/* =========================================================
   Bewerbung Yaron Grüter
   1. FARBEN UND GRUNDWERTE
   Alle Farben stehen hier zentral, übernommen von ortho-team.ch:
   Blau für Name, Titel und Überschriften, Magenta für Akzente.
   Ecken wie dort eckig (--radius).
   ========================================================= */
:root {
  --bg: #ffffff;          /* Hintergrund */
  --surface: #f6f6f6;     /* Seitenleiste: Hellgrau der Website */
  --chip: #ffffff;        /* Tags */
  --ink: #2f2f2e;         /* Haupttext */
  --muted: #6e6e6e;       /* Nebentext: Daten, Firmen */
  --line: #e0e0e0;        /* Linien und Rahmen */
  --brand: #114287;       /* ORTHO-TEAM-Blau: Logo, Überschriften, Links */
  --accent: #e6007e;      /* ORTHO-TEAM-Magenta: Buttons, Linien, Punkte */
  --accent-ink: #b42a7e;  /* Dunkleres Magenta für kleinen Text */
  --accent-soft: #fdf0f7; /* Helles Rosa */
  --on-accent: #ffffff;   /* Text auf Magenta */
  --radius: 0;            /* eckig wie auf ortho-team.ch */

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

/* Dark Mode: greift automatisch, wenn das Gerät dunkel eingestellt ist */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171c;
    --surface: #1d2129;
    --chip: #252a33;
    --ink: #e9ecf1;
    --muted: #a0a8b5;
    --line: #333944;
    --brand: #8fb0ea;
    --accent: #ff4fa8;
    --accent-ink: #ff7dbd;
    --accent-soft: #3a1a2c;
    --on-accent: #14171c;
  }
}

