/* ------------------------------------------------------------------ fonts */
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces.woff2) format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces-italic.woff2) format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "FrauncesHero"; src: url(../fonts/fraunces-hero.woff2) format("woff2"); font-weight: 800; font-display: block; }
@font-face { font-family: "Hanken Grotesk"; src: url(../fonts/hanken-grotesk.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url(../fonts/fragment-mono.woff2) format("woff2"); font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  --paper: #f3eee3;
  --paper-2: #ebe4d5;
  --paper-3: #e1d8c4;
  --ink: #101826;
  --ink-2: #3b4457;
  --ink-3: #596176;
  --line: rgba(16, 24, 38, 0.16);
  --line-soft: rgba(16, 24, 38, 0.08);
  --lapis: #1b3a8c;
  --turq: #19b5a5;
  --turq-ink: #09706a;
  --saffron: #e5a93d;
  --brick: #c65d3b;
  --accent: var(--turq-ink);
  --on-ink: #f3eee3;
  --shadow: 0 1px 0 rgba(16, 24, 38, 0.04), 0 18px 40px -18px rgba(16, 24, 38, 0.28);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.4vw, 64px);
  --wrap: 1360px;
  --bar: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] {
  --paper: #0b1020;
  --paper-2: #111833;
  --paper-3: #19224a;
  --ink: #ece7db;
  --ink-2: #b9b8b2;
  --ink-3: #868a96;
  --line: rgba(236, 231, 219, 0.18);
  --line-soft: rgba(236, 231, 219, 0.08);
  --lapis: #5b7be0;
  --turq: #25c2b1;
  --turq-ink: #3ccfc0;
  --saffron: #f0b955;
  --brick: #e07a58;
  --accent: var(--turq-ink);
  --on-ink: #0b1020;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 22px 44px -18px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 12px); }
body {
  margin: 0; background: var(--paper) url(../img/grain.png); background-size: 128px 128px; color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-synthesis: none; overflow-x: clip;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--saffron); color: #101826; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }


.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100; padding: 10px 14px;
  background: var(--ink); color: var(--paper); border-radius: 8px; transform: translateY(-160%); transition: transform 0.2s;
}
.skip:focus { transform: none; }

/* paper grain, very quiet: a background tile, so there is nothing extra to composite */
:root[data-theme="dark"] body { background-image: url(../img/grain-dark.png); }

