/* ==========================================================================
   Kristen Wang — portfolio
   Dark stage, wide display type, warm accents pulled from the hero illustration
   ========================================================================== */

:root {
  --bg: #0e0e0d;
  --bg-2: #171715;
  --ink: #f4ecdc;
  --muted: #a39d8f;
  --accent: #ff6b3d;
  --leaf: #c4e07a;
  --sky: #7fd3e6;
  --line: rgba(244, 236, 220, 0.22);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: clamp(16px, 2.2vw, 32px);
  --nav-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* grain + vignette atmosphere ------------------------------------------- */
.atmosphere {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0,0,0,.55) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}

/* fixed chrome ------------------------------------------------------------ */
.page-loader { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.page-loader-bar { height: 100%; width: 0; background: var(--accent); transition: width .4s var(--ease), opacity .4s; }

.top-logo {
  position: fixed; top: 18px; left: var(--gutter); z-index: 60;
  width: 84px; height: 44px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .04em;
}
.top-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.top-logo rect {
  fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4;
  animation: march 1.2s linear infinite;
}
.top-logo:hover rect { stroke: var(--accent); animation-duration: .4s; }
@keyframes march { to { stroke-dashoffset: -9; } }

.top-right {
  position: fixed; top: 24px; right: var(--gutter); z-index: 60;
  font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  display: flex; gap: 22px; align-items: center;
}
.top-right a { position: relative; padding: 4px 0; }
.top-right a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.top-right a:hover::after { transform: scaleX(1); }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav-h); z-index: 60;
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
  padding: 0 var(--gutter);
  background: linear-gradient(to top, rgba(14,14,13,.94) 55%, rgba(14,14,13,0));
  font-family: var(--display); font-weight: 700; font-size: clamp(11px, 1.05vw, 14px);
  letter-spacing: .08em; text-transform: uppercase;
}
.bottom-nav a { position: relative; justify-self: start; padding: 8px 0; }
.bottom-nav a:nth-child(2) { justify-self: center; }
.bottom-nav a:nth-child(3) { justify-self: center; }
.bottom-nav a:last-child { justify-self: end; }
.bottom-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.bottom-nav a:hover::after, .bottom-nav a[aria-current="page"]::after { transform: scaleX(1); }
.bottom-nav a[aria-current="page"] { color: var(--accent); }

/* mobile nav */
.mobile-nav { display: none; }
.mobile-menu { display: none; }

/* cursor ------------------------------------------------------------------ */
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
#trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 150; }
#cursor {
  position: fixed; left: 0; top: 0; z-index: 151; pointer-events: none;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--cursor, var(--accent));
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .1em; color: var(--bg);
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s;
  opacity: 0;
}
#cursor.on { opacity: 1; }
#cursor span { opacity: 0; transition: opacity .2s; white-space: nowrap; }
#cursor.big { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
#cursor.big span { opacity: 1; }
#cursor.grow { width: 34px; height: 34px; margin: -17px 0 0 -17px; mix-blend-mode: difference; background: var(--ink); }
#cursor.down { transform: scale(.85); }

/* page transition curtain --------------------------------------------------- */
.curtain {
  position: fixed; inset: 0; z-index: 200; background: var(--accent); color: var(--bg);
  display: grid; place-items: center; transform: translateY(101%); pointer-events: none;
  font-family: var(--display); font-weight: 800; font-size: clamp(40px, 8vw, 120px);
}
[data-cv] .curtain { transform: translateY(0); }

/* reveal ------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* pills -------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--ink); border-radius: 999px; padding: 8px 15px 7px;
  font-family: var(--display); font-weight: 600; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
  transition: background .3s, color .3s, transform .3s var(--ease);
  background: rgba(14,14,13,.5); backdrop-filter: blur(6px);
}
.pill:hover { transform: translateX(4px); }
.pill[aria-pressed="true"], .pill.active { background: var(--ink); color: var(--bg); }

/* ==========================================================================
   HOME
   ========================================================================== */