/* =========================================================
   2. GRUNDLAGEN
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  border-top: 6px solid var(--accent);   /* magentafarbenes Band über die ganze Breite */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  hyphens: auto;          /* trennt lange deutsche Wörter sauber */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0; }
.name, .application-title, .section-heading, .station-title, .project-title { color: var(--brand); }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 3px; transition: color 150ms ease; }
a:hover { color: var(--accent-ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

.nowrap { white-space: nowrap; }

/* Noch auszufüllende Stellen */
.todo { background: #fff2a8; color: #1c2230; padding: 0 3px; border-radius: 2px; }

/* Symbole: feine Linien in Textfarbe */
.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   3. LAYOUT
   Breit: Seitenleiste links über die ganze Höhe,
   rechts oben das Anschreiben, darunter der Lebenslauf.
   Handy: alles untereinander.
   ========================================================= */
.layout {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: 340px minmax(0, 1fr);
    column-gap: 72px;
    padding: 0 40px;
  }
  .sidebar { grid-column: 1; grid-row: 1 / span 2; }
  .cover   { grid-column: 2; grid-row: 1; }
  .content { grid-column: 2; grid-row: 2; }
}

/* =========================================================
   4. SEITENLEISTE
   ========================================================= */
.sidebar {
  background: var(--surface);
  padding: 40px 24px;
}

@media (min-width: 900px) {
  .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    padding: 56px 36px;
    border-radius: var(--radius);
  }
}

.portrait-card {
  max-width: 240px;
  margin-bottom: 28px;
  perspective: 800px;
}

.portrait-tilt {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.portrait {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  object-position: center top;
}

.name {
  font-size: clamp(2.4rem, 8vw, 2.9rem);
  overflow-wrap: anywhere;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 14px;
}

.role {
  color: var(--accent-ink);
  font-weight: 600;
  min-height: 3.4em;      /* Platz für zwei Zeilen: nichts springt beim Wechsel */
  margin-bottom: 24px;
  transition: opacity 300ms ease, transform 300ms ease;
}

.role.is-swapping { opacity: 0; transform: translateY(-6px); }

.contact li,
.plain-list .with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.contact li[hidden] { display: none; }

/* Zweizeilige Adresse: Symbol auf Höhe der ersten Zeile */
.contact .contact-address { align-items: flex-start; }
.contact-address .icon { margin-top: 0.3em; }

.contact .icon,
.with-icon .icon { color: var(--accent); }

.sidebar-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 36px 0 12px;
}

.tag-group {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.tags + .tag-group { margin-top: 16px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tags li {
  background: var(--chip);
  border: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius);
}

/* Sprachen: Name, sechs Kästchen (A1 bis C2), Niveau */
.languages li {
  display: grid;
  grid-template-columns: 84px 72px auto;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.lang-meter {
  height: 8px;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / calc(var(--level, 0) * 12.4px) 100% no-repeat,
    var(--line);
  /* schneidet den Balken in 6 Kästchen à 10px mit 2.4px Abstand */
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 12.4px);
  mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 12.4px);
  animation: fill-meter 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 500ms backwards;
}

@keyframes fill-meter {
  from { background-size: 0 100%; }
}

.lang-code { color: var(--muted); font-size: 0.85rem; }

/* Button für die PDF-Version */
.print-button {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
  transition: filter 150ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.print-button:hover { background: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(230, 0, 126, 0.3); }
.print-button:active { transform: none; box-shadow: none; }
.print-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.print-button .icon { transition: transform 200ms ease; }
.print-button:hover .icon { transform: translateY(2px); }

/* =========================================================
   5. HAUPTBEREICH
   ========================================================= */
.cover,
.content {
  padding: 48px 24px 0;
  max-width: 680px;       /* hält Zeilen gut lesbar */
}

.content { padding-bottom: 32px; }

@media (min-width: 900px) {
  .cover { padding: 72px 0 0; }
  .content { padding: 0 0 40px; }
}

.section { margin-bottom: 88px; }

.section-heading {
  font-size: clamp(1.4rem, 3.5vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

/* Kurzer blauer Strich unter jeder Abschnittsüberschrift */
.section-heading::after {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left;
  transition: width 300ms ease;
}

.section-heading:hover::after { width: 72px; }

/* --- Anschreiben --- */
.application-for {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.application-title {
  font-size: clamp(1.8rem, 4.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
  overflow-wrap: break-word;
}

.letter-meta {
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

/* Briefkopf nur im PDF */
.letter-head { display: none; }

.signature { margin-top: 28px; }

.signature-name {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 1.15rem;
}

.enclosures {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Passung zur Stelle --- */
.fit-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 6px 28px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.fit-row:last-child { border-bottom: 1px solid var(--line); }
.fit dt { font-weight: 600; }
.fit dd { margin: 0; color: var(--muted); }

.fit-head {
  border-top: none;
  padding-top: 0;
  color: var(--accent-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.fit-head dd { color: var(--muted); }

@media (max-width: 600px) {
  .fit-row { grid-template-columns: 1fr; }
  .fit-head { gap: 2px; }
}

/* --- Nachweis-Links --- */
.proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.station .proof { margin-top: 8px; }
.proof .icon { transition: transform 200ms ease; }
.proof:hover .icon { transform: translateY(-2px); }

/* =========================================================
   6. ZEITLEISTE
   Handy: senkrecht. Ab 601px: waagrecht, links die
   Vergangenheit, rechts das Ziel (die neue Stelle).
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 32px;
}

/* Graue Grundlinie und blaue Fortschrittslinie */
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 2px;
  background: var(--line);
}

.timeline::after {
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(var(--progress, 1));
  transition: transform 150ms linear;
}

.station {
  position: relative;
  padding-bottom: 36px;
}

.station:last-child { padding-bottom: 0; }

/* Punkt auf der Linie */
.station::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -32px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
  transition: border-color 300ms ease, background-color 300ms ease;
}

.station.is-reached::before {
  border-color: var(--accent);
  background: var(--accent);
}

/* Ziel: gestrichelter Rahmen, pulsiert sobald erreicht */
.station.is-next::before {
  border-style: dashed;
  border-color: var(--accent);
}

.station.is-next.is-reached::before {
  border-style: solid;
  box-shadow: 0 0 0 5px var(--accent-soft);
  animation: live 2.4s ease-out infinite;
}

@keyframes live {
  0%       { box-shadow: 0 0 0 5px var(--accent-soft), 0 0 0 5px color-mix(in srgb, var(--accent) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 5px var(--accent-soft), 0 0 0 16px transparent; }
}

.station-date {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}

.station.is-next .station-date { color: var(--accent-ink); }

.station-title { font-size: 1.25rem; font-weight: 600; }

.station-org { color: var(--muted); margin-bottom: 10px; }

.station-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.station-points .icon { margin-top: 0.3em; color: var(--accent); }

/* Der Fussabdruck läuft mit --progress die Linie entlang */
.timeline-walker {
  display: none;
  position: absolute;
  z-index: 2;
  left: -11px;
  top: calc(8px + (100% - 16px) * var(--progress, 0) - 18px);
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 4px 12px rgba(230, 0, 126, 0.3);
  transition: top 150ms linear, left 150ms linear;
}

.timeline-walker .icon { width: 20px; height: 20px; transform: rotate(180deg); }

.js .timeline-walker { display: grid; }

/* Beim Scrollen tritt der Fuss abwechselnd auf */
.timeline.is-walking .timeline-walker .icon { animation: step 300ms ease-in-out infinite; }

@keyframes step {
  0%, 100% { transform: rotate(180deg) translateY(0); }
  50%      { transform: rotate(180deg) translateY(-2px) rotate(8deg); }
}

@media (min-width: 601px) {
  .timeline {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 32px;
    padding-left: 0;
    padding-top: 44px;
  }

  .timeline::before,
  .timeline::after {
    top: 5px;
    bottom: auto;
    left: 8px;
    right: 8px;
    width: auto;
    height: 4px;
  }

  .timeline::after {
    transform-origin: left;
    transform: scaleX(var(--progress, 1));
  }

  .station::before { top: -44px; left: 0; }
  .station { padding-bottom: 0; }

  /* Fuss zeigt nach rechts */
  .timeline-walker {
    top: -11px;
    left: calc(8px + (100% - 16px) * var(--progress, 0) - 18px);
  }

  .timeline-walker .icon { transform: rotate(90deg); }

  @keyframes step {
    0%, 100% { transform: rotate(90deg) translateY(0); }
    50%      { transform: rotate(90deg) translateY(-2px) rotate(8deg); }
  }
}

/* =========================================================
   6b. AUS DEM STUDIUM
   ========================================================= */
.project {
  position: relative;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

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

/* Blauer Balken links beim Hover */
.project::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 300ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project:hover::before { transform: scaleY(1); }

.project-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.project-context li {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.project-context .context-main { background: var(--accent-soft); color: var(--accent-ink); }
.project-context .context-side { border-color: var(--line); color: var(--muted); }

.project-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 6px; }

.project-result { color: var(--accent-ink); font-weight: 600; margin-bottom: 8px; }

.project p:last-child { margin-bottom: 0; }

.project .proof { margin-top: 10px; }

/* Vorgehen: drei nummerierte Schritte, verbunden mit einer Linie */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 4px 0 12px;
}

.steps li {
  counter-increment: step;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.steps li::before {
  content: counter(step);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.75rem;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 22px;
  right: -16px;
  height: 2px;
  background: var(--line);
}

.step-title { font-size: 0.95rem; font-weight: 600; }
.step-text { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }

@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .steps li { min-height: 22px; padding-left: 34px; }
  .steps li::before { position: absolute; left: 0; top: 0; }
  .steps li:not(:last-child)::after { top: 22px; bottom: -12px; left: 10px; right: auto; width: 2px; height: auto; }
}

/* Notenbalken: füllt sich bis zur Note (von 6) */
.grade-meter {
  display: inline-block;
  position: relative;
  width: 72px;
  height: 6px;
  margin-left: 12px;
  vertical-align: middle;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.grade-meter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--grade, 1));
  transition: transform 1200ms cubic-bezier(0.2, 0.7, 0.2, 1) 200ms;
}

.js .section:not(.is-visible) .grade-meter::after { transform: scaleX(0); }

/* =========================================================
   7. AUSBILDUNG
   ========================================================= */
.education-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.education-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

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

.education dt {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease;
}

.education-row:hover dt { color: var(--accent-ink); }
.education dd { margin: 0; }

@media (max-width: 520px) {
  .education-row { grid-template-columns: 92px 1fr; }
  .education-proof { grid-column: 2; }
}

/* =========================================================
   8. FUSSZEILE
   ========================================================= */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer p { margin: 0; }

/* =========================================================
   9. BEWEGUNG UND ÜBERGÄNGE
   ========================================================= */
html { scroll-behavior: smooth; }

/* Beim Laden: Seitenleiste und Anschreiben erscheinen einmal */
.sidebar > *,
.cover {
  animation: arrive 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.sidebar > :nth-child(2) { animation-delay: 60ms; }
.sidebar > :nth-child(3) { animation-delay: 120ms; }
.sidebar > :nth-child(4) { animation-delay: 180ms; }
.sidebar > :nth-child(n+5) { animation-delay: 240ms; }
.cover { animation-delay: 300ms; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(10px); }
}

/* Abschnitte: Strich zeichnet sich, Inhalt blendet ein */
.js .section-heading::after {
  transform: scaleX(0);
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1) 150ms, width 300ms ease;
}

.js .section.is-visible .section-heading::after { transform: scaleX(1); }

.js .project,
.js .education-row,
.js .fit-row {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .section.is-visible .project,
.js .section.is-visible .education-row,
.js .section.is-visible .fit-row {
  opacity: 1;
  transform: none;
}

.js .section.is-visible :is(.project, .education-row, .fit-row):nth-child(2) { transition-delay: 80ms; }
.js .section.is-visible :is(.project, .education-row, .fit-row):nth-child(3) { transition-delay: 160ms; }
.js .section.is-visible :is(.project, .education-row, .fit-row):nth-child(4) { transition-delay: 240ms; }
.js .section.is-visible .project:nth-child(5) { transition-delay: 320ms; }
.js .section.is-visible .fit-row:nth-child(5) { transition-delay: 320ms; }
.js .section.is-visible .fit-row:nth-child(6) { transition-delay: 400ms; }

/* Tags ploppen nacheinander auf */
.tags li {
  animation: pop 400ms cubic-bezier(0.3, 1.5, 0.5, 1) backwards;
  animation-delay: calc(350ms + var(--i, 0) * 60ms);
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.7); }
}

/* Kontakt-Links: Unterstrich wächst beim Hover */
.contact a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size 250ms ease;
}

.contact a:hover { background-size: 100% 1.5px; }

.contact li .icon,
.with-icon .icon { transition: transform 250ms cubic-bezier(0.3, 1.5, 0.5, 1); }

.contact li:hover .icon,
.with-icon:hover .icon { transform: scale(1.2) rotate(-8deg); }

/* Foto kippt mit der Maus, Lichtreflex folgt */
.portrait-tilt {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 400ms ease;
}

.portrait-tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.35), transparent 55%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.portrait-tilt.is-tilting { transition-duration: 100ms; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18); }
.portrait-tilt.is-tilting::after { opacity: 1; }

/* Scroll-Fortschritt: blauer Balken ganz oben */
.scroll-progress {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--scroll, 0));
}

