/* Fonts (SIL OFL 1.1, licenses in assets/fonts/licenses).
   Velvetyne Lineal: titles and menus only. Geist: all other text. */
@font-face{font-family:'VT Lineal Light';src:url(fonts/Lineal-Light.woff2) format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:'VT Lineal Medium';src:url(fonts/Lineal-Medium.woff2) format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:'Geist';src:url(fonts/Geist-Variable.woff2) format('woff2');font-weight:100 900;font-display:swap}

:root {
  color-scheme: light;
  --surface: #F3F0E9;
  --surface-side: #ECE8DF;
  --line: #DAD5C8;
  --text: #1A1814;
  --text-muted: #7B766B;

  --fallback: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Geist', var(--fallback);            /* all running text */
  --font-display: 'VT Lineal Light', var(--fallback);  /* the name */
  --font-title: 'VT Lineal Medium', var(--fallback);   /* titles and menus */

  /* muted hues from the Umkreis party palette */
  --c-red: #9A3B33; --c-green: #3E6B4B; --c-purple: #7A4A86; --c-blue: #2A4A77; --c-gold: #9A7A2E; --c-rose: #8A6474;

  --space-1: 5px; --space-2: 16px; --space-3: 24px; --space-4: 28px;
  --space-5: 40px; --space-6: 64px; --space-7: 96px;
  --side-width: clamp(300px, 36vw, 480px);

  /* hand-drawn hairline, used as a mask so it takes any colour */
  --ink-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='6' viewBox='0 0 400 6'%3E%3Cpath d='M0 3 C 30 2.1 60 3.9 100 3.1 S 170 2.2 210 3 S 290 3.9 330 3.2 S 380 2.3 400 3' fill='none' stroke='black' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #13120F; --surface-side: #1A1915; --line: #2A2822;
    --text: #EFEBE2; --text-muted: #9A958A;
    --c-red: #C9776D; --c-green: #7FA88A; --c-purple: #A987B3; --c-blue: #7C99C4; --c-gold: #C6A862; --c-rose: #B28E9D;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #13120F; --surface-side: #1A1915; --line: #2A2822;
  --text: #EFEBE2; --text-muted: #9A958A;
  --c-red: #C9776D; --c-green: #7FA88A; --c-purple: #A987B3; --c-blue: #7C99C4; --c-gold: #C6A862; --c-rose: #B28E9D;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 15px/1.55 var(--font-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--line); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 3px; }
button { font: inherit; color: inherit; }

.skip { position: absolute; left: -999px; top: 0; z-index: 10; padding: .5rem 1rem; background: var(--text); color: var(--surface); }
.skip:focus { left: 0; }

/* menus and section titles: Lineal Medium, uppercase */
.tabs a, .tbtn, section h2 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
section h2 { font-size: 14px; }
/* everything else is Geist */
.role { font-size: 13px; }
.meta, .copy { font-size: 12px; letter-spacing: .02em; }

/* ---------- layout ---------- */
.layout { display: block; }
.side {
  position: relative;
  display: flex; flex-direction: column; gap: var(--space-5);
  padding: var(--space-3) 16px var(--space-4);
  background: var(--surface-side);
}
.side h1 {
  margin: 0;
  font: 400 clamp(44px, 12vw, 64px)/1.02 var(--font-display);
  letter-spacing: -.03em;
  padding-right: 64px;
}
.role { margin: 14px 0 0; color: var(--text-muted); font-family: var(--font-body); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px var(--space-3); }
.tabs a { position: relative; padding-bottom: 3px; color: var(--text-muted); transition: color .15s; }
.tabs a:hover, .tabs a[aria-current="true"] { color: var(--text); }
.tabs a::after,
section h2::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: var(--text-muted); opacity: 0; pointer-events: none;
  -webkit-mask: var(--ink-line) repeat-x left center/400px 6px;
          mask: var(--ink-line) repeat-x left center/400px 6px;
}
.tabs a::after { bottom: -3px; background: var(--text); transition: opacity .15s; }
.tabs a:hover::after { opacity: .5; }
.tabs a[aria-current="true"]::after { opacity: 1; }