/* ------------------------------------------------------------------ top bar */
.bar {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50; height: var(--bar);
  transition: transform 0.4s var(--ease), background-color 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.bar.is-solid { background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-color: var(--line-soft); }
.bar.is-away { transform: translateY(-100%); }
.bar__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 640; font-size: 19px; letter-spacing: -0.01em; font-variation-settings: "opsz" 36; }
.brand__name { white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; color: var(--accent); transition: transform 0.9s var(--ease); }
.brand:hover svg { transform: rotate(135deg); }
.nav { display: flex; gap: clamp(14px, 2.4vw, 34px); font-size: 15px; }
.nav a { position: relative; padding: 6px 0; color: var(--ink-2); transition: color 0.2s; }
.nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.nav a:hover, .nav a.is-on { color: var(--ink); }
.nav a:hover::after, .nav a.is-on::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: 6px; }
.tool {
  height: 38px; min-width: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.tool:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tool svg { width: 16px; height: 16px; }
.tool kbd { font: inherit; opacity: 0.6; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
@media (max-width: 860px) { .nav { display: none; } .tool kbd { display: none; } }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; min-height: 100svh; overflow: clip; isolation: isolate; }
.hero__wall { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; }
/* hero.js stacks these over the wall; every moving part below is a transform or opacity */
.hero__shine { position: absolute; left: 0; z-index: -1; pointer-events: none; overflow: hidden;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.hero__band, .hero__spot { position: absolute; top: 0; left: 0; display: block; will-change: transform; }
.hero__band { width: 34%; height: 100%; transform: translateX(-110%);
  background: linear-gradient(105deg, transparent 22%, rgb(214 246 255 / 0.08) 38%, rgb(226 250 255 / 0.4) 50%, rgb(214 246 255 / 0.08) 62%, transparent 78%);
  animation: hero-band 7.2s cubic-bezier(.45, .05, .3, 1) 1.5s infinite; }
@keyframes hero-band { 0% { transform: translateX(-110%); } 30%, 100% { transform: translateX(310%); } }
.hero__spot { width: 360px; height: 360px; margin: -180px 0 0 -180px; opacity: 0; transition: opacity .5s;
  background: radial-gradient(closest-side, rgb(200 244 255 / 0.36), rgb(200 244 255 / 0.12) 55%, transparent); }
.hero__shine.has-spot .hero__spot { opacity: 1; transition-duration: .2s; }
/* the intro: the wall settles in, then the inlay is laid from left to right with the light on its edge */
.hero.is-intro .hero__lines { animation: hero-fade 1.1s ease-out both; }
.hero.is-intro .hero__glaze { animation: hero-fade 1.1s ease-out both; }
.hero.is-intro .hero__inlay {
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: hero-lay 1.7s cubic-bezier(.5, 0, .2, 1) .15s both; }
.hero.is-intro .hero__band { animation: hero-band-in 1.7s cubic-bezier(.5, 0, .2, 1) .15s both, hero-band 7.2s cubic-bezier(.45, .05, .3, 1) 3.2s infinite; }
@keyframes hero-fade { from { opacity: 0; } }
@keyframes hero-lay { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes hero-band-in { from { transform: translateX(-110%); } to { transform: translateX(310%); } }
@media (prefers-reduced-motion: reduce) { .hero__band, .hero__spot { display: none; } .hero.is-intro .hero__inlay { -webkit-mask-image: none; mask-image: none; } }
.hero__in { position: relative; min-height: 100svh; display: flex; flex-direction: column; padding-block: calc(var(--bar) + clamp(22px, 5vh, 54px)) clamp(22px, 4vh, 40px); }
.hero__meta { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }
.hero__place { display: inline-flex; align-items: center; gap: 10px; }
.dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--turq); }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--turq); opacity: 0.5; animation: ping 2.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.5; } 70%, 100% { transform: scale(3.4); opacity: 0; } }
.hero__name {
  margin-block: clamp(14px, 3vh, 34px) clamp(14px, 3vh, 30px);
  font-family: "FrauncesHero", var(--display); font-weight: 800; font-size: clamp(72px, 30vw, 470px); line-height: 0.9; letter-spacing: -0.02em;
}
.hero.is-ready .hero__name { overflow: hidden; font-size: 0; line-height: 0; margin-block: 0 clamp(14px, 2.4vh, 26px); }
.hero__row { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 80px); align-items: end; }
.hero__lede { font-family: var(--display); font-weight: 420; font-size: clamp(22px, 2.5vw, 34px); line-height: 1.22; letter-spacing: -0.012em; font-variation-settings: "opsz" 48; max-width: 24em; text-wrap: balance; }
.hero__lede .l1 { display: block; }
.hero__lede em { font-style: italic; font-weight: 440; color: var(--accent); }
.hero__side { display: grid; gap: 22px; justify-items: start; }
.hero__note { color: var(--ink-2); font-size: 15.5px; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 560; font-size: 15.5px; border: 1px solid var(--ink); overflow: hidden; isolation: isolate;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transition: transform 0.45s var(--ease); }
.btn--solid { color: var(--paper); }
.btn--solid::before { transform: none; }
.btn--ghost::before { transform: translateY(101%); }
.btn--ghost:hover { color: var(--paper); }
.btn--ghost:hover::before { transform: none; }
.btn--solid::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--turq-ink); transform: translateY(101%); transition: transform 0.45s var(--ease); }
.btn--solid:hover::after { transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn .go { transition: transform 0.35s var(--ease); }
.btn:hover .go { transform: translate(2px, 2px); }
.btn:hover .arr { transform: translateX(3px); }
.hero__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: clamp(24px, 5vh, 52px); padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-3); }
.cue { display: inline-flex; align-items: center; gap: 10px; }
.cue i { width: 1px; height: 28px; background: currentColor; transform-origin: top; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) { .hero__row { grid-template-columns: 1fr; } }
/* tall and narrow screens: the word sits in the middle of the free space instead of leaving a hole under it */
@media (max-width: 640px), (max-aspect-ratio: 9/10) {
  .hero .hero__name, .hero.is-ready .hero__name { margin-block: auto; }
  .hero__row { margin-top: clamp(16px, 3vh, 28px); }
}
@media (max-width: 420px) {
  .tools { gap: 4px; }
  .tool { height: 36px; min-width: 36px; padding: 0 10px; }
}
@media (max-width: 640px) {
  .coords, [data-clock] .tz { display: none; }
  .hero__foot { flex-wrap: wrap; row-gap: 10px; }
  .cue { display: none; }
  .brand { font-size: 17px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; } html { scroll-behavior: auto; } }

