/* Dominik Reydt — Portfolio. Framework-frei, ein Akzent, automatisches Dark/Light.
   Keine Inline-Styles/Scripts → strenge CSP (Observatory A+). */

:root {
  --bg: #f6f5f2;
  --surface: #fcfbf9;
  --text: #1c1d1a;
  --muted: #5d6058;
  --accent: #1f6f8b;
  --accent-strong: #185a72;
  --border: #e4e2dc;
  --shadow: 0 1px 2px rgba(28, 29, 26, .04), 0 8px 24px rgba(28, 29, 26, .06);
  --radius: 14px;
  --maxw: 64rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131519;
    --surface: #1a1d22;
    --text: #e7e9ec;
    --muted: #9aa0a8;
    --accent: #5fb0cf;
    --accent-strong: #80c2db;
    --border: #2a2e35;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.wordmark { font-weight: 650; letter-spacing: -.01em; text-decoration: none; color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: var(--text); }

/* Layout */
main { display: block; }
.section, .hero {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}
.section { border-top: 1px solid var(--border); }

h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: .2em 0 .4em;
}
h2 {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  letter-spacing: -.01em;
  margin: 0 0 1.25rem;
}
h3 { font-size: 1.125rem; margin: 0 0 .2rem; }

.muted { color: var(--muted); }
.lead { font-size: 1.1rem; max-width: 60ch; color: var(--text); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.hero-role {
  color: var(--accent-strong);
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0;
}
.hero-intro { font-size: 1.15rem; max-width: 46ch; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-photo { margin: 0; }
.hero-photo img {
  width: 100%;
  height: auto;
  max-width: 22rem;
  margin-inline: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Buttons */
.button {
  display: inline-block;
  padding: .7rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button--primary { background: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-strong); color: #fff; }
.button--ghost { border-color: var(--border); color: var(--text); }
.button--ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* Skills / definition groups */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1px; margin: 0; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.skill { background: var(--surface); padding: 1.1rem 1.25rem; }
.skill dt { font-weight: 650; color: var(--accent-strong); margin-bottom: .25rem; }
.skill dd { margin: 0; color: var(--muted); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.entry { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem 1.5rem; }
.entry-period { margin: .15rem 0 0; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.entry-body { border-left: 2px solid var(--border); padding-left: 1.25rem; }
.entry-role { color: var(--text); }
.entry-org { margin: 0 0 .6rem; color: var(--muted); }
.entry-points { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.entry-points li { color: var(--muted); }

/* References */
.reference-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.reference-list a {
  display: inline-block;
  padding: .55rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 550;
}
.reference-list a:hover { border-color: var(--accent); }

/* Contact */
.section--contact .lead { margin-bottom: 1.25rem; }

/* Footer */
.site-footer {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* Rechtstext-Seiten */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.2rem; margin: 2rem 0 .6rem; }
.legal p { margin: 0 0 1rem; }
.legal address { font-style: normal; margin: 0 0 1rem; line-height: 1.7; }

/* Responsive */
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 14rem; }
  .entry { grid-template-columns: 1fr; gap: .25rem; }
  .entry-body { border-left: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
