/* ==========================================================================
   Maximilian Michels — personal site
   Design system ported from the NeurodiversiTUM club site (theme.js).
   Tokens live here and nowhere else.
   ========================================================================== */

/* ---------- Easy reading typeface ----------
   Lexend, self hosted under the SIL Open Font License 1.1. Self hosted rather
   than loaded from Google Fonts so that no visitor's IP address is handed to a
   third party. The browser only downloads these files if a visitor actually
   selects the easy reading option, because nothing else references the family. */

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lexend-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/lexend-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lexend-latin-700-normal.woff2') format('woff2');
}

/* ---------- Tokens ---------- */

:root {
  --dur: 0.25s;
  --font-default: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-easy: 'Lexend', system-ui, sans-serif;
  --font: var(--font-default);
  --scale: 1;

  --max: 1440px;
  --gutter: 48px;
  --radius-panel: 20px;
  --radius-pill: 999px;
}

/* Dark is the default, matching the club site. */
html[data-theme='dark'] {
  --bg0: #06141B;
  --bg1: #11212D;
  --text: #CCD0CF;
  --text-soft: rgba(220, 224, 224, 0.76);
  --panel: rgba(37, 55, 69, 0.6);
  --panel-border: rgba(220, 224, 224, 0.22);
  --accent: #9BA8AB;
  --accent-contrast: #06141B;
  --accent-soft: rgba(155, 168, 171, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --blob-a: #253745;
  --blob-b: #4A5C6A;
  --blob-c: #11212D;
  --blob-opacity: 0.28;
}

html[data-theme='light'] {
  --bg0: #CCD0CF;
  --bg1: #9BA8AB;
  --text: #11212D;
  /* The club site used 0.62 here. Raised to 0.82 so secondary text still clears
     4.5 to 1 against the darker end of the light gradient. */
  --text-soft: rgba(17, 33, 45, 0.82);
  --panel: rgba(255, 255, 255, 0.55);
  --panel-border: rgba(6, 20, 27, 0.12);
  --accent: #253745;
  --accent-contrast: #CCD0CF;
  --accent-soft: rgba(37, 55, 69, 0.10);
  --shadow: 0 20px 60px rgba(37, 55, 69, 0.18);
  --blob-a: #9BA8AB;
  --blob-b: #4A5C6A;
  --blob-c: #CCD0CF;
  --blob-opacity: 0.35;
}

html[data-font='easy'] { --font: var(--font-easy); }

/* ---------- Reset ---------- */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  min-height: 100%;
  background-color: var(--bg0);
  background-image: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font);
  font-size: calc(17px * var(--scale));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent-soft); color: var(--text); }

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Background blob layer ---------- */

.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--blob-opacity);
}

.blob-1 { top: -8%; left: -6%; width: 46vw; height: 46vw; background: var(--blob-a); }
.blob-2 { top: 30%; left: 70%; width: 38vw; height: 38vw; background: var(--blob-b); }
.blob-3 { top: 70%; left: 0%; width: 42vw; height: 42vw; background: var(--blob-c); }

/* ---------- Glass ---------- */

.glass {
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur);
}
.skip:focus { top: 16px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--panel-border);
  color: var(--text);
  transition: background var(--dur), border-color var(--dur), color var(--dur), padding var(--dur);
}

/* Over a hero image, before any scroll, the header dissolves into the picture. */
body[data-hero='true'] .site-header:not(.scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  color: #fff;
}

.header-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 5px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: padding var(--dur);
}

body[data-hero='true'] .site-header:not(.scrolled) .header-inner { padding: 14px 24px; }

.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 9px 4px;
}

.wordmark .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0;
  flex: none;
}

body[data-hero='true'] .site-header:not(.scrolled) .wordmark .mark {
  background: rgba(255, 255, 255, 0.9);
  color: #0b0b0c;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  font: inherit;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.88em;
  color: inherit;
  opacity: 0.72;
  transition: opacity var(--dur), background var(--dur), transform var(--dur);
}

.nav a:hover { opacity: 1; transform: scale(1.04); }

body[data-hero='true'] .site-header:not(.scrolled) .nav a { opacity: 0.92; }

.nav a[aria-current='page'] {
  opacity: 1;
  font-weight: 600;
  background: var(--accent-soft);
}

body[data-hero='true'] .site-header:not(.scrolled) .nav a[aria-current='page'] {
  background: rgba(255, 255, 255, 0.16);
}