/* ------------------------------------------------------------------ reveal */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s); }
html.js [data-reveal].in { opacity: 1; transform: none; }
/* if the script never runs, show everything after a moment */
html.js [data-reveal]:not(.in) { animation: unhide 0.5s ease 3.5s forwards; }
@keyframes unhide { to { opacity: 1; transform: none; } }
.progress { position: fixed; inset-block-start: 0; inset-inline: 0; height: 2px; z-index: 60; background: var(--turq); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ------------------------------------------------------------------ sections */
.sec { padding-block: clamp(56px, 7.5vw, 112px); }
.sec__head { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(28px, 5vw, 56px); color: var(--ink-2); }
.sec__head .rule { flex: 1; height: 1px; background: var(--line); }
.idx { color: var(--accent); }
.display {
  font-family: var(--display); font-weight: 560; font-size: clamp(34px, 5vw, 68px); line-height: 1.04; letter-spacing: -0.022em;
  font-variation-settings: "opsz" 96; text-wrap: balance; max-width: 16em;
}
.display em { font-style: italic; font-weight: 470; color: var(--accent); }
.display--xl { font-size: clamp(44px, 7.4vw, 116px); line-height: 0.98; letter-spacing: -0.03em; max-width: none; }

.strip {
  height: 26px; opacity: 0.85;
  background: linear-gradient(90deg, transparent, var(--ink-3) 14%, var(--ink-3) 86%, transparent);
  -webkit-mask: url(../img/girih.svg) 0 50% / 48px 48px repeat-x; mask: url(../img/girih.svg) 0 50% / 48px 48px repeat-x;
}

/* ------------------------------------------------------------------ about */
.about__grid { display: grid; grid-template-columns: minmax(250px, 390px) minmax(0, 1fr); gap: clamp(36px, 7vw, 120px); align-items: start; }
.portrait { position: sticky; top: calc(var(--bar) + 24px); }
.portrait__stack { position: relative; aspect-ratio: 4 / 5; }
.portrait__ring { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--turq-ink); transform: translate(14px, 14px); transition: transform 0.7s var(--ease); }
.portrait:hover .portrait__ring { transform: translate(22px, 22px); }
.portrait__img { position: absolute; inset: 0; clip-path: url(#arch); background: var(--paper-3); }
.portrait__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; filter: saturate(0.94) contrast(1.02); transition: transform 1.2s var(--ease); }
.portrait:hover .portrait__img img { transform: scale(1.04); }
.portrait__star { position: absolute; width: 74px; inset-inline-end: -22px; bottom: 44px; animation: spin 48s linear infinite; will-change: transform; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 520px) { .portrait__star { inset-inline-end: 6px; width: 62px; } }
.prose p { font-size: 18px; line-height: 1.72; color: var(--ink-2); max-width: 36em; margin-block-start: 1.05em; }
.about__text .display { margin-bottom: 0.2em; }
.facts { margin-top: 44px; max-width: 40em; }
.facts > div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-3); padding-top: 3px; }
.facts dd { margin: 0; }
.facts dd a { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: color 0.2s; }
.facts dd a:hover { color: var(--accent); }
@media (max-width: 880px) {
  .about__grid { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 320px; }
}