.tbtn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--text-muted); text-align: left; transition: color .15s; }
.tbtn:hover { color: var(--text); }
#theme-toggle { position: absolute; top: var(--space-3); right: 16px; }

main { padding: var(--space-5) 16px var(--space-6); max-width: 760px; }
.lede {
  margin: 0;
  font: 300 clamp(20px, 5.4vw, 24px)/1.45 var(--font-body);
  letter-spacing: -.015em;
  max-width: 32em;
}

section { margin-top: var(--space-6); }
section h2 { position: relative; margin: 0 0 var(--space-2); padding-bottom: 8px; color: var(--text); }
section h2::after { opacity: .7; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: baseline; padding: 10px 0; }
.list a, .list .entry { display: block; }
.title { display: block; font-family: var(--font-body); font-weight: 500; font-size: 16px; line-height: 1.35; letter-spacing: -.005em; transition: color .15s; }
.desc { display: block; margin-top: 3px; color: var(--text-muted); font-family: var(--font-body); font-size: 14px; }
.desc em { font-style: normal; color: var(--text); }
.list a:hover .title { color: var(--text-muted); }
.meta { color: var(--text-muted); white-space: nowrap; font-family: var(--font-body); }

.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px var(--space-3); }
.links a { text-decoration: underline; text-underline-offset: 3px; transition: color .15s; }
.links a:hover { color: var(--text-muted); }

.copy { margin: var(--space-7) 0 0; color: var(--text-muted); font-family: var(--font-body); }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .side h1, .role, .lede, section, .tabs { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .role { animation-delay: .05s; } .tabs { animation-delay: .1s; } .lede { animation-delay: .12s; }
  section:nth-of-type(1) { animation-delay: .18s; } section:nth-of-type(2) { animation-delay: .24s; }
  section:nth-of-type(3) { animation-delay: .3s; } section:nth-of-type(4) { animation-delay: .36s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- desktop: fixed side column + scrolling content ---------- */
@media (min-width: 900px) {
  html { scroll-padding-top: 28px; }
  .layout { display: grid; grid-template-columns: var(--side-width) minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; height: 100vh; height: 100dvh;
    justify-content: space-between; gap: var(--space-4);
    padding: var(--space-4) clamp(24px, 3vw, 40px);
  }
  .side h1 { font-size: clamp(52px, 5.4vw, 84px); padding-right: 0; }
  .tabs { flex-direction: column; flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
  #theme-toggle { position: static; }
  main { padding: var(--space-4) clamp(24px, 5vw, 80px) var(--space-6); }
  .lede { margin-top: 0; }
}

/* ---------- colour motif and project cards ---------- */
.ramp { display: flex; width: 168px; height: 6px; margin-top: var(--space-3); }
.ramp span { flex: 1; margin-right: 1px; }
.ramp span:last-child { margin-right: 0; }
.ramp span:nth-child(1) { background: var(--c-red); }
.ramp span:nth-child(2) { background: var(--c-gold); }
.ramp span:nth-child(3) { background: var(--c-green); }
.ramp span:nth-child(4) { background: var(--c-blue); }
.ramp span:nth-child(5) { background: var(--c-purple); }
.ramp span:nth-child(6) { background: var(--c-rose); }

.cards { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--space-4) var(--space-3); }
.cards li { display: block; padding: 0; }
.cards a { display: grid; gap: 4px; }
.thumb { display: block; overflow: hidden; border-radius: 6px; background: var(--tone); aspect-ratio: 4 / 3; margin-bottom: 10px; }
.cards .wide .thumb { aspect-ratio: 16 / 9; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cards a:hover .thumb img { transform: scale(1.03); }
.cards a:hover .title { color: var(--c); }
.cards .meta { display: inline-flex; align-items: center; gap: 7px; justify-self: start; color: var(--text-muted); }
.cards .meta::before { content: ""; width: 8px; height: 8px; background: var(--c); }
:root[data-theme="dark"] .thumb img { filter: brightness(.86); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .thumb img { filter: brightness(.86); } }
@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .wide { grid-column: 1 / -1; }
}