.gear {
  font-size: 1.5em;
  line-height: 1;
  opacity: 0.75;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
  transition: opacity var(--dur), transform var(--dur);
}
.gear:hover { opacity: 1; transform: rotate(35deg); }
body[data-hero='true'] .site-header:not(.scrolled) .gear { opacity: 0.92; }

/* Written as .nav a.btn-contact so it outranks the plain .nav a rule above. */
.nav a.btn-contact {
  margin-left: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  opacity: 1;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.88em;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  transition: opacity var(--dur), transform var(--dur);
}
.nav a.btn-contact:hover { opacity: 0.88; transform: scale(1.05); }

body[data-hero='true'] .site-header:not(.scrolled) .nav a.btn-contact {
  background: #fff;
  color: #0b0b0c;
}

.nav-toggle { display: none; }

/* ---------- Settings panel ---------- */

.settings {
  position: fixed;
  top: 76px;
  right: 22px;
  z-index: 151;
  width: 300px;
  max-width: calc(100vw - 44px);
  border-radius: var(--radius-panel);
  padding: 22px;
}
.settings[hidden] { display: none; }

.settings h2 {
  margin: 0 0 16px;
  font-size: 1em;
  letter-spacing: -0.01em;
}

.settings-label {
  display: block;
  font-weight: 700;
  font-size: 0.76em;
  margin-bottom: 9px;
  color: var(--text-soft);
}

.seg {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.seg button {
  flex: 1;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.86em;
  font-weight: 500;
  transition: all var(--dur);
}

.seg button[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.seg-scale button:nth-child(1) { font-size: 0.85em; }
.seg-scale button:nth-child(2) { font-size: 1.07em; }
.seg-scale button:nth-child(3) { font-size: 1.29em; }

.settings-note {
  margin: 0;
  font-size: 0.76em;
  color: var(--text-soft);
}

/* ---------- Hero ---------- */

/* Heroes size themselves to their content and use min-height only as a floor.
   The previous version fixed the height and hid the overflow, which meant a long
   title, a narrow screen or an enlarged text setting silently cut the text off. */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 52vh;
  padding-top: 128px;
}

.hero-home { min-height: 88vh; }

/* Heroes are a generated gradient field rather than a photograph, so they stay
   sharp, weigh nothing, and look identical in both themes. Fixed palette values
   are deliberate here, because the hero always carries white text. */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
  background-image:
    radial-gradient(60% 70% at 18% 22%, rgba(74, 92, 106, 0.95) 0%, rgba(74, 92, 106, 0) 62%),
    radial-gradient(52% 60% at 82% 30%, rgba(155, 168, 171, 0.55) 0%, rgba(155, 168, 171, 0) 60%),
    radial-gradient(70% 80% at 55% 92%, rgba(6, 20, 27, 0.9) 0%, rgba(6, 20, 27, 0) 70%),
    linear-gradient(160deg, #11212D 0%, #253745 45%, #06141B 100%);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 14, 20, 0.38) 0%, rgba(6, 14, 20, 0.3) 50%, rgba(6, 14, 20, 0.5) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 56px;
  width: 100%;
  color: #fff;
}

.hero-home .hero-inner { padding-bottom: 44px; margin-top: auto; }

.hero-kicker {
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(1.8em, 4vw, 2.7em);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.hero-home h1 {
  font-size: clamp(2.4em, 6.4vw, 4.1em);
  line-height: 1.08;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1.05em;
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
  text-wrap: pretty;
  max-width: 62ch;
}

.hero-home .hero-sub { font-size: 1.15em; max-width: 56ch; }

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.cta-primary {
  background: #fff;
  color: #0b0b0c;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.88em;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  transition: opacity var(--dur), transform var(--dur);
  display: inline-block;
}
.cta-primary:hover { opacity: 0.88; transform: scale(1.05); }

.cta-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.88em;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  transition: background var(--dur), transform var(--dur);
  display: inline-block;
}
.cta-ghost:hover { background: rgba(255, 255, 255, 0.24); transform: scale(1.05); }

/* Stat strip. A flow child at the end of the hero's flex column rather than an
   absolutely positioned overlay, so it can never land on top of the headline. */
.hero-stats {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 22px var(--gutter);
  background: linear-gradient(180deg, rgba(6, 14, 20, 0) 0%, rgba(6, 14, 20, 0.55) 100%);
  color: #fff;
  flex-wrap: wrap;
  row-gap: 18px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 34px;
  text-align: center;
}

.stat-num {
  font-size: 1.9em;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.74em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.stat-divider {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.28);
}

/* ---------- Main and bands ---------- */

main {
  position: relative;
  z-index: 1;
  flex: 1;
}

.band {
  padding: 96px 0;
  position: relative;
}

.band-alt { background: var(--accent-soft); }

.band-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.band-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.band-alt .band-row { direction: rtl; }
.band-alt .band-row > * { direction: ltr; }

.band h2,
.section-head h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  font-size: 1.94em;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.h2-sub {
  color: var(--text-soft);
  font-weight: 400;
  font-size: 0.56em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.band p {
  color: var(--text-soft);
  margin: 0 0 22px;
  text-wrap: pretty;
  max-width: 58ch;
}

.band-link {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9em;
  opacity: 0.82;
  display: inline-block;
  transition: opacity var(--dur), transform var(--dur);
}
.band-link:hover { opacity: 1; transform: scale(1.05); }

.band-media {
  border-radius: var(--radius-panel);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}

.band-media img { width: 100%; height: 100%; object-fit: cover; }

/* A generated abstract tile, used where there is no photograph. */
.tile {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-panel);
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #253745 0%, #4A5C6A 55%, #06141B 100%);
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 55% at 22% 26%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(38% 46% at 78% 74%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 62%);
}

.tile-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.24);
  z-index: 1;
  line-height: 1;
}

