/* Selbstgehostete Schriften (DSGVO-konform, keine Google-Server-Requests) */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ebgaramond.woff') format('woff');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ebgaramond-italic.woff') format('woff');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/hanken-grotesk.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
h1, h2, h3, p { margin: 0; font-weight: 400; }

/* Rundes Schwarzweiß-Porträt im Kopf, mit Blur-/Scale-in beim Laden. */
.cv-photo {
  width: 180px;
  height: 180px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
}
/* Nur mit JS verborgen starten, damit ohne JS das Foto sichtbar bleibt. */
.js .cv-photo {
  opacity: 0;
  transform: scale(0.94);
}
.js .cv-photo.photo-in {
  opacity: 1;
  transform: none;
  transition: opacity 2.2s ease, transform 2.2s cubic-bezier(0.22, 0.65, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  .js .cv-photo { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 760px) {
  .cv-head { flex-direction: column-reverse; align-items: flex-start !important; gap: 24px !important; }
  .cv-photo { width: 132px; height: 132px; }
}

/* Reading Progress Bar — schmale fixierte Leiste am oberen Rand. */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #f0f0f0;
  z-index: 100;
}
#progress-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--scroll, 0%);
  background: #111;
  border-radius: 0 2px 2px 0;
}

.cvlink {
  color: rgb(22, 20, 15);
  text-decoration: underline 1px rgba(22, 20, 15, 0.35);
  text-underline-offset: 3px;
  transition: color 0.6s, text-decoration-color 0.6s;
}
.cvlink:hover {
  color: rgba(22, 20, 15, 0.4);
  text-decoration-color: transparent;
}

/* Reveal-on-scroll, Reader-/Druck-sicher:
   Verborgen wird mit clip-path + transform statt opacity. Safari Reader,
   Druck und SEO werten clip-path NICHT als "versteckt" — das Element bleibt
   im Layout und wird voll extrahiert. Optisch ist es maskiert und deckt
   beim Eintritt ins Sichtfeld sanft nach oben auf. */
.js [data-reveal] {
  clip-path: inset(-12% -12% 100% -12%);
  transform: translateY(26px);
  transition: clip-path 0.9s cubic-bezier(0.22, 0.65, 0.2, 1), transform 0.9s cubic-bezier(0.22, 0.65, 0.2, 1);
  will-change: clip-path, transform;
}
.js [data-reveal].is-in {
  clip-path: inset(-12% -12% -12% -12%);
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js [data-reveal].is-in {
    clip-path: none;
    transform: none;
    transition: none;
  }
}

/* Einleitungstext: Wort-für-Wort-Blur-in (per JS in .word-Spans gesplittet). */
.cv-intro .word {
  display: inline-block;
  opacity: 0;
  filter: blur(5px);
  transition: opacity 0.55s ease, filter 0.55s ease;
  will-change: opacity, filter;
}
.cv-intro.words-in .word {
  opacity: 1;
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
  .cv-intro .word {
    opacity: 1;
    filter: none;
    transition: none;
  }
}

@media (max-width: 760px) {
  .cv-page { padding: 24px 14px !important; }
  .cv-card { padding: 40px 26px !important; }
  .cv-name { font-size: 40px !important; }
  .cv-name-xl { font-size: 88px !important; }
  .cv-row { grid-template-columns: 1fr !important; gap: 14px 0 !important; }
  .cv-skill { grid-template-columns: 1fr !important; gap: 4px 0 !important; padding-top: 18px !important; }
  .cv-skill > div:first-child { padding-top: 0 !important; }
}
