/* Layout: full-bleed cinematic bands (hero, Metzee, work) alternate with a 12-col editorial measure.
   Dark-first: "liquid chrome at night". Iridescence is the only colour; everything else is ink and steel. */
:root {
  --bg: #07090c;
  --bg-2: #0e1217;
  --fg: #e8ecf0;
  --fg-2: #8a94a0;
  --line: rgba(232, 236, 240, 0.11);
  --iri-1: #a9c8ff;
  --iri-2: #d7b8ff;
  --iri-3: #ffc7a8;
  --iri: linear-gradient(100deg, var(--iri-1), var(--iri-2) 45%, var(--iri-3));
  --shadow: rgba(0, 0, 0, 0.55);

  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: max(clamp(16px, 3.4vw, 48px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 3.4vw, 48px), env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #e7eaee;
    --bg-2: #dce0e5;
    --fg: #0a0d11;
    --fg-2: #56606c;
    --line: rgba(10, 13, 17, 0.12);
    --iri-1: #3d63e0;
    --iri-2: #8a4fd8;
    --iri-3: #d9663d;
    --shadow: rgba(20, 30, 50, 0.22);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #e7eaee;
  --bg-2: #dce0e5;
  --fg: #0a0d11;
  --fg-2: #56606c;
  --line: rgba(10, 13, 17, 0.12);
  --iri-1: #3d63e0;
  --iri-2: #8a4fd8;
  --iri-3: #d9663d;
  --shadow: rgba(20, 30, 50, 0.22);
  color-scheme: light;
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: clamp(16px, 1.05vw, 18px); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 400; }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter-r); max-width: 1600px; margin-inline: auto; }
.iri { background: var(--iri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--iri-2); color: #07090c; }
:focus-visible { outline: 1.5px solid var(--iri-1); outline-offset: 4px; border-radius: 6px; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 300; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: calc(16px + env(safe-area-inset-top, 0px)); }

.label { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--fg-2); }
.label__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--iri); box-shadow: 0 0 12px var(--iri-1); }