/* ---------- Utility classes ---------- */

.page-top { padding-top: 132px; }

.band-center { text-align: center; }
.band-center h2 { justify-content: center; }

.lede {
  margin: 0 auto 26px;
  max-width: 52ch;
  color: var(--text-soft);
}

.cta-solid { background: var(--accent); color: var(--accent-contrast); }

.group-label {
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 26px 0 12px;
}

.muted { color: var(--text-soft); }

.card-role { font-weight: 600; color: var(--text); }

.dt-sub { font-weight: 500; text-transform: none; letter-spacing: 0; }

.tl-points.tight { margin-top: 8px; }

.spaced { margin-top: 30px; }

.cv-download { margin-top: 18px; }

/* ---------- Generic section head ---------- */

.section-head { margin-bottom: 40px; }
.section-head p { color: var(--text-soft); margin: 0; max-width: 62ch; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  border-radius: var(--radius-panel);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--dur), box-shadow var(--dur);
}

a.card:hover { transform: translateY(-4px); }

.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 2px;
}

.card-kicker {
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.card h3 {
  margin: 0;
  font-size: 1.16em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94em;
  text-wrap: pretty;
}

.card-more {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 700;
  font-size: 0.88em;
}

.card-media {
  margin: -28px -28px 4px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
}


/* ---------- Organisation marks ----------
   One visual token per employer, university, club or project. Renders as a
   monogram by default. If a real logo file exists in assets/logos/ the build
   swaps it in and nothing else has to change, so logos can arrive one at a time.
   Real logos sit on a white plate because most are drawn for light backgrounds
   and would disappear against the dark theme. */

.mark {
  --mark-size: 52px;
  width: var(--mark-size);
  height: var(--mark-size);
  border-radius: calc(var(--mark-size) * 0.27);
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: calc(var(--mark-size) * 0.33);
  line-height: 1;
  color: rgba(255, 255, 255, 0.94);
  background: linear-gradient(150deg, #253745 0%, #4A5C6A 58%, #06141B 100%);
  border: 1px solid var(--panel-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.mark-lg { --mark-size: 64px; }

/* Monogram length drives the type size, so "PoliMi" fits the same tile as "D." */
.mark-l3 { font-size: calc(var(--mark-size) * 0.30); }
.mark-l4 { font-size: calc(var(--mark-size) * 0.25); }
.mark-l5 { font-size: calc(var(--mark-size) * 0.21); }
.mark-l6 { font-size: calc(var(--mark-size) * 0.185); }
.mark-sm { --mark-size: 40px; }

/* A supplied logo file rather than a monogram. */
.mark-logo {
  background: #fff;
  border-color: rgba(6, 20, 27, 0.14);
}

.mark-logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

/* A row or grid of marks, used where a page needs to show a set of places at a
   glance rather than a list. */
.markwall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.markwall li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-panel);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.markwall .mark-caption {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
}

/* Used inside band media, where the marks are the picture. */
.mark-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 34px;
  border-radius: var(--radius-panel);
  background: linear-gradient(150deg, #253745 0%, #4A5C6A 55%, #06141B 100%);
}

.mark-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 22px; }

.mark-grid .mark {
  --mark-size: min(84px, 9vw);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
  .mark-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 22px; }

.mark-grid .mark { --mark-size: 64px; }
}

/* ---------- Timeline ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline > li {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 22px;
  padding-bottom: 46px;
}

.timeline > li:last-child { padding-bottom: 0; }

/* The connecting line is drawn per item, from just below one mark to the next,
   so it never runs past the ends of the list. */
.timeline > li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 25px;
  top: 62px;
  bottom: 12px;
  width: 1px;
  background: var(--panel-border);
}

