:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --ink: #1b1a17;
  --ink-2: #5b574f;
  --rule: #d6cfc1;
  --accent: #c2410c;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --max: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151412;
    --paper-2: #1e1c19;
    --ink: #ece7dc;
    --ink-2: #a39d91;
    --rule: #34312b;
    --accent: #f08a4b;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--accent); color: var(--paper); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 40px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 40px;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.top.scrolled { border-bottom-color: var(--rule); }
.mark { font: 500 18px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.top nav { display: flex; gap: 28px; }
.top nav a { font-size: 14px; text-decoration: none; color: var(--ink-2); transition: color .2s; }
.top nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding-top: clamp(80px, 14vh, 160px); padding-bottom: clamp(80px, 12vh, 140px); }
.eyebrow { font-size: 13px; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 32px; }
.hero h1 {
  font: 300 clamp(44px, 7.4vw, 104px)/1.02 var(--serif);
  letter-spacing: -.035em;
  max-width: 14ch;
}
.lede {
  margin-top: 40px; max-width: 34em;
  font: 400 clamp(19px, 1.8vw, 23px)/1.5 var(--serif);
  color: var(--ink-2);
}
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--rule);
}
.facts dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.facts dd { font-size: 16px; }

/* Section heads */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 20px; border-bottom: 1px solid var(--ink);
}
h2 { font: 400 clamp(32px, 4vw, 52px)/1.05 var(--serif); letter-spacing: -.025em; }
.count { font: italic 300 22px var(--serif); color: var(--ink-2); }

/* Projects */
.project {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 48px;
  padding-top: 72px; padding-bottom: 72px;
  border-bottom: 1px solid var(--rule);
}
.p-meta { display: flex; flex-direction: column; gap: 6px; }
.p-num { font: italic 300 40px/1 var(--serif); color: var(--accent); }
.p-year { font-size: 13px; color: var(--ink-2); }
.p-body h3 { font: 400 clamp(30px, 3.4vw, 44px)/1.05 var(--serif); letter-spacing: -.025em; }
.p-kicker { margin: 10px 0 24px; font-size: 14px; color: var(--ink-2); }
.p-body > p { max-width: 36em; }
.p-points { list-style: none; margin: 24px 0; }
.p-points li {
  position: relative; padding: 10px 0 10px 22px;
  border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-2);
}
.p-points li::before { content: ""; position: absolute; left: 0; top: 20px; width: 10px; height: 1px; background: var(--accent); }
.p-stack { font-size: 13px; letter-spacing: .02em; color: var(--ink-2); margin-bottom: 20px; }
.p-link {
  display: inline-flex; gap: 8px; align-items: center;
  font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--ink); padding-bottom: 3px;
  transition: color .2s, border-color .2s;
}
.p-link:hover { color: var(--accent); border-color: var(--accent); }
.p-note { font: italic 400 16px var(--serif); color: var(--ink-2); }

.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin-top: 32px; }
.roles h4 { font-size: 15px; font-weight: 600; }
.roles span { font-size: 12px; color: var(--ink-2); }
.roles p { font-size: 14px; color: var(--ink-2); margin-top: 6px; }