body.page-home { overflow: hidden; height: 100vh; height: 100dvh; }
#stage { position: fixed; inset: 0; z-index: 2; }
#stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.home-title {
  position: fixed; inset: 0; z-index: 1; display: grid; place-items: center; text-align: center; pointer-events: none;
  padding-bottom: 6vh;
}
.home-title h1 {
  margin: 0; font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(48px, 12.5vw, 230px); line-height: .88; letter-spacing: -.02em;
}
.home-title h1 span { display: block; }
.home-title h1 span:nth-child(2) { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.home-title p {
  margin: 22px 0 0; font-family: var(--display); font-weight: 500; font-size: clamp(10px, 1vw, 13px);
  letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}

.filters {
  position: fixed; left: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.filters .label {
  font-family: var(--display); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 4px;
}
.stage-hint {
  position: fixed; right: var(--gutter); top: 50%; z-index: 20; transform: translateY(-50%) rotate(90deg); transform-origin: right center;
  font-family: var(--display); font-size: 10px; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; white-space: nowrap;
}
.count-badge {
  position: fixed; right: var(--gutter); bottom: calc(var(--nav-h) + 10px); z-index: 20;
  font-family: var(--display); font-size: 10px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase;
}

/* cover ------------------------------------------------------------------- */
#cover {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  transition: transform 1.1s var(--ease);
}
#cover.gone { transform: translateY(-101%); }
#coverCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-copy {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 34px; z-index: 2; pointer-events: none;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.cover-copy h2 {
  margin: 0; font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(26px, 4.6vw, 72px); line-height: .95; letter-spacing: -.02em;
}
.cover-copy p {
  margin: 0; max-width: 260px; text-align: right; font-family: var(--display); font-weight: 500; font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
#coverPill {
  position: fixed; left: 0; top: 0; z-index: 110; pointer-events: none;
  padding: 14px 24px 13px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .18em;
  transform: translate(-999px, -999px);
}
.cover-skip {
  position: absolute; top: 24px; right: var(--gutter); z-index: 3;
  font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.cover-skip:hover { color: var(--ink); }

/* lightbox ---------------------------------------------------------------- */
#lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: 1.15fr 1fr;
  background: rgba(10,10,9,.9); backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s;
}
#lightbox.open { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.lb-media {
  position: relative; display: grid; place-items: center; padding: 84px 40px calc(var(--nav-h) + 24px) var(--gutter);
}
.lb-frame {
  position: relative; max-width: 100%; max-height: 100%; display: grid; place-items: center;
  transform: scale(.94) rotate(-1.5deg); transition: transform .8s var(--ease);
}
#lightbox.open .lb-frame { transform: none; }
.lb-frame img { max-height: calc(100vh - 84px - var(--nav-h) - 48px); max-width: 100%; object-fit: contain; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-frame .marq { position: absolute; left: -8px; top: -8px; width: calc(100% + 16px); height: calc(100% + 16px); pointer-events: none; overflow: visible; }
.lb-frame .marq rect { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 4; animation: march 1.2s linear infinite; }
.lb-arrows { position: absolute; inset: auto var(--gutter) calc(var(--nav-h) + 8px) auto; display: flex; gap: 8px; }
.lb-arrows button {
  width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: 14px; transition: background .3s, color .3s;
}
.lb-arrows button:hover { background: var(--ink); color: var(--bg); }
.lb-arrows button[disabled] { opacity: .25; pointer-events: none; }
.lb-info {
  padding: 96px var(--gutter) calc(var(--nav-h) + 24px) 40px; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: center;
}
.lb-eyebrow { display: flex; justify-content: space-between; gap: 16px; font-family: var(--display); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.lb-eyebrow .n { color: var(--muted); }
.lb-info h2 { margin: 18px 0 14px; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.2vw, 52px); line-height: 1; text-transform: uppercase; letter-spacing: -.02em; }
.lb-rule { height: 1px; background: var(--line); margin: 0 0 18px; }
.lb-info p { margin: 0 0 20px; color: #d9d2c2; max-width: 52ch; }
.lb-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.lb-metrics li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.lb-metrics b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(18px, 1.8vw, 26px); color: var(--leaf); line-height: 1.1; }
.lb-metrics span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.lb-meta { border-top: 1px solid var(--line); margin-bottom: 24px; }
.lb-meta div { display: flex; gap: 20px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lb-meta dt { width: 84px; flex: none; color: var(--muted); font-family: var(--display); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding-top: 3px; }
.lb-meta dd { margin: 0; }
.lb-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--ink); border-radius: 999px; padding: 14px 24px 13px;
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  transition: color .4s var(--ease);
  isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1;
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.solid::before { background: var(--ink); }
.lb-close {
  position: absolute; top: 24px; right: var(--gutter); z-index: 3;
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.lb-close:hover { color: var(--accent); }

.no-webgl-list { display: none; }
.no-webgl .no-webgl-list {
  display: grid; position: fixed; inset: 90px var(--gutter) calc(var(--nav-h) + 20px); z-index: 30; overflow-y: auto;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-content: start;
}
.no-webgl-list a { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.no-webgl-list img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.no-webgl-list span { display: block; padding: 12px 14px; font-family: var(--display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* ==========================================================================
   SUBPAGES (about, contact, case studies)
   ========================================================================== */
.sub { padding-bottom: calc(var(--nav-h) + 40px); }
.wrap { width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
}
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: -.02em; line-height: 1.02; margin: 0; }

/* about hero */
.about-hero { padding: 120px 0 50px; }
.about-hero .grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.about-hero h1 { font-weight: 800; font-size: clamp(32px, 5vw, 80px); margin: 22px 0 0; }
.about-hero h1 em { font-style: normal; color: var(--accent); }
.portrait { position: relative; transform-style: preserve-3d; transition: transform .25s ease-out; }
.portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 58% 30%; border-radius: 4px; }
.portrait svg { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); pointer-events: none; }
.portrait rect { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 4; animation: march 1.2s linear infinite; }
.lede { max-width: 62ch; font-size: clamp(18px, 1.6vw, 22px); color: #ddd6c5; margin: 40px 0 0; }

.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; margin: 60px 0 0; }
.marquee-track { display: flex; width: max-content; animation: slide 32s linear infinite; }
.marquee-track span {
  font-family: var(--display); font-weight: 800; font-size: clamp(28px, 5vw, 72px); text-transform: uppercase; padding-right: .6em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.2px var(--ink);
}
.marquee-track span:nth-child(3n+1) { color: var(--ink); -webkit-text-stroke: 0; }
.marquee-track i { font-style: normal; color: var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }

.block { padding: clamp(60px, 9vw, 130px) 0 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 40px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.block-head h2 { font-weight: 800; font-size: clamp(28px, 4vw, 60px); }
.block-head .eyebrow { color: var(--muted); }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); }
.story-grid p { margin: 0 0 1.1em; color: #ddd6c5; }
.story-grid ul { margin: 0; padding: 0; list-style: none; }
.story-grid li { padding: 16px 0 16px 34px; border-top: 1px solid var(--line); position: relative; color: #ddd6c5; }
.story-grid li::before { content: "↗"; position: absolute; left: 0; top: 16px; color: var(--accent); font-family: var(--display); font-size: 14px; }
.story-grid li:last-child { border-bottom: 1px solid var(--line); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 14px; margin-top: 44px; }
.stat { border: 1px solid var(--line); border-radius: 16px; padding: 22px; transition: border-color .3s, transform .5s var(--ease), background .3s; }
.stat:hover { border-color: var(--leaf); transform: translateY(-4px); background: rgba(196,224,122,.05); }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 46px); color: var(--leaf); line-height: 1; }
.stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.4; }

