:root {
  --bg: #0f0e0c;
  --panel: #191714;
  --line: #2b2823;
  --text: #f2efe8;
  --muted: #a39d92;
  --accent: #d7f25c;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(16px, 5vw, 64px);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); }
.logo { font: italic 30px/1 var(--serif); }
.nav nav { display: flex; gap: clamp(12px, 3vw, 28px); align-items: center; font: 500 14px var(--mono); color: var(--muted); }
.nav nav a:hover { color: var(--text); }
.pill { border: 1px solid var(--line); padding: 8px 14px; border-radius: 99px; color: var(--text); }
.pill:hover { background: var(--accent); color: var(--bg) !important; border-color: var(--accent); }

/* hero */
.hero { padding: clamp(60px, 12vh, 140px) var(--pad) 60px; max-width: 1280px; }
.eyebrow { font: 500 13px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }
h1 { font: 500 clamp(38px, 6.4vw, 92px)/1.02 var(--sans); letter-spacing: -.035em; }
h1 em { font-size: 1.08em; letter-spacing: -.01em; }
.chip { display: inline-block; vertical-align: middle; font: 500 clamp(12px, 1.2vw, 16px)/1 var(--mono); letter-spacing: 0;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: .6em .9em; border-radius: 99px; transform: translateY(-.3em) rotate(-2deg); }
.chip:nth-of-type(2) { transform: translateY(-.3em) rotate(2deg); }
.lede { max-width: 640px; margin-top: 40px; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); }

/* marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.track { display: flex; gap: 36px; width: max-content; animation: slide 40s linear infinite; font: italic clamp(24px, 3vw, 36px) var(--serif); color: var(--muted); white-space: nowrap; }
.track i { font-style: normal; color: var(--accent); font-size: .6em; align-self: center; }
@keyframes slide { to { transform: translateX(-50%); } }

/* sections */
section { padding: 80px var(--pad) 0; }
.label { display: flex; justify-content: space-between; font: 500 13px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 28px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s; }
.card:hover { transform: translateY(-6px); border-color: var(--accent); }
.card-top { display: flex; gap: 14px; font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; }
.num { color: var(--accent); }
.card h3 { font: 500 clamp(26px, 2.6vw, 34px)/1.1 var(--sans); letter-spacing: -.02em; }
.card p { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.metrics b { display: block; font: italic clamp(22px, 2.2vw, 30px)/1.1 var(--serif); color: var(--text); }
.metrics span { font-size: 13px; color: var(--muted); line-height: 1.3; display: block; margin-top: 4px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; flex-wrap: wrap; }
.more { font: 500 13px var(--mono); }
.card:hover .more { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 500 12px var(--mono); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; color: var(--muted); }

.sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; }
.side { border: 1px dashed var(--line); border-radius: 22px; padding: 28px; display: grid; gap: 14px; }
.side h3 { font: italic 30px/1.1 var(--serif); font-weight: 400; }
.side p { color: var(--muted); }

.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); }
.about-text p { font-size: clamp(20px, 2vw, 26px); line-height: 1.45; letter-spacing: -.01em; margin-bottom: 20px; }
.timeline { list-style: none; padding: 0; }
.timeline li { display: grid; grid-template-columns: 90px 1fr; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline span { font: 500 13px var(--mono); color: var(--muted); grid-row: span 2; padding-top: 3px; }
.timeline em { color: var(--muted); font-size: 18px; }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; margin-top: 56px; }
.skills dt { font: 500 13px var(--mono); color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.skills dd { color: var(--muted); font-size: 15px; margin: 0; }

/* footer */
.foot { padding: 120px var(--pad) 40px; margin-top: 80px; border-top: 1px solid var(--line); }
.cta { display: block; font: 500 clamp(40px, 8vw, 120px)/1 var(--sans); letter-spacing: -.04em; transition: color .3s; }
.cta:hover { color: var(--accent); }
.foot-links { display: flex; gap: 24px; margin-top: 48px; font: 500 14px var(--mono); }
.foot-links a:hover { color: var(--accent); }
.fine { margin-top: 48px; color: var(--muted); font: 12px var(--mono); }

/* case study */
.case { padding: 40px var(--pad) 0; max-width: 980px; }
.back { font: 500 13px var(--mono); color: var(--muted); display: inline-block; margin-bottom: 48px; }
.back:hover { color: var(--accent); }
.case h1 { font-size: clamp(36px, 5.2vw, 72px); margin-bottom: 48px; }
.info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-block: 1px solid var(--line); padding: 24px 0; }
.info .wide { grid-column: 1 / -1; }
.info dt { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.info dd { margin: 0; }
.metrics.big { border: 0; padding: 48px 0; }
.metrics.big b { font-size: clamp(30px, 4.4vw, 56px); color: var(--accent); }
.case section { padding: 32px 0 0; }
.case h2 { font: 500 13px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.case section p, .built li { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; }
.built { padding-left: 1.1em; display: grid; gap: 12px; }
.built li::marker { color: var(--accent); }
.hard { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 32px !important; margin-top: 40px; }
.hard p { font: italic clamp(22px, 2.3vw, 30px)/1.35 var(--serif); }
.note { color: var(--muted); font: 12px var(--mono); margin-top: 40px; }
.next { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 64px; padding: 28px 0; border-top: 1px solid var(--line); }
.next span { font: 500 13px var(--mono); color: var(--muted); text-transform: uppercase; }
.next b { font: 500 clamp(24px, 3vw, 40px) var(--sans); letter-spacing: -.02em; }
.next:hover b { color: var(--accent); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .track, .dot { animation: none; } }

@media (max-width: 760px) {
  .nav nav a:not(.pill) { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .info { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: 1fr 1fr 1fr; }
}