/* ------------------------------------------------------------------ work */
.work-sec .display--xl { margin-bottom: 0; }
.work { margin-top: clamp(64px, 9vw, 150px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 84px); align-items: center; --ct: color-mix(in srgb, var(--c) 72%, var(--ink)); }
.work--flip .work__media { order: 2; }
.work__media {
  position: relative; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, var(--c) 13%, var(--paper-2)); border: 1px solid var(--line-soft);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  box-shadow: var(--shadow);
}
.work__media.is-tilting { transition: transform 0.12s linear; }
.work__wall {
  position: absolute; inset: 0; z-index: -1; background: var(--c); opacity: 0.28;
  -webkit-mask: url(../img/girih.svg) 0 0 / 52px 52px; mask: url(../img/girih.svg) 0 0 / 52px 52px;
}
:root[data-theme="dark"] .work__wall { opacity: 0.4; }
.work__media::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 30% 10%, color-mix(in srgb, var(--c) 30%, transparent), transparent 60%); }
.work__frame {
  position: absolute; inset-inline: 7%; top: 50%; translate: 0 -50%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0a0d18;
  box-shadow: 0 34px 60px -26px rgba(5, 8, 20, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.work__frame img, .work__frame video { width: 100%; height: 100%; object-fit: cover; }
.work__frame--art { background: var(--paper); display: grid; place-items: center; padding: 1%; }
.work__chip { position: absolute; inset-inline-start: 16px; top: 16px; padding: 6px 12px; border-radius: 999px; font-size: 11px; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line-soft); z-index: 2; }
.work__meta { display: flex; justify-content: space-between; color: var(--ink-3); padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.work__title { font-family: var(--display); font-size: clamp(46px, 5.8vw, 92px); font-weight: 600; line-height: 0.94; letter-spacing: -0.03em; font-variation-settings: "opsz" 144; }
.work__tag { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(20px, 2vw, 27px); line-height: 1.3; color: var(--ink-2); margin: 14px 0 22px; text-wrap: balance; }
.work__points li, .site__points li { position: relative; padding-inline-start: 24px; margin-bottom: 11px; color: var(--ink-2); font-size: 15.5px; line-height: 1.62; }
.work__points li::before, .site__points li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.5em; width: 11px; height: 11px; background: var(--ct, var(--c));
  clip-path: polygon(17.47% 17.47%, 38.91% 23.22%, 50% 4%, 61.09% 23.22%, 82.53% 17.47%, 76.78% 38.91%, 96% 50%, 76.78% 61.09%, 82.53% 82.53%, 61.09% 76.78%, 50% 96%, 38.91% 76.78%, 17.47% 82.53%, 23.22% 61.09%, 4% 50%, 23.22% 38.91%);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 24px; }
.tags li { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--ink-2); text-transform: none; letter-spacing: 0.02em; }
.work__links { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.link { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; font-weight: 580; font-size: 15px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: color 0.25s, background-size 0.4s var(--ease); }
.link i { font-style: normal; display: inline-block; transition: transform 0.35s var(--ease); }
.link:hover { color: var(--ct, var(--accent)); }
.link:hover i { transform: translate(2px, -2px); }
@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; }
  .work--flip .work__media { order: 0; }
}

