@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --ink: #1b1b18;
  --muted: #5d5a52;
  --line: #d9d3c6;
  --mark: #f4d35e;
  --vinyl: #fffdf8;

  /* one flat colour per project, shared by stickers, timeline and cards */
  --c-ark: #1f3a5c;
  --c-ark-fg: #f3efe6;
  --c-klim: #c8db8f;
  --c-climateers: #f2a660;
  --c-btl: #9fd6cb;
  --c-code: #ddd5c4;
  --c-side: #f2b8c6;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141412;
    --ink: #efebe2;
    --muted: #a6a297;
    --line: #2e2d29;
    --vinyl: #2a2925;
    --c-ark: #2b5486;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.label { font-size: 15px; font-weight: 600; color: var(--muted); }

/* ---------- top ---------- */
.top {
  max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter);
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
}
.top-name { font-weight: 700; text-decoration: none; }
.top-links { display: flex; gap: 22px; }
.top-links a { text-decoration: none; }
.top-links a:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.hero {
  position: relative; max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 9vh, 104px) var(--gutter) clamp(56px, 9vh, 96px);
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: center;
}
.hero h1 {
  font-size: clamp(42px, 6.6vw, 96px); line-height: 1.02; font-weight: 800; font-stretch: 76%;
  letter-spacing: -.02em;
}
.hero-face {
  display: inline-block; height: .8em; width: 1.3em; border-radius: 999px;
  object-fit: cover; object-position: 50% 22%; vertical-align: -.08em;
}
mark {
  color: #1b1b18; padding: 0 .06em; margin: 0 -.03em;
  background: linear-gradient(to bottom, transparent 14%, var(--mark) 14%, var(--mark) 90%, transparent 90%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero-sub { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 34em; margin-top: 28px; }

/* ---------- stickers: key numbers, click opens the project ---------- */
.stickers { position: relative; height: 100%; min-height: 520px; }
.sticker {
  position: absolute; left: var(--x); top: var(--y); rotate: var(--r);
  display: inline-flex; flex-direction: column; gap: 4px;
  padding: 14px 20px 16px; border-radius: 16px;
  background: var(--c); color: #1b1b18;
  font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  box-shadow: 0 0 0 4px var(--vinyl), 0 10px 22px rgba(20, 20, 18, .16);
  transition: scale .2s var(--ease), rotate .2s var(--ease), box-shadow .2s var(--ease);
  animation: slap .55s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--i, 0) * 110ms + 350ms);
}
.sticker b { font-size: clamp(36px, 4.2vw, 60px); font-weight: 850; font-stretch: 62%; line-height: .9; letter-spacing: -.02em; }
.sticker:hover { scale: 1.07; rotate: 0deg; z-index: 5; box-shadow: 0 0 0 4px var(--vinyl), 0 18px 36px rgba(20, 20, 18, .24); }
.sticker-dark { color: var(--c-ark-fg); }
.sticker-ink { background: var(--ink); color: var(--paper); }
.sticker-ink b { font-size: clamp(24px, 2.6vw, 36px); }
.sticker-round {
  width: 8.4em; height: 8.4em; border-radius: 50%; padding: 0;
  justify-content: center; align-items: center; text-align: center;
}
@keyframes slap { from { scale: 1.6; opacity: 0; } }

/* ---------- explorer: timeline + one project at a time ---------- */
.ex-nav { position: relative; height: 0; z-index: 2; }
.ex-arrow {
  position: absolute; top: 28px; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: var(--ink); color: var(--paper); font: inherit; font-size: 22px; font-weight: 700;
  cursor: pointer; box-shadow: 0 0 0 4px var(--paper); transition: scale .2s var(--ease);
}
.ex-arrow:hover { scale: 1.1; }
.ex-prev { left: -20px; }
.ex-next { right: -20px; }
.ex-nav + .ex-cards .project { padding-top: clamp(40px, 5vw, 64px); }
.explorer { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 8vh, 96px) var(--gutter) 0; scroll-margin-top: 8px; }
.ex-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 22px; }
.ex-note { font-size: clamp(17px, 1.6vw, 20px); font-weight: 500; max-width: 34em; margin-top: 6px; min-height: 3.1em; }
.ex-year {
  font-size: clamp(64px, 10vw, 136px); font-weight: 800; font-stretch: 62%;
  line-height: .8; letter-spacing: -.03em; overflow: hidden; padding-top: .06em; flex: none;
  font-variant-numeric: tabular-nums;
}
.ex-year span { display: inline-block; }
.ex-year .roll-up { animation: roll-up .35s var(--ease); }
.ex-year .roll-down { animation: roll-down .35s var(--ease); }
@keyframes roll-up { from { transform: translateY(70%); opacity: 0; } }
@keyframes roll-down { from { transform: translateY(-70%); opacity: 0; } }

