/* Thales A. Gutcke — site styles
   Palette taken from the simulation colormaps (inferno / afmhot). */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #16202e;
  --muted: #5b6576;
  --rule: #d9dde4;
  --link: #6a1a6e;
  --ph: #fff1c9;
  --ph-ink: #6b4a00;
  --inferno: linear-gradient(90deg, #000004 0%, #280b54 12%, #57106e 25%, #8a226a 38%, #bc3754 50%, #e45a31 63%, #f98e09 76%, #f9cb35 88%, #fcffa4 100%);

  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 40rem;
  --wide: 68rem;
  --rail: 11rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --surface: #182233;
    --ink: #e8ebf0;
    --muted: #9aa4b5;
    --rule: #2c3649;
    --link: #f6a9e0;
    --ph: #3d3312;
    --ph-ink: #f5d98a;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--sans); line-height: 1.15; font-weight: 600; margin: 0; }
h2 { font-size: 1.05rem; letter-spacing: 0.01em; color: var(--muted); font-weight: 500; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; }
.brand { font-family: var(--sans); font-weight: 600; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 0.55rem; }
.brand img { width: 1.5rem; height: 1.5rem; border-radius: 50%; }
.site-nav { display: flex; gap: 1.4rem; font-family: var(--sans); font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 0.3rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 9vw, 7rem) 0 2.5rem; }
.hero h1 {
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 0.95;
}
.hero .lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); max-width: 34rem; margin-top: 1.6rem; color: var(--ink); }
.hero .lede span { color: var(--muted); }

/* The one loud element: a simulation colorbar */
.colorbar { margin-top: 3rem; }
.colorbar .bar { height: 14px; background: var(--inferno); border-radius: 1px; }
.colorbar .ticks { display: flex; justify-content: space-between; font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.colorbar .ticks span { position: relative; padding-top: 0.35rem; }
.colorbar .ticks span::before { content: ""; position: absolute; top: -0.4rem; left: 50%; width: 1px; height: 0.55rem; background: var(--muted); }
.colorbar .ticks span:first-child::before { left: 0; }
.colorbar .ticks span:last-child::before { left: auto; right: 0; }
.colorbar figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; max-width: var(--measure); }

.page-hero { padding: clamp(2.5rem, 7vw, 5rem) 0 1rem; }
.page-hero h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); letter-spacing: -0.03em; }
.page-hero p { max-width: var(--measure); color: var(--muted); margin-top: 1rem; font-size: 1.15rem; }
.page-hero .bar { height: 6px; background: var(--inferno); margin-top: 2rem; max-width: 12rem; }

/* ---------- sections: label rail + content ---------- */
.section { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 2rem; padding: 3rem 0; border-top: 1px solid var(--rule); }
.section > h2 { padding-top: 0.3rem; }
.section .body { max-width: var(--measure); }
.section .body.wide { max-width: none; }

@media (max-width: 760px) {
  .section { grid-template-columns: 1fr; gap: 1rem; padding: 2.25rem 0; }
}

/* ---------- feature (grant announcement) ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.feature h3 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -0.02em; margin-bottom: 0.8rem; }
.feature .meta { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* ---------- placeholders ---------- */
.placeholder {
  display: grid; place-items: center; text-align: center;
  aspect-ratio: 4 / 3; padding: 1.5rem;
  border: 1px dashed var(--muted);
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--muted) 12%, transparent) 10px 11px),
    var(--surface);
  color: var(--muted); font-family: var(--sans); font-size: 0.9rem;
}
.placeholder.wide { aspect-ratio: 16 / 7; }
.placeholder.square { aspect-ratio: 1; }
/* text that still needs to be filled in / verified */
.ph { background: var(--ph); color: var(--ph-ink); padding: 0 0.25em; border-radius: 2px; }

/* ---------- figures ---------- */
figure { margin: 0; }
figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; line-height: 1.5; }
.banner { margin: 0 0 1rem; }
.banner img { width: 100%; }

.portrait-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.portrait-row img { width: 9rem; height: 9rem; object-fit: cover; border-radius: 50%; }
@media (max-width: 520px) { .portrait-row { grid-template-columns: 1fr; } }

/* ---------- research items ---------- */
.research { display: grid; gap: 2.5rem; }
.research-item { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.research-item img, .research-item .placeholder { width: 10rem; height: 10rem; object-fit: cover; aspect-ratio: 1; }
.research-item p { margin: 0 0 0.5rem; }
@media (max-width: 560px) { .research-item { grid-template-columns: 1fr; } }

.more { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; }

/* ---------- plain lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.list li:first-child { padding-top: 0; }
.list .aside { color: var(--muted); font-family: var(--sans); font-size: 0.9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.inline-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; padding: 0; margin: 0; list-style: none; }

/* ---------- CV timeline ---------- */
.cv { display: grid; gap: 0; }
.cv-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.25rem; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.cv-row:first-child { padding-top: 0; }
.cv-row time, .cv-row .when { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.15rem; }
.cv-row strong { font-family: var(--sans); font-weight: 600; display: block; }
.cv-row span { display: block; color: var(--muted); }
@media (max-width: 520px) { .cv-row { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ---------- media grid ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
video { width: 100%; background: #000; aspect-ratio: 1; object-fit: cover; }

.people { columns: 2; column-gap: 2rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.people li { break-inside: avoid; }
@media (max-width: 520px) { .people { columns: 1; } }

/* ---------- buttons ---------- */
.button {
  display: inline-block; font-family: var(--sans); font-weight: 500; font-size: 0.95rem;
  padding: 0.6rem 1.1rem; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; border-radius: 999px;
}
.button:hover { background: var(--ink); color: var(--bg); }
.button-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); margin-top: 3rem; padding: 2.5rem 0 3rem; font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .hero .bar { transform-origin: left; animation: grow 1.1s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