/* experience */
.role { display: grid; grid-template-columns: 200px 1fr; gap: 30px; padding: 34px 0; border-bottom: 1px solid var(--line); position: relative; transition: padding .5s var(--ease); }
.role::before { content: ""; position: absolute; inset: 0 -20px; background: rgba(244,236,220,.04); opacity: 0; transition: opacity .4s; z-index: -1; border-radius: 12px; }
.role:hover::before { opacity: 1; }
.role .when { font-family: var(--display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.7; }
.role h3 { font-weight: 700; font-size: clamp(20px, 2.2vw, 32px); }
.role .where { margin: 8px 0 18px; color: var(--accent); font-family: var(--display); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.role ul { margin: 0; padding: 0; list-style: none; }
.role li { padding: 0 0 12px 22px; position: relative; color: #d3ccbb; font-size: 16px; }
.role li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--accent); }

.edu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.edu > div { border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.edu h3 { font-size: 20px; font-weight: 700; }
.edu .deg { margin: 10px 0 0; color: #ddd6c5; }
.edu .meta { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.edu .gpa { float: right; font-family: var(--display); font-size: 11px; color: var(--leaf); letter-spacing: .08em; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.skill-card { border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.skill-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 18px; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px 5px; font-size: 14px; color: #ddd6c5;
  transition: background .25s, color .25s, border-color .25s, transform .4s var(--ease);
}
.chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-3px) rotate(-2deg); }
.tools-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tools-row .chip { font-family: var(--display); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 12px 18px 11px; }

/* cta block */
.cta-band { margin-top: clamp(70px, 10vw, 140px); border-top: 1px solid var(--line); padding-top: 60px; text-align: center; }
.cta-band h2 { font-weight: 800; font-size: clamp(34px, 7vw, 120px); }
.cta-band h2 a { color: var(--accent); transition: color .3s; }
.cta-band h2 a:hover { color: var(--leaf); }
.cta-band .row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

/* contact */
.contact-hero { min-height: 100vh; display: grid; align-content: center; padding: 140px 0 100px; }
.contact-hero h1 { font-weight: 800; font-size: clamp(40px, 9vw, 150px); }
.contact-hero h1 em { font-style: normal; color: var(--accent); }
.contact-links { margin-top: 60px; border-top: 1px solid var(--line); }
.contact-links a {
  display: grid; grid-template-columns: 160px 1fr auto; gap: 20px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line);
  transition: padding .5s var(--ease), color .3s;
}
.contact-links a:hover { padding-left: 24px; color: var(--accent); }
.contact-links .k { font-family: var(--display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-links .v { font-family: var(--display); font-weight: 600; font-size: clamp(16px, 2.4vw, 34px); overflow-wrap: anywhere; }
.contact-links .arr { font-family: var(--display); font-size: 22px; transition: transform .5s var(--ease); }
.contact-links a:hover .arr { transform: translate(6px, -6px); }

/* case study ---------------------------------------------------------------- */
.cs-hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; padding: 140px 0 60px; overflow: hidden; isolation: isolate; }
.cs-hero .bg { position: absolute; inset: -5% 0; z-index: -2; }
.cs-hero .bg img { width: 100%; height: 100%; object-fit: cover; }
.cs-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--bg) 4%, rgba(14,14,13,.72) 42%, rgba(14,14,13,.5)); }
.cs-hero h1 { font-weight: 800; font-size: clamp(34px, 6.4vw, 108px); max-width: 16ch; margin: 18px 0 22px; }
.cs-hero .sum { max-width: 60ch; font-size: clamp(17px, 1.5vw, 21px); color: #e6dfcf; margin: 0; }

.cs-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-block: 1px solid var(--line); margin-top: -1px; }
.cs-meta > div { padding: 22px 22px 22px 0; border-right: 1px solid var(--line); padding-left: 22px; }
.cs-meta > div:first-child { padding-left: 0; }
.cs-meta > div:last-child { border-right: 0; }
.cs-meta dt { font-family: var(--display); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cs-meta dd { margin: 0; font-size: 15px; }

.cs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(30px, 5vw, 90px); padding-top: 70px; }
.toc { position: sticky; top: 100px; align-self: start; font-size: 14px; max-height: calc(100vh - 170px); overflow-y: auto; scrollbar-width: none; }
.toc .eyebrow { display: block; margin-bottom: 18px; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); transition: color .3s, border-color .3s; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--accent); }
.toc .progress { margin-top: 22px; height: 2px; background: var(--line); }
.toc .progress i { display: block; height: 100%; width: 0; background: var(--accent); }