.tl { --lw: 188px; }
.tl-rows { position: relative; border-top: 1px solid var(--line); touch-action: pan-y; }
.tl-row {
  appearance: none; background: none; border: 0; border-bottom: 1px solid var(--line);
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  width: 100%; display: grid; grid-template-columns: calc(var(--lw) - 16px) 1fr; gap: 16px; align-items: center;
  padding: 9px 0;
}
.tl-name { font-size: 15px; font-weight: 500; }
.tl-row:hover .tl-name { text-decoration: underline; text-underline-offset: 3px; }
.tl-row.is-sel .tl-name { font-weight: 700; }
.tl-track {
  position: relative; height: 26px;
  /* one faint tick per year, 12 years from 2015 */
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 12));
}
.tl-bar {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--s) / 12 * 100%); width: calc((var(--e) - var(--s)) / 12 * 100%); min-width: 12px;
  background: var(--c); border-radius: 6px;
  transform-origin: left center; animation: grow 1s var(--ease) both; animation-delay: calc(var(--s) * 70ms + 150ms);
  transition: opacity .3s, box-shadow .3s;
}
.tl-now { min-width: 22px; border-radius: 6px 0 0 6px; background: linear-gradient(90deg, var(--c) 50%, transparent); }
.tl-row.is-off .tl-bar { opacity: .25; }
.tl-row.is-sel .tl-bar { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
@keyframes grow { from { transform: scaleX(0); } }

.tl-cursor {
  position: absolute; top: -10px; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink);
  left: calc(var(--lw) + (100% - var(--lw)) * var(--x, .9583)); pointer-events: none;
  transition: left .3s var(--ease);
}
.tl-cursor::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--ink);
}
.tl-ruler {
  margin-left: var(--lw); margin-top: 8px; display: grid; grid-template-columns: repeat(12, 1fr);
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.tl-ruler span {
  text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
  padding: 5px 0; border-radius: 999px; transition: background .2s, color .2s;
}
.tl-ruler span.is-on { background: var(--ink); color: var(--paper); font-weight: 600; }
.tl-hint { margin-left: var(--lw); margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; transition: opacity .5s; }
.tl-hint.is-gone { opacity: 0; }
html:not(.js) .ex-year, html:not(.js) .ex-note, html:not(.js) .tl-cursor,
html:not(.js) .tl-ruler, html:not(.js) .tl-hint, html:not(.js) .ex-nav { display: none; }

.ex-cards { margin-top: 28px; }
.project {
  background: var(--bg); color: var(--fg, #1b1b18);
  border-radius: 22px; padding: clamp(24px, 4.5vw, 56px);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px);
  margin-bottom: 16px;
}
.js .project { display: none; }
.js .project.is-on { display: grid; animation: card-in .4s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }
.project-meta { font-size: 15px; opacity: .78; }
.project h3 { font-size: clamp(44px, 6vw, 80px); font-weight: 800; font-stretch: 74%; letter-spacing: -.02em; line-height: .95; margin-top: 10px; }
.stat { margin-top: clamp(32px, 6vw, 72px); display: grid; gap: 10px; }
.stat-num { font-size: clamp(72px, 10vw, 140px); font-weight: 800; font-stretch: 62%; line-height: .82; letter-spacing: -.03em; }
#p-btl .stat-num { font-size: clamp(56px, 8vw, 108px); }
.stat-label { font-size: 16px; max-width: 26ch; }
.project-body { align-self: end; }
.project-body p + p { margin-top: 12px; }
.project-body ul { list-style: none; margin-top: 18px; }
.project-body li { padding: 11px 0; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.project-link { display: inline-block; margin-top: 22px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- offer ---------- */
.help { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 12vh, 128px) var(--gutter) 0; }
.help-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px);
  margin-top: 14px; padding-top: 20px; border-top: 2px solid var(--ink);
}
.help h3 { font-size: 22px; font-weight: 750; font-stretch: 85%; line-height: 1.2; }
.help p { margin-top: 6px; color: var(--muted); }

/* ---------- contact ---------- */
.contact { max-width: var(--max); margin: 0 auto; padding: clamp(104px, 18vh, 200px) var(--gutter) clamp(88px, 14vh, 160px); }
.contact h2 { font-size: clamp(44px, 7.4vw, 108px); font-weight: 800; font-stretch: 76%; line-height: 1; letter-spacing: -.02em; }
.contact-mail {
  display: inline-block; margin-top: 28px;
  font-size: clamp(28px, 4.6vw, 60px); font-weight: 500; font-stretch: 88%; letter-spacing: -.01em;
  text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: .14em; text-underline-offset: .14em;
}
.contact-mail:hover { text-decoration-thickness: .22em; }
.contact-alt { margin-top: 18px; color: var(--muted); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 40px;
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}

/* ---------- legal ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; font-stretch: 76%; line-height: 1; margin-top: 40px; }
.legal p { margin-top: 24px; }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .stickers { min-height: 520px; margin-top: 8px; }
  .sticker { left: var(--mx); top: var(--my); }
  .sticker-round { width: 7.4em; height: 7.4em; }
  .project, .help-grid { grid-template-columns: 1fr; }
  .stat { margin-top: 24px; }
}
@media (max-width: 600px) {
  .top-name { white-space: nowrap; }
  .top-links { gap: 14px; font-size: 15px; }
  .tl { --lw: 0px; }
  .ex-prev { left: -8px; }
  .ex-next { right: -8px; }
  .ex-arrow { width: 44px; height: 44px; top: 20px; }
  .tl-row { grid-template-columns: 1fr; gap: 6px; }
  .tl-cursor { top: 0; }
  .ex-head { align-items: flex-start; }
  .ex-note { font-size: 16px; min-height: 4.7em; }
  .ex-year { font-size: 64px; }
  .project { border-radius: 18px; }
  .sticker b { font-size: 32px; }
  .sticker-ink b { font-size: 22px; }
  .sticker-round { width: 7.2em; height: 7.2em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tl-bar, .sticker, .js .project.is-on { animation: none; }
  .tl-cursor { transition: none; }
}