.tl-current .mark {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 6px 18px rgba(0, 0, 0, 0.18);
}

.tl-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.tl-role {
  margin: 0 0 2px;
  font-size: 1.16em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tl-org { margin: 0 0 12px; color: var(--text-soft); font-weight: 500; }

.tl-points { margin: 0; padding-left: 18px; color: var(--text-soft); }
.tl-points li { margin-bottom: 6px; text-wrap: pretty; }

@media (max-width: 560px) {
  .timeline > li { grid-template-columns: 40px 1fr; gap: 16px; }
  .timeline > li .mark { --mark-size: 40px; }
  .timeline > li:not(:last-child)::before { left: 19px; top: 50px; }
}

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chip {
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-size: 0.86em;
  font-weight: 600;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.chip-strong { background: var(--accent-soft); border-color: var(--accent); }

/* ---------- Definition rows, used on CV and contact ---------- */

.rows { display: grid; gap: 0; }

.row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--panel-border);
}

.row:last-child { border-bottom: 1px solid var(--panel-border); }

.row dt {
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.row dt { overflow-wrap: anywhere; }

/* ---------- Prose, used on legal pages and project detail ---------- */

.prose { max-width: 72ch; }
.prose h2 { display: block; font-size: 1.4em; margin: 44px 0 14px; }
.prose h3 { font-size: 1.08em; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--text-soft); text-wrap: pretty; }
.prose a { font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 0;
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--panel-border);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-name { font-weight: 700; letter-spacing: -0.01em; }
.footer-tag { color: var(--text-soft); font-size: 0.86em; margin-top: 2px; }

.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.8em;
  font-weight: 600;
  transition: color var(--dur), transform var(--dur);
}
.footer-links a:hover { color: var(--text); transform: translateY(-1px); }

/* ---------- Contact FAB ---------- */

.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  border-radius: var(--radius-pill);
  padding: 13px 20px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.88em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: opacity var(--dur), transform var(--dur);
}
.fab:hover { transform: scale(1.05); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .band { padding: 68px 0; }
  .band-row { grid-template-columns: 1fr; gap: 32px; }
  .band-alt .band-row { direction: ltr; }
  .band-alt .band-row .band-media { order: -1; }

  .row { grid-template-columns: 1fr; gap: 6px; }

  .hero { padding-top: 104px; min-height: 44vh; }
  .hero-home { min-height: 78vh; }
  /* Contact already sits in the menu on small screens, so the floating button
     would only cover content. */
  .fab { display: none; }
  .stat { padding: 0 18px; }
  .stat-num { font-size: 1.5em; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: 700;
    font-size: 0.86em;
    cursor: pointer;
    padding: 9px 12px;
    border-radius: var(--radius-pill);
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 6px 0 14px;
  }

  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav a.btn-contact { margin-left: 0; text-align: center; }
}

@media (max-width: 560px) {
  .hero-stats { padding: 18px 12px; }
  .stat-divider { display: none; }
  .stat { padding: 0 14px; }
}

/* ---------- Print, so the CV page prints cleanly ---------- */

@media print {
  html { background: #fff; background-image: none; }
  body { color: #000; font-size: 10.5pt; display: block; }
  .site-header, .site-footer, .settings, .fab, .blobs, .skip, .hero, .no-print { display: none !important; }
  .band, .band.page-top { padding: 0 0 14pt; }
  .band-alt { background: none; }
  .band-inner { padding: 0; max-width: none; }
  .section-head { margin-bottom: 14pt; }
  .band h2, .section-head h2 { font-size: 15pt; margin-bottom: 10pt; }
  .h2-sub { color: #444; }
  .row { grid-template-columns: 120px 1fr; padding: 10pt 0; page-break-inside: avoid; }
  .row dt { color: #333; }
  .timeline > li { page-break-inside: avoid; }
  .tl-points li, .row dd, .band p, .prose p, .muted, .group-label { color: #000; }
  .tl-points { margin-top: 4pt; }
  .tl-points li { margin-bottom: 2pt; }
  a { text-decoration: none; }
}