/* Film grain over everything for a printed, physical feel */
body::after {
  content: ""; position: fixed; inset: -100%; z-index: 250; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain { 0%,100%{transform:translate(0,0)} 25%{transform:translate(-4%,3%)} 50%{transform:translate(3%,-2%)} 75%{transform:translate(-2%,-4%)} }

/* ───────────── Loader ───────────── */
.loader {
  position: fixed; inset: 0; z-index: 400; background: var(--bg); color: var(--fg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(24px + env(safe-area-inset-top, 0px)) var(--gutter-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  transition: transform 1.1s var(--ease-io);
}
.loader__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.loader__name { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.loader__count { font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: clamp(80px, 18vw, 260px); line-height: .8; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.loader__bar { height: 1px; background: var(--line); margin-top: 20px; overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--iri); transform: scaleX(var(--p, 0)); transform-origin: left; }
.is-ready .loader { transform: translateY(-100%); }
.no-js .loader { display: none; }

/* ───────────── Cursor ───────────── */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 350; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference; opacity: 0;
  display: grid; place-items: center;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), opacity .3s;
}
.has-cursor .cursor { opacity: 1; }
.cursor.is-link { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.cursor.is-label { width: 92px; height: 92px; margin: -46px 0 0 -46px; mix-blend-mode: normal; background: var(--fg); }
.cursor__label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--bg); opacity: 0; transition: opacity .3s; }
.cursor.is-label .cursor__label { opacity: 1; }
@media (pointer: fine) { .has-cursor, .has-cursor a, .has-cursor button { cursor: none; } }

/* ───────────── Nav ───────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter-r) 18px var(--gutter);
  mix-blend-mode: difference; color: #fff;
  transition: transform .5s var(--ease), background-color .4s, border-color .4s, color .4s;
  border-bottom: 1px solid transparent;
}
/* Past the hero the bar gets its own surface so page content never shows through it,
   and it slides away while scrolling down */
.nav.is-solid {
  mix-blend-mode: normal; color: var(--fg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
  padding-block: calc(12px + env(safe-area-inset-top, 0px)) 12px;
}
.nav.is-solid .chip { border-color: var(--line); }
.nav.is-solid .chip:hover { border-color: var(--fg); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__mark-name { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.nav__links { display: flex; gap: clamp(14px, 2.2vw, 34px); font-size: 14px; }
.nav__links a { position: relative; padding: 4px 0; opacity: .78; transition: opacity .3s; }
.nav__links a:hover, .nav__links a.is-active { opacity: 1; }
.nav__links a::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; transform: scale(0); transition: transform .4s var(--ease); }
.nav__links a.is-active::after { transform: scale(1); }
.nav__tools { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.nav__clock { opacity: .78; font-variant-numeric: tabular-nums; }
.chip {
  appearance: none; background: none; color: inherit; cursor: pointer; font: inherit;
  height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  display: inline-grid; place-items: center; transition: border-color .3s, background .3s;
}
.chip:hover { border-color: #fff; }
.chip kbd { font-size: 11px; }
.chip--round { width: 34px; padding: 0; }
.chip__half { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }

/* ───────────── Hero ───────────── */
.hero { position: relative; height: 100svh; min-height: 620px; max-height: 1100px; overflow: hidden; isolation: isolate; background: #05070a; color: #fff; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -2; }
.hero__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5,7,10,.35) 0%, transparent 30%, transparent 55%, rgba(5,7,10,.55) 100%); }
.hero__inner {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(110px + env(safe-area-inset-top, 0px)) var(--gutter-r) clamp(18px, 3vw, 36px) var(--gutter);
}
.hero__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.hero__intro { margin: 0; font-size: clamp(20px, 2vw, 30px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 400; max-width: 22ch; }
.hero__intro .split { display: block; }
.hero__intro .iri { background: linear-gradient(100deg, #b9d3ff, #e2c6ff 45%, #ffd2b8); -webkit-background-clip: text; background-clip: text; }
.hero__index { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 260px; color: rgba(255,255,255,.62); }
.hero__index li { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.14); }
.hero__index li span:last-child { color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #7dffc4; box-shadow: 0 0 0 0 rgba(125,255,196,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(125,255,196,0); } }

.hero__name {
  margin: 0; font-family: var(--display); font-weight: 750; font-stretch: 75%;
  font-size: clamp(64px, 17.2vw, 330px); line-height: .8; letter-spacing: -0.012em;
  font-variation-settings: "opsz" 96;
}
.hero__line { display: flex; align-items: flex-end; gap: 2vw; overflow: hidden; padding-top: .04em; }
.hero__line--2 { justify-content: space-between; }
.hero__chars { display: inline-block; white-space: nowrap; }
.hero__chars .word { display: inline-block; white-space: nowrap; }
.hero__chars .ch { display: inline-block; transform: translateY(110%); transition: transform 1.3s var(--ease); transition-delay: calc(var(--i) * 38ms + 150ms); }
.is-ready .hero__chars .ch { transform: none; }
.hero__tag { color: rgba(255,255,255,.6); line-height: 1.5; padding-bottom: .9vw; margin-right: auto; margin-left: 1vw; }
.hero__scroll {
  flex: none; width: clamp(64px, 7vw, 104px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4); display: grid; place-items: center; align-content: center; gap: 2px;
  margin-bottom: .6vw; transition: background .4s, color .4s, border-color .4s;
}
.hero__scroll svg { width: 20px; height: 20px; animation: nudge 2s var(--ease) infinite; }
.hero__scroll .mono { font-size: 10px; }
.hero__scroll:hover { background: #fff; color: #05070a; border-color: #fff; }
@keyframes nudge { 0%,100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }

/* ───────────── About ───────────── */
.about { padding-block: clamp(110px, 16vw, 220px) clamp(80px, 10vw, 140px); display: grid; gap: clamp(40px, 6vw, 80px); }
.about__statement {
  margin: 0; font-family: var(--display); font-weight: 500; font-stretch: 88%;
  font-size: clamp(32px, 4.8vw, 84px); line-height: 1.04; letter-spacing: -0.012em; max-width: 23ch;
}
.about__statement .w { opacity: .16; transition: opacity .25s linear; }
.about__statement .w.on { opacity: 1; }
.no-js .about__statement .w { opacity: 1; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.facts__item { padding: 20px 20px 0 0; display: grid; gap: 8px; }
.facts__item + .facts__item { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { color: var(--fg-2); }
.facts dd { margin: 0; font-size: clamp(17px, 1.4vw, 22px); }

/* ───────────── Metzee ───────────── */
.metzee { position: relative; }
.metzee__scene { position: relative; height: 165svh; }
.metzee__sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; place-items: center; isolation: isolate;
}
.metzee__orb { position: absolute; opacity: var(--orb-o, 1); width: min(78vh, 86vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; z-index: -1; transform: scale(var(--orb, .6)); filter: drop-shadow(0 40px 80px var(--shadow)); }
.metzee__canvas { width: 100%; height: 100%; display: block; }
.metzee__word {
  margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(90px, 25vw, 480px); line-height: .8; letter-spacing: -0.01em; opacity: var(--word-o, 1);
  color: #fff; mix-blend-mode: difference; transform: scale(var(--word, 1)); will-change: transform;
}
.metzee__body { position: relative; z-index: 2; padding-block: clamp(40px, 6vw, 80px) clamp(100px, 14vw, 200px); display: grid; gap: clamp(28px, 4vw, 48px); }
.metzee__lede {
  margin: 0; max-width: 22ch; font-family: var(--display); font-weight: 500; font-stretch: 88%;
  font-size: clamp(32px, 4.4vw, 72px); line-height: 1.04; letter-spacing: -0.012em;
}
.metzee__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metzee__card {
  min-width: 0; padding: clamp(20px, 2.4vw, 32px); border-radius: 20px;
  background: color-mix(in srgb, var(--bg-2) 72%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  display: grid; gap: 40px; align-content: space-between; min-height: 220px;
}
.metzee__card h3 { margin: 0; color: var(--fg-2); }
.metzee__card p { margin: 0; font-size: clamp(17px, 1.3vw, 21px); line-height: 1.35; }

.pill {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500;
  position: relative; overflow: hidden; isolation: isolate; transition: color .5s var(--ease), border-color .5s;
}
.pill::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: translateY(102%); border-radius: inherit; transition: transform .6s var(--ease); }
.pill:hover { color: var(--bg); border-color: var(--fg); }
.pill:hover::before { transform: none; }
.pill--iri { border: 0; color: #07090c; background: linear-gradient(100deg, #b9d3ff, #e2c6ff 45%, #ffd2b8); }
.pill--iri::before { background: var(--fg); }

/* ───────────── Work ───────────── */
.work { position: relative; height: var(--work-h, auto); }
.work__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: clamp(24px, 4vh, 48px); }
.work__head { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.work__progress { margin: 0; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.work__progress span:first-child { color: var(--fg); }
.work__track {
  list-style: none; margin: 0; padding: 0 var(--gutter-r) 0 var(--gutter);
  display: flex; gap: clamp(16px, 2vw, 28px); width: max-content; will-change: transform;
}
.card { width: clamp(300px, 42vw, 720px); flex: none; }
.card__link { display: grid; gap: 18px; }
.card__art {
  position: relative; aspect-ratio: 16 / 11; max-width: 100%; border-radius: 22px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 70% at 25% 25%, var(--a), transparent 70%),
    radial-gradient(55% 60% at 80% 75%, var(--b), transparent 70%),
    var(--c);
  background-size: 140% 140%; background-position: 0% 0%;
  transition: background-position 1.2s var(--ease), border-radius .6s var(--ease);
}
.card__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.35)); }
.card__art[style*="--img"] { background: var(--img) center / cover; }
.card__glyph {
  position: absolute; right: 4%; bottom: -12%; font-family: var(--display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(160px, 22vw, 380px); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.55);
  transition: transform 1.2s var(--ease);
}
.card__link:hover .card__art { background-position: 100% 100%; border-radius: 40px; }
.card__link:hover .card__glyph { transform: translateY(-6%) rotate(-4deg); }
.card__meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: baseline; }
.card__title { margin: 0; font-family: var(--display); font-weight: 600; font-stretch: 85%; font-size: clamp(28px, 2.6vw, 44px); letter-spacing: -0.008em; line-height: 1; }
.card__desc { margin: 0; color: var(--fg-2); grid-column: 1; }
.card__tags { margin: 0; color: var(--fg-2); display: flex; gap: 14px; grid-column: 2; grid-row: 1 / span 2; align-self: start; }

/* ───────────── Experience ───────────── */
.exp { padding-block: clamp(110px, 14vw, 200px) 0; display: grid; gap: clamp(32px, 4vw, 56px); }
.exp__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.exp__row {
  display: grid; grid-template-columns: 180px minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.3fr); gap: 24px; align-items: baseline;
  padding: clamp(22px, 2.6vw, 36px) 0; border-bottom: 1px solid var(--line); position: relative; isolation: isolate;
}
.exp__row::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--bg-2); transform: scaleY(0); transition: transform .5s var(--ease); }
.exp__row:hover::before { transform: none; }
.exp__when { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.exp__role { font-family: var(--display); font-weight: 600; font-stretch: 85%; font-size: clamp(24px, 2.4vw, 40px); letter-spacing: -0.008em; line-height: 1.05; }
.exp__org { font-size: clamp(17px, 1.4vw, 22px); }
.exp > .exp__list > .exp__row:first-child .exp__org { background: var(--iri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.exp__note { color: var(--fg-2); }
.kit { display: grid; gap: 20px; margin-top: clamp(24px, 4vw, 48px); }
.kit__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.kit__list li { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; transition: background .3s, color .3s, border-color .3s; }
.kit__list li:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ───────────── Contact ───────────── */
.contact { padding-top: clamp(120px, 16vw, 240px); overflow: hidden; }
.contact__marquee { border-block: 1px solid var(--line); padding-block: clamp(10px, 1.6vw, 22px); }
.contact__track {
  display: flex; gap: .3em; width: max-content; animation: marquee 22s linear infinite;
  font-family: var(--display); font-weight: 750; font-stretch: 75%; font-size: clamp(80px, 15vw, 280px);
  line-height: .9; letter-spacing: -0.01em; white-space: nowrap;
}
.contact__track span { padding-right: .3em; }
.contact__track .iri { font-weight: 300; }
@keyframes marquee { to { transform: translateX(-50%); } }
.contact__body { padding-block: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 56px; align-items: center; }
.contact__lede { margin: 0; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.3; color: var(--fg-2); max-width: 26ch; }
.contact__actions { display: flex; align-items: center; justify-content: flex-end; gap: clamp(20px, 3vw, 48px); flex-wrap: wrap; }
.contact__email {
  appearance: none; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left;
  display: grid; gap: 8px; min-width: 0;
}
.contact__email-text {
  font-family: var(--display); font-weight: 500; font-stretch: 88%; font-size: clamp(26px, 3.2vw, 54px); letter-spacing: -0.01em; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; padding-bottom: 6px; transition: background-size .7s var(--ease);
}
.contact__email:hover .contact__email-text { background-size: 100% 1.5px; }
.contact__email-hint { color: var(--fg-2); }
.contact__orb {
  flex: none; width: clamp(120px, 12vw, 180px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center;
  color: #07090c; font-weight: 600; font-size: clamp(16px, 1.3vw, 20px); line-height: 1.1;
  background: conic-gradient(from var(--spin, 0deg), #b9d3ff, #e2c6ff, #ffd2b8, #c2fff0, #b9d3ff);
  animation: spin 8s linear infinite; box-shadow: 0 20px 60px -10px var(--shadow);
}
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
.socials { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: inline-flex; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); transition: background .3s, color .3s, border-color .3s; }
.socials a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.foot {
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; color: var(--fg-2);
  padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
}
.foot a:hover { color: var(--fg); }

/* ───────────── Photos (shared) ─────────────
   Every .photo shows its <img>; when the file isn't there yet, main.js adds .is-empty
   and the frame shows a designed placeholder naming the file to add. */
.photo { position: relative; margin: 0; overflow: hidden; isolation: isolate; background: var(--bg-2); }
.photo img { position: absolute; inset: -8% 0; width: 100%; height: 116%; max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); transform: translate3d(0, var(--py, 0px), 0) scale(var(--ps, 1)); will-change: transform; }
.photo.is-empty img { display: none; }
.photo.is-empty {
  background:
    radial-gradient(70% 80% at var(--gx, 30%) var(--gy, 30%), color-mix(in srgb, var(--iri-1) 55%, transparent), transparent 70%),
    radial-gradient(60% 70% at calc(100% - var(--gx, 30%)) 80%, color-mix(in srgb, var(--iri-3) 45%, transparent), transparent 70%),
    radial-gradient(50% 50% at 70% 20%, color-mix(in srgb, var(--iri-2) 50%, transparent), transparent 70%),
    var(--bg-2);
}
.photo.is-empty::before {
  content: ""; position: absolute; inset: 18px; pointer-events: none;
  background:
    linear-gradient(var(--fg), var(--fg)) top left / 18px 1px no-repeat,
    linear-gradient(var(--fg), var(--fg)) top left / 1px 18px no-repeat,
    linear-gradient(var(--fg), var(--fg)) top right / 18px 1px no-repeat,
    linear-gradient(var(--fg), var(--fg)) top right / 1px 18px no-repeat,
    linear-gradient(var(--fg), var(--fg)) bottom left / 18px 1px no-repeat,
    linear-gradient(var(--fg), var(--fg)) bottom left / 1px 18px no-repeat,
    linear-gradient(var(--fg), var(--fg)) bottom right / 18px 1px no-repeat,
    linear-gradient(var(--fg), var(--fg)) bottom right / 1px 18px no-repeat;
  opacity: .5;
}
.photo.is-empty::after {
  content: attr(data-photo-label); position: absolute; left: 32px; bottom: 30px; right: 32px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); opacity: .75;
}

/* ───────────── Hero photo (optional) ───────────── */
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; z-index: -2; mix-blend-mode: luminosity; opacity: .5; }
.hero__photo.is-missing { display: none; }

/* ───────────── Portrait ───────────── */
.portrait { position: relative; height: 260svh; }
.portrait__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.portrait__frame {
  position: absolute; inset: 0; --pos: 38% 30%;
  /* the window opens around the face, which sits in the upper part of the photo */
  clip-path: inset(calc((1 - var(--pp, 0)) * 21%) calc((1 - var(--pp, 0)) * 30%) calc((1 - var(--pp, 0)) * 27%) round calc((1 - var(--pp, 0)) * 28px));
  --ps: calc(1.05 - var(--pp, 0) * 0.05);
}
.portrait__frame img { inset: 0; height: 100%; transform-origin: 40% 22%; }
.portrait__frame.is-empty::before { inset: calc((1 - var(--pp, 0)) * 21% + 18px) calc((1 - var(--pp, 0)) * 30% + 18px) calc((1 - var(--pp, 0)) * 27% + 18px); }
.portrait__frame.is-empty::after { left: calc((1 - var(--pp, 0)) * 30% + 32px); bottom: calc((1 - var(--pp, 0)) * 27% + 30px); }
.portrait__say {
  position: relative; z-index: 2; margin: 0; pointer-events: none;
  font-family: var(--display); font-weight: 750; font-stretch: 75%; font-size: min(10vw, 16vh);
  line-height: .85; letter-spacing: -0.01em; color: var(--fg); white-space: nowrap;
  grid-area: 1 / 1; opacity: calc(1 - var(--pp, 0) * 2.2);
}
/* "Hello," sits above the photo card and "I'm Arun." below it, so neither covers the face */
.portrait__say--l { transform: translate(calc(-8vw - var(--pp, 0) * 20vw), calc(-50svh + 11svh)); }
.portrait__say--r { transform: translate(calc(10vw + var(--pp, 0) * 20vw), calc(50svh - 15svh)); }
.portrait__caption {
  position: absolute; right: var(--gutter-r); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); margin: 0; z-index: 2;
  color: #fff; mix-blend-mode: difference; opacity: var(--pp, 0); text-align: right;
}

/* ───────────── Gallery ───────────── */
.gallery { padding-block: clamp(110px, 14vw, 200px) 0; display: grid; gap: clamp(36px, 5vw, 72px); }
.gallery__head { display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: end; }
.gallery__head .label { grid-column: 1 / -1; }
.gallery__title {
  margin: 0; font-family: var(--display); font-weight: 750; font-stretch: 75%;
  font-size: clamp(56px, 9vw, 168px); line-height: .86; letter-spacing: -0.01em;
}
.gallery__note { margin: 0; color: var(--fg-2); padding-bottom: 10px; }
.gallery__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); row-gap: clamp(28px, 3.4vw, 52px); }
.gallery__item { min-width: 0; display: grid; gap: 12px; align-content: start; }
.gallery__btn { appearance: none; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; display: block; width: 100%; border-radius: 18px; }
.gallery__btn .photo { border-radius: 18px; transition: border-radius .8s var(--ease); }
.gallery__btn .photo img { transition: scale 1.2s var(--ease); }
.gallery__btn:hover .photo { border-radius: 36px; }
.gallery__btn:hover .photo img { scale: 1.05; }
.gallery__cap { margin: 0; display: flex; gap: 16px; color: var(--fg-2); }
.gallery__cap span:first-child { color: var(--fg); }
.g-hero { grid-column: span 8; } .g-hero .photo { aspect-ratio: 4 / 3; }
.g-tall { grid-column: span 4; } .g-tall .photo { aspect-ratio: 3 / 4; }
.g-tall:nth-child(3n+2) { margin-top: clamp(40px, 6vw, 110px); }
.g-hero + .g-tall { align-self: end; }
.g-wide { grid-column: span 8; align-self: end; } .g-wide .photo { aspect-ratio: 16 / 10; }
.g-half { grid-column: span 6; } .g-half .photo { aspect-ratio: 4 / 5; }
.g-half + .g-half { margin-top: clamp(40px, 8vw, 140px); }
.g-full { grid-column: 1 / -1; } .g-full .photo { aspect-ratio: 21 / 9; }
.gallery__item .photo { max-width: 100%; }

/* ───────────── Lightbox ───────────── */
.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgba(4, 6, 9, .94); color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(4, 6, 9, .6); backdrop-filter: blur(10px); }
.lightbox__fig { width: min(88vw, 1600px); height: min(78dvh, 1000px); border-radius: 14px; background: transparent; }
.lightbox__fig img { inset: 0; height: 100%; object-fit: contain; transform: none; }
.lightbox__fig.is-empty { background-color: #0e1217; }
.lightbox__cap { position: absolute; left: var(--gutter); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); margin: 0; display: flex; gap: 16px; color: rgba(255,255,255,.7); }
.lightbox__btn {
  position: absolute; appearance: none; background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; height: 48px; min-width: 48px; padding: 0 18px; cursor: pointer; font: inherit; font-size: 15px;
  transition: background .3s, color .3s;
}
.lightbox__btn:hover { background: #fff; color: #05070a; }
.lightbox__close { top: calc(20px + env(safe-area-inset-top, 0px)); right: var(--gutter-r); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.lightbox__prev { left: var(--gutter); top: 50%; translate: 0 -50%; }
.lightbox__next { right: var(--gutter-r); top: 50%; translate: 0 -50%; }

/* ───────────── Command menu ───────────── */
.palette { border: 0; padding: 0; background: transparent; color: var(--fg); width: min(580px, calc(100vw - 32px)); margin: 16vh auto auto; }
.palette::backdrop { background: rgba(4, 6, 9, .55); backdrop-filter: blur(6px); }
.palette__box { background: color-mix(in srgb, var(--bg-2) 92%, transparent); backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 100px -20px var(--shadow); }
.palette__input { width: 100%; padding: 20px 22px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; font: inherit; font-size: 17px; outline: none; }
.palette__list { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow: auto; }
.palette__list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; cursor: pointer; }
.palette__list li[aria-selected="true"] { background: var(--line); }
.palette__list li .mono { color: var(--fg-2); }
.palette__hint { margin: 0; padding: 10px 22px; border-top: 1px solid var(--line); color: var(--fg-2); font-size: 11px; }

/* ───────────── Reveal ───────────── */
.rv { transform: translateY(40px); opacity: 0; transition: transform 1.1s var(--ease), opacity 1.1s var(--ease); }
.rv.in { transform: none; opacity: 1; }
.no-js .rv { transform: none; opacity: 1; }

/* ───────────── Responsive ───────────── */
@media (max-width: 1000px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .exp__row { grid-template-columns: 140px minmax(0, 1fr); gap: 6px 20px; }
  .exp__org, .exp__note { grid-column: 2; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts__item { padding-bottom: 20px; }
  .contact__body { grid-template-columns: 1fr; }
  .contact__actions { justify-content: space-between; }
}
@media (max-width: 760px) {
  .nav__clock { display: none; }
  .hero__index { min-width: 0; width: 100%; }
  .hero__tag { display: none; }
  .hero__name { font-size: 20.5vw; }
  .hero__line:first-child .hero__chars { white-space: normal; }
  .metzee__grid { grid-template-columns: 1fr; }
  .metzee__card { min-height: 0; gap: 18px; }
  /* Work becomes a native swipe carousel */
  .work { height: auto !important; }
  .work__sticky { position: static; height: auto; padding-block: 96px 0; }
  .work__track { transform: none !important; width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
  .work__track::-webkit-scrollbar { display: none; }
  .card { width: 82vw; scroll-snap-align: start; scroll-margin-left: var(--gutter); }
  .card__meta { grid-template-columns: 1fr; }
  .card__tags { grid-column: 1; grid-row: auto; }
  .exp__row { grid-template-columns: 1fr; }
  .portrait { height: 200svh; }
  .portrait__frame { clip-path: inset(calc((1 - var(--pp, 0)) * 20%) calc((1 - var(--pp, 0)) * 8%) calc((1 - var(--pp, 0)) * 24%) round calc((1 - var(--pp, 0)) * 20px)); }
  .portrait__frame.is-empty::before { inset: calc((1 - var(--pp, 0)) * 20% + 14px) calc((1 - var(--pp, 0)) * 8% + 14px) calc((1 - var(--pp, 0)) * 24% + 14px); }
  .portrait__frame.is-empty::after { left: calc((1 - var(--pp, 0)) * 8% + 26px); bottom: calc((1 - var(--pp, 0)) * 24% + 26px); right: 26px; }
  .portrait__say { font-size: 17vw; }
  .portrait__caption { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .portrait__say--l { transform: translate(calc(-16vw - var(--pp, 0) * 20vw), calc(-50svh + 12svh)); }
  .portrait__say--r { transform: translate(calc(12vw + var(--pp, 0) * 20vw), calc(50svh - 14svh)); }
  .gallery__head { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; }
  .g-hero, .g-tall, .g-wide, .g-half, .g-full { grid-column: 1; }
  .g-half + .g-half, .g-tall:nth-child(3n+2) { margin-top: 0; }
  .g-full .photo { aspect-ratio: 4 / 3; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); translate: none; }
  .lightbox__prev { left: auto; right: calc(var(--gutter-r) + 60px); }
  .lightbox__cap { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .exp__org, .exp__note { grid-column: 1; }
  .facts { grid-template-columns: 1fr; }
  .facts__item, .facts__item + .facts__item { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .hero__chars .ch, .rv { transform: none; opacity: 1; }
  .portrait { height: auto; }
  .portrait__sticky { position: relative; }
  .portrait__frame { --pp: 1; }
  .about__statement .w { opacity: 1; }
}
