/* ───────────────────────── FONTS (self-hosted, OFL) ───────────────────────── */
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('/assets/fonts/instrument-serif-italic-latin.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/instrument-serif-latin.woff2') format('woff2'); }
@font-face { font-family: 'Host Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/assets/fonts/host-grotesk-latin.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 500; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2'); }

/* ───────────────────────── TOKENS ───────────────────────── */
:root {
  --black: #0a0a0a;
  --ink: #0d0d0d;
  --ink-2: #121110;
  --warm: #161412;
  --white: #f2f0eb;
  --dim: #6b6b6b;
  --muted: #8a8a8a;
  --line: #1f1f1f;
  --line-2: #2a2a2a;
  --accent: #e8e0d0;
  --k8s: #326ce5;
  --ok: #4ade80;
  --font-display: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font-heading: 'Host Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --pad-x: 3rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 5.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  background: #000;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: #000;
  color: var(--white);
  font-family: var(--font-mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.preloading { overflow: hidden; height: 100vh; }

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--white); color: var(--black); }

@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor [role="button"] { cursor: none; }
}

:focus-visible { outline: 1px dashed var(--white); outline-offset: 4px; }

/* ───────────────────────── PRELOADER ───────────────────────── */
#preloader {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--black);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 2.5rem var(--pad-x);
}
#preloader-label { display: flex; flex-direction: column; gap: 0.8rem; }
#preloader-text {
  font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--dim);
}
#preloader-text::after { content: '_'; animation: blink 1s steps(1) infinite; }
#preloader-bar { width: min(260px, 40vw); height: 1px; background: #222; position: relative; overflow: hidden; }
#preloader-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--white); }
#preloader-pct {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(5rem, 16vw, 14rem); line-height: 0.8; letter-spacing: -0.04em;
  color: var(--white); font-variant-numeric: tabular-nums;
}
@keyframes blink { 50% { opacity: 0; } }

/* ───────────────────────── MOTION SCREEN ───────────────────────── */
#motion-screen {
  position: fixed; inset: 0; z-index: 9500;
  background: var(--black);
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
}
#motion-screen.show { display: flex; }
.motion-inner { max-width: 320px; display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.motion-icon { font-size: 2rem; color: var(--white); animation: pulse 2.4s ease-in-out infinite; }
.motion-eyebrow { font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }
.motion-title { font-family: var(--font-display); font-style: italic; font-size: 2.4rem; line-height: 1.05; }
.motion-body { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 300; color: #aaa; line-height: 1.6; }
.motion-divider { height: 1px; background: var(--line-2); margin: 0.5rem 0; }
.motion-btn {
  padding: 1rem; background: var(--white); color: var(--black);
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.motion-skip { padding: 0.6rem; font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }

/* ───────────────────────── CURSOR ───────────────────────── */
#cursor {
  position: fixed; top: 0; left: 0; z-index: 10000;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--white);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease-out), height .3s var(--ease-out), background .3s, box-shadow .3s, opacity .3s;
  display: none; align-items: center; justify-content: center;
  mix-blend-mode: difference;
}
body.has-cursor #cursor { display: flex; }
#cursor.hover { width: 40px; height: 40px; background: transparent; box-shadow: inset 0 0 0 1px rgba(242,240,235,.6); }
#cursor.view { width: 76px; height: 76px; background: var(--white); mix-blend-mode: normal; }
#cursor.view::after {
  content: 'VIEW'; font-family: var(--font-heading); font-size: .55rem; font-weight: 500;
  letter-spacing: .18em; color: var(--black);
}
#cursor.hidden { opacity: 0; }

