/* ===========================================================================
   Design tokens
   Light is the default; dark applies from the OS setting unless the visitor
   picked a theme, and always when data-theme="dark" is set.
=========================================================================== */
:root {
  color-scheme: light;

  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e9ecf1;
  --border: #e2e6ec;
  --border-strong: #cdd3dc;

  --text: #0f141b;
  --text-2: #465061;
  --text-3: #5f6a7b;

  --accent: #1d5fd1;
  --accent-strong: #174ea9;
  --accent-soft: #e8f0fd;
  --accent-line: #b9cff5;
  --on-accent: #ffffff;

  --ok: #16774c;
  --ok-soft: #e6f4ed;
  --lock: #5b4bb3;
  --lock-soft: #efedfa;
  --warm: #9a4a14;
  --warm-soft: #fbefe6;

  /* Categorical chart slots, validated for adjacent-pair CVD separation. */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;

  --shadow-sm: 0 1px 2px rgba(15, 20, 27, 0.05);
  --shadow-md: 0 1px 2px rgba(15, 20, 27, 0.04), 0 12px 32px -16px rgba(15, 20, 27, 0.18);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue",
    Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;

  --content-width: 1140px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0d1016;
    --surface: #151922;
    --surface-2: #1a1f29;
    --surface-3: #222834;
    --border: #262c38;
    --border-strong: #353d4b;

    --text: #e9ecf2;
    --text-2: #aeb6c3;
    --text-3: #8e98a8;

    --accent: #82a9ff;
    --accent-strong: #a3c0ff;
    --accent-soft: #18233a;
    --accent-line: #2d4577;
    --on-accent: #0d1016;

    --ok: #56cf9c;
    --ok-soft: #13271f;
    --lock: #b4a6ff;
    --lock-soft: #211d38;
    --warm: #f0a26b;
    --warm-soft: #2b1d14;

    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 36px -18px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d1016;
  --surface: #151922;
  --surface-2: #1a1f29;
  --surface-3: #222834;
  --border: #262c38;
  --border-strong: #353d4b;

  --text: #e9ecf2;
  --text-2: #aeb6c3;
  --text-3: #8e98a8;

  --accent: #82a9ff;
  --accent-strong: #a3c0ff;
  --accent-soft: #18233a;
  --accent-line: #2d4577;
  --on-accent: #0d1016;

  --ok: #56cf9c;
  --ok-soft: #13271f;
  --lock: #b4a6ff;
  --lock-soft: #211d38;
  --warm: #f0a26b;
  --warm-soft: #2b1d14;

  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 36px -18px rgba(0, 0, 0, 0.7);
}

/* ===========================================================================
   Base
=========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  /* Single-word titles such as "TwinCAT-Automatisierungsprojekt" are wider than a 320px screen. */
  hyphens: auto;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.125em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--on-accent);
}

/* ===========================================================================
   Layout primitives
=========================================================================== */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 760px;
}

