/* ==========================================================================
   Aditya Jatad — portfolio
   ========================================================================== */

:root {
  --bg: #0b0b0c;
  --bg2: #121214;
  --card: #151517;
  --fg: #f2f0ea;
  --mute: #8d8b85;
  --line: rgba(242, 240, 234, 0.12);
  --accent: #c8ff3d;
  --accent-ink: #0b0b0c;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);

  --ff-sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --ff-serif: "Instrument Serif", "Times New Roman", serif;
  --ff-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(18px, 4vw, 56px);
  --maxw: 1400px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 72px;
}
:root[data-theme="light"] {
  --bg: #f3f1ea;
  --bg2: #eae7de;
  --card: #fbfaf6;
  --fg: #101010;
  --mute: #6b6962;
  --line: rgba(16, 16, 16, 0.14);
  --accent: #ff4b1f;
  --accent-ink: #ffffff;
  --shadow: 0 30px 70px -30px rgba(40, 30, 10, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
main { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ff-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
body.locked { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--ff-mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; }
.muted { color: var(--mute); }
.serif, em.serif { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 999; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; transition: top 0.2s; }
.skip:focus { top: 12px; }

.h-xl { font-size: clamp(2.8rem, 8vw, 7.5rem); line-height: 0.92; letter-spacing: -0.045em; font-weight: 600; }
.h-lg { font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
.h-md { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.03em; font-weight: 600; }
.h-xl .serif, .h-lg .serif { font-weight: 400; letter-spacing: -0.02em; }

.section { padding: clamp(90px, 14vw, 200px) 0; position: relative; }
.section-head { margin-bottom: clamp(40px, 7vw, 100px); }
.section-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-label { display: flex; gap: 12px; align-items: center; color: var(--mute); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 28px; }
.section-label .mono { color: var(--accent); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--pad);
  transition: transform 1s var(--ease) 0.1s, opacity 0.4s ease 0.9s;
  /* safety net: even if JS fails, never block the site */
  animation: pl-failsafe 0.01s linear 6s forwards;
}
@keyframes pl-failsafe { to { visibility: hidden; opacity: 0; } }
.preloader.done { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.pl-top { display: flex; justify-content: space-between; font-family: var(--ff-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.pl-count { font-size: clamp(6rem, 24vw, 22rem); font-weight: 700; letter-spacing: -0.06em; line-height: 0.8; font-variant-numeric: tabular-nums; }
.pl-count sup { font-size: 0.2em; color: var(--accent); vertical-align: top; margin-left: 0.1em; }
.pl-bar { height: 2px; background: var(--line); }
.pl-bar i { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 900; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.cursor { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid var(--fg); border-radius: 50%; display: grid; place-items: center; mix-blend-mode: difference; border-color: #fff; transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.3s, opacity 0.3s; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; border-radius: 50%; mix-blend-mode: difference; }
.cursor-label { font-family: var(--ff-mono); font-size: 0; color: #000; text-transform: uppercase; letter-spacing: 0.06em; transition: font-size 0.2s; }
.cursor.active { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: #fff; }
.cursor.active .cursor-label { font-size: 0.7rem; }
.cursor.down { transform: scale(0.85); }
body.has-cursor .cursor, body.has-cursor .cursor-dot { opacity: 1; }
@media (hover: hover) and (pointer: fine) { body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; } body.has-cursor input, body.has-cursor textarea { cursor: text; } }

.preview { position: fixed; left: 0; top: 0; width: 340px; aspect-ratio: 4 / 3; z-index: 800; pointer-events: none; border-radius: 14px; overflow: hidden; opacity: 0; transform: translate(-50%, -50%) scale(0.7); transition: opacity 0.3s, transform 0.4s var(--ease); box-shadow: var(--shadow); border: 1px solid var(--line); }
.preview.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.preview svg, .preview .media-img { width: 100%; height: 100%; display: block; }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 950; }
.noise { position: fixed; inset: -50%; z-index: 700; pointer-events: none; opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
:root[data-theme="light"] .noise { opacity: 0.07; mix-blend-mode: multiply; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 600; height: var(--nav-h); padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; transition: transform 0.5s var(--ease), background 0.4s, backdrop-filter 0.4s, border-color 0.4s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); }
.nav.hide { transform: translateY(-100%); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.9rem; letter-spacing: -0.04em; transition: transform 0.5s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-text sup { font-size: 0.55em; color: var(--mute); margin-left: 2px; }
.nav-links { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-links a { padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; color: var(--mute); transition: color 0.3s, background 0.3s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { background: var(--fg); color: var(--bg); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.kbd-btn { display: flex; gap: 4px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--mute); transition: border-color 0.3s, color 0.3s; }
.kbd-btn:hover { border-color: var(--fg); color: var(--fg); }
kbd { font-family: var(--ff-mono); font-size: 0.7rem; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); color: var(--mute); }
.kbd-btn kbd { border: 0; background: none; padding: 0 2px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background 0.3s, color 0.3s, transform 0.5s var(--ease); }
.icon-btn:hover { background: var(--fg); color: var(--bg); transform: rotate(40deg); }
.menu-btn { display: none; position: relative; }
.menu-btn:hover { transform: none; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.6px; background: currentColor; transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.menu-btn span:first-child { top: 16px; } .menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 590; background: var(--bg); padding: calc(var(--nav-h) + 20px) var(--pad) var(--pad); display: flex; flex-direction: column; justify-content: space-between; clip-path: inset(0 0 100% 0); transition: clip-path 0.7s var(--ease); visibility: hidden; }
.mobile-menu.open { clip-path: inset(0); visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu a { font-size: clamp(2.6rem, 13vw, 5rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.12; border-bottom: 1px solid var(--line); padding: 6px 0; }
.mm-foot { display: flex; justify-content: space-between; color: var(--mute); font-size: 0.9rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 999px; font-weight: 600; letter-spacing: -0.01em; border: 1px solid var(--line); position: relative; overflow: hidden; isolation: isolate; transition: color 0.4s, border-color 0.4s, transform 0.3s var(--ease); will-change: transform; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: translateY(101%); border-radius: 50% 50% 0 0; transition: transform 0.5s var(--ease), border-radius 0.5s var(--ease); }
.btn:hover::before { transform: translateY(0); border-radius: 0; }
.btn:hover { color: var(--bg); border-color: var(--fg); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-lg { padding: 20px 34px; font-size: 1.05rem; }
.arrow { font-style: normal; transition: transform 0.4s var(--ease); display: inline-block; }
.btn:hover .arrow { transform: translate(3px, 3px) rotate(0deg); }
.round-btn { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); font-size: 1.3rem; transition: background 0.3s, color 0.3s, transform 0.3s var(--ease); }
.round-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: scale(1.06); }

.pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem; background: color-mix(in srgb, var(--bg) 50%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.line { display: block; overflow: hidden; padding: 0 0.04em 0.22em; margin: 0 -0.04em -0.22em; }
.split .ch, .split .wd { display: inline-block; transform: translateY(110%) rotate(5deg); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 40ms + var(--base, 0ms)); }
.split.in .ch, .split.in .wd { transform: none; }
.split .sp { display: inline-block; width: 0.26em; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--nav-h) + 24px) var(--pad) 36px; overflow: hidden; isolation: isolate; }
#hero-gl, .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-fallback { background: radial-gradient(60% 50% at 70% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), radial-gradient(50% 60% at 20% 80%, color-mix(in srgb, var(--fg) 8%, transparent), transparent 70%); }
#hero-gl { opacity: 0; transition: opacity 1.6s ease; }
#hero-gl.ready { opacity: 1; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(transparent, var(--bg)); z-index: -1; pointer-events: none; }
.hero-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-clock { color: var(--mute); margin-left: auto; }
.hero-body { margin-top: auto; padding-top: 60px; }
.eyebrow { color: var(--mute); margin-bottom: 18px; font-size: 0.95rem; }
.eyebrow .mono { color: var(--accent); margin-right: 8px; }
.hero-name { font-size: clamp(4.4rem, min(21vw, 28vh), 20rem); line-height: 0.84; letter-spacing: -0.065em; font-weight: 700; margin-left: -0.04em; }
/* extra room so the "y" descender and the italic "d" ascender never touch or get clipped */
.hero-name .line { padding: 0.1em 0.04em 0.26em; margin: -0.1em -0.04em -0.26em; }
.hero-name .line + .line { margin-top: 0.1em; }
.hero-name .line:nth-child(2) { display: flex; align-items: center; gap: 0.12em; flex-wrap: nowrap; }
.hero-name .serif { font-weight: 400; letter-spacing: -0.04em; padding-right: 0.08em; }
.hero-badge { display: inline-flex; align-items: center; height: clamp(2.2rem, 6.4vw, 6.6rem); padding: 0 clamp(14px, 2.2vw, 36px); border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: clamp(0.85rem, 1.6vw, 1.5rem); letter-spacing: -0.02em; font-weight: 600; transform: rotate(-4deg); overflow: hidden; align-self: center; opacity: 0; transition: opacity 0.8s ease 1.1s; }
.in-view-hero .hero-badge, body.loaded .hero-badge { opacity: 1; }
.roles { display: block; height: 1.3em; line-height: 1.3em; overflow: hidden; }
.roles span { display: block; transition: transform 0.7s var(--ease); }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-top: clamp(28px, 4vw, 56px); flex-wrap: wrap; }
.hero-tag { max-width: 34ch; font-size: clamp(1.15rem, 1.9vw, 1.6rem); line-height: 1.25; letter-spacing: -0.02em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-cue { position: absolute; right: var(--pad); top: 50%; writing-mode: vertical-rl; color: var(--mute); display: flex; align-items: center; gap: 12px; }
.scroll-cue i { width: 1px; height: 60px; background: linear-gradient(var(--mute), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; border-block: 1px solid var(--line); }
.marquee-track { display: inline-flex; animation: marquee var(--dur, 40s) linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee.rev .marquee-track { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee.big { padding: 22px 0; background: var(--accent); color: var(--accent-ink); border: 0; transform: rotate(-1.2deg) scale(1.02); margin: -10px 0; position: relative; z-index: 2; }
.marquee.big .item { font-size: clamp(1.6rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -0.04em; padding: 0 0.6em; display: inline-flex; align-items: center; gap: 1.2em; }
.marquee.big .item i { font-style: normal; display: inline-block; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.marquee.chips { padding: 14px 0; border-color: var(--line); }
.chip { display: inline-flex; align-items: center; margin: 0 8px; padding: 12px 24px; border-radius: 999px; border: 1px solid var(--line); font-size: 1.15rem; letter-spacing: -0.02em; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.chip:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.marquee.chips { --dur: 50s; margin-bottom: 14px; border: 0; }

/* ---------- About ---------- */
.about-lede { font-size: clamp(1.8rem, 4.6vw, 4.2rem); line-height: 1.08; letter-spacing: -0.04em; font-weight: 500; max-width: 24ch; max-width: 22em; margin-bottom: clamp(60px, 9vw, 130px); }
.about-lede .w { opacity: 0.14; transition: opacity 0.25s linear; }
.about-lede .w.on { opacity: 1; }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 100px); align-items: start; }
.portrait { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line); transform-style: preserve-3d; transition: transform 0.4s var(--ease), opacity 1s var(--ease); box-shadow: var(--shadow); }
.portrait-art, .portrait-art > * { width: 100%; height: 100%; }
.portrait-art svg, .portrait-art img { width: 100%; height: 100%; object-fit: cover; }
.portrait-tag { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.portrait-initials { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(6rem, 14vw, 12rem); font-weight: 700; letter-spacing: -0.07em; color: rgba(255, 255, 255, 0.92); mix-blend-mode: overlay; }
.about-copy p { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--mute); margin-bottom: 1.2em; max-width: 56ch; }
.about-copy p:first-child { color: var(--fg); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 36px 0; border-top: 1px solid var(--line); }
.facts div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--mute); font-family: var(--ff-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.facts dd { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.02em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(70px, 10vw, 140px); border-top: 1px solid var(--line); }
.stat { padding: 36px 24px 12px 0; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat + .stat { padding-left: 24px; }
.stat-n { font-size: clamp(3rem, 8vw, 7rem); font-weight: 600; letter-spacing: -0.06em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-n small { font-size: 0.45em; color: var(--accent); margin-left: 2px; }
.stat-l { color: var(--mute); margin-top: 10px; }

/* ---------- Work: stacking features ---------- */
.stack { display: block; }
.feature { position: sticky; top: calc(var(--nav-h) + var(--i) * 18px); margin-bottom: clamp(24px, 6vw, 80px); transform-origin: 50% 0; will-change: transform; }
.feature-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); min-height: min(640px, 76vh); }
.feature:nth-child(even) .feature-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-text { padding: clamp(24px, 3.4vw, 52px); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.feature-top { display: flex; justify-content: space-between; color: var(--mute); }
.feature-title { font-size: clamp(2.6rem, 6vw, 5.4rem); letter-spacing: -0.055em; line-height: 0.9; font-weight: 600; margin: 10px 0 18px; }
.feature-tag { font-size: clamp(1.05rem, 1.5vw, 1.35rem); color: var(--mute); max-width: 28ch; line-height: 1.3; letter-spacing: -0.015em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.8rem; color: var(--mute); }
.feature-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.view i { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-style: normal; transition: transform 0.5s var(--ease); }
.feature:hover .view i { transform: rotate(45deg) scale(1.1); }
.feature-media { position: relative; overflow: hidden; min-height: 280px; }
.feature-media svg, .feature-media .media-img { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.2s var(--ease); }
.feature:hover .feature-media svg, .feature:hover .feature-media .media-img { transform: scale(1.06); }
.feature-chips { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.glass { padding: 8px 14px; border-radius: 12px; background: rgba(10, 10, 10, 0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.85rem; }
.glass b { font-weight: 600; margin-right: 6px; }

.index-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin: clamp(60px, 10vw, 140px) 0 20px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.88rem; color: var(--mute); transition: all 0.3s; }
.filter:hover { color: var(--fg); border-color: var(--fg); }
.filter[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.index { border-top: 1px solid var(--line); }
.index li { border-bottom: 1px solid var(--line); transition: opacity 0.4s, max-height 0.6s var(--ease); overflow: hidden; }
.index li.hidden { display: none; }
.index button { width: 100%; display: grid; grid-template-columns: 100px minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) 40px; align-items: center; gap: 16px; padding: 28px 0; text-align: left; transition: padding 0.5s var(--ease), color 0.3s; }
.index:hover button { color: var(--mute); }
.index button:hover { color: var(--fg); padding-left: 18px; padding-right: 8px; }
.index .yr { font-family: var(--ff-mono); font-size: 0.8rem; color: var(--mute); white-space: nowrap; }
.index .nm { font-size: clamp(1.6rem, 3.6vw, 3.2rem); letter-spacing: -0.04em; font-weight: 600; line-height: 1; }
.index .cat, .index .rl { color: var(--mute); font-size: 0.95rem; }
.index .go { justify-self: end; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); transition: all 0.4s var(--ease); }
.index button:hover .go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: rotate(-45deg); }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 0; padding-left: clamp(24px, 4vw, 60px); }
.tl-line { position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-line i { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: 0 0; transform: scaleY(0); }
.tl-item { position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 6fr); gap: 24px; padding: clamp(28px, 4vw, 52px) 0; border-bottom: 1px solid var(--line); }
.tl-item::before { content: ""; position: absolute; left: calc(clamp(24px, 4vw, 60px) * -1 - 3px); top: clamp(38px, 5vw, 64px); width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--mute); transition: all 0.5s var(--ease); }
.tl-item.in::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); }
.tl-period { font-family: var(--ff-mono); font-size: 0.82rem; color: var(--mute); padding-top: 8px; }
.tl-role { font-size: clamp(1.6rem, 3.2vw, 2.8rem); letter-spacing: -0.04em; font-weight: 600; line-height: 1.05; }
.tl-org { color: var(--accent); font-size: 1.1rem; margin: 6px 0 12px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tl-org span { color: var(--mute); font-size: 0.9rem; }
.tl-desc { color: var(--mute); max-width: 56ch; margin-bottom: 16px; }

/* ---------- Toolbox ---------- */
.tool-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.tg { padding: 28px 24px 8px 0; }
.tg + .tg { padding-left: 24px; border-left: 1px solid var(--line); }
.tg h4 { font-family: var(--ff-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 18px; font-weight: 400; }
.tg li { padding: 9px 0; font-size: 1.2rem; letter-spacing: -0.02em; border-bottom: 1px dashed var(--line); transition: padding 0.4s var(--ease), color 0.3s; }
.tg li:hover { padding-left: 10px; color: var(--accent); }

/* ---------- Writing ---------- */
.awards { border-top: 1px solid var(--line); }
.award { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 0.9fr); gap: 20px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--line); }
.aw-yr { color: var(--mute); font-family: var(--ff-mono); font-size: 0.78rem; }
.aw-t { font-size: clamp(1.2rem, 2.3vw, 2rem); letter-spacing: -0.035em; line-height: 1.12; font-weight: 500; }
.aw-by { color: var(--mute); }
@media (max-width: 720px) { .award { grid-template-columns: 1fr; gap: 6px; } }
.posts { border-top: 1px solid var(--line); }
.post a { display: grid; grid-template-columns: 120px minmax(0, 1fr) 150px 120px 40px; gap: 20px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); transition: padding 0.5s var(--ease), color 0.3s; }
.posts:hover .post a { color: var(--mute); }
.post a:hover { color: var(--fg); padding-left: 16px; }
.post .pd, .post .pr { color: var(--mute); font-family: var(--ff-mono); font-size: 0.78rem; text-transform: uppercase; }
.post .pt { font-size: clamp(1.2rem, 2.3vw, 2rem); letter-spacing: -0.035em; line-height: 1.12; font-weight: 500; }
.post .pg { justify-self: start; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.78rem; }
.post .pa { justify-self: end; transition: transform 0.4s var(--ease); font-size: 1.3rem; }
.post a:hover .pa { transform: translate(4px, -4px); color: var(--accent); }

/* ---------- Now + Activity ---------- */
.activity { margin-top: 16px; padding: clamp(22px, 3vw, 40px); border: 1px solid var(--line); border-radius: 26px; background: var(--card); }
.activity-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.heat-scroll { overflow-x: auto; padding-bottom: 8px; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; min-width: 760px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--line); min-width: 10px; transition: transform 0.2s; }
.heat i:hover { transform: scale(1.6); }
.heat i[data-l="1"] { background: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.heat i[data-l="2"] { background: color-mix(in srgb, var(--accent) 50%, transparent); }
.heat i[data-l="3"] { background: color-mix(in srgb, var(--accent) 78%, transparent); }
.heat i[data-l="4"] { background: var(--accent); }
.activity-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.as-n { font-size: clamp(1.8rem, 3.6vw, 3rem); letter-spacing: -0.05em; font-weight: 600; line-height: 1; }
.as-l { color: var(--mute); font-size: 0.9rem; margin-top: 6px; }

/* ---------- Contact ---------- */
.contact { overflow: hidden; background: var(--bg2); border-top: 1px solid var(--line); }
.contact-glow { position: absolute; width: 70vw; height: 70vw; right: -20vw; top: -25vw; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 28%, transparent), transparent); filter: blur(30px); pointer-events: none; }
.contact-title { font-size: clamp(3.2rem, 11.5vw, 12rem); line-height: 0.9; letter-spacing: -0.06em; font-weight: 700; margin-bottom: clamp(50px, 8vw, 120px); position: relative; }
.contact-title .serif { font-weight: 400; color: var(--accent); letter-spacing: -0.03em; }
.contact-title .line { padding: 0.08em 0.04em 0.26em; margin: -0.08em -0.04em -0.26em; }
.contact-title .line + .line { margin-top: -0.02em; }
.contact-title .line:last-child { margin-top: 0.04em; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 100px); position: relative; }
.mail-btn { display: block; text-align: left; width: 100%; padding: 8px 0 28px; border-bottom: 1px solid var(--fg); position: relative; will-change: transform; }
.mail-text { display: block; font-size: clamp(1.7rem, 4.2vw, 3.8rem); letter-spacing: -0.05em; font-weight: 600; line-height: 1.05; word-break: break-all; transition: color 0.3s; }
.mail-btn:hover .mail-text { color: var(--accent); }
.mail-hint { display: block; margin-top: 12px; color: var(--mute); }
.socials { margin-top: 40px; display: grid; }
.socials a { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.2rem; letter-spacing: -0.02em; transition: padding 0.4s var(--ease), color 0.3s; }
.socials a span { color: var(--mute); font-size: 0.9rem; font-family: var(--ff-mono); }
.socials a:hover { padding-left: 14px; color: var(--accent); }
.form { display: grid; gap: 22px; align-content: start; }
.field { position: relative; }
.field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); font: inherit; font-size: 1.15rem; padding: 26px 0 10px; outline: none; resize: vertical; transition: border-color 0.3s; border-radius: 0; }
.field label { position: absolute; left: 0; top: 24px; color: var(--mute); pointer-events: none; transition: transform 0.35s var(--ease), color 0.3s; transform-origin: 0 0; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input:focus + label, .field textarea:focus + label, .field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-22px) scale(0.75); color: var(--accent); }
.field.err input, .field.err textarea { border-color: #ff5a5a; }
.chips-field { border: 0; padding: 0; margin: 0; }
.chips-field legend { color: var(--mute); margin-bottom: 12px; padding: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.95rem; transition: all 0.3s; }
.opt:hover { border-color: var(--fg); }
.opt[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.form .btn { justify-self: start; }
.form-note { color: var(--mute); }

/* ---------- Footer ---------- */
.footer { padding: 60px 0 28px; overflow: hidden; border-top: 1px solid var(--line); }
.footer-big { font-size: clamp(3rem, 15.5vw, 17rem); font-weight: 700; letter-spacing: -0.07em; line-height: 0.82; white-space: nowrap; text-align: center; background: linear-gradient(var(--fg), transparent 95%); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0.9; margin-bottom: 30px; user-select: none; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--mute); padding-top: 20px; border-top: 1px solid var(--line); }
.to-top { text-transform: inherit; font: inherit; letter-spacing: inherit; transition: color 0.3s; }
.to-top:hover { color: var(--accent); }

/* ---------- Modal ---------- */
.modal, .palette { position: fixed; inset: 0; z-index: 800; display: grid; visibility: hidden; pointer-events: none; }
.modal.open, .palette.open { visibility: visible; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.5s; }
.open .modal-backdrop { opacity: 1; }
.modal-card { position: relative; align-self: end; justify-self: center; width: min(1180px, 100%); max-height: 94vh; max-height: 94svh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border: 1px solid var(--line); border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform 0.8s var(--ease); outline: none; }
.modal.open .modal-card { transform: none; }
.m-cover { position: relative; aspect-ratio: 21 / 9; min-height: 220px; overflow: hidden; }
.m-cover svg, .m-cover .media-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-close { position: sticky; top: 16px; display: block; margin: 16px 16px -64px auto; z-index: 5; width: 48px; height: 48px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.2rem; transition: transform 0.4s var(--ease), background 0.3s; }
.m-close:hover { transform: rotate(90deg); background: var(--accent); color: var(--accent-ink); }
.m-body { padding: clamp(24px, 4vw, 60px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); }
.m-title { font-size: clamp(2.6rem, 7vw, 6rem); letter-spacing: -0.055em; line-height: 0.9; font-weight: 600; margin-bottom: 14px; }
.m-tagline { color: var(--mute); font-size: 1.2rem; letter-spacing: -0.015em; margin-bottom: 28px; max-width: 28ch; }
.m-meta { display: grid; gap: 0; border-top: 1px solid var(--line); }
.m-meta div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.m-meta dt { color: var(--mute); font-family: var(--ff-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 3px; }
.m-meta dd { text-align: right; }
.m-main h4 { font-family: var(--ff-mono); font-size: 0.74rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 10px; }
.m-main p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); margin-bottom: 32px; max-width: 58ch; }
.m-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.m-res { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.m-res b { display: block; font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: -0.05em; line-height: 1; font-weight: 600; }
.m-res span { color: var(--mute); font-size: 0.85rem; display: block; margin-top: 8px; }
.m-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 32px; }
.m-shots div { border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.m-shots div:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.m-shots svg { width: 100%; height: 100%; }
.m-nav { display: flex; justify-content: space-between; gap: 12px; padding: 0 clamp(24px, 4vw, 60px) clamp(24px, 4vw, 48px); flex-wrap: wrap; }
.m-nav button { display: flex; flex-direction: column; text-align: left; gap: 2px; padding: 16px 22px; border: 1px solid var(--line); border-radius: 18px; min-width: 200px; transition: border-color 0.3s, background 0.3s; }
.m-nav button:last-child { text-align: right; align-items: flex-end; }
.m-nav button:hover { border-color: var(--accent); background: var(--card); }
.m-nav small { color: var(--mute); font-family: var(--ff-mono); font-size: 0.7rem; text-transform: uppercase; }
.m-nav span { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.03em; }

/* ---------- Palette ---------- */
.palette { place-items: start center; padding-top: 14vh; }
.palette-card { position: relative; width: min(640px, calc(100% - 28px)); background: var(--bg); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transform: translateY(-16px) scale(0.97); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.3s; }
.palette.open .palette-card { transform: none; opacity: 1; }
.palette-input { width: 100%; padding: 22px 24px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); font: inherit; font-size: 1.1rem; outline: none; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.palette-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer; }
.palette-list li small { color: var(--mute); font-family: var(--ff-mono); font-size: 0.7rem; text-transform: uppercase; }
.palette-list li[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.palette-list li[aria-selected="true"] small { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.palette-list .empty { color: var(--mute); cursor: default; }
.palette-foot { display: flex; gap: 20px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--mute); flex-wrap: wrap; }
.palette-foot kbd { margin-right: 4px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 990; transform: translate(-50%, 30px); opacity: 0; padding: 14px 22px; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 500; transition: all 0.5s var(--ease); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .tool-groups, .activity-stats { grid-template-columns: repeat(2, 1fr); }
  .tg:nth-child(3) { padding-left: 0; border-left: 0; }
  .tg:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 20px; }
  .post a { grid-template-columns: 100px minmax(0, 1fr) 40px; }
  .post .pg, .post .pr { display: none; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .kbd-btn, .scroll-cue { display: none; }
  .about-grid, .contact-grid, .m-body { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .feature { position: relative; top: 0 !important; transform: none !important; }
  .feature-inner, .feature:nth-child(even) .feature-inner { grid-template-columns: 1fr; min-height: 0; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature-media { min-height: 260px; order: -1 !important; }
  .index button { grid-template-columns: 88px minmax(0, 1fr) 36px; gap: 12px; }
  .index .yr { font-size: 0.72rem; }
  .index .cat, .index .rl { display: none; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
  .m-results { grid-template-columns: 1fr; }
  .hero-name { font-size: clamp(4rem, 21vw, 12rem); }
  .section-head.row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  /* research list: date on top, full-width title below */
  .post a { grid-template-columns: minmax(0, 1fr) 28px; grid-template-areas: "date arrow" "title arrow"; row-gap: 10px; column-gap: 14px; padding: 24px 0; }
  .post .pd { grid-area: date; }
  .post .pt { grid-area: title; font-size: 1.3rem; }
  .post .pa { grid-area: arrow; align-self: center; }
}
@media (max-width: 520px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .logo-text { display: none; }
  .tool-groups { grid-template-columns: 1fr 1fr; }
  .tg, .tg + .tg { padding: 22px 10px 6px 0; border-left: 0; margin-top: 0; }
  .tg:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .tg:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tg li { font-size: 1.02rem; padding: 7px 0; }
  .facts { grid-template-columns: 1fr; }
  .hero-badge { height: 2.3rem; padding: 0 14px; font-size: 0.85rem; }
  .btn { padding: 14px 22px; }
  .m-shots { grid-template-columns: 1fr; }
}
@media (hover: none) { .cursor, .cursor-dot, .preview { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal, .split .ch, .split .wd { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .noise { display: none; }
}
