/* Fahim Shahriar portfolio. Brutalist: raw grid, thick black lines, hard shadows, one electric blue.
   Space Grotesk for voice, Space Mono for anything the machine says. */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('/assets/fonts/grotesk-latin.woff2') format('woff2'); }
@font-face { font-family: 'Dela Gothic One'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/display.woff2') format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/mono-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/mono-700.woff2') format('woff2'); }

:root {
    --paper: #ecebf5;
    --surface: #ffffff;
    --ink: #14111f;
    --deep: #14111f;
    --on-deep: #ffffff;
    --accent: #5b2eff;
    --on-accent: #ffffff;
    --tint: #ddd6ff;
    --good: #2ee59d;
    --bad: #ff5c7a;
    --soft-on-deep: #cfcadf;
    --accent-on-deep: #b7a2ff;
    --m: clamp(16px, 3vw, 40px);
    --gap: clamp(64px, 9vw, 130px);
    --line: 3px solid var(--ink);
    --shadow: 6px 6px 0 var(--ink);
    --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Dela Gothic One', 'Space Grotesk', 'Space Grotesk', system-ui, sans-serif;
    --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
    --step-small: 0.9rem;
    --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
    --step-lead: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
    --step-head: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
}
:root[data-theme="dark"] {
    --paper: #0e0c16;
    --surface: #181525;
    --ink: #f1eeff;
    --deep: #050408;
    --on-deep: #f1eeff;
    --accent: #7a4dff;
    --on-accent: #ffffff;
    --tint: #261f4d;
    --good: #2ee59d;
    --bad: #ff5c7a;
    --soft-on-deep: #b9b3cf;
    --accent-on-deep: #b7a2ff;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #0e0c16;
        --surface: #181525;
        --ink: #f1eeff;
        --deep: #050408;
        --on-deep: #f1eeff;
        --accent: #7a4dff;
        --on-accent: #ffffff;
        --tint: #261f4d;
        --good: #2ee59d;
        --bad: #ff5c7a;
        --soft-on-deep: #b9b3cf;
        --accent-on-deep: #b7a2ff;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
p, h1, h2, h3, ul, ol, figure, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--m); top: -80px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

main > section, .bar { padding-left: var(--m); padding-right: var(--m); }
h2 { font-family: var(--display); font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.5rem); font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; max-width: 20ch; }

/* Buttons: a slab that presses into its shadow */
.btn { display: inline-block; font: 700 1rem/1 var(--sans); text-decoration: none; color: var(--on-accent); background: var(--accent); border: var(--line); padding: 16px 24px; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s ease-out, box-shadow 0.15s ease-out; }
.btn:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--ink); }
.btn.alt { background: var(--surface); color: var(--ink); }
.mode { font: 700 0.9rem/1 var(--sans); color: var(--ink); background: var(--surface); border: 2px solid var(--ink); padding: 8px 12px; cursor: pointer; }
.mode:hover { background: var(--tint); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Top bar */
.bar { display: flex; align-items: center; gap: 20px; border-bottom: var(--line); background: var(--surface); min-height: 64px; position: sticky; top: 0; z-index: 20; transform: translateZ(0); }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.open { font: 400 0.85rem/1 var(--mono); display: flex; align-items: center; gap: 8px; }
.open i { width: 10px; height: 10px; background: var(--good); border: 2px solid var(--ink); display: block; }
.bar nav { display: flex; gap: 6px; }
.bar nav a { font-weight: 600; text-decoration: none; padding: 8px 12px; border: 2px solid transparent; }
.bar nav a:hover { border-color: var(--ink); background: var(--tint); }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 32px; row-gap: 40px; align-items: start; padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(48px, 7vw, 100px); }
.hero-main { grid-column: 1 / span 7; }
.monument { font-family: var(--display); font-size: clamp(3rem, 9.6vw, 10rem); font-weight: 400; line-height: 1; letter-spacing: -0.02em; }
.monument span { display: block; }
.monument span + span { color: var(--accent); }
.lead { font-size: var(--step-lead); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; margin-top: clamp(24px, 3vw, 40px); max-width: 22ch; }
.sub { margin-top: 14px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 16px 20px; margin-top: 32px; }

