/* ============================================================
   Tim Sauer — personal portfolio
   ============================================================ */

:root {
  /* — Color tokens (light) — */
  --bg:        #FAF7F1;
  --bg-soft:   #F2EDE3;
  --bg-card:   #FFFFFF;
  --ink:       #1F1B16;
  --ink-2:     #4A443B;
  --ink-3:     #6F6659;
  --rule:      rgba(31, 27, 22, 0.12);
  --rule-soft: rgba(31, 27, 22, 0.06);
  --accent:      #C2562B;        /* terracotta default */
  --accent-ink:  #FFFFFF;
  --accent-text: #B04920;        /* accent, darkened for small text (AA contrast on --bg) */

  /* — Typography — */
  --font-display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-sans:    "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* — Spacing scale — */
  --pad-x:     clamp(24px, 5vw, 72px);
  --section-y: clamp(64px, 7vw, 104px);
  --gap-lg:    clamp(40px, 6vw, 80px);

  /* — Type scale — */
  --t-eyebrow: 11px;
  --t-body:    17px;
  --t-lead:    20px;
  --t-h2:      clamp(26px, 3vw, 34px);
  --t-h3:      clamp(22px, 2.2vw, 28px);
  --t-hero:    clamp(60px, 7vw, 96px);

  /* — Misc — */
  --radius:    14px;
  --max-w:     1280px;
  --shadow:    0 1px 2px rgba(31,27,22,.04), 0 24px 48px -24px rgba(31,27,22,.18);
}

[data-theme="dark"] {
  --bg:        #15130F;
  --bg-soft:   #1E1B16;
  --bg-card:   #1B1814;
  --ink:       #F1ECE2;
  --ink-2:     #C9C1B3;
  --ink-3:     #8E867A;
  --rule:      rgba(241, 236, 226, 0.14);
  --rule-soft: rgba(241, 236, 226, 0.06);
  --accent-text: #D97757;        /* accent, brightened for small text (AA contrast on dark --bg) */
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 24px 48px -24px rgba(0,0,0,.6);
}

[data-density="compact"] { --section-y: clamp(56px, 8vw, 110px); --gap-lg: clamp(28px, 4vw, 56px); }
[data-density="comfy"]   { --section-y: clamp(100px, 14vw, 200px); --gap-lg: clamp(56px, 8vw, 110px); }