/* Nach-oben-Knopf */
.to-top {
  position: fixed;
  z-index: 10;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) scale(0.8);
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms cubic-bezier(0.3, 1.5, 0.5, 1);
}

.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top .icon { width: 20px; height: 20px; stroke-width: 2.2; transition: transform 200ms ease; }
.to-top:hover .icon { transform: translateY(-3px); }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Weniger Bewegung, wenn das Gerät es verlangt */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .section-heading::after,
  .js .project,
  .js .education-row,
  .js .fit-row { opacity: 1; transform: none; }

  .js .timeline-walker { display: none; }
}

/* =========================================================
   10. DRUCKANSICHT / PDF AUF A4
   Seite 1: Anschreiben im Briefformat über die ganze Breite.
   Ab Seite 2: Lebenslauf zweispaltig, Seitenleiste links.
   ========================================================= */
/* Eigene Fusszeile im Seitenrand. Sobald sie definiert ist, lässt der
   Browser seine eigene Kopf- und Fusszeile (Datum, Dateipfad) weg. */
@page {
  size: A4;
  margin: 14mm 14mm 16mm;

  /* Oben bewusst leer: unterdrückt Datum und Titel des Browsers */
  @top-left { content: " "; }
  @top-center { content: " "; }
  @top-right { content: " "; }

  @bottom-left {
    content: "Yaron Grüter · Bewerbung als Fuss-Spezialist:in, ORTHO-TEAM Luzern AG";
    font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
    font-size: 7pt;
    color: #6e6e6e;
    vertical-align: top;
    padding-top: 4mm;
  }

  @bottom-right {
    content: "Seite " counter(page) " von " counter(pages);
    font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
    font-size: 7pt;
    color: #6e6e6e;
    vertical-align: top;
    padding-top: 4mm;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --chip: #ffffff;
    --ink: #000000;
    --muted: #444444;
    --line: #cccccc;
    --brand: #114287;
    --accent: #e6007e;
    --accent-ink: #b42a7e;
    --accent-soft: #fdf0f7;
    --on-accent: #ffffff;
  }

  html { font-size: 8.75pt; }

  body {
    border-top: none;
    line-height: 1.5;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .layout {
    grid-template-columns: 54mm minmax(0, 1fr);
    column-gap: 9mm;
    max-width: none;
    padding: 0;
  }

  /* Links bleiben anklickbar, aber ohne Unterstreichung */
  a { text-decoration: none; }

  /* --- Seite 1: Anschreiben --- */
  .cover {
    grid-column: 1 / -1;
    grid-row: 1;
    max-width: none;
    padding: 0 6mm 0 0;
    margin: 0;
    break-after: page;
    font-size: 10pt;
    line-height: 1.45;
  }

  .letter-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 12mm;
    font-size: 9.5pt;
  }

  .letter-from { grid-column: 2; grid-row: 1; color: var(--muted); }
  .letter-from strong { color: var(--ink); }
  .letter-to { grid-column: 1; grid-row: 1; padding-top: 10mm; font-size: 10pt; }
  .letter-date { grid-column: 1 / -1; margin: 10mm 0 6mm; color: var(--muted); }

  .letter-meta { display: none; }

  .application-for { font-size: 9.5pt; margin-bottom: 1mm; }
  .application-title { font-size: 16pt; margin-bottom: 6mm; }

  .letter p { margin-bottom: 0.75em; }
  .signature { margin-top: 6mm; }
  .signature-name { margin-top: 3mm; font-size: 11pt; }
  .enclosures { margin-top: 6mm; font-size: 9pt; }

  /* --- Ab Seite 2: Lebenslauf --- */
  .sidebar {
    grid-column: 1;
    grid-row: 2;
    position: static;
    min-height: 0;
    padding: 0;
    background: var(--surface);
  }

  .content {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
    max-width: none;
  }

  .portrait-card { max-width: 30mm; margin-bottom: 4mm; }
  .portrait-tilt { border-radius: var(--radius); transform: none !important; }
  .name { font-size: 20pt; margin-bottom: 2mm; }
  .role { min-height: 0; margin-bottom: 3mm; opacity: 1 !important; transform: none !important; }
  .sidebar-heading { margin: 4.5mm 0 1.5mm; }
  .tags + .tag-group { margin-top: 2.5mm; }
  .contact li, .plain-list .with-icon { margin-bottom: 0.5mm; }
  .tags { gap: 1.2mm; }
  .tags li { font-size: 7.5pt; padding: 0.6mm 1.8mm; }

  /* Sechs Kästchen brauchen 74.4px, also mindestens 20mm */
  .languages li { grid-template-columns: 15mm 20mm auto; gap: 2mm; break-inside: avoid; }
  .lang-code { font-size: 7.5pt; }

  .section { margin-bottom: 7mm; }
  .section-heading { font-size: 14pt; margin-bottom: 4mm; break-after: avoid; }

  .js .section-heading::after,
  .js .project,
  .js .education-row,
  .js .fit-row {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Studienabschnitt beginnt auf Seite 3, damit die Überschrift nicht allein steht */
  #studium { break-before: page; }

  .grade-meter::after { transform: scaleX(var(--grade, 1)) !important; }
  .project { padding: 2mm 0; break-inside: avoid; }
  .project::before { display: none; }
  .project-context { margin-bottom: 1mm; }
  .project-context li { font-size: 6.5pt; padding: 0.2mm 1.5mm; }
  .project-title { font-size: 10.5pt; margin-bottom: 1mm; }
  .project-result { margin-bottom: 1mm; }
  .project p { margin-bottom: 1mm; }
  .steps { margin: 2mm 0 1mm; gap: 4mm; }
  .steps li::before { width: 16px; height: 16px; margin-bottom: 1mm; font-size: 7pt; }
  .steps li:not(:last-child)::after { top: 7px; left: 16px; right: -4mm; }

  .timeline::after { transform: none !important; }
  .timeline { padding-top: 9mm; gap: 5mm; }
  .station::before { top: -9mm; border-color: var(--accent); background: var(--accent); }
  .station.is-next::before { background: var(--bg); border-style: dashed; box-shadow: none; }
  .station-points li { font-size: 8.5pt; }

  .fit-row { padding: 2mm 0; gap: 1mm 6mm; }
  .education-row { grid-template-columns: 20mm 1fr; padding: 1.5mm 0; }

  .education-row,
  .station,
  .fit-row { break-inside: avoid; }

  /* Im PDF überflüssig */
  .print-button,
  .proof,
  .footer,
  .timeline-walker,
  .scroll-progress,
  .to-top { display: none !important; }
}
