/* =============================================================================
   main.css — one stylesheet, no framework.
   Sections: tokens · base · shell · topbar · hero · sections · index · about ·
             skills · timeline · contact · footer · case study · work · motion
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  --paper: #f3f0e9;
  --paper-2: #eae6db;
  --ink: #16150f;
  --muted: #6c6759;
  --line: rgba(22, 21, 15, 0.14);
  --line-soft: rgba(22, 21, 15, 0.07);
  --line-strong: rgba(22, 21, 15, 0.34);
  --accent: #b23d15;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1220px;
  --pad: clamp(20px, 4vw, 60px);
  --gap: clamp(26px, 4.2vw, 58px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  --paper: #0e0e0c;
  --paper-2: #17170f;
  --ink: #eeeadf;
  --muted: #928c7d;
  --line: rgba(238, 234, 223, 0.15);
  --line-soft: rgba(238, 234, 223, 0.07);
  --line-strong: rgba(238, 234, 223, 0.34);
  --accent: #ff7043;
}

/* -------------------------------------------------------------------- base */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* a whisper of paper grain, purely decorative */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

img { display: block; max-width: 100%; height: auto; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
button { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip:focus { left: 12px; top: 12px; }

.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}
.muted { color: var(--muted); }

.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.link {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease), color 0.2s var(--ease);
  padding-bottom: 1px;
}
.link:hover {
  background-size: 100% 2px;
  color: var(--accent);
}