/* ────────────── Base ────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--font-sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.eyebrow {
  font: 500 var(--t-eyebrow)/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px; height: 1px;
  background: currentColor;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }

/* ────────────── Top navigation ────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}

.nav-mark {
  font: 500 14px/1.4 var(--font-sans);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.nav-mark .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4FB87B;
}


.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 3px;
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--rule-soft); }
.nav-links a.active { color: var(--ink); background: var(--rule-soft); }

.spine-num {
  display: none; /* only the fixed rail (≥900px) shows the numbered index; the
                    collapsed pill nav stays plain-label, matching the pre-spine pattern */
  font: 500 11px/1 var(--font-mono);
  color: var(--ink-3);
}
.spine-clock {
  font: 500 12px/1 var(--font-mono);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-theme {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  width: 44px;
  height: 44px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-theme:hover { background: var(--rule); color: var(--ink); }

.nav-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-lang {
  color: var(--ink-2);
  width: 44px;
  height: 44px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font: 500 12px/1 var(--font-sans);
  transition: background .15s, color .15s;
}
.nav-lang:hover { background: var(--rule); color: var(--ink); }

.nav-burger { display: none; position: static; }
.nav-burger summary {
  list-style: none;
  width: 44px;
  height: 44px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
}
.nav-burger summary::-webkit-details-marker,
.nav-burger summary::marker { display: none; content: ""; }
.nav-burger summary:hover { background: var(--rule); color: var(--ink); }
.nav-burger[open] summary { background: var(--ink); color: var(--bg); }
.nav-burger summary .ico { width: 14px; height: 14px; }

.nav-burger-list {
  position: absolute;
  top: calc(100% - 1px);
  right: 24px;
  width: min(280px, calc(100vw - 48px));
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 12px 24px -12px rgba(31,27,22,.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-burger-list a {
  display: block;
  min-height: 44px;
  padding: 12px;
  border-radius: 3px;
  color: var(--ink-2);
  font-size: 14px;
  transition: color .15s, background .15s;
}
.nav-burger-list a:hover,
.nav-burger-list a.active {
  color: var(--ink);
  background: var(--rule-soft);
}

@media (max-width: 760px) {
  .nav { gap: 6px; padding: 10px 18px; }
  .nav-burger { margin-left: auto; }
  .nav-bottom { margin-left: 0; }
  .nav-links { display: none; }
  .spine-clock { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ────────────── Ledger Spine (≥900px) ──────────────
   Below this width the same <nav class="nav spine"> renders as the
   top bar (rules above); at this width it becomes a fixed,
   full-height left rail and .page-shell makes room for it. */
.page-shell { min-width: 0; }

@media (min-width: 900px) {
  .spine {
    position: fixed;
    inset: 0 auto 0 0;
    left: 0;
    top: 0;
    transform: none;
    z-index: 100;
    width: 250px;
    height: 100vh;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    padding: 28px 22px;
    background: var(--bg);
    border: 0;
    border-right: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .spine .nav-mark { gap: 9px; }
  .spine .spine-clock { display: block; order: 1; }
  .spine .nav-links.spine-index {
    order: 2;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 8px;
  }
  .spine .nav-links.spine-index a {
    display: flex;
    width: 100%;
    padding: 10px 12px;
    border-radius: 3px;
    font-size: 15px;
  }
  .spine .spine-num { display: inline; }
  /* The rail index uses a quiet filled state; the top bar uses a lighter wash. */
  .spine .nav-links.spine-index a:hover,
  .spine .nav-links.spine-index a.active {
    background: var(--bg-soft);
  }
  .spine .nav-bottom { order: 3; align-self: flex-start; margin: auto 0 0; }

  .page-shell { margin-left: 250px; }

  /* No floating top nav to clear at this width — the spine sits beside
     the content, not above it. */
  .hero {
  padding-top: 128px;
  padding-bottom: var(--section-y);
  position: relative;
}
}

/* ────────────── Hero ────────────── */

.hero {
  padding-top: clamp(140px, 18vw, 220px);
  padding-bottom: var(--section-y);
  position: relative;
}

/* Hero layout — portrait on the left, content on the right */
.hero-top {
  display: grid;
  grid-template-columns: clamp(180px, 22vw, 280px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 800px) {
  .hero-top { grid-template-columns: 1fr; gap: 28px; }
}

.hero-portrait {
  aspect-ratio: 1000 / 1078;
  width: 100%;
  border-radius: 3px;
  background: var(--bg-soft);
  overflow: hidden;
}


/* Inline replacement of <img> works without changing the layout */
.hero-portrait img,
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-meta {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-top: 20px;
  margin-bottom: 0;
  flex-wrap: wrap;
}
.hero-meta .time { font: 500 12px/1 var(--font-mono); color: var(--ink-3); }
.hero-meta .loc {
  font: 400 12px/1.5 var(--font-sans);
  color: var(--ink-3);
}

.hero-name {
  font-family: var(--font-display);
  font-size: var(--t-hero);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin-bottom: 16px;
}
.hero-name em {
  font-style: italic;
  color: var(--accent);
  font-feature-settings: "ss01";
}

/* Mono "tag" used in headlines instead of italic flourish */
.tag {
  display: inline-block;
  font: 500 0.42em/1 var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--accent-text);
  vertical-align: 0.42em;
  padding: 0.35em 0.55em;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  text-transform: lowercase;
  margin: 0 0.15em;
  white-space: nowrap;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
}
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

.hero-lead {
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

.hero-role {
  font-size: 19px;
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 40ch;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  margin-top: 28px;
}

.hero-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 14px 18px;
  border-radius: 4px;
  font: 500 14px/1.2 var(--font-sans);
  transition: background .2s, color .2s;
}
.btn:active { opacity: .85; }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--rule);
  box-shadow: none;
}
.btn-ghost:hover { background: transparent; text-decoration-color: var(--ink); }

.btn .ico {
  width: 14px; height: 14px;
  display: inline-block;
}

.hero-socials {
  display: flex;
  gap: 22px;
  font: 400 14px/1.4 var(--font-sans);
  color: var(--ink-2);
}
.hero-socials a {
  position: relative;
  padding: 10px 0;
  transition: color .15s;
}
.hero-socials a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
  transition: opacity .15s;
}
.hero-socials a:hover { color: var(--ink); }
.hero-socials a:hover::after { opacity: 1; }

/* ────────────── Section shared ────────────── */

section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  border-top: 1px solid var(--rule);
}
section:first-of-type { border-top: 0; }

.section-head {
  margin-bottom: 36px;
}
/* Optional two-column section heading for ancillary surfaces. */
.section-head:has(.eyebrow) {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 800px) {
  .section-head:has(.eyebrow) { grid-template-columns: 1fr; gap: 16px; }
}
.section-head h2 {
  font-family: var(--font-sans);
  font-size: var(--t-h2);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: balance;
}
.section-head h2 em {
  font-style: italic;
  color: var(--accent);
}
.section-head .eyebrow {
  margin-top: 12px;
}

/* ────────────── About ────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; }
}

.portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 3px;
  background: var(--bg-soft);
  overflow: hidden;
}


.about-copy { display: flex; flex-direction: column; gap: 20px; }
.about-copy p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 62ch;
}
.about-copy p:first-child {
  color: var(--ink);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 32px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.fact { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; }
.fact dt {
  font: 400 13px/1.5 var(--font-sans);
  color: var(--ink-3);
}
.fact dd { margin: 0; font-size: 15px; color: var(--ink); }

/* ────────────── Work ────────────── */

.work-list {
  display: flex;
  flex-direction: column;
}

/* Project stats — GitHub-style mono row */
.repo-stats {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font: 500 12px/1 var(--font-mono);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.repo-stats span { display: inline-flex; align-items: center; gap: 5px; }
.repo-stats svg { width: 11px; height: 11px; }

/* ────────────── Publications ────────────── */

.pubs-list {
  display: flex;
  flex-direction: column;
}
.pub-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: clamp(20px, 3vw, 40px);
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.pub-item:last-child { border-bottom: 1px solid var(--rule); }
.pub-year {
  font: 500 12px/1.3 var(--font-mono);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.pub-body { display: flex; flex-direction: column; gap: 6px; }
.pub-body h4 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.pub-authors {
  font: 500 13px/1.5 var(--font-sans);
  color: var(--ink-2);
}
.pub-authors b { font-weight: 600; color: var(--ink); }
.pub-venue {
  font: 500 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.pub-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pub-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font: 500 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 5px;
  transition: color .15s, background .15s, border-color .15s;
}
.pub-link:hover {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.venue-badge {
  display: inline-block;
  padding: 2px 6px;
  font: 500 10px/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  text-transform: none;
  margin-right: 4px;
}
@media (max-width: 800px) {
  .pub-item { grid-template-columns: 1fr; gap: 8px; }
  .pub-links { justify-content: flex-start; }
}

.work-item {
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.6fr;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
  position: relative;
  transition: padding-left .25s ease;
}
.work-item:last-child { border-bottom: 1px solid var(--rule); }
.work-item:hover { padding-left: 16px; }
.work-item:hover .work-arrow { opacity: 1; transform: translateX(0); }

@media (max-width: 800px) {
  .work-item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 28px 0;
  }
  .work-item:hover { padding-left: 0; }
}

.work-thumb {
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 280px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--bg-soft) 0%, color-mix(in srgb, var(--bg-soft) 70%, var(--accent) 30%) 100%);
  position: relative;
  overflow: hidden;
}
.work-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  mask-image: linear-gradient(135deg, rgba(0,0,0,.5), rgba(0,0,0,.85));
}
.work-thumb[data-tag]::after {
  content: attr(data-tag);
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-radius: 5px;
  font: 500 10px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.work-info { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.work-info h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  letter-spacing: -0.01em;
  font-weight: 400;
  line-height: 1.1;
}
.work-info .role {
  font: 500 12px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.work-info p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  max-width: 50ch;
  margin-top: 4px;
}

.work-meta {
  text-align: right;
  font: 500 12px/1.4 var(--font-mono);
  color: var(--ink-3);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.work-meta .year { color: var(--ink); font-size: 14px; }

.work-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(8px, -50%);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  color: var(--accent-text);
  font-size: 18px;
  pointer-events: none;
}
@media (max-width: 800px) { .work-arrow { display: none; } }

/* ────────────── Experience ────────────── */

.experience-list {
  display: flex;
  flex-direction: column;
}
.xp-item {
  display: grid;
  grid-template-columns: 128px 1fr 1.2fr;
  gap: clamp(20px, 3vw, 36px);
  padding: 26px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.xp-item:last-child { border-bottom: 1px solid var(--rule); }
.xp-year {
  font: 400 13px/1.5 var(--font-sans);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.xp-role {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.xp-role h4 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
}
.xp-role .company {
  font: 400 14px/1.5 var(--font-sans);
  color: var(--ink-3);
}
.xp-desc {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
}
@media (max-width: 800px) {
  .xp-item { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
}

/* ────────────── Now / Currently ────────────── */

.now-grid { display: flex; flex-direction: column; }
.now-entry {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) 1.6fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}
.now-entry:last-child { border-bottom: 1px solid var(--rule); }
.now-entry h3 { font: 500 17px/1.5 var(--font-sans); }
.now-entry p { font-size: 18px; line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
@media (max-width: 700px) {
  .now-entry { grid-template-columns: 1fr; gap: 10px; }
}

/* ────────────── Contact ────────────── */

.contact {
  background: var(--bg-soft);
  border-top: 1px solid var(--rule);
  margin-top: 0;
}
.contact .wrap {
  padding-top: 0;
  padding-bottom: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  margin-bottom: clamp(60px, 9vw, 120px);
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

.contact-headline {
  font-family: var(--font-sans);
  font-size: 22px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 32ch;
  text-wrap: pretty;
}
.contact-headline em {
  font-style: italic;
  color: var(--accent);
}
.contact-headline a {
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s;
  padding-bottom: 2px;
}
.contact-headline a:hover { border-bottom-color: var(--accent); }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-block .label {
  font: 400 13px/1.5 var(--font-sans);
  color: var(--ink-3);
}
.contact-block .val {
  font-size: 17px;
  color: var(--ink);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--rule);
  white-space: nowrap;
  transition: color .15s, text-decoration-color .15s;
}
.social-row a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.social-row a .ico { width: 14px; height: 14px; }

/* ────────────── Footer ────────────── */

footer {
  padding: 28px 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font: 400 12px/1.6 var(--font-sans);
  color: var(--ink-3);
}
footer .copy { display: block; }
.footer-legal { display: inline-flex; align-items: center; gap: 16px; }
.footer-legal a { transition: color .15s; }
.footer-legal a:hover { color: var(--ink); }

/* ────────────── Static content visibility ────────────── */

.reveal {
  opacity: 1;
  transform: none;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ────────────── CV modal ────────────── */

.cv-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--ink) 65%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.cv-modal.open { opacity: 1; pointer-events: auto; }

.cv-sheet {
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  width: min(900px, 100%);
  height: min(85vh, 800px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
.cv-modal.open .cv-sheet { transform: scale(1); }

.cv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px 14px 22px;
  border-bottom: 1px solid var(--rule);
  gap: 12px;
}
.cv-head .title {
  font: 500 13px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.cv-head .actions { display: flex; gap: 8px; }
.cv-head button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  font: 500 13px/1 var(--font-sans);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, color .15s;
}
.cv-head button:hover { background: var(--rule-soft); color: var(--ink); }
.cv-head .download { background: var(--ink); color: var(--bg); }
.cv-head .download:hover { background: var(--accent); color: var(--accent-ink); }

.cv-body { flex: 1; background: var(--bg-soft); position: relative; }
.cv-body iframe { width: 100%; height: 100%; border: 0; background: var(--bg-soft); }

/* ────────────── Legal pages (Imprint / Datenschutz) ────────────── */

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.legal-brand {
  font: 500 13px/1 var(--font-mono);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.legal-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 12px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.legal-crumbs a { color: var(--ink-3); transition: color .15s; }
.legal-crumbs a:hover { color: var(--ink); }
.legal-crumbs a[aria-current="page"] { color: var(--ink); }

.legal-main { padding-top: clamp(56px, 9vw, 100px); padding-bottom: var(--section-y); }
.legal-wrap { max-width: 760px; }

.legal-wrap > .eyebrow { margin-bottom: 20px; }
.legal-wrap h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.legal-updated {
  display: block;
  margin-bottom: 48px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.legal-content { color: var(--ink-2); font-size: var(--t-body); line-height: 1.7; }
.legal-content h2 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 48px 0 12px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 8px;
}
.legal-content p { margin: 0 0 14px; max-width: 68ch; }
.legal-content ul {
  margin: 0 0 14px;
  padding-left: 20px;
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal-content li { padding-left: 4px; }
.legal-content a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.legal-content a:hover { color: var(--accent); }
.legal-content strong { color: var(--ink); font-weight: 600; }

.legal-placeholder {
  display: inline;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px dashed var(--accent-text);
  color: var(--accent-text);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.92em;
}

.legal-source {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-3);
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive composition and native browser controls */
@media (max-width: 899px) {
  .page-shell section { scroll-margin-top: 88px; }
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}
html { color-scheme: light; scrollbar-color: var(--ink-3) var(--bg); }
html[data-theme="dark"] { color-scheme: dark; }
.spine-num { font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.contact-block .val { overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .hero { padding-top: 80px; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  .hero-top { grid-template-columns: 180px minmax(0, 1fr); gap: 28px; }
  .hero-name { font-size: 64px; }
  .xp-item { grid-template-columns: 128px minmax(0, 1fr); gap: 12px 24px; }
  .xp-desc { grid-column: 2; }
}
@media (max-width: 800px) {
  .hero { padding-top: 104px; }
  .hero-top { gap: 28px; }
  .hero-portrait { width: 180px; }
  .hero-meta { margin-bottom: 0; }
  .hero-name { font-size: clamp(60px, 10vw, 80px); }
  .hero-lead { font-size: 18px; }
  .hero-role { font-size: 18px; margin-bottom: 18px; }
  .about-grid { gap: 28px; }
  .portrait { max-width: 420px; }
  .xp-item { gap: 10px; padding: 24px 0; }
  .contact-grid { margin-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