/* newsroom diagram */
.flow { width: 100%; height: 100%; color: var(--ink); }
.flow__src rect { fill: var(--paper-2); stroke: var(--ink-3); stroke-width: 1.2; }
.flow__src text, .flow__db text, .flow__router text, .flow__report text { fill: var(--ink-2); }
.flow__wires path { stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 5 9; animation: dash 1.8s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.flow__db ellipse, .flow__db path { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.flow__db ellipse { fill: color-mix(in srgb, var(--c) 18%, var(--paper)); }
.flow__router rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.flow__router circle { fill: var(--c); animation: blink 2.4s ease-in-out infinite; }
.flow__router .p2 { animation-delay: 0.8s; } .flow__router .p3 { animation-delay: 1.6s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.flow__report rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.flow__report path { stroke: var(--ink-3); stroke-width: 3; }
.flow__report .plane path { fill: var(--c); stroke: none; }
.flow__report .plane { animation: fly 3.2s ease-in-out infinite; }
@keyframes fly { 0%, 100% { transform: translate(84px, 6px); } 50% { transform: translate(90px, 0px); } }

/* in production */
.prod__head { display: flex; align-items: center; gap: 16px; margin-block: clamp(70px, 9vw, 130px) 26px; color: var(--ink-2); }
.prod__head .rule { flex: 1; height: 1px; background: var(--line); }
.prod__head h3 { font-weight: 400; }
.prod__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.site {
  position: relative; display: flex; flex-direction: column; padding: clamp(22px, 3vw, 38px); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; isolation: isolate;
  transition: transform 0.5s var(--ease), border-color 0.3s, box-shadow 0.5s var(--ease); --ct: color-mix(in srgb, var(--c) 72%, var(--ink));
}
.site { box-shadow: inset 0 3px 0 var(--ct); }
.site:hover { transform: translateY(-5px); border-color: var(--ct); box-shadow: var(--shadow); }
.site__wall { position: absolute; inset: 0; z-index: -1; background: var(--c); opacity: 0.1; -webkit-mask: url(../img/girih.svg) 0 0 / 52px 52px; mask: url(../img/girih.svg) 0 0 / 52px 52px; transition: opacity 0.5s; }
.site:hover .site__wall { opacity: 0.24; }
.site__top span:first-child { color: var(--ct); }
.site__top { display: flex; justify-content: space-between; color: var(--ink-3); margin-bottom: clamp(26px, 5vw, 56px); }
.site__top span:last-child { direction: ltr; }
.site__title { font-family: var(--display); font-size: clamp(40px, 4.6vw, 68px); font-weight: 600; line-height: 1; letter-spacing: -0.025em; font-variation-settings: "opsz" 144; }
.site__tag { font-family: var(--display); font-style: italic; font-size: clamp(19px, 1.8vw, 24px); color: var(--ink-2); margin: 12px 0 20px; line-height: 1.3; }
.site .tags { margin-top: auto; padding-top: 14px; margin-bottom: 0; }
@media (max-width: 860px) { .prod__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ approach */
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: clamp(36px, 5vw, 70px); }
.rule-card { padding: 30px clamp(14px, 2vw, 30px) 38px; border-inline-end: 1px solid var(--line); }
.rule-card:first-child { padding-inline-start: 0; }
.rule-card:last-child { border-inline-end: 0; padding-inline-end: 0; }
.rule-card h3 { font-family: var(--display); font-weight: 580; font-size: clamp(22px, 2vw, 28px); line-height: 1.12; letter-spacing: -0.015em; margin-bottom: 12px; }
.rule-card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.66; }
@media (max-width: 1000px) {
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-card, .rule-card:first-child, .rule-card:last-child { padding-inline: clamp(0px, 2vw, 24px); border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .rule-card:nth-child(odd) { padding-inline-start: 0; border-inline-end: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .rules { grid-template-columns: 1fr; }
  .rule-card, .rule-card:nth-child(odd) { border-inline-end: 0; padding-inline: 0; }
}
.art { width: 100%; max-width: 250px; height: auto; margin-bottom: 26px; overflow: visible; color: var(--ink); }
.art * { animation-play-state: paused; }
.rule-card.in .art * { animation-play-state: running; }
.art text { font-family: var(--mono); }
/* ground */
.a-src rect { fill: var(--paper-3); }
.a-wire path { stroke: var(--turq-ink); stroke-width: 1.7; stroke-dasharray: 3 5; animation: dash 1.2s linear infinite; }
.a-ans rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.a-ans > path { stroke: var(--ink-3); stroke-width: 3; }
.a-cite rect { fill: var(--saffron); stroke: var(--ink); stroke-width: 1.4; }
.a-cite text { font-size: 11px; font-weight: 700; fill: #101826; }
.a-cite { transform-box: fill-box; transform-origin: center; animation: pop 3.6s var(--ease) infinite; }
@keyframes pop { 0%, 35% { transform: scale(0); } 48% { transform: scale(1.18); } 56%, 92% { transform: scale(1); } 100% { transform: scale(0); } }
/* leash */
.a-track { stroke: var(--ink-3); stroke-width: 1.6; stroke-dasharray: 2 6; stroke-linecap: round; }
.a-gate path { stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.a-door { fill: color-mix(in srgb, var(--saffron) 35%, var(--paper)); transform-box: fill-box; transform-origin: left center; animation: door 6s var(--ease) infinite; }
@keyframes door { 0%, 46% { transform: scaleX(1); } 56%, 86% { transform: scaleX(0.08); } 96%, 100% { transform: scaleX(1); } }
.a-ball { fill: var(--turq-ink); animation: ball 6s var(--ease) infinite; }
@keyframes ball { 0% { transform: translateX(0); } 30%, 54% { transform: translateX(56px); } 84% { transform: translateX(150px); } 100% { transform: translateX(150px); opacity: 0; } }
.a-yes { opacity: 0; animation: yes 6s var(--ease) infinite; }
.a-yes rect { fill: var(--turq-ink); }
.a-yes path { stroke: #fff; stroke-width: 2; }
@keyframes yes { 0%, 34% { opacity: 0; } 42%, 62% { opacity: 1; } 72%, 100% { opacity: 0; } }
/* survive */
.a-rail { fill: var(--paper-3); }
.a-fill { fill: var(--turq-ink); transform-box: fill-box; transform-origin: left center; animation: fill 7.5s linear infinite; }
@keyframes fill { 0% { transform: scaleX(0); } 36% { transform: scaleX(0.66); } 44% { transform: scaleX(0.66); } 48% { transform: scaleX(0.5); } 56% { transform: scaleX(0.5); } 90% { transform: scaleX(1); } 100% { transform: scaleX(1); } }
.a-ticks path { stroke: var(--ink); stroke-width: 1.6; }
.a-cut path { stroke: var(--brick); stroke-width: 3; }
.a-cut { opacity: 0; animation: cut 7.5s linear infinite; }
@keyframes cut { 0%, 36% { opacity: 0; } 38%, 46% { opacity: 1; } 48%, 100% { opacity: 0; } }
.a-lbl { display: none; }
/* shape */
.a-brace { font-size: 66px; fill: var(--ink-3); font-weight: 300; }
.a-lines path { stroke: var(--ink); stroke-width: 3; }
.a-bad { stroke: var(--brick) !important; animation: fixit 5.5s ease-in-out infinite; }
@keyframes fixit { 0%, 38% { stroke: var(--brick); stroke-dasharray: 5 6; } 48%, 100% { stroke: var(--turq-ink); stroke-dasharray: none; } }
.a-ok { stroke: var(--turq-ink); stroke-width: 3; stroke-dasharray: 36; stroke-dashoffset: 36; animation: tick 5.5s ease-in-out infinite; }
@keyframes tick { 0%, 44% { stroke-dashoffset: 36; } 58%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 36; } }

/* ------------------------------------------------------------------ also built */
.rows { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.3fr) minmax(120px, auto) 28px; gap: 8px 28px; align-items: baseline; padding: 22px 8px; border-top: 1px solid var(--line); transition: background-color 0.3s, padding 0.35s var(--ease); }
.row:hover { background: var(--paper-2); padding-inline: 20px; }
.row__name { font-family: var(--display); font-size: clamp(20px, 2vw, 26px); font-weight: 560; letter-spacing: -0.012em; line-height: 1.15; }
.row__desc { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.row__tags { color: var(--ink-3); font-size: 11.5px; text-transform: none; }
.row__go { font-style: normal; color: var(--ink-3); transition: transform 0.35s var(--ease), color 0.3s; justify-self: end; }
.row:hover .row__go { transform: translate(3px, -3px); color: var(--accent); }
@media (max-width: 860px) {
  .row { grid-template-columns: 1fr auto; padding-inline: 0; }
  .row:hover { padding-inline: 10px; }
  .row__desc { grid-column: 1 / -1; grid-row: 2; }
  .row__tags { grid-column: 1; grid-row: 3; }
  .row__go { grid-column: 2; grid-row: 1; }
}

/* ------------------------------------------------------------------ github */
.gh__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.stats > div { display: flex; flex-direction: row-reverse; align-items: baseline; justify-content: space-between; gap: 20px; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.stats > div:last-child { border-bottom: 1px solid var(--line); }
.stats dt { color: var(--ink-3); }
.stats dd { margin: 0; }
.num { font-family: var(--display); font-size: clamp(54px, 7vw, 104px); font-weight: 560; line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; font-variation-settings: "opsz" 144; }
.gh__recent h3 { font-weight: 400; color: var(--ink-3); margin-bottom: 14px; }
.recent li a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); transition: padding 0.35s var(--ease), color 0.2s; }
.recent li:last-child a { border-bottom: 1px solid var(--line); }
.recent li a:hover { padding-inline-start: 12px; color: var(--accent); }
.recent b { font-family: var(--mono); font-weight: 400; font-size: 15.5px; }
.when { color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.langs { margin-top: 30px; }
.langs__bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; }
.langs__bar i { display: block; height: 100%; min-width: 4px; }
.langs__key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; color: var(--ink-2); font-size: 13.5px; }
.langs__key span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--k); margin-inline-end: 7px; }
@media (max-width: 860px) { .gh__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ contact */
.contact { position: relative; overflow: clip; isolation: isolate; padding-bottom: clamp(90px, 12vw, 180px); }
.contact__wall { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; -webkit-mask: linear-gradient(transparent, #000 18%, #000 70%, transparent); mask: linear-gradient(transparent, #000 18%, #000 70%, transparent); }
.contact .display--xl { margin-bottom: 0; }
.mail { margin-top: clamp(32px, 4vw, 60px); display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.mail__addr {
  direction: ltr; unicode-bidi: isolate; font-family: var(--display); font-weight: 560; font-size: clamp(28px, 5.9vw, 92px); letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere;
  font-variation-settings: "opsz" 120; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat; transition: background-size 0.7s var(--ease), color 0.3s;
}
.mail__addr:hover { background-size: 100% 3px; color: var(--accent); }
.contact__note { margin-top: 22px; color: var(--ink-2); font-size: 17px; }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 999px; font-weight: 540; font-size: 15px; transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.35s var(--ease); }
.chip i { font-style: normal; transition: transform 0.3s var(--ease); }
.chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.chip:hover i { transform: translate(2px, -2px); }

/* ------------------------------------------------------------------ footer */
.foot { padding-block: 0 44px; color: var(--ink-3); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; text-transform: none; }
.foot__links { display: inline-flex; gap: 22px; }
.foot a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ command menu */
.pal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding: 13vh 14px 0; }
.pal[hidden] { display: none; }
.pal__scrim { position: absolute; inset: 0; background: rgba(8, 12, 24, 0.5); backdrop-filter: blur(5px); animation: fade 0.25s var(--ease); }
.pal__box { position: relative; width: min(640px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow), 0 40px 80px -20px rgba(0, 0, 0, 0.5); overflow: hidden; animation: palin 0.3s var(--ease); }
@keyframes palin { from { opacity: 0; transform: translateY(-12px) scale(0.985); } }
@keyframes fade { from { opacity: 0; } }
.pal__field { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.pal__field svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.pal__field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: inherit; font-size: 17px; color: var(--ink); }
.pal__field input::placeholder { color: var(--ink-3); }
.pal__field kbd { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-3); text-transform: none; font-size: 11px; }
.pal__list { max-height: min(52vh, 420px); overflow: auto; padding: 8px; }
.pal__group { padding: 12px 12px 6px; color: var(--ink-3); font-size: 11px; }
.pal__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 11px 12px; border-radius: 10px; text-align: start; font-size: 15.5px; }
.pal__item small { color: var(--ink-3); font-family: var(--mono); font-size: 11.5px; }
.pal__item[aria-selected="true"] { background: var(--paper-2); }
.pal__item[aria-selected="true"]::after { content: "↵"; color: var(--ink-3); margin-inline-start: auto; }
.pal__empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }
.toast { position: fixed; inset-inline: 0; bottom: 28px; margin-inline: auto; width: max-content; max-width: 90vw; padding: 12px 20px; background: var(--ink); color: var(--paper); border-radius: 999px; font-size: 14.5px; opacity: 0; transform: translateY(14px); transition: opacity 0.3s, transform 0.4s var(--ease); pointer-events: none; z-index: 300; }
.toast.show { opacity: 1; transform: none; }

.work__meta span:last-child, .site__top span:last-child { text-align: end; }

/* ------------------------------------------------------------------ headline words */
.display.is-split[data-reveal] { opacity: 1; transform: none; animation: none; }
.display .w { display: inline-block; overflow: clip; overflow-clip-margin: 0.1em; vertical-align: top; padding-block: 0.06em 0.14em; margin-block: -0.06em -0.14em; }
.display .wi { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: 0 100%; transition: transform 1.05s var(--ease) calc(var(--d, 0s) + var(--i) * 55ms); }
.display.in .wi { transform: none; }
html:not(.js) .display .wi { transform: none; }


/* ------------------------------------------------------------------ the band */
.band { position: relative; padding-block: clamp(28px, 4vw, 54px); border-block: 1px solid var(--line); overflow: clip; background: var(--paper-2); }
.band::before, .band::after { content: ""; position: absolute; inset-block: 0; width: 12vw; z-index: 2; pointer-events: none; }
.band::before { left: 0; background: linear-gradient(90deg, var(--paper-2), transparent); }
.band::after { right: 0; background: linear-gradient(-90deg, var(--paper-2), transparent); }
.band__row { overflow: visible; white-space: nowrap; }
.band__track { display: inline-flex; align-items: center; will-change: transform; animation: marquee 70s linear infinite; }
.band__row--stack .band__track { animation-duration: 55s; animation-direction: reverse; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
.band__item { font-family: var(--display); font-weight: 640; font-size: clamp(46px, 8.4vw, 132px); line-height: 1.02; letter-spacing: -0.03em; padding-inline: 0.18em; font-variation-settings: "opsz" 144; }
.band__item.is-outline { color: transparent; -webkit-text-stroke: 1.4px var(--ink); font-style: italic; font-weight: 520; }
.band__star { width: clamp(28px, 3.6vw, 54px); height: auto; flex: none; margin-inline: 0.5em; fill: var(--saffron); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; animation: spin 18s linear infinite; }
.band__row--stack { margin-top: clamp(10px, 1.6vw, 22px); }
.band__row--stack .band__item { font-family: var(--mono); font-size: clamp(14px, 1.35vw, 19px); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding-inline: 0.9em; }
.band__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--turq); flex: none; }

