:root {
  --bg: #F5F4F1;
  --fg: #262523;
  --muted: #8A877F;
  --faint: #B3B0A8;
  --line: rgba(38, 37, 35, .35);
  --rule: rgba(38, 37, 35, .1);
  --card: #FBFAF8;
  --chip: rgba(38, 37, 35, .07);
  --accent: #4A5BD9;
}
:root[data-accent="orange"] { --accent: #E0582A; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 15px; line-height: 22px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

#pond { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; transition: opacity .2s linear; }

.nav {
  position: fixed; top: 32px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 32px; align-items: center; z-index: 4;
  font-size: 13px; line-height: 19.5px;
  padding: 6px 14px; border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover, .nav a.on { color: var(--fg); }

.counter {
  position: fixed; top: 32px; right: max(16px, calc(50% - 450px));
  display: flex; flex-direction: column; font-size: 11px; line-height: 18px;
  color: var(--muted); text-align: right; z-index: 3; pointer-events: none;
}

/* one column, aligned like the pond intro */
.col { position: relative; z-index: 2; width: min(880px, calc(100% - 32px)); margin: 0 auto; }

.hero { position: relative; height: 100vh; min-height: 560px; pointer-events: none; }
.hero .col { position: absolute; left: 50%; transform: translateX(-50%); top: 54vh; }
.hero .col > * { pointer-events: auto; }

.hero h1 { font-size: 15px; font-weight: 400; margin: 0; line-height: 22px; }
.hero p { margin: 0; }
.links { margin-top: 12px !important; color: var(--muted); }
.links a, .links .copy { color: var(--muted); }
.links a:hover, .links .copy:hover { color: var(--fg); }
.ref, .hero a, .copy {
  text-decoration: underline; text-decoration-color: var(--line);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-decoration-color .15s;
}
.ref:hover, .hero a:hover, .copy:hover { text-decoration-color: currentColor; }
.copied { margin-left: 10px; font-size: 11px; color: var(--accent); opacity: 0; transition: opacity .2s; }
.copied.show { opacity: 1; }
.caret { display: inline-block; width: 8px; height: 15px; margin-left: 2px; background: currentColor; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.down {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  color: var(--muted); text-decoration: none; font-size: 13px; pointer-events: auto;
  animation: nudge 2.4s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: translate(-50%, 4px); } }

/* ---------- sections ---------- */
main.col { padding-bottom: 48px; }
section { padding-top: 96px; scroll-margin-top: 40px; }
section h2 { font-size: 13px; font-weight: 400; color: var(--muted); margin: 0 0 14px; }
section h2 i { font-style: normal; color: var(--accent); margin-right: 12px; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 96px; gap: 24px; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--rule); text-decoration: none;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  transition: color .15s;
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.row .name { color: var(--fg); }
.row .desc { color: var(--muted); }
.row .meta { color: var(--faint); font-size: 12px; text-align: right; }
a.row:hover .name { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
a.row:hover .name::after { content: ' →'; color: var(--muted); }
.chip { font-style: normal; font-size: 10.5px; background: var(--chip); color: var(--muted); padding: 1px 7px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 120px; font-size: 12px; color: var(--muted); }
.foot-r { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }

/* ---------- popover ---------- */
.pop {
  position: absolute; z-index: 5; width: 330px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.07);
  padding: 14px 14px 10px; font-size: 12px; line-height: 18px;
}
.pop[hidden] { display: none; }
.pop-top { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 12px; }
.pop-co { display: flex; align-items: center; gap: 8px; color: var(--fg); }
.pop-logo { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.pop-role { font-weight: 500; margin-bottom: 4px; }
.pop-desc { color: var(--muted); margin-bottom: 18px; }
.pop-open { display: flex; justify-content: space-between; text-decoration: none; color: var(--muted); font-size: 11px; }
.pop-open:hover { color: var(--fg); }
.pop-open[hidden] { display: none; }

/* ---------- case study ---------- */
.cs { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr minmax(0, 640px) 1fr; column-gap: 48px; padding: 120px 16px 120px; }
.cs .back { position: sticky; top: 120px; align-self: start; justify-self: end; color: var(--muted); text-decoration: none; font-size: 13px; }
.cs .back:hover { color: var(--fg); }
.cs article h1 { font-size: 15px; font-weight: 400; margin: 0; }
.cs .date { font-size: 12px; color: var(--muted); margin: 4px 0 28px; }
.cs article p, .cs ul { color: color-mix(in srgb, var(--fg) 80%, var(--bg)); margin: 0 0 18px; }
.cs ul { padding-left: 18px; }
.cs li { margin-bottom: 4px; }
.cs article h2 { font-size: 13px; font-weight: 400; color: var(--muted); margin: 56px 0 12px; scroll-margin-top: 110px; }
.shot-img { margin: 28px 0; }
.shot-img img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); }
.shot-img figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.shot { aspect-ratio: 16 / 9; background: var(--chip); border-radius: 4px; display: grid; place-items: center; color: var(--muted); font-size: 11px; margin: 28px 0; }
.toc { position: sticky; top: 120px; align-self: start; font-size: 12px; line-height: 18px; }
.toc .visit { display: block; color: var(--fg); text-decoration: none; margin-bottom: 18px; }
.toc .visit:hover { color: var(--accent); }
.toc a.t { position: relative; display: block; padding: 3px 0 3px 16px; color: var(--faint); text-decoration: none; transition: color .15s; }
.toc a.t:hover { color: var(--muted); }
.toc a.t.on { color: var(--fg); }
.toc a.t.on::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; background: var(--accent); }

@media (max-width: 720px) {
  .nav { gap: 18px; top: 16px; }
  .counter { display: none; }
  .hero .col { top: auto; bottom: 72px; }
  .row { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .row .desc { grid-column: 1 / -1; grid-row: 2; }
  .cs { grid-template-columns: 1fr; padding-top: 80px; }
  .cs .back { position: static; justify-self: start; margin-bottom: 24px; }
  /* phones: drop the section list but keep the visit link, just above the write-up */
  .cs .back { order: -2; }
  .toc { position: static; order: -1; margin-bottom: 4px; }
  .toc a.t { display: none; }
}