/* Visuals */
.p-visual {
  background: var(--paper-2); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 28px; min-height: 380px; align-self: start;
}
.phone {
  width: 230px; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 28px; padding: 16px 16px 22px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.35);
}
.ph-bar { width: 60px; height: 5px; border-radius: 3px; background: var(--rule); margin: 0 auto 22px; }
.ph-label { font: 500 10px/1 ui-monospace, monospace; letter-spacing: .06em; color: var(--ink-2); padding: 14px 10px; border: 1px dashed var(--rule); border-radius: 8px; text-align: center; }
.ph-verdict { margin: 14px 0; padding: 16px 14px; border-radius: 12px; background: #e3efe4; color: #1f5130; }
.ph-verdict span { display: block; font: 500 20px/1.1 var(--serif); }
.ph-verdict small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; opacity: .8; }
.ph-row { display: flex; justify-content: space-between; font-size: 12px; padding: 9px 2px; border-top: 1px solid var(--rule); }
.ph-row span { color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .ph-verdict { background: #1f3325; color: #a6d8b2; } }

.term {
  width: 100%; max-width: 360px; background: #0d0f0d; color: #b6c8b3;
  border-radius: 8px; font: 11px/1.7 ui-monospace, "SF Mono", Menlo, monospace;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); overflow: hidden;
}
.t-top { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #222820; }
.t-top i { width: 8px; height: 8px; border-radius: 50%; background: #2c332a; }
.t-top span { margin-left: 8px; color: #5f6f5c; }
.t-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 14px; }
.t-h { color: #6fdc8c; letter-spacing: .1em; margin-bottom: 6px; }
.t-col p:not(.t-h) { display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; }
.t-col b { color: #e6efe3; font-weight: 500; }
.t-col em { font-style: normal; color: #5f6f5c; }
.t-next { padding: 12px 14px; border-top: 1px solid #222820; color: #5f6f5c; letter-spacing: .1em; }
.t-next b { color: #6fdc8c; font-weight: 500; margin-left: 8px; }

.v-stats { flex-direction: column; align-items: stretch; justify-content: center; gap: 0; padding: 12px 32px; }
.stat { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.stat:last-child { border-bottom: 0; }
.stat b { display: block; font: 300 clamp(44px, 5vw, 64px)/1 var(--serif); letter-spacing: -.03em; }
.stat span { font-size: 14px; color: var(--ink-2); }

/* About */
.about { padding-top: 140px; padding-bottom: 40px; }
.about h2 { padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-top: 48px; }
.about-lead { font: 300 clamp(26px, 2.8vw, 36px)/1.25 var(--serif); letter-spacing: -.015em; }
.about-body p { margin-bottom: 18px; color: var(--ink-2); }
.about-body h4 { margin-top: 32px; margin-bottom: 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.tools { font-size: 15px; }

/* Contact */
.contact { position: relative; z-index: 1; padding-top: 160px; padding-bottom: 150px; }
.contact h2 { font-size: clamp(56px, 10vw, 140px); font-weight: 300; letter-spacing: -.045em; }
.contact > p { margin-top: 20px; font: 400 21px var(--serif); color: var(--ink-2); }
.c-links { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 48px; }
.c-links a {
  font-size: 18px; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--rule); padding-bottom: 4px;
  transition: border-color .2s, color .2s;
}
.c-links a:hover { color: var(--accent); border-color: var(--accent); }

.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 40px;
  border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-2);
}

/* Letter cascade */
[data-cascade] { cursor: default; }
a[data-cascade] { cursor: pointer; }
.lc-w { display: inline-block; white-space: nowrap; perspective: 600px; }
.lc-l { position: relative; display: inline-block; transform-style: preserve-3d; }
.lc-f, .lc-e {
  display: inline-block; backface-visibility: hidden;
  transform-origin: 50% 50% -0.32em;
  transition:
    transform .62s cubic-bezier(.34, 1.45, .55, 1) var(--lc-d, 0s),
    opacity .38s ease var(--lc-d, 0s);
}
.lc-e { position: absolute; left: 0; top: 0; transform: rotateX(-90deg); opacity: 0; }
.lc-go .lc-f { transform: rotateX(90deg); opacity: 0; }
.lc-go .lc-e { transform: rotateX(0deg); opacity: 1; }
.lc-reset .lc-f, .lc-reset .lc-e { transition: none !important; }

/* Scroll velocity */
.velocity { overflow: hidden; padding: 8px 0 18px; margin-bottom: 96px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.v-row {
  overflow: hidden; white-space: nowrap;
  font: italic 300 clamp(44px, 8vw, 112px)/1.12 var(--serif);
  letter-spacing: -.03em;
}
.v-track { display: inline-flex; will-change: transform; }
.v-track > span { padding-right: .35em; }
.v-row i { font-style: normal; color: var(--accent); margin: 0 .35em; }
.v-row.outline { color: transparent; -webkit-text-stroke: 1px var(--ink); }
.v-row.outline i { -webkit-text-stroke: 0; }

/* Contact band with liquid */
.contact-band {
  position: relative; overflow: hidden; isolation: isolate;
  background: #100d0a;
  color: #f4f1ea;
  margin-top: 140px;
}
.contact-band .liquid { contain: strict; position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.contact-band.liquid-fallback .liquid { display: none; }
.contact-band.liquid-fallback {
  background:
    radial-gradient(80% 90% at 70% 30%, #5c2410 0%, transparent 60%),
    radial-gradient(60% 60% at 20% 80%, #3a1a0c 0%, transparent 70%),
    #100d0a;
}
.contact-band .contact > p { color: rgba(244, 241, 234, .72); }
.contact-band .c-links a { border-bottom-color: rgba(244, 241, 234, .3); }
.contact-band .c-links a:hover { color: #f0a274; border-color: #f0a274; }
.contact-band ::selection { background: #f0a274; color: #100d0a; }
.foot { border-top: 0; padding-top: 28px; }

/* Wide project: shot spans below the text */
.project-wide { grid-template-columns: 120px minmax(0, 1fr); }
.project-wide .p-body { max-width: 760px; }
.project-wide .p-shot { grid-column: 2; }

/* Browser frame with real screenshots / live embed */
.p-shot { margin: 8px 0 0; }
.p-shot figcaption { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.b-chrome {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; background: var(--paper-2);
  border: 1px solid var(--rule); border-bottom: 0; border-radius: 10px 10px 0 0;
}
.b-dots { display: flex; gap: 6px; }
.b-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.b-tabs { display: flex; gap: 2px; }
.b-tabs button, .b-live {
  font: 500 13px var(--sans); color: var(--ink-2); background: none; border: 0;
  padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: background .2s, color .2s;
}
.b-tabs button:hover { color: var(--ink); }
.b-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
.b-url {
  flex: 1; min-width: 0; text-align: center; font-size: 12px; color: var(--ink-2);
  background: var(--paper); border-radius: 6px; padding: 6px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.b-live { background: var(--ink); color: var(--paper); }
.b-live:hover { background: var(--accent); color: #fff; }
.b-live[aria-pressed="true"] { background: var(--accent); color: #fff; }
.b-view {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border: 1px solid var(--rule); border-radius: 0 0 10px 10px; background: #f6f7f4;
  box-shadow: 0 40px 80px -50px rgba(0,0,0,.45);
}
.b-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; animation: shotIn .45s ease; }
.b-view iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
@keyframes shotIn { from { opacity: 0; transform: scale(1.01); } to { opacity: 1; transform: none; } }

@media (max-width: 680px) {
  .project-wide { grid-template-columns: 1fr; }
  .project-wide .p-shot { grid-column: 1; }
  .b-dots, .b-url { display: none; }
  .b-chrome { gap: 6px; padding: 8px; flex-wrap: wrap; }
  .b-tabs button { padding: 6px 9px; }
  .b-live { margin-left: auto; }
}

/* Theme switcher under the CONTROL frame */
.themes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.themes > span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-right: 6px; }
.themes button {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px var(--sans); color: var(--ink-2);
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: 6px 12px 6px 7px; cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.themes button i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.themes button:hover { color: var(--ink); border-color: var(--ink-2); }
.themes button[aria-checked="true"] { color: var(--ink); border-color: var(--ink); background: var(--paper-2); }

/* Hero band with slow, cursor-reactive liquid */
.hero-band { position: relative; isolation: isolate; margin-top: -59px; padding-top: 59px; overflow: hidden; }
.hero-band .liquid {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1;
  opacity: 0; transition: opacity 2.4s ease;
}
.hero-band::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--paper));
}
.hero-band.liquid-on .liquid { opacity: 1; }
.hero-band.liquid-fallback .liquid { display: none; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 1000px) {
  .project { grid-template-columns: 80px minmax(0, 1fr); }
  .p-visual { grid-column: 2; }
}
@media (max-width: 680px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .top { padding: 14px 16px; }
  .top nav { gap: 18px; }
  .facts { grid-template-columns: 1fr; gap: 16px; margin-top: 48px; }
  .project { grid-template-columns: 1fr; gap: 20px; padding-top: 48px; padding-bottom: 48px; }
  .p-meta { flex-direction: row; align-items: baseline; gap: 14px; }
  .p-num { font-size: 32px; }
  .p-visual { grid-column: 1; min-height: 300px; padding: 28px 16px; }
  .roles { grid-template-columns: 1fr; }
  .about { padding-top: 96px; }
  .contact { padding-top: 110px; padding-bottom: 110px; }
  .velocity { margin-bottom: 64px; }
  .v-row { font-size: 44px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .t-grid { grid-template-columns: 1fr; }
}