.cs-body section { padding-bottom: clamp(44px, 6vw, 84px); scroll-margin-top: 90px; }
.cs-body h2 { font-weight: 800; font-size: clamp(24px, 3.2vw, 46px); margin-bottom: 26px; }
.cs-body h3 { font-weight: 700; font-size: clamp(16px, 1.5vw, 21px); margin: 34px 0 12px; color: var(--leaf); letter-spacing: 0; }
.cs-body p { margin: 0 0 1.1em; color: #ddd6c5; max-width: 70ch; }
.cs-body ul, .cs-body ol { margin: 0 0 1.4em; padding-left: 0; list-style: none; max-width: 74ch; counter-reset: li; }
.cs-body li { position: relative; padding: 0 0 12px 30px; color: #d6cfbe; }
.cs-body ul > li::before { content: ""; position: absolute; left: 4px; top: .78em; width: 12px; height: 1px; background: var(--accent); }
.cs-body ol > li { counter-increment: li; }
.cs-body ol > li::before { content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: .28em; font-family: var(--display); font-size: 11px; color: var(--accent); }
.cs-body .prose-quote { border-left: 2px solid var(--accent); padding-left: 20px; margin: 0 0 1.4em; font-style: italic; color: #f0e8d5; max-width: 66ch; }
.cs-body .callout { border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; margin: 0 0 1.4em; max-width: 74ch; background: rgba(244,236,220,.03); }
.cs-body .callout p:last-child, .cs-body .callout ul:last-child { margin-bottom: 0; }
.cs-body u { text-decoration-color: var(--accent); text-underline-offset: 4px; }
.cs-body a.inline { color: var(--accent); border-bottom: 1px solid currentColor; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0 0 40px; }
.fig { margin: 0 0 22px; position: relative; }
.fig img { width: 100%; height: auto; border-radius: 10px; background: #fff; transition: transform .6s var(--ease); }
.fig.zoomable img { cursor: none; }
.fig.zoomable:hover img { transform: scale(1.012); }
.fig.contain img { max-width: min(100%, 520px); margin-inline: auto; background: transparent; }
.fig-grid { display: grid; gap: 14px; margin: 0 0 24px; grid-template-columns: repeat(var(--cols, 2), 1fr); align-items: start; }
.fig-grid .fig { margin: 0; }
.fig-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.next-project { display: block; margin-top: clamp(40px, 8vw, 100px); border-top: 1px solid var(--line); padding: 50px 0 10px; }
.next-project .eyebrow { color: var(--muted); }
.next-project h2 { font-weight: 800; font-size: clamp(30px, 6vw, 96px); margin-top: 14px; transition: color .3s, transform .6s var(--ease); }
.next-project:hover h2 { color: var(--accent); transform: translateX(16px); }

#zoom { position: fixed; inset: 0; z-index: 140; background: rgba(10,10,9,.94); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; padding: 40px; }
#zoom.open { opacity: 1; visibility: visible; transition: opacity .4s; }
#zoom img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 8px; transform: scale(.96); transition: transform .6s var(--ease); }
#zoom.open img { transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  :root { --nav-h: 0px; }
  body { font-size: 16px; }
  .bottom-nav, .top-right, .top-logo { display: none; }
  .mobile-nav {
    display: flex; position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 70; align-items: center; justify-content: space-between;
    padding: 0 var(--gutter); background: linear-gradient(to bottom, rgba(14,14,13,.9), rgba(14,14,13,0));
  }
  .mobile-nav .logo { position: relative; width: 70px; height: 38px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; }
  .mobile-nav .logo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .mobile-nav .logo rect { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; animation: march 1.2s linear infinite; }
  .burger { width: 44px; height: 44px; display: grid; place-content: center; gap: 7px; }
  .burger span { display: block; width: 26px; height: 2px; background: var(--ink); transition: transform .4s var(--ease); }
  .menu-open .burger span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-open .burger span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .mobile-menu {
    display: flex; flex-direction: column; justify-content: center; gap: 6px; position: fixed; inset: 0; z-index: 65; padding: 90px var(--gutter) 40px;
    background: var(--bg); transform: translateY(-101%); transition: transform .7s var(--ease);
  }
  .menu-open .mobile-menu { transform: none; }
  .mobile-menu a { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 9vw, 52px); text-transform: uppercase; letter-spacing: -.02em; padding: 8px 0; }
  .mobile-menu a[aria-current="page"] { color: var(--accent); }

  .filters { top: auto; bottom: 18px; left: 0; right: 0; transform: none; flex-direction: row; overflow-x: auto; padding: 4px var(--gutter); gap: 8px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .label { display: none; }
  .pill { white-space: nowrap; flex: none; }
  .pill:hover { transform: none; }
  .stage-hint, .count-badge { display: none; }
  .home-title { place-items: start center; padding: 84px 0 0; }
  .home-title h1 { font-size: clamp(44px, 15vw, 96px); }
  .home-title p { margin-top: 12px; }

  #lightbox { grid-template-columns: 1fr; grid-template-rows: minmax(0, 42%) 1fr; }
  .lb-media { padding: 70px var(--gutter) 10px; }
  .lb-frame img { max-height: 32vh; }
  .lb-info { padding: 20px var(--gutter) 40px; justify-content: flex-start; }
  .lb-arrows { inset: auto var(--gutter) auto auto; bottom: 8px; position: absolute; }

  .about-hero { padding-top: 110px; }
  .about-hero .grid, .story-grid, .edu, .skills, .role { grid-template-columns: 1fr; }
  .about-hero .grid { gap: 40px; }
  .portrait { max-width: 420px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .role { gap: 10px; }
  .contact-links a { grid-template-columns: 1fr auto; }
  .contact-links .k { grid-column: 1 / -1; }

  .cs-hero { min-height: 80vh; padding-top: 100px; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-meta > div:nth-child(2) { border-right: 0; }
  .cs-meta > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cs-meta > div:nth-child(3) { padding-left: 0; }
  .cs-layout { grid-template-columns: 1fr; padding-top: 40px; }
  .toc { display: none; }
  .fig-grid { grid-template-columns: 1fr 1fr; }
  .fig-pair { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .fig-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .marquee-track { animation: none; }
}
@media (hover: none) { #cursor, #trail { display: none; } }

/* additions */
main { position: relative; z-index: 2; }
body.page-home main { position: static; }
.cs-body p.kicker { color: var(--ink); font-weight: 600; margin: 1.6em 0 .6em; }
.cs-body .reveal > p.kicker:first-child { margin-top: 0; }
.cs-body blockquote { margin: 0 0 1.2em; }
.cs-body .callout h3 { margin-top: 0; }
.cs-body .callout h3:not(:first-child) { margin-top: 26px; }
.stat b.long { font-size: clamp(18px, 1.9vw, 27px); line-height: 1.15; }
.cs-hero .eyebrow { color: var(--ink); text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.story-grid li.lead { padding-left: 0; border-top: 0; }
.story-grid li.lead::before { content: none; }

/* ---- sticker sheet: peel + tear (about) ---- */
.sheet {
  position: relative; z-index: 6; max-width: 430px; width: 100%; margin-left: auto; color: #0e0e0d; border-radius: 16px; padding: 20px 20px 16px;
  background: #efe6d2 radial-gradient(rgba(0,0,0,.07) 1px, transparent 1.3px) 0 0 / 14px 14px;
  box-shadow: 0 34px 70px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.06);
}
.sheet-head, .sheet-foot { display: flex; justify-content: space-between; font-family: var(--display); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.sheet-head { margin-bottom: 14px; } .sheet-foot { margin-top: 14px; }
.sheet-grid { position: relative; aspect-ratio: 5 / 6.4; container-type: inline-size; }
.slot {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); aspect-ratio: var(--ar);
  border: 1.5px dashed rgba(14,14,13,.38); border-radius: 22px; background: rgba(14,14,13,.055);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.12);
}
.slot::after { content: "peeled"; position: absolute; inset: 0; pointer-events: none; z-index: -1; display: grid; place-items: center; font-family: var(--display); font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(14,14,13,.35); opacity: 0; transition: opacity .4s .15s; }
.slot.empty { background: repeating-linear-gradient(45deg, rgba(14,14,13,.07) 0 5px, rgba(14,14,13,.02) 5px 10px); }
.slot.empty::after { opacity: 1; }
.sticker {
  position: absolute; inset: 5px; touch-action: none; user-select: none; -webkit-user-select: none;
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--r, 0deg)) scale(var(--sc, 1));
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)) drop-shadow(0 4px 6px rgba(0,0,0,.22));
  transition: filter .3s;
}
.sticker.drag { --sc: 1.07; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)) drop-shadow(0 26px 18px rgba(0,0,0,.4)); }
.sticker.off { filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)) drop-shadow(0 5px 7px rgba(0,0,0,.35)); }
.sticker .piece { position: absolute; inset: 0; background: #fff; padding: 5px; border-radius: 22px; }
.sticker .art {
  position: relative; overflow: hidden; width: 100%; height: 100%; border-radius: 17px; padding: 6%;
  display: flex; flex-direction: column; justify-content: center; background: var(--bg-c); color: var(--fg);
}
.sticker .art b { font-family: var(--display); font-weight: 800; font-size: var(--fs, 6cqw); line-height: 1.02; letter-spacing: -.02em; text-transform: uppercase; }
.sticker .art small { margin-top: .5em; font-family: var(--display); font-weight: 600; font-size: 2.6cqw; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.sticker.outline .art { background: #0e0e0d; }
.sticker.outline .art b { color: transparent; -webkit-text-stroke: 1.6px var(--fg); }
.sticker .art::after { /* moving sheen, follows the pointer */
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: linear-gradient(105deg, transparent calc(var(--gx, 50%) - 24%), rgba(255,255,255,.42) var(--gx, 50%), transparent calc(var(--gx, 50%) + 24%));
}
.sticker:hover .art::after, .sticker.drag .art::after { opacity: 1; }
.sticker .flap { display: none; position: absolute; inset: 0; border-radius: 22px; transform-origin: 0 0; pointer-events: none; }
.sticker-hint { margin: 22px 0 0; max-width: 46ch; font-family: var(--display); font-size: 10.5px; line-height: 1.7; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sticker-reset { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 4px; font-family: var(--display); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; transition: background .3s, color .3s; }
.sticker-reset:hover { background: var(--ink); color: var(--bg); }
@media (max-width: 900px) { .sheet { max-width: 520px; margin-inline: auto; } }