/* ───────────────────────── TOOLTIPS ───────────────────────── */
#loc-tooltip, #math-tooltip {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; opacity: 0;
  background: rgba(14,14,14,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  padding: 1rem 1.1rem; width: 260px;
  transform: translate(-50%, calc(-100% - 18px)) scale(.96);
  transition: opacity .25s ease, transform .25s var(--ease-out);
}
#loc-tooltip.show, #math-tooltip.show { opacity: 1; transform: translate(-50%, calc(-100% - 18px)) scale(1); }
.lt-pin, .tt-eyebrow { font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: .5rem; }
.lt-eyebrow { font-size: .55rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.lt-name { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; line-height: 1.1; margin: .2rem 0 .3rem; }
.lt-sub { font-family: var(--font-heading); font-size: .75rem; color: #aaa; line-height: 1.5; }
.lt-divider, .tt-divider { height: 1px; background: var(--line-2); margin: .7rem 0; }
.lt-coords { font-size: .65rem; color: var(--dim); margin-top: .5rem; letter-spacing: .05em; }
#math-tooltip { width: 300px; transform: translate(0, 18px) scale(.96); }
#math-tooltip.show { transform: translate(0, 18px) scale(1); }
.tt-title { font-family: var(--font-heading); font-size: .8rem; color: #ccc; line-height: 1.5; }
.tt-math { font-size: .7rem; line-height: 1.9; color: #bbb; }
.tt-math .hl { color: var(--white); }
.tt-math .val { color: var(--dim); }
.tt-footer { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* ───────────────────────── LAYOUT ───────────────────────── */
.page { min-height: 100vh; display: flex; flex-direction: column; background: var(--black); overflow-x: clip; max-width: 100vw; }
main { display: block; }

.eyebrow {
  font-size: .78rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 2rem;
}
.section-heading {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(3rem, 8vw, 8rem); line-height: .95; letter-spacing: -0.035em;
  color: var(--white); margin-bottom: 1.6rem;
  display: inline-block; position: relative;
}
.section-heading .h-char { display: inline-block; will-change: transform; }
.section-desc {
  font-family: var(--font-heading); font-size: .98rem; color: var(--muted);
  line-height: 1.7; max-width: 52ch; margin-bottom: 3.5rem; letter-spacing: .01em;
}

/* ───────────────────────── HEADER ───────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 2rem var(--pad-x);
  pointer-events: none;
  transition: transform .5s var(--ease-out);
}
.site-header > * { pointer-events: auto; }
.site-header::before {
  content: ''; position: absolute; inset: 0 0 -40% 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,10,10,.96) 0%, rgba(10,10,10,.82) 55%, rgba(10,10,10,0) 100%);
  opacity: 0; transition: opacity .4s;
}
.site-header.scrolled::before { opacity: 1; }
.site-header.tucked { transform: translateY(-110%); }
.logo {
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem;
  letter-spacing: -0.01em; text-decoration: none; color: var(--white); opacity: .85;
}
.main-nav { display: flex; gap: 2.5rem; align-items: center; }
.nav-link { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; }
.nav-dot { width: 5px; height: 5px; border: 1px solid #444; border-radius: 50%; transition: background .2s, border-color .2s; }
.nav-label { font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--dim); transition: color .2s; }
.nav-line { display: block; width: 100%; min-width: 80px; height: 1px; background: var(--line-2); position: relative; }
.nav-line-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--white); }
.nav-link:hover .nav-dot, .nav-link.active .nav-dot { background: var(--white); border-color: var(--white); }
.nav-link:hover .nav-label, .nav-link.active .nav-label { color: var(--white); }
.nav-icons { display: flex; align-items: center; gap: 1.1rem; margin-left: .5rem; }
.nav-icon { color: var(--dim); display: flex; position: relative; transition: color .2s; }
.nav-icon:hover { color: var(--white); }
.nav-icon::after {
  content: attr(aria-label); position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translate(-50%, -4px);
  font-size: .55rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--black); background: var(--white); padding: .3rem .6rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.nav-icon:hover::after { opacity: 1; transform: translate(-50%, 0); }
.mob-actions { display: none; }

/* mobile menu */
.mob-menu {
  position: fixed; inset: 0; z-index: 190;
  background: var(--black);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 7rem 1.25rem 2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease-out);
  visibility: hidden;
}
.mob-menu.open { clip-path: inset(0 0 0 0); visibility: visible; }
.mob-menu nav { display: flex; flex-direction: column; }
.mob-menu nav a {
  font-family: var(--font-display); font-style: italic; font-size: 3.4rem; line-height: 1.15;
  text-decoration: none; display: flex; align-items: baseline; gap: 1rem;
  border-bottom: 1px solid var(--line); padding: .5rem 0;
}
.mob-menu nav a span { font-family: var(--font-mono); font-style: normal; font-size: .7rem; color: var(--dim); }
.mob-menu-foot { display: flex; justify-content: space-between; font-size: .7rem; color: var(--dim); gap: 1rem; flex-wrap: wrap; }
.mob-menu-foot a { text-decoration: none; color: var(--white); }

/* ───────────────────────── HERO ───────────────────────── */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--ink); z-index: 4; }
.parallax-field { position: absolute; inset: 0; pointer-events: none; }
.pimg {
  position: absolute; overflow: hidden; border-radius: 2px;
  opacity: 0; will-change: transform;
  background: #111;
}
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pimg.small img { opacity: .5; transition: opacity .6s ease; }
.hero:hover .pimg.small img { opacity: .7; }

.tile-term { background: #0b0d10; border: 1px solid #1c1f24; display: flex; flex-direction: column; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #1c1f24; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a2d33; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: auto; font-size: .55rem; color: #555; letter-spacing: .08em; }
.term-bar { padding-left: 1.6rem; }
.term-body {
  flex: 1; min-height: 0; padding: 12px 14px 14px 2rem; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.term-body pre {
  font-family: var(--font-mono); font-size: clamp(.5rem, .7vw, .7rem); line-height: 1.75;
  color: #9aa4b2; white-space: pre;
}
.term-body .p { color: var(--ok); }
.term-body .ok { color: var(--ok); }
.term-body .w { color: var(--white); }
.term-body .cur { display: inline-block; width: .55em; height: 1.05em; background: #9aa4b2; vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }

.tile-halftone { background: #0f0f0f; }
.tile-halftone img { object-fit: contain; object-position: bottom center; }
.tile-cap {
  position: absolute; left: 10px; bottom: 8px;
  font-size: .5rem; letter-spacing: .14em; text-transform: uppercase; color: #555;
}
.tile-logo {
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--glow) 35%, transparent), transparent 70%), #101010;
  display: flex; align-items: center; justify-content: center;
}
.tile-logo img { width: 52%; height: 52%; object-fit: contain; opacity: .9 !important; }
.tile-portrait {
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(242,240,235,.16), transparent 60%),
    linear-gradient(180deg, #151515, #0b0b0b);
}
.tile-portrait img { object-fit: cover; object-position: 50% 8%; }
.tile-clock {
  background:
    radial-gradient(90% 80% at 80% 100%, rgba(201,162,39,.22), transparent 65%),
    linear-gradient(160deg, #141210, #0c0b0a);
  border: 1px solid #1d1a16;
}
.clock-inner { position: absolute; inset: 0; padding: 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; }
.clock-label { font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: #6f675a; }
.clock-time { font-family: var(--font-display); font-style: italic; font-size: clamp(2.4rem, 4.6vw, 4.6rem); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.clock-time em { font-family: var(--font-mono); font-style: normal; font-size: .6rem; letter-spacing: .14em; color: #6f675a; margin-left: .5rem; vertical-align: super; }
.clock-coords { font-size: .6rem; color: #6f675a; line-height: 1.7; }
.clock-logo { width: 58% !important; height: auto !important; margin-top: auto; opacity: .85; }

.invert-dark { filter: invert(1) hue-rotate(180deg) brightness(1.1); }

.hero-text {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: .5rem; pointer-events: none;
  padding-bottom: 18vh;
}
.hero-name-clip { overflow: hidden; padding: 0 .1em .18em; line-height: 1; }
.hero-name {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(3.6rem, 9.5vw, 9.5rem); line-height: 1.02; letter-spacing: -0.035em;
  color: #fff; mix-blend-mode: difference; white-space: nowrap;
}
.hero-name .ch { display: inline-block; will-change: transform; }
.hero-roles {
  font-family: var(--font-heading); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase;
  color: #8f8f8f; display: flex; gap: .6em; align-items: center;
}
.hero-roles .sep { font-size: 1.6em; line-height: 1; letter-spacing: 0; }
.hero-sub {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #9a9a9a;
  line-height: 1.9; margin-top: .9rem; pointer-events: auto;
}
.loc-trigger {
  color: var(--white); border-bottom: 1px dotted #666; cursor: help; padding-bottom: 1px;
}
.hero-foot {
  position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 2rem; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
  pointer-events: none;
}
.status {
  display: inline-flex; align-items: center; gap: .6rem;
  border: 1px solid #2a2a2a; padding: .45rem .8rem; background: rgba(10,10,10,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
.scroll-hint { display: inline-flex; align-items: center; gap: .8rem; }
.scroll-line { width: 48px; height: 1px; background: #333; position: relative; overflow: hidden; }
.scroll-line::after { content: ''; position: absolute; inset: 0; background: var(--white); transform: translateX(-100%); animation: scan 2.2s var(--ease-out) infinite; }
@keyframes scan { to { transform: translateX(100%); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* pre-reveal states (JS only) */
.js .reveal { opacity: 0; transform: translateY(14px); }

/* ───────────────────────── WHAT I DO ───────────────────────── */
.philosophy-section {
  padding: 9rem var(--pad-x); background: var(--ink); border-top: 1px solid #1a1a1a;
  position: relative; z-index: 3;
}
.philosophy-inner { display: grid; grid-template-columns: 55fr 45fr; gap: 6rem; align-items: start; }
.reveal-text {
  font-family: var(--font-heading); font-weight: 300;
  font-size: clamp(1.45rem, 2.7vw, 3.1rem); line-height: 1.22; letter-spacing: .01em;
  color: #aaa;
}
.reveal-text em { font-family: var(--font-display); font-style: italic; font-size: 1.12em; }
.reveal-text .rc { opacity: .14; transition: none; }
.reveal-text .rc.hi { color: var(--white); }
.expertise-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; }
.expertise-card {
  padding: 1.6rem 1.4rem;
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  transition: background .3s;
}
.expertise-card:nth-child(even) { border-right: none; }
.expertise-card:nth-last-child(-n+2) { border-bottom: none; }
.ecard-icon {
  display: block; width: 32px; height: 32px; margin-bottom: 1.2rem; color: var(--white);
  transition: color .3s, transform .4s cubic-bezier(.34,1.56,.64,1);
}
.ecard-icon svg { width: 100%; height: 100%; }
.ecard-title {
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem; line-height: 1.05;
  margin-bottom: .8rem; transition: color .3s;
}
.ecard-list { list-style: none; display: flex; flex-direction: column; gap: .2rem; }
.ecard-list li {
  font-family: var(--font-heading); font-size: .82rem; font-weight: 300; color: #aaa;
  line-height: 1.6; padding-left: 1.1em; position: relative; transition: color .3s;
}
.ecard-list li::before { content: ''; position: absolute; left: 0; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
@media (hover: hover) {
  .expertise-list:has(.expertise-card:hover) .expertise-card:not(:hover) :is(.ecard-icon, .ecard-title, .ecard-list li) { color: #333; }
  .expertise-card:hover { background: #181818; }
  .expertise-card:hover .ecard-icon { transform: scale(1.15); }
  .expertise-card:hover .ecard-list li { color: var(--white); }
}

/* mono logos via mask so they inherit currentColor */
.mono-logo {
  display: inline-block; background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat;
}

/* ───────────────────────── FEATURED (9 CARDS) ───────────────────────── */
.featured-section {
  padding: 8rem var(--pad-x) 6rem; background: var(--black); position: relative; z-index: 3;
  border-top: 1px solid #1a1a1a;
}
.featured-rows { display: flex; flex-direction: column; gap: 3.2rem; }
.featured-row { display: flex; gap: 1.2rem; }
.fcard { flex: 2; min-width: 0; display: flex; flex-direction: column; gap: 1rem; outline-offset: 6px; }
.fv {
  position: relative; height: clamp(260px, 24vw, 400px); overflow: hidden; border-radius: 2px;
  background: var(--c2, #111); isolation: isolate;
  transform-style: preserve-3d;
}
.fv-bg {
  position: absolute; inset: -10%; z-index: -2;
  background:
    radial-gradient(60% 70% at 50% 58%, color-mix(in srgb, var(--c1) 42%, transparent), transparent 70%),
    radial-gradient(40% 40% at 85% 10%, color-mix(in srgb, var(--c1) 18%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--c2) 90%, #000), #070707);
  transform: translate3d(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -16px), 0) scale(var(--bs, 1));
  transition: transform 1.2s var(--ease-out), opacity .6s;
  opacity: .85;
}
.fv-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 28px 28px; background-position: center;
  -webkit-mask: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  mask: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
.fv::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .09; mix-blend-mode: overlay;
}
.fv-tag, .fv-meta {
  position: absolute; top: 1rem; z-index: 3;
  font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(242,240,235,.55);
}
.fv-tag { left: 1.1rem; }
.fv-meta { right: 1.1rem; }
.fv-center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 3rem 1.5rem;
  transform: translate3d(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 10px), 0) scale(var(--s, 1));
  transition: transform .9s var(--ease-out);
}
.fv-logo { width: auto; height: clamp(56px, 6vw, 96px); object-fit: contain; filter: drop-shadow(0 10px 30px rgba(0,0,0,.45)); }
.fv-logo.sm { height: clamp(44px, 4.2vw, 64px); }
.fv-logo.wide { height: auto; width: min(78%, 360px); }
.fv-duo { gap: clamp(.8rem, 1.6vw, 1.6rem); }
.fv-duo .fv-logo { height: clamp(48px, 5vw, 84px); max-width: 42%; }
.fv-x { font-family: var(--font-display); font-style: italic; font-size: 2rem; color: rgba(242,240,235,.5); }
.fv-mono { width: clamp(48px, 5vw, 84px); height: clamp(48px, 5vw, 84px); color: var(--white); }
.fv-brand { display: flex; align-items: center; gap: 1rem; }
.fv-wordmark { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.6rem); letter-spacing: .02em; color: var(--white); }
.fv-plate {
  background: var(--white); padding: 1.1rem 1.5rem; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; width: min(78%, 360px);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.fv-plate .fv-logo.wide { width: 100%; filter: none; }
.fv-term {
  position: absolute; left: 1.1rem; bottom: 1rem; z-index: 3;
  font-family: var(--font-mono); font-size: .62rem; line-height: 1.7; color: rgba(242,240,235,.6); white-space: pre;
}
.fv-term b { color: var(--ok); font-weight: 400; }
.fv-chips { position: absolute; left: 1.1rem; bottom: 1rem; z-index: 3; display: flex; gap: .55rem; align-items: center; }
.fv-chips img {
  height: 26px; width: 26px; object-fit: contain; padding: 5px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 6px;
}
.fv-chips img.chip-wide { width: auto; height: 30px; padding: 6px 8px; }
.fv-pills { position: absolute; left: 1.1rem; bottom: 1rem; z-index: 3; display: flex; gap: .4rem; }
.fv-pills span {
  font-size: .55rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,240,235,.7);
  border: 1px solid rgba(242,240,235,.18); padding: .3rem .55rem; border-radius: 999px;
}
.fv-stat { flex-direction: column; gap: .3rem; text-align: center; }
.stat-num {
  font-family: var(--font-display); font-style: italic; font-size: clamp(4.5rem, 8vw, 8rem); line-height: .9;
  color: var(--white); letter-spacing: -0.04em;
  text-shadow: 0 0 60px color-mix(in srgb, var(--c1) 50%, transparent);
}
.stat-label { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(242,240,235,.6); max-width: 26ch; line-height: 1.6; }
.fv-type {
  position: absolute; left: 1.1rem; bottom: 1rem; z-index: 3;
  font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,240,235,.6);
  display: flex; align-items: center; gap: .6rem;
}
.fv-type span {
  font-family: var(--font-display); font-style: italic; font-size: 1.1rem; letter-spacing: 0; text-transform: none;
  color: var(--accent); border: 1px solid rgba(242,240,235,.25); padding: .05rem .45rem; border-radius: 3px;
}
.fv-chat {
  display: flex; flex-direction: column; gap: .5rem; width: min(80%, 300px);
  background: rgba(8,20,19,.75); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: .9rem;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.chat-head { font-size: .55rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,240,235,.55); display: flex; align-items: center; gap: .45rem; }
.chat-head i { width: 6px; height: 6px; border-radius: 50%; background: #2dd4bf; animation: pulse 2s infinite; }
.chat-bubble {
  align-self: flex-end; font-family: var(--font-heading); font-size: .78rem; color: var(--black);
  background: var(--white); padding: .45rem .7rem; border-radius: 10px 10px 2px 10px;
}
.chat-bubble.me { align-self: flex-start; background: rgba(45,212,191,.16); color: var(--white); border-radius: 10px 10px 10px 2px; }
.chat-bubble.typing { display: flex; gap: 4px; padding: .6rem .7rem; }
.chat-bubble.typing i { width: 5px; height: 5px; border-radius: 50%; background: #5eead4; animation: typing 1.2s infinite; }
.chat-bubble.typing i:nth-child(2) { animation-delay: .15s; } .chat-bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }
.fv-weather { position: absolute; right: 1.1rem; bottom: .9rem; z-index: 3; text-align: right; display: flex; flex-direction: column; }
.w-temp { font-family: var(--font-display); font-style: italic; font-size: 2.4rem; line-height: 1; color: var(--white); }
.w-city { font-size: .55rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,240,235,.55); }
.fv-score {
  position: absolute; right: 1.1rem; bottom: .7rem; z-index: 3;
  font-family: var(--font-mono); font-size: .8rem; color: rgba(242,240,235,.55);
}
.fv-score span { font-family: var(--font-display); font-style: italic; font-size: 2.6rem; color: var(--white); }

.fcaption { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.fcaption-left { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.fcaption-title {
  font-family: var(--font-heading); font-size: 1.05rem; font-weight: 400; color: #bbb;
  line-height: 1.3; transition: color .3s;
}
.fcaption-sub { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcaption-year { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; transition: color .3s; }
@media (hover: hover) {
  .fcard:hover { --s: 1.05; --bs: 1.08; }
  .fcard:hover .fv-bg { opacity: 1; }
  .fcard:hover .fcaption-title, .fcard:hover .fcaption-year { color: var(--white); }
  .featured-row:has(.fcard:hover) .fcard:not(:hover) .fv { filter: saturate(.4) brightness(.6); }
}
.fv { transition: filter .6s var(--ease-out); }

/* ───────────────────────── CREDENTIALS ───────────────────────── */
.work-section { padding: 7rem var(--pad-x) 4rem; background: var(--warm); position: relative; z-index: 3; }
.project-list { list-style: none; }
.project-row {
  display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 2rem;
  padding: 1.5rem 0; border-bottom: 1px solid #252220; position: relative;
  transition: border-color .3s;
}
.project-row:first-child { border-top: 1px solid #252220; }
.project-index { font-size: .9rem; letter-spacing: .1em; color: #444; transition: color .3s; }
.project-name {
  font-family: var(--font-heading); font-size: clamp(1.15rem, 2.2vw, 2rem); font-weight: 300; color: #aaa;
  display: flex; flex-direction: column; gap: .45rem; transition: transform .45s var(--ease-out), color .3s;
}
.project-sub { display: flex; flex-wrap: wrap; gap: .5rem; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.sub-dot { opacity: .6; }
.project-year { font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.project-thumb { display: none; }
@media (hover: hover) {
  .project-row:hover { border-bottom-color: #3a3632; }
  .project-row:hover .project-name { transform: translateX(.6rem); color: var(--white); }
  .project-row:hover .project-index { color: var(--white); }
  .project-list:has(.project-row:hover) .project-row:not(:hover) .project-name { color: #555; }
}
#row-preview {
  position: fixed; top: 0; left: 0; z-index: 60; pointer-events: none;
  width: 260px; height: 170px; border-radius: 4px; overflow: hidden;
  opacity: 0; transform: translate(-50%, -50%) scale(.85);
  transition: opacity .3s, transform .4s var(--ease-out);
}
#row-preview.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.rp-inner {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(70% 80% at 50% 60%, color-mix(in srgb, var(--rc, #888) 45%, transparent), transparent 75%), #0e0d0c;
  border: 1px solid #2a2622;
}
.rp-inner img { max-width: 62%; max-height: 46%; object-fit: contain; }

/* ───────────────────────── STACK MARQUEE ───────────────────────── */
.stack-section { background: var(--warm); padding: 2rem 0 6rem; position: relative; z-index: 3; overflow: hidden; }
.marquee {
  display: flex; overflow: hidden; border-top: 1px solid #252220; border-bottom: 1px solid #252220;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; flex-shrink: 0; gap: 3.5rem; padding: 1.6rem 1.75rem; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-item {
  display: inline-flex; align-items: center; gap: .8rem; white-space: nowrap;
  font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2.2rem); color: #7d7770;
  transition: color .3s;
}
.mq-item:hover { color: var(--white); }
.mq-item .mono-logo { width: 1.4em; height: 1.4em; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ───────────────────────── ABOUT ───────────────────────── */
.about-section {
  padding: 8rem var(--pad-x); background: var(--ink); border-top: 1px solid #1a1a1a;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 6rem; position: relative; z-index: 3;
}
.about-left { position: sticky; top: 7rem; align-self: start; }
.about-text { font-size: clamp(1.3rem, 2.2vw, 2.4rem); margin-top: 1rem; }
.lang-list { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 3rem; }
.lang-list li {
  display: flex; flex-direction: column; gap: .2rem; padding: .8rem .9rem; flex: 1 1 0; min-width: 104px;
  border: 1px solid var(--line-2); transition: background .3s, border-color .3s;
}
.lang-list li:hover { background: #161616; border-color: #3a3a3a; }
.lang-hi { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; line-height: 1.1; }
.lang-lv { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.about-right { display: flex; flex-direction: column; }
.about-photo-wrap {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; margin-bottom: 2.5rem;
  background: #111;
}
.about-photo-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 55% at 50% 72%, rgba(232,224,208,.28), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, #1a1815, #0c0b0a);
}
.about-photo {
  position: absolute; left: 50%; bottom: 0; width: 100%; height: 92%;
  object-fit: contain; object-position: bottom center; transform: translateX(-50%);
  transition: opacity .8s var(--ease-out);
}
.about-photo-color { opacity: 0; }
.has-gyro .about-photo { transform: translate3d(calc(-50% + var(--px, 0) * 12px), calc(var(--py, 0) * 6px), 0); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.has-gyro .about-photo-bg { transform: translate3d(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -10px), 0) scale(1.05); transition: transform .9s var(--ease-out); }
@media (hover: hover) { .about-photo-wrap:hover .about-photo-color { opacity: 1; } }
.about-photo-wrap.color .about-photo-color { opacity: 1; }
.about-photo-cap {
  position: absolute; left: 1rem; top: 1rem; font-size: .55rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(242,240,235,.55);
}
.about-right-label { font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; }
.about-role { padding: 1.1rem 0; border-top: 1px solid var(--line-2); display: grid; gap: .25rem; }
.about-role-company { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; }
.about-role-title { font-family: var(--font-heading); font-size: .9rem; color: #aaa; }
.about-role-period { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* ───────────────────────── PUNCHLINE ───────────────────────── */
.punchline-section { padding: 10rem var(--pad-x); background: var(--black); position: relative; z-index: 3; border-top: 1px solid #1a1a1a; }
.punchline-wrap { max-width: 1100px; margin: 0 auto; position: relative; }
.punchline-quote { font-family: var(--font-display); font-size: 10rem; line-height: .5; color: #2a2a2a; margin-bottom: 1rem; }
.punchline-text { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(2rem, 5vw, 5rem); line-height: 1.05; letter-spacing: -0.02em; }

/* ───────────────────────── FOOTER ───────────────────────── */
.site-footer { background: var(--black); border-top: 1px solid #1a1a1a; padding: 5rem var(--pad-x) 1.6rem; position: relative; z-index: 3; }
.footer-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.footer-eyebrow { font-family: var(--font-heading); font-size: .95rem; color: var(--muted); margin-bottom: 1rem; }
.footer-email {
  font-family: var(--font-display); font-style: italic; font-size: clamp(2rem, 4.6vw, 4.4rem);
  text-decoration: none; letter-spacing: -0.02em; line-height: 1;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease-out);
}
.footer-email:hover { background-size: 100% 1px; }
.footer-buttons { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.barrel { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--white); }
.br-b { color: var(--dim); transition: transform .35s var(--ease-out), color .3s; }
.barrel:hover .br-l { transform: translateX(-4px); color: var(--white); }
.barrel:hover .br-r { transform: translateX(4px); color: var(--white); }
.br-wrap { display: inline-flex; perspective: 300px; }
.br-drum { display: inline-block; position: relative; height: 1.2em; line-height: 1.2em; transform-style: preserve-3d; }
.br-face { display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.br-face-1 { position: absolute; top: 0; left: 0; transform: rotateX(-90deg) translateZ(.6em); transform-origin: 50% 50% -.6em; }
.footer-name-wrap { position: relative; height: clamp(150px, 22vw, 340px); margin: 4rem calc(var(--pad-x) * -1) 1rem; }
#footer-name-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.footer-name-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic; font-size: 17vw; line-height: 1; color: #1d1d1d; white-space: nowrap;
}
.js .footer-name-wrap.ready .footer-name-fallback { visibility: hidden; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
  border-top: 1px solid #1a1a1a; padding-top: 1.4rem;
}
kbd { font-family: var(--font-mono); border: 1px solid #333; border-bottom-width: 2px; padding: 0 .35rem; border-radius: 3px; color: var(--white); }

/* ───────────────────────── DETAIL PANEL ───────────────────────── */
.detail { position: fixed; inset: 0; z-index: 8000; visibility: hidden; pointer-events: none; }
.detail.open { visibility: visible; pointer-events: auto; }
.detail-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .5s; }
.detail.open .detail-backdrop { opacity: 1; }
.detail-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: #0e0e0e; border-left: 1px solid var(--line-2);
  padding: 5rem 2.5rem 3rem; overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform .7s var(--ease-out);
}
.detail.open .detail-panel { transform: translateX(0); }
.detail-close {
  position: absolute; top: 1.8rem; right: 2.2rem;
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; display: flex; gap: .4rem;
}
.detail-close span { color: var(--dim); }
.detail-visual {
  height: 200px; border-radius: 2px; margin-bottom: 2rem; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(70% 80% at 50% 60%, color-mix(in srgb, var(--dc, #555) 45%, transparent), transparent 75%), #0a0a0a;
  border: 1px solid #1f1f1f;
}
.detail-visual img { max-height: 42%; max-width: 60%; object-fit: contain; }
.detail-visual .fv-plate { width: 60%; }
.detail-visual .dv-type { font-family: var(--font-display); font-style: italic; font-size: 4rem; color: var(--accent); }
.detail-tag { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: .8rem; }
.detail-title { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.02; margin-bottom: 1rem; }
.detail-org { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #9a9a9a; line-height: 1.7; margin-bottom: 1.4rem; }
.detail-about { font-family: var(--font-heading); font-size: .95rem; color: #9a9a9a; line-height: 1.7; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line-2); margin-bottom: 1.4rem; }
.detail-points { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.detail-points li { font-family: var(--font-heading); font-size: 1rem; line-height: 1.6; color: #ddd; padding-left: 1.6rem; position: relative; }
.detail-points li::before { content: '→'; position: absolute; left: 0; color: var(--dim); font-family: var(--font-mono); }
.detail-stack { display: flex; gap: .6rem; flex-wrap: wrap; }
.detail-stack img { height: 38px; width: 38px; object-fit: contain; padding: 7px; background: #161616; border: 1px solid #262626; border-radius: 8px; }
.detail-stack img.wide { width: auto; padding: 8px 10px; }

/* ───────────────────────── CONSOLE ───────────────────────── */
.console { position: fixed; inset: 0; z-index: 8500; visibility: hidden; pointer-events: none; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.console.open { visibility: visible; pointer-events: auto; }
.console-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.console.open .console-backdrop { opacity: 1; }
.console-window {
  position: relative; width: min(860px, 100%); height: min(560px, 80vh);
  background: #0b0d10; border: 1px solid #23272e; border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.7);
  transform: translateY(20px) scale(.97); opacity: 0;
  transition: transform .45s var(--ease-out), opacity .35s;
}
.console.open .console-window { transform: none; opacity: 1; }
.console-bar { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-bottom: 1px solid #1c1f24; }
.console-bar .dots { display: flex; gap: 7px; }
.console-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2d33; cursor: pointer; }
.console-bar .dots i:nth-child(1) { background: #ff5f57; } .console-bar .dots i:nth-child(2) { background: #febc2e; } .console-bar .dots i:nth-child(3) { background: #28c840; }
.console-title { flex: 1; text-align: center; font-size: .65rem; color: #5c6370; letter-spacing: .06em; }
.console-x { font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: #5c6370; border: 1px solid #2a2d33; padding: .2rem .5rem; border-radius: 4px; }
.console-out {
  flex: 1; overflow-y: auto; padding: 1rem 1.1rem .5rem; overscroll-behavior: contain;
  font-size: .8rem; line-height: 1.65; color: #b6bfcc; white-space: pre-wrap; word-break: break-word;
}
.console-out .c-cmd { color: var(--white); }
.console-out .c-p { color: var(--ok); }
.console-out .c-dim { color: #5c6370; }
.console-out .c-ok { color: var(--ok); }
.console-out .c-warn { color: #febc2e; }
.console-out .c-err { color: #ff6b6b; }
.console-out .c-acc { color: #7aa2f7; }
.console-out a { color: #7aa2f7; }
.console-out .c-ascii { color: var(--accent); line-height: 1.15; font-size: .62rem; }
.console-in { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border-top: 1px solid #1c1f24; }
.console-in .prompt { color: var(--ok); font-size: .8rem; white-space: nowrap; }
.console-in input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--white);
  font-family: var(--font-mono); font-size: 16px; caret-color: var(--ok);
}
.console-chips { display: flex; gap: .45rem; padding: 0 1.1rem .9rem; overflow-x: auto; scrollbar-width: none; }
.console-chips::-webkit-scrollbar { display: none; }
.console-chips button {
  flex-shrink: 0; font-size: .65rem; color: #9aa4b2; border: 1px solid #2a2d33; border-radius: 999px; padding: .35rem .7rem;
  transition: color .2s, border-color .2s;
}
.console-chips button:hover { color: var(--white); border-color: #4a4f58; }

/* ───────────────────────── RESPONSIVE ───────────────────────── */
@media (max-width: 1100px) {
  .main-nav { gap: 1.6rem; }
  .nav-line { min-width: 56px; }
  .philosophy-inner { gap: 3.5rem; }
  .about-section { gap: 3.5rem; }
  .fcaption-title { font-size: .95rem; }
}

@media (max-width: 900px) {
  :root { --pad-x: 1.25rem; }
  .main-nav { display: none; }
  .mob-actions { display: flex; gap: .6rem; align-items: center; }
  .site-header { padding: 1.2rem var(--pad-x); align-items: center; }
  .mob-console, .mob-menu-btn {
    height: 36px; padding: 0 .9rem; border: 1px solid #333; border-radius: 999px;
    font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--white);
    background: rgba(10,10,10,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .mob-console { font-family: var(--font-mono); letter-spacing: 0; color: var(--ok); }
  .mob-menu-btn[aria-expanded="true"] { background: var(--white); color: var(--black); }

  .philosophy-section { padding: 6rem var(--pad-x); }
  .philosophy-inner { grid-template-columns: 1fr; gap: 3rem; }
  .featured-section { padding: 6rem var(--pad-x) 4rem; }
  .featured-rows { gap: 2.4rem; }
  .featured-row { flex-direction: column; gap: 2.4rem; }
  .fcard { flex: none !important; width: 100%; }
  .fv { height: auto; aspect-ratio: 4 / 3.2; }
  .fcaption-title, .fcaption-sub { white-space: normal; }
  .work-section { padding: 5rem var(--pad-x) 3rem; }
  .project-row { grid-template-columns: 1fr auto; gap: 1rem; padding: 1.2rem 0; }
  .project-index { display: none; }
  .project-year { display: none; }
  .project-thumb {
    display: flex; align-items: center; justify-content: center; width: 64px; height: 48px;
    background: #0e0d0c; border: 1px solid #2a2622; border-radius: 4px;
  }
  .project-thumb img { max-width: 72%; max-height: 52%; object-fit: contain; }
  #row-preview { display: none; }
  .about-section { grid-template-columns: 1fr; padding: 6rem var(--pad-x); gap: 3rem; }
  .about-left { position: static; }
  .about-photo-wrap { max-width: 520px; }
  .punchline-section { padding: 7rem var(--pad-x); }
  .punchline-quote { font-size: 7rem; }
  .punchline-text { font-size: 2.4rem; line-height: 1.08; }
  .site-footer { padding: 4rem var(--pad-x) 1.4rem; }
  .footer-buttons { gap: 1.1rem; }
  .detail-panel { top: auto; left: 0; width: 100%; max-height: 88vh; border-left: 0; border-top: 1px solid var(--line-2); border-radius: 14px 14px 0 0; padding: 4.2rem 1.25rem 2.5rem; transform: translateY(100%); }
  .detail.open .detail-panel { transform: translateY(0); }
  .detail-close { top: 1.3rem; right: 1.25rem; }
  .detail-visual { height: 160px; }
}

@media (max-width: 900px) {
  /* hero tiles re-flowed for portrait screens */
  .hero-text { padding-bottom: 6vh; }
  .hero-name { font-size: clamp(3.2rem, 15vw, 6rem); }
  .hero-roles { font-size: .7rem; }
  .hero-sub { font-size: .62rem; padding: 0 1.25rem; }
  .hero-foot { bottom: 1.2rem; }
  .hero-foot .scroll-hint { display: none; }
  .status { font-size: .52rem; }
  .pimg[data-m="hide"] { display: none; }
  .tile-term { top: 10% !important; left: 3% !important; width: 56% !important; height: 23% !important; }
  .term-bar { padding-left: 10px; }
  .term-body { padding-left: 10px; }
  .tile-halftone { top: 6% !important; right: -8% !important; width: 44% !important; height: 28% !important; }
  .pimg[data-m="face"] { top: 66% !important; left: 4% !important; width: 30% !important; height: 20% !important; }
  .tile-portrait { bottom: 6% !important; left: auto !important; right: -4% !important; width: 46% !important; height: 30% !important; }
  .tile-logo[data-m="k8s"] { top: 58% !important; left: 38% !important; width: 18% !important; height: 9% !important; }
  .tile-logo[data-m="aws"] { top: 69% !important; left: 38% !important; right: auto !important; width: 18% !important; height: 8% !important; }
  .term-body pre { font-size: .5rem; }
}

@media (max-width: 520px) {
  .section-heading { font-size: clamp(2.8rem, 14vw, 4rem); }
  .reveal-text { font-size: 1.35rem; }
  .expertise-list { grid-template-columns: 1fr 1fr; }
  .expertise-card { padding: 1.2rem .9rem; }
  .ecard-title { font-size: 1.05rem; }
  .ecard-list li { font-size: .74rem; }
  .fv { aspect-ratio: 4 / 3.6; }
  .lang-list li { min-width: calc(50% - .3rem); flex: 1; }
  .footer-email { font-size: 1.9rem; }
  .footer-hint { display: none; }
  .console { padding: 0; align-items: flex-end; }
  .console-window { height: 86vh; height: 86svh; border-radius: 14px 14px 0 0; }
  .console-out { font-size: .72rem; }
  .console-out .c-ascii { font-size: .42rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee-track { animation: none; }
  .reveal-text .rc { opacity: 1 !important; }
}