/* Request / response panel */
.reqres { grid-column: 8 / span 5; background: var(--deep); color: var(--on-deep); border: var(--line); box-shadow: 8px 8px 0 var(--accent); margin-top: clamp(0px, 3vw, 40px); }
.rr-top { display: flex; justify-content: space-between; background: var(--accent); color: var(--on-accent); font: 700 0.9rem/1 var(--mono); padding: 12px 16px; border-bottom: var(--line); }
.reqres pre { font: 400 0.85rem/1.75 var(--mono); padding: 18px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rr-cap { font-size: 0.9rem; padding: 14px 16px; border-top: 2px dashed var(--on-deep); color: var(--soft-on-deep); }
.rr-cap a { color: var(--on-deep); font-weight: 700; }

/* Band */
.marquee { overflow: hidden; background: var(--accent); color: var(--on-accent); border-top: var(--line); border-bottom: var(--line); }
.track { display: flex; width: max-content; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1; padding: 18px 0; animation: slide 40s linear infinite; will-change: transform; }
.track span { white-space: nowrap; }
@keyframes slide { to { transform: translateX(-25%); } }

/* Work */
.work { padding-top: var(--gap); }
.work > h2 { margin-bottom: clamp(32px, 5vw, 64px); }
.proj { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 32px; row-gap: 24px; background: var(--surface); border: var(--line); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 40px); margin-bottom: clamp(32px, 4vw, 56px); }
.proj:nth-of-type(even) { background: var(--tint); }
.proj h3 { grid-column: 1 / span 5; font-family: var(--display); font-size: clamp(1.9rem, 3.3vw, 3.1rem); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; }
.proj-body { grid-column: 6 / span 7; display: grid; gap: 16px; max-width: 40em; }
.sec { background: var(--deep); color: var(--on-deep); padding: 14px 16px; border-left: 8px solid var(--accent); }
.sec strong { display: block; font: 700 0.85rem/1 var(--mono); margin-bottom: 8px; color: var(--accent-on-deep); }
.links { display: flex; flex-wrap: wrap; gap: 12px 24px; font-weight: 700; }
.shots { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.shots img { border: 2px solid var(--ink); background: var(--deep); }

/* Audit */
.flip { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 32px; row-gap: 32px; margin-top: var(--gap); }
.audit { background: var(--deep); color: var(--on-deep); padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); margin-top: var(--gap); border-top: var(--line); border-bottom: var(--line); }
.audit-head { grid-column: 1 / span 5; display: grid; gap: 20px; align-content: start; }
.audit-head p { color: var(--soft-on-deep); max-width: 28em; }
.audit .btn { justify-self: start; color: var(--on-accent); box-shadow: 6px 6px 0 var(--on-deep); border-color: var(--on-deep); }
.audit .btn:hover { box-shadow: 3px 3px 0 var(--on-deep); }
.audit-note { font: 400 0.9rem/1.5 var(--mono); min-height: 3em; color: var(--on-deep) !important; }
.checks { grid-column: 6 / span 7; border: 3px solid var(--on-deep); }
.checks li { display: grid; grid-template-columns: 1.3fr 1.2fr auto; gap: 8px 16px; align-items: center; padding: 14px 16px; border-bottom: 2px solid var(--on-deep); }
.checks li:last-child { border-bottom: 0; }
.checks .n { font: 700 0.85rem/1.3 var(--mono); overflow-wrap: anywhere; }
.checks .d { font-size: 0.9rem; color: var(--soft-on-deep); }
.checks .r { font: 700 0.85rem/1 var(--mono); padding: 7px 10px; border: 2px solid var(--on-deep); white-space: nowrap; }
.checks li.ok .r { background: var(--good); border-color: var(--good); color: #000; }
.checks li.no .r { background: var(--bad); border-color: var(--bad); color: #000; }

/* Services */
.services { padding-top: var(--gap); }
.services h2 { margin-bottom: clamp(28px, 4vw, 48px); }
.table { border: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.grp { background: var(--accent); color: var(--on-accent); font: 700 1rem/1 var(--mono); padding: 12px 16px; border-bottom: var(--line); }
.row { display: grid; grid-template-columns: 1.1fr 1.2fr 1.2fr; gap: 8px 24px; padding: 16px; border-bottom: 2px solid var(--ink); }
.row:last-child { border-bottom: 0; }
.grp:not(:first-child) { border-top: var(--line); }
.row span:first-child { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.row span:nth-child(2) { font-family: var(--mono); font-size: 0.85rem; }

/* Process */
.process { display: block; }
.process .col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: var(--line); background: var(--surface); box-shadow: var(--shadow); counter-reset: step; }
.process h2 { grid-column: 1 / -1; padding: clamp(20px, 3vw, 36px); border-bottom: var(--line); max-width: none; background: var(--tint); }
.process p { padding: clamp(18px, 2.4vw, 28px); border-right: 2px solid var(--ink); counter-increment: step; }
.process p:last-child { border-right: 0; }
.process p strong { display: block; font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.process p::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--accent); color: var(--on-accent); font: 700 0.95rem/1 var(--mono); margin-bottom: 14px; border: 2px solid var(--ink); }

/* About */
.about { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 32px; row-gap: 28px; padding-top: var(--gap); align-items: start; }
.facts { grid-column: 1 / span 5; border: var(--line); background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow); }
.facts li { padding: 18px 20px; font-weight: 700; font-size: 1.2rem; line-height: 1.25; border-bottom: 2px solid var(--on-accent); }
.facts li:last-child { border-bottom: 0; }
.bio { grid-column: 7 / span 6; display: grid; gap: 20px; font-size: clamp(1.15rem, 1.5vw, 1.45rem); line-height: 1.4; }
.bio p:last-child { font-size: var(--step-body); font-family: var(--mono); line-height: 1.7; }

/* Contact rows */
.contact { padding-top: var(--gap); }
.crow { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: clamp(64px, 7vw, 92px); padding: 0 clamp(16px, 2vw, 28px); border: var(--line); border-top-width: 0; background: var(--surface); text-decoration: none; font-family: var(--display); font-size: clamp(1.6rem, 3.3vw, 3rem); font-weight: 400; letter-spacing: -0.02em; transition: background 0.15s ease-out, color 0.15s ease-out; }
.crow:first-of-type { border-top-width: 3px; }
.crow em { font: 400 clamp(0.85rem, 1.1vw, 1rem)/1.2 var(--mono); letter-spacing: 0; font-style: normal; text-align: right; overflow-wrap: anywhere; }
.crow:hover { background: var(--accent); color: var(--on-accent); }
.crow.hello { background: var(--deep); color: var(--on-deep); }
.crow.hello:hover { background: var(--accent); }

/* Form */
.form-sec { align-items: start; }
.form-intro { grid-column: 1 / span 5; display: grid; gap: 18px; }
.form-intro p { max-width: 28em; }
.form { grid-column: 7 / span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: var(--step-small); }
.form .wide { grid-column: 1 / -1; }
.form input:not(.sr-only), .form textarea { font: 400 1rem/1.4 var(--mono); color: var(--ink); background: var(--surface); border: var(--line); border-radius: 0; padding: 13px 14px; width: 100%; }
.form input:focus, .form textarea:focus { outline: none; background: var(--tint); box-shadow: 4px 4px 0 var(--accent); }
.form input.sr-only { width: 1px; padding: 0; border: 0; }
.form .btn { justify-self: start; }
.status { grid-column: 1 / -1; min-height: 1.5em; font: 700 0.95rem/1.4 var(--mono); }
.status.err { color: #c0201a; }

/* Footer */
.foot { background: var(--deep); color: var(--on-deep); margin-top: var(--gap); padding: clamp(40px, 6vw, 80px) var(--m) 28px; border-top: var(--line); }
.foot-name { font-family: var(--display); font-size: 9.4vw; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.legal { margin-top: 28px; font: 400 0.85rem/1.6 var(--mono); color: var(--soft-on-deep); max-width: 60em; }
.foot :focus-visible { outline-color: var(--on-deep); }

/* Snap-in reveal */
.js .rise { opacity: 0; transform: translate3d(-18px, 18px, 0); will-change: opacity, transform; }
.js .rise.in { opacity: 1; transform: none; transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); will-change: auto; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .track { animation: none; }
    .js .rise { opacity: 1; transform: none; }
    .btn, .crow { transition: none; }
}

@media (max-width: 960px) {
    .hero, .proj, .audit, .about, .form-sec { display: block; }
    .hero-main, .reqres { grid-column: auto; }
    .reqres { margin-top: 40px; }
    .proj h3 { margin-bottom: 16px; }
    .proj-body { max-width: none; }
    .audit-head { margin-bottom: 32px; }
    .form { margin-top: 28px; }
    .facts { margin-bottom: 28px; }
    .shots { grid-template-columns: repeat(2, 1fr); margin-top: 24px; }
    .process .col { grid-template-columns: 1fr 1fr; }
    .process p:nth-of-type(2) { border-right: 0; }
    .process p:nth-of-type(-n+2) { border-bottom: 2px solid var(--ink); }
    .row { grid-template-columns: 1fr 1fr; }
    .row span:last-child { grid-column: 1 / -1; }
    .hide-s { display: none; }
}

@media (max-width: 600px) {
    .bar { gap: 10px; min-height: 56px; }
    .open { display: none; }
    .monument { font-size: 15vw; }
    .lead { max-width: none; }
    .btn { padding: 14px 18px; }
    .shots { grid-template-columns: 1fr; }
    .checks li { grid-template-columns: 1fr auto; }
    .checks .d { grid-column: 1 / -1; order: 3; }
    .process .col { grid-template-columns: 1fr; }
    .process p { border-right: 0; border-bottom: 2px solid var(--ink); }
    .process p:last-child { border-bottom: 0; }
    .row { grid-template-columns: 1fr; }
    .crow { font-size: 1.7rem; min-height: 64px; }
    .crow em { display: none; }
    .form { grid-template-columns: 1fr; }
    .foot-name { font-size: 10.4vw; }
}