.link-plain {
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.link-plain:hover { color: var(--accent); border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------- shell */
.shell {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
  border-inline: 1px solid var(--line-soft);
}

.section {
  padding-block: var(--gap);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.section-head .label { flex: 0 0 auto; }
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.section-note {
  margin-left: auto;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: right;
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
  height: 62px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-inline: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.brand b { font-weight: 500; white-space: nowrap; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
  margin-left: auto;
}
.nav a {
  position: relative;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 4px;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

.theme-toggle {
  margin-left: 2px;
  padding: 4px 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); }

/* -------------------------------------------------------------------- hero */
.hero {
  padding-block: clamp(48px, 9vw, 104px) clamp(36px, 6vw, 68px);
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: clamp(22px, 4vw, 40px);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .sep { color: var(--line-strong); }

.display {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 9vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin: 0;
}
.display span { display: block; }
.display em {
  font-style: italic;
  letter-spacing: -0.02em;
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  margin-top: clamp(30px, 5vw, 56px);
  padding-top: clamp(20px, 3vw, 30px);
  border-top: 1px solid var(--line);
}

.lede {
  max-width: 46ch;
  font-size: clamp(1.0625rem, 1.55vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}
.lede em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0 0;
}

.hero-meta {
  display: grid;
  gap: 14px;
  justify-items: start;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.hero-meta dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  width: 100%;
}
.hero-meta dt { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.6875rem; }
.hero-meta dd { color: var(--ink); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-align: left;
  text-transform: uppercase;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}
.status[data-state="closed"]::before { background: var(--muted); }

/* ------------------------------------------------------------- project list */
.index { counter-reset: none; }

.row {
  border-top: 1px solid var(--line);
  position: relative;
}
.row:last-child { border-bottom: 1px solid var(--line); }

.row-link {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(0, 340px) 96px 28px;
  align-items: center;
  gap: 20px;
  padding: 26px 12px;
  margin-inline: -12px;
  border-radius: 2px;
  transition: background-color 0.25s var(--ease);
}
.row-link:hover { background: var(--paper-2); }

.row-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  transition: color 0.22s var(--ease);
}
.row-link:hover .row-num { color: var(--accent); }

.row-main { display: grid; gap: 3px; }
.row-title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.row-sub {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: color 0.22s var(--ease);
}
.row-link:hover .row-sub { color: var(--ink); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags li {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.row-year {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}

.row-go {
  justify-self: end;
  font-size: 1.05rem;
  color: var(--muted);
  transition: transform 0.28s var(--ease), color 0.22s var(--ease);
}
.row-link:hover .row-go { transform: translateX(5px); color: var(--accent); }

.row-empty {
  padding: 28px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--line);
}

.index-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.index-foot .spacer { flex: 1; }

/* cursor preview */
.preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 360px;
  height: 234px;
  pointer-events: none;
  opacity: 0;
  transform-origin: top left;
  transition: opacity 0.22s var(--ease), scale 0.3s var(--ease);
  scale: 0.96;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
}
.preview.is-on { opacity: 1; scale: 1; }
.preview img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------- about */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(30px, 5vw, 80px);
  align-items: start;
}

.prose {
  max-width: 60ch;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.66;
}
.prose p + p { margin-top: 1em; }
.prose strong { font-weight: 500; }
.prose .drop {
  float: left;
  font-family: var(--serif);
  font-size: 3.4em;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--accent);
}

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.facts dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { font-size: 0.9375rem; }
.facts dd small { display: block; color: var(--muted); font-size: 0.8125rem; }

/* ------------------------------------------------------------------ skills */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.skill-group {
  padding: 22px 22px 24px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line-soft);
}
.skill-group:first-child { padding-left: 0; }
.skill-group:last-child { border-right: 0; padding-right: 0; }
.skill-group h3 {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.skill-group ul { display: grid; gap: 1px; }
.skill-group li {
  font-size: 0.9375rem;
  line-height: 1.95;
}

@media (max-width: 940px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-group:nth-child(2n) { border-right: 0; padding-right: 0; }
  .skill-group:nth-child(2n + 1) { padding-left: 0; }
}
@media (max-width: 420px) {
  .skill-grid { grid-template-columns: minmax(0, 1fr); }
  .skill-group { border-right: 0; padding-inline: 0; }
}

/* ---------------------------------------------------------------- timeline */
.timeline {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.tl-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.tl-when {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.tl-what h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 4px;
}
.tl-what p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 56ch;
}
.tl-where {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* ----------------------------------------------------------------- contact */
.contact {
  padding-block: clamp(48px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.contact .label { margin-bottom: 20px; }
.contact-big {
  display: inline-block;
  margin: 0 0 clamp(24px, 4vw, 36px);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 5.6vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  word-break: break-word;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0 2px;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease), color 0.3s var(--ease);
}
.contact-big:hover { background-size: 100% 2px; color: var(--accent); }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 32px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.contact-row a { color: var(--ink); }
.contact-row a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ footer */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 26px 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer .spacer { flex: 1; }
.footer a:hover { color: var(--accent); }

/* --------------------------------------------------------------- work page */
.page-head {
  padding-block: clamp(40px, 7vw, 84px) clamp(24px, 4vw, 40px);
}
.page-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
}
.page-sub {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.0625rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}
.chip span { color: var(--line-strong); font-size: 0.6875rem; }
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.chip[aria-pressed="true"] span { color: var(--paper); opacity: 0.55; }

/* ------------------------------------------------------------- case study */
.case { padding-block: clamp(32px, 5vw, 64px) 0; }

.case-head { max-width: 100%; }
.case-head .label { margin-bottom: 18px; }
.case-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
}
.case-sub {
  max-width: 48ch;
  margin-top: 16px;
  font-size: clamp(1.0625rem, 1.6vw, 1.3rem);
  color: var(--muted);
  line-height: 1.45;
}
.case-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.case-cover {
  margin: clamp(30px, 4vw, 48px) 0 0;
  border: 1px solid var(--line);
  background: var(--paper-2);
  aspect-ratio: 800 / 520;
  overflow: hidden;
}
.case-cover img { width: 100%; height: 100%; object-fit: cover; }

.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.case-meta > div { padding: 14px 18px 14px 0; }
.case-meta dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.case-meta dd { font-size: 0.9375rem; }

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  padding-block: clamp(36px, 6vw, 72px);
}

.case-body { max-width: 66ch; }
.case-body section + section { margin-top: clamp(28px, 4vw, 44px); }
.case-body h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.15;
  margin-bottom: 14px;
}
.case-body p {
  font-size: clamp(1rem, 1.2vw, 1.09375rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.case-aside {
  position: sticky;
  top: 84px;
  padding-top: 4px;
}
.case-aside .label { margin-bottom: 16px; }
.metrics { display: grid; gap: 0; }
.metrics li {
  display: grid;
  gap: 3px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.metrics li:last-child { border-bottom: 1px solid var(--line); }
.metrics b {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
}
.metrics span { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
.case-summary {
  margin-top: 22px;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

.case-next {
  display: grid;
  gap: 10px;
  padding-block: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line);
}
.next-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 20px;
  padding: 18px 20px;
  margin-inline: -20px;
  border-radius: 2px;
  transition: background-color 0.25s var(--ease);
}
.next-link:hover { background: var(--paper-2); }
.next-link > span:first-child {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.05;
}
.next-link .row-sub { grid-column: 1; }
.next-link > span:last-child {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform 0.28s var(--ease), color 0.2s var(--ease);
}
.next-link:hover > span:last-child { transform: translateX(5px); color: var(--accent); }

.case-missing {
  padding-block: clamp(60px, 12vw, 140px);
  max-width: 48ch;
}
.case-missing h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  margin: 12px 0 16px;
}

/* ------------------------------------------------------------------ motion
   Entrance is a page-load fade on the hero, and only the hero. Sections are
   never hidden by script: a crawler, a print view or a broken JS file still
   gets every word of the page. */
.hero .kicker,
.hero .display,
.hero .hero-foot {
  animation: rise 0.85s var(--ease) both;
}
.hero .display { animation-delay: 0.05s; }
.hero .hero-foot { animation-delay: 0.13s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero .kicker,
  .hero .display,
  .hero .hero-foot { animation: none; }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero-foot,
  .about-grid,
  .case-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-foot { gap: 32px; }
  .section-note { text-align: left; margin-left: 0; }

  .case-aside { position: static; }

  .row-link {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas:
      "num main go"
      "num tags year";
    gap: 6px 14px;
    align-items: start;
    padding: 20px 8px;
    margin-inline: -8px;
  }
  .row-num { grid-area: num; padding-top: 7px; }
  .row-main { grid-area: main; }
  .row-go { grid-area: go; align-self: start; padding-top: 5px; }
  .row-tags { grid-area: tags; margin-top: 6px; }
  .row-year {
    grid-area: year;
    justify-self: end;
    align-self: center;
    margin-top: 6px;
  }

  .tl-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tl-where { text-align: left; }
  .facts > div { grid-template-columns: 84px minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .topbar-inner { height: 56px; gap: 12px; }
  .brand { font-size: 0.6875rem; letter-spacing: 0.06em; gap: 7px; }
  .brand span.full { display: none; }
  .nav { gap: 13px; }
  .nav a { font-size: 0.6875rem; letter-spacing: 0.06em; }
  .theme-toggle { font-size: 0.6875rem; }
  .display { font-size: clamp(2.4rem, 11.5vw, 3.4rem); }
  .preview { display: none; }
  .case-meta > div { padding-right: 10px; }
  .contact-big { font-size: clamp(1.35rem, 6.4vw, 2rem); }
}

@media (max-width: 520px) {
  .nav a[href*="capabilities"] { display: none; }
}

@media (max-width: 345px) {
  .brand b { display: none; }
}

/* ------------------------------------------------------------------- print */
@media print {
  body::before,
  .topbar,
  .preview,
  .filters,
  .theme-toggle,
  .case-next { display: none !important; }
  body { background: #fff; color: #000; }
  .shell { border: 0; max-width: none; }
  .case-layout { grid-template-columns: 1fr; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; }
}