/* ------------------------------------------------------------------ work media */
.work .work__media { clip-path: inset(10% 8% 10% 8% round 28px); transition: clip-path 1.4s var(--ease), transform 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.work.in .work__media { clip-path: inset(0 round 20px); }
.work .work__frame { transform: translateY(var(--py, 0px)) scale(1.06); transition: transform 1.4s var(--ease); }
.work.in .work__frame { transform: translateY(var(--py, 0px)); transition: transform 0.25s linear; }
.work__media::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.22), transparent 60%);
  mix-blend-mode: soft-light;
}
.work__media.is-tilting::before { opacity: 1; }
.work__title { transition: letter-spacing 0.6s var(--ease); }
.work:hover .work__title { letter-spacing: -0.018em; }

/* ------------------------------------------------------------------ magnetic */
.btn, .chip { transition-property: color, border-color, transform, background-color, translate; transition-duration: 0.35s, 0.35s, 0.35s, 0.25s, 0.5s; transition-timing-function: var(--ease); }

/* ------------------------------------------------------------------ footer wordmark */
.foot { padding-top: 0; }
.foot__mark { overflow-x: clip; padding-top: clamp(30px, 5vw, 70px); }
.mark {
  font-family: var(--display); font-size: 18vw; line-height: 0.82; letter-spacing: -0.035em; white-space: nowrap; color: var(--ink);
  font-variation-settings: "wght" 300, "opsz" 144; padding-bottom: 0.2em; margin-bottom: -0.08em; user-select: none; width: max-content;
}
.mark span { display: inline-block; }
.foot__in { padding-top: 22px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .work .work__media, .work.in .work__media { clip-path: none; } .display .wi { transform: none !important; } .band__star { animation: none; } }

/* ------------------------------------------------------------------ keeping it light */
/* animations stop while their section is off screen (main.js toggles .is-off) */
.is-off, .is-off * { animation-play-state: paused !important; }
/* small or save-data devices: no blur behind the bar, no looping art */
html.lite .bar.is-solid { backdrop-filter: none; background: var(--paper); }
html.lite .band__track, html.lite .art *, html.lite .flow *, html.lite .portrait__star, html.lite .band__star { animation: none !important; }

/* older browsers */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .work, .site { --ct: var(--c); }
  .bar.is-solid, .work__chip { background: var(--paper); }
  .work__media { background: var(--paper-2); }
  .a-door { fill: var(--saffron); }
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
  .band, .hero, .foot__mark, .contact { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .band__track { animation: none; } }