main {
  flex: 1;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section--first {
  padding-top: clamp(2.25rem, 5vw, 3.5rem);
}

.section--tight {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.section--alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-head__lead,
.lead {
  margin-top: 0.85rem;
  color: var(--text-2);
  font-size: 1.075rem;
  max-width: 64ch;
}

.eyebrow {
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.note {
  margin-top: 0.85rem;
  color: var(--text-3);
  font-size: 0.875rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.subsection {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.subsection__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

/* ===========================================================================
   Header & footer
=========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.site-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--surface-3);
  color: var(--text);
}

.site-nav a.active {
  color: var(--text);
  background: var(--surface-3);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 1.05rem;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-header__inner {
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    padding-block: 0.6rem 0.35rem;
    min-height: 0;
  }
  .brand {
    margin-right: auto;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 0.2rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav a {
    padding-inline: 0.5rem;
    font-size: 0.9rem;
  }
  .site-nav a:first-child {
    margin-left: -0.5rem;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.25rem;
  color: var(--text-3);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__name {
  color: var(--text);
  font-weight: 600;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.site-footer a {
  color: var(--text-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ===========================================================================
   Buttons, chips, badges, tags
=========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--secondary:hover {
  border-color: var(--text-3);
  color: var(--text);
}

.btn--block {
  width: 100%;
  margin-top: 0.75rem;
}

.btn[hidden] {
  display: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem 0.85rem 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
}

.pill__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.pill__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--ok);
  opacity: 0.25;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--surface-3);
  color: var(--text-2);
}

.chip--internal {
  background: var(--lock-soft);
  color: var(--lock);
}

.chip--private {
  background: var(--accent-soft);
  color: var(--accent);
}

.chip--commercial {
  background: var(--warm-soft);
  color: var(--warm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-3);
  font-size: 0.8rem;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

.badge--confirmed::before {
  background: var(--ok);
}

.badge--active::before {
  background: var(--accent);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  padding: 0.14rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.5;
  white-space: nowrap;
  /* A very long tag may wrap instead of pushing the page wider than a 320px screen. */
  max-width: 100%;
}

@media (max-width: 420px) {
  .tag {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.tag--more {
  color: var(--text-3);
}

/* ===========================================================================
   Lists
=========================================================================== */
.bullets {
  display: grid;
  gap: 0.55rem;
  color: var(--text-2);
}

.bullets li {
  position: relative;
  padding-left: 1.2rem;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}

.bullets--small {
  gap: 0.4rem;
  font-size: 0.9rem;
}

@media (min-width: 720px) {
  .bullets--columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

.steps {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.25rem;
  counter-reset: step;
  color: var(--text-2);
}

.steps li {
  position: relative;
  padding-left: 2.2rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ===========================================================================
   Hero
=========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60rem 30rem at 0% 0%, var(--accent-soft), transparent 70%),
    var(--bg);
}

.hero__grid {
  display: grid;
  /* Without an explicit track the column grows with the widest tag list and overflows at 320px. */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: center;
  }
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 3.9rem);
  letter-spacing: -0.035em;
}

.hero__role {
  margin-top: 0.6rem;
  color: var(--text-2);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 500;
}

.hero__headline {
  margin-top: 1.6rem;
  max-width: 34ch;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.hero__lead {
  margin-top: 1rem;
  max-width: 60ch;
  color: var(--text-2);
  font-size: 1.05rem;
}

.facts {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.facts__title {
  margin-bottom: 1rem;
  font-size: 1rem;
  letter-spacing: -0.005em;
}

.facts__list {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.facts__list div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
}

.facts__list dt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-3);
  font-size: 0.88rem;
}

.facts__list dd {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 500;
}

.facts__stack .tag-list + .facts__label {
  margin-top: 1rem;
}

@media (max-width: 420px) {
  .facts__list div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* ===========================================================================
   Portrait
   One square source file, framed differently per page.
=========================================================================== */
.portrait {
  display: block;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}

/* Square crop out of the landscape source, so the circle stays centred on the face. */
.portrait--hero {
  width: clamp(5.5rem, 9vw, 7rem);
  height: auto;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Capped at the file's own width; anything wider would only upscale. */
.portrait--about {
  width: 100%;
  max-width: 494px;
  height: auto;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
}

/* ===========================================================================
   Project cards
=========================================================================== */
.project-stack {
  display: grid;
  gap: 1.25rem;
}

.project {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.project[hidden] {
  display: none;
}

.project:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

@media (min-width: 900px) {
  .project {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .project--text {
    grid-template-columns: 1fr;
  }
}

.project__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: clamp(1.35rem, 3vw, 2rem);
}

.project__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.85rem;
}

.project__title {
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
}

.project__title a {
  color: var(--text);
  text-decoration: none;
}

/* Stretch the title link over the whole card. */
.project__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.project__title a:focus-visible {
  outline: none;
}

.project:has(.project__title a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.project__subtitle {
  color: var(--text-3);
  font-size: 0.95rem;
  font-weight: 500;
}

.project__summary {
  margin-top: 0.85rem;
  color: var(--text-2);
}

.project__highlights {
  margin: 1rem 0 1.25rem;
  font-size: 0.93rem;
}

.project__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.88rem;
}

.project__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 600;
}

.project__cta .icon {
  transition: transform 0.2s ease;
}

.project:hover .project__cta .icon {
  transform: translateX(3px);
}

.project__code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-3);
}

/* Sits above the stretched card link so it stays separately clickable. */
.project__code--link {
  position: relative;
  z-index: 2;
  color: var(--accent);
  font-weight: 600;
}

.project__visual {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box;
  border-top: 1px solid var(--border);
}

@media (min-width: 900px) {
  .project__visual {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

.project__visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.project__visual .diagram {
  width: 100%;
}

.teaser-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.teaser {
  position: relative;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.teaser:hover {
  border-color: var(--border-strong);
}

.teaser .project__meta {
  margin-bottom: 0.6rem;
}

.teaser__title {
  font-size: 1.1rem;
}

.teaser__title a {
  color: var(--text);
  text-decoration: none;
}

.teaser__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.teaser__title a:hover {
  color: var(--accent);
}

.teaser__subtitle {
  margin: 0.25rem 0 0.9rem;
  color: var(--text-2);
  font-size: 0.9rem;
}

/* ===========================================================================
   Architecture diagram
=========================================================================== */
.diagram {
  container-type: inline-size;
  margin: 0;
}

.diagram__flow {
  display: flex;
  flex-direction: column;
}

.diagram__step {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
}

.diagram__col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.diagram__label {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.diagram__nodes {
  display: grid;
  gap: 0.4rem;
}

.diagram__node {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
}

.diagram__node--accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.diagram__node-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.diagram__node-detail {
  color: var(--text-2);
  font-size: 0.76rem;
  line-height: 1.35;
}

.diagram__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0 0.35rem 0.9rem;
  min-height: 2.25rem;
}

.diagram__arrow {
  position: relative;
  order: -1;
  width: 1px;
  height: 1.6rem;
  background: var(--border-strong);
  flex: none;
}

.diagram__arrow::after {
  content: "";
  position: absolute;
  left: -3.5px;
  bottom: -1px;
  border: 4px solid transparent;
  border-top: 5px solid var(--text-3);
  border-bottom: 0;
}

.diagram__link-label {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.3;
}

.diagram__caption {
  margin-top: 1rem;
  color: var(--text-3);
  font-size: 0.82rem;
}

/* Horizontal flow once there is room for it. */
@container (min-width: 34rem) {
  .diagram__flow {
    flex-direction: row;
    align-items: stretch;
  }
  .diagram__step {
    flex-direction: row;
  }
  .diagram__col {
    flex: 1 1 0;
    min-width: 0;
  }
  .diagram__nodes {
    flex: 1;
    align-content: center;
  }
  .diagram__link {
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    width: clamp(3rem, 9cqi, 5.5rem);
    padding: 1.2rem 0.3rem 0;
    text-align: center;
  }
  .diagram__arrow {
    order: 0;
    width: 100%;
    height: 1px;
  }
  .diagram__arrow::after {
    left: auto;
    right: -1px;
    bottom: -4px;
    border: 4px solid transparent;
    border-left: 5px solid var(--text-3);
    border-right: 0;
  }
}

/* Card variant: a vertical stack with the layer label beside its boxes.
   Selectors are more specific than the container-query rules above, so the card
   keeps this layout at every width. */
.diagram--compact .diagram__flow,
.diagram--compact .diagram__step {
  flex-direction: column;
  align-items: stretch;
}

.diagram--compact .diagram__col {
  display: grid;
  grid-template-columns: 6.75rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.diagram--compact .diagram__label {
  font-size: 0.6rem;
  text-align: right;
}

.diagram--compact .diagram__nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.diagram--compact .diagram__node {
  padding: 0.35rem 0.6rem;
  box-shadow: var(--shadow-sm);
}

.diagram--compact .diagram__node-title {
  font-size: 0.78rem;
  overflow-wrap: normal;
}

.diagram--compact .diagram__link {
  flex-direction: row;
  justify-content: flex-start;
  width: auto;
  min-height: 0;
  padding: 0.2rem 0 0.2rem calc(6.75rem + 0.75rem + 1rem);
}

.diagram--compact .diagram__arrow {
  order: 0;
  width: 1px;
  height: 0.85rem;
}

.diagram--compact .diagram__arrow::after {
  left: -3.5px;
  right: auto;
  bottom: -1px;
  border: 4px solid transparent;
  border-top: 5px solid var(--text-3);
  border-bottom: 0;
}

.panel-diagram {
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

/* ===========================================================================
   Project detail
=========================================================================== */
.breadcrumb {
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-2);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.case__header {
  padding-bottom: 0;
}

.case__intro {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 960px) {
  .case__intro {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }
}

.case__subtitle {
  margin-top: 0.55rem;
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 500;
}

.case__summary {
  margin-top: 1.1rem;
  max-width: 62ch;
  font-size: 1.05rem;
}

.case__glance {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.case__glance .bullets {
  color: var(--text);
  font-size: 0.95rem;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 1px;
  margin: 2rem 0 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.fact-grid div {
  padding: 0.85rem 1.1rem;
  background: var(--surface);
}

.fact-grid dt {
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.fact-grid dd {
  margin: 0.15rem 0 0;
  font-size: 0.93rem;
  font-weight: 500;
}

.case__hero {
  margin-top: 2rem;
}

.case__figure {
  margin: 0;
}

.case__hero-media {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
}

.case__hero-media img {
  width: auto;
  max-width: 100%;
  max-height: 640px;
  margin-inline: auto;
  object-fit: contain;
}

.case__layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1000px) {
  .case__layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 4rem;
  }
}

.case__body {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.25rem);
  min-width: 0;
}

.case__section h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
}

.case__section > p {
  max-width: 70ch;
  color: var(--text-2);
  font-size: 1.02rem;
}

.case__section > .bullets {
  max-width: 72ch;
}

.case__section .panel-diagram + .steps {
  margin-top: 1.5rem;
}

.challenges {
  display: grid;
  gap: 0.75rem;
}

.challenge {
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.challenge__problem {
  font-weight: 500;
}

.challenge__approach {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
  color: var(--text-2);
  font-size: 0.94rem;
}

.challenge__approach .icon {
  margin-top: 0.22rem;
  color: var(--ok);
}

.case__aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}

@media (min-width: 1000px) {
  .case__aside {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
  }
}

.toc ol {
  display: grid;
  border-left: 1px solid var(--border);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 0.3rem 0 0.3rem 0.9rem;
  border-left: 2px solid transparent;
  color: var(--text-2);
  font-size: 0.9rem;
  text-decoration: none;
}

.toc a:hover,
.toc a[aria-current="true"] {
  border-left-color: var(--accent);
  color: var(--text);
}

@media (max-width: 999px) {
  .toc {
    display: none;
  }
}

.aside-card {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9rem;
}

.aside-card > p:not(.facts__label) {
  color: var(--text-2);
}

.aside-card .link-arrow {
  margin-top: 0.75rem;
}

.mini-facts {
  display: grid;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.mini-facts dt {
  color: var(--text-3);
  font-size: 0.78rem;
}

.mini-facts dd {
  margin: 0;
  font-weight: 500;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(3rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.pager__link {
  display: grid;
  gap: 0.2rem;
  text-decoration: none;
}

.pager__link--next {
  margin-left: auto;
  text-align: right;
}

.pager__dir {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-3);
  font-size: 0.82rem;
}

.pager__link--next .pager__dir {
  justify-content: flex-end;
}

.pager__title {
  color: var(--text);
  font-weight: 600;
}

.pager__link:hover .pager__title {
  color: var(--accent);
}

/* ===========================================================================
   Gallery & lightbox
=========================================================================== */
.gallery {
  display: grid;
  gap: 1rem;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.gallery__item {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.gallery__item--wide {
  grid-column: 1 / -1;
}

.gallery__link {
  position: relative;
  display: block;
  background: var(--surface-2);
  cursor: zoom-in;
}

.gallery__link img {
  width: 100%;
}

.gallery__zoom {
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(10, 13, 18, 0.65);
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery__link:hover .gallery__zoom,
.gallery__link:focus-visible .gallery__zoom {
  opacity: 1;
}

.gallery figcaption {
  padding: 0.7rem 0.95rem;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.86rem;
}

.gallery--natural {
  align-items: start;
}

.gallery--natural .gallery__link {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
}

.gallery--natural .gallery__link img {
  width: auto;
}

.lightbox {
  width: min(96vw, 1500px);
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.lightbox::backdrop {
  background: rgba(8, 10, 14, 0.78);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.6rem 0.6rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.lightbox__caption {
  color: var(--text-2);
  font-size: 0.9rem;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: calc(94vh - 60px);
  margin-inline: auto;
  background: var(--surface-2);
}

/* ===========================================================================
   Projects filter
=========================================================================== */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.filter[hidden] {
  display: none;
}

.filter button {
  min-height: 36px;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.filter button:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.filter button[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

/* ===========================================================================
   Project roadmap: vertical timeline
   Mobile: one column with the axis on the left. Desktop: company projects left of a central
   axis, own projects right, and projects that started together share a row.
=========================================================================== */
.roadmap {
  --axis: 0.6rem;
  --gap: 2.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.roadmap::before,
.roadmap::after {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: var(--axis);
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--border);
}

/* Scroll progress: filled by site.js, fully drawn without it. */
.roadmap::after {
  background: var(--accent-line);
  transform: scaleY(var(--progress, 1));
  transform-origin: top;
}

.roadmap > * {
  position: relative;
  z-index: 1;
}

.roadmap__lanes {
  display: none;
}

.roadmap__year[hidden],
.roadmap__row[hidden],
.roadmap__milestone[hidden],
.roadmap-card[hidden] {
  display: none;
}

.roadmap__marker {
  position: relative;
  margin: 2.5rem 0 1.25rem;
  padding-left: var(--gap);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
}

.roadmap__year:first-of-type .roadmap__marker {
  margin-top: 0;
}

.roadmap__marker::before {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--axis);
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}

.roadmap__marker span {
  display: inline-block;
  padding: 0.15rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  line-height: 1.4;
}

.roadmap__marker--now {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
}

.roadmap__marker--now span {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.roadmap__row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-left: var(--gap);
}

.roadmap__row--milestone {
  margin: 1.4rem 0;
}

.roadmap__milestone {
  position: relative;
  display: grid;
  gap: 0.05rem;
  margin: 0;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.45;
}

.roadmap__milestone::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: calc(var(--axis) - var(--gap));
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
}

.roadmap__milestone-date {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.roadmap__milestone-title {
  color: var(--text);
  font-weight: 600;
}

.roadmap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.roadmap-card:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md);
}

/* Connector and dot from the axis to the card. */
.roadmap-card::before,
.roadmap-card::after {
  content: "";
  position: absolute;
  top: 1.55rem;
}

.roadmap-card::before {
  left: calc(var(--axis) - var(--gap));
  width: calc(var(--gap) - var(--axis));
  height: 2px;
  margin-top: -1px;
  background: var(--border-strong);
}

.roadmap-card::after {
  left: calc(var(--axis) - var(--gap));
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--lock);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.roadmap-card--private::after {
  background: var(--accent);
}

.roadmap-card__media {
  overflow: hidden;
  aspect-ratio: 16 / 7;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface-2);
}

.roadmap-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.roadmap-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.15rem 1.35rem 1.25rem;
}

.roadmap-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.45rem;
}

.roadmap-card__period {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.roadmap-card__period--ongoing {
  color: var(--accent);
}

.roadmap-card__kind {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-card__kind--internal {
  color: var(--lock);
}

.roadmap-card__kind--private {
  color: var(--accent);
}

.roadmap-card__kind--commercial {
  color: var(--warm);
}

.roadmap-card__title {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
}

.roadmap-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.85rem;
  margin: 0.3rem 0 0.7rem;
  color: var(--text-3);
  font-size: 0.85rem;
}

.roadmap-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.roadmap-card__link:hover {
  text-decoration: underline;
}

.roadmap-card__summary {
  margin: 0 0 0.9rem;
  color: var(--text-2);
  font-size: 0.93rem;
}

@media (min-width: 960px) {
  .roadmap {
    --axis: 50%;
    --gap: 2.5rem;
  }

  .roadmap__lanes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: calc(var(--gap) * 2);
    margin-bottom: 1.75rem;
    color: var(--text-3);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .roadmap__lanes span:first-child {
    text-align: right;
  }

  .roadmap__marker {
    padding-left: 0;
    text-align: center;
  }

  .roadmap__marker::before {
    display: none;
  }

  .roadmap__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: calc(var(--gap) * 2);
    align-items: start;
    padding-left: 0;
  }

  .roadmap-card--work {
    grid-column: 1;
  }

  .roadmap-card--private {
    grid-column: 2;
  }

  .roadmap-card--offset {
    margin-top: 3rem;
  }

  /* Without its neighbour (filtered out) the offset would only leave a gap. */
  .roadmap-card[hidden] + .roadmap-card--offset {
    margin-top: 0;
  }

  .roadmap-card--work::before,
  .roadmap-card--work::after {
    left: auto;
  }

  .roadmap-card--work::before {
    right: calc(var(--gap) * -1);
    width: var(--gap);
  }

  .roadmap-card--work::after {
    right: calc(var(--gap) * -1);
    margin: -5.5px -5.5px 0 0;
  }

  .roadmap-card--private::before {
    left: calc(var(--gap) * -1);
    width: var(--gap);
  }

  .roadmap-card--private::after {
    left: calc(var(--gap) * -1);
  }

  .roadmap__row--milestone {
    grid-template-columns: minmax(0, 1fr);
  }

  .roadmap__milestone {
    justify-self: center;
    max-width: 24rem;
    padding: 0.55rem 1rem 0.45rem;
    background: var(--bg);
    text-align: center;
  }

  .roadmap__milestone::before {
    top: -0.3rem;
    left: 50%;
  }
}

/* Reveal on scroll. Only active when site.js adds .is-animated, i.e. with JavaScript and without
   a reduced-motion preference. */
.roadmap.is-animated::after {
  transform: scaleY(var(--progress, 0));
}

.roadmap.is-animated .roadmap-card,
.roadmap.is-animated .roadmap__milestone,
.roadmap.is-animated .roadmap__marker {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.roadmap.is-animated .is-visible {
  opacity: 1;
  transform: none;
}

/* ===========================================================================
   About & contact
=========================================================================== */
.about {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1000px) {
  .about {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 4rem;
  }
  .about__aside {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
  }
}

.about__aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.prose {
  display: grid;
  gap: 1rem;
  max-width: 68ch;
  color: var(--text-2);
  font-size: 1.05rem;
}

.about__block {
  margin-top: clamp(2.5rem, 5vw, 3.25rem);
}

.about__block h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
}

.hobby-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hobby {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.5rem;
  max-width: 100%;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
}

.hobby__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--border);
  margin-left: 0.35rem;
}

.timeline__item {
  position: relative;
  padding: 0 0 1.75rem 1.5rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}

.timeline__item:first-child::before {
  background: var(--accent);
}

.timeline__period {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.timeline__title {
  margin-top: 0.2rem;
  font-size: 1.08rem;
}

.timeline__org {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.93rem;
}

.timeline__text {
  margin-top: 0.4rem;
  max-width: 64ch;
  color: var(--text-2);
}

.contact {
  max-width: 820px;
}

.contact__card {
  padding: clamp(1.4rem, 4vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.contact__email a {
  color: var(--text);
  text-decoration: none;
}

.contact__email a:hover {
  color: var(--accent);
}

.contact__card .actions {
  margin-top: 1.25rem;
}

.contact .fact-grid {
  margin-top: 1.5rem;
}

/* ===========================================================================
   Print
=========================================================================== */
@media print {
  .site-header,
  .site-footer,
  .contact-band,
  .filter,
  .toc,
  .pager,
  .lightbox,
  .skip-link {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .project,
  .challenge {
    break-inside: avoid;
    box-shadow: none;
  }
}
