/* ---------------------------------------------------------
   Tobias Hardes — persönliche Website
   Reines CSS, keine externen Frameworks.
--------------------------------------------------------- */

:root {
  --bg: #f7f7f5;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-border: #e5e3df;
  --text: #1c1b1a;
  --text-muted: #5c5a56;
  --text-faint: #8f8c86;
  --accent: #2b5a8c;
  --accent-strong: #1c3a5e;
  --accent-soft: #e5edf5;
  --line: #ddd9d3;
  --shadow: 0 1px 2px rgba(20, 19, 17, 0.04), 0 8px 24px -12px rgba(20, 19, 17, 0.12);
  --shadow-lg: 0 12px 32px -12px rgba(20, 19, 17, 0.22);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121212;
  --bg-alt: #171716;
  --surface: #1c1b1a;
  --surface-border: #2e2c29;
  --text: #f1efec;
  --text-muted: #b3afa8;
  --text-faint: #7a766f;
  --accent: #6fa8dc;
  --accent-strong: #9cc4e8;
  --accent-soft: #1b2836;
  --line: #2e2c29;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --bg-alt: #171716;
    --surface: #1c1b1a;
    --surface-border: #2e2c29;
    --text: #f1efec;
    --text-muted: #b3afa8;
    --text-faint: #7a766f;
    --accent: #6fa8dc;
    --accent-strong: #9cc4e8;
    --accent-soft: #1b2836;
    --line: #2e2c29;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

section { padding: 96px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.section-head p { font-size: 1.05rem; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: var(--shadow);
}
.brand-text { font-size: 0.98rem; }
.brand-text small { display: block; font-weight: 500; color: var(--text-muted); font-size: 0.72rem; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text-muted); font-weight: 600; font-size: 0.9rem;
  padding: 8px 12px; border-radius: 8px; display: block;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-border); text-decoration: none; }

.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lang-switch a { padding: 8px 10px; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); border-radius: 0; }
.lang-switch a.active { background: var(--accent-soft); color: var(--accent-strong); }
.lang-switch a:hover { text-decoration: none; background: var(--surface-border); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--line);
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
:root[data-theme="dark"] .hero-canvas { opacity: 0.85; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); margin-bottom: 0.3em; margin-top: 0; }
.hero h1 span { color: var(--accent-strong); }
.hero .role { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-muted); font-weight: 600; margin-bottom: 18px; }
.hero .lede { font-size: 1.08rem; max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 0.92rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent-strong); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }

.hero-photo-wrap { position: relative; display: flex; justify-content: center; }
.hero-photo {
  position: relative; width: min(320px, 90%); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.hero-photo img { display: block; width: 100%; height: auto; }

/* ---------- Focus cards ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.focus-card {
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.focus-card .icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.focus-card .icon svg { width: 22px; height: 22px; }
.focus-card h3 { font-size: 1.1rem; }
.focus-card p { font-size: 0.94rem; margin-bottom: 0; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 40px 36px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent); z-index: 1;
}
.tl-item.current::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-period { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-strong); text-transform: uppercase; margin-bottom: 4px; }
.tl-item h3 { font-size: 1.08rem; margin-bottom: 2px; }
.tl-org { font-size: 0.9rem; color: var(--text-muted); font-style: italic; margin-bottom: 10px; display: block; }
.tl-item ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.93rem; }
.tl-item li { margin-bottom: 5px; }
.tl-item li::marker { color: var(--accent); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }

/* ---------- Project cards ---------- */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project-card {
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.project-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.project-card h3 { font-size: 1.05rem; margin-bottom: 0; }
.project-card h3 a { color: var(--text); }
.project-card h3 a:hover { color: var(--accent-strong); }
.tag {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent-strong); padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.project-meta { font-size: 0.8rem; color: var(--text-faint); margin-bottom: 10px; }
.project-card p { font-size: 0.93rem; margin-bottom: 0; flex-grow: 1; }
.project-funder { margin-top: 14px; font-size: 0.78rem; color: var(--text-faint); border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Certificates ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cert-col h3 {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-strong);
  border-bottom: 2px solid var(--accent-soft); padding-bottom: 10px; margin-bottom: 16px;
}
.cert-col ul { list-style: none; margin: 0; padding: 0; }
.cert-col li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.cert-col li:last-child { border-bottom: none; }
.cert-year { display: block; font-size: 0.74rem; color: var(--text-faint); font-weight: 700; margin-bottom: 2px; }
.cert-name { color: var(--text); font-weight: 600; }
.cert-org { display: block; color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Engagement / lists ---------- */
.engage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.engage-card {
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.engage-card h3 { font-size: 1rem; display: flex; align-items: center; gap: 10px; }
.engage-card h3 .icon { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.engage-card h3 .icon svg { width: 18px; height: 18px; }
.engage-card ul { margin: 10px 0 0; padding-left: 0; list-style: none; font-size: 0.92rem; color: var(--text-muted); }
.engage-card li { padding: 6px 0 6px 20px; position: relative; }
.engage-card li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { font-size: 0.82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-muted); }

/* ---------- Languages ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.lang-item { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.lang-item h3 { font-size: 1rem; margin-bottom: 6px; }
.lang-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 10px; }
.lang-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 999px; }

/* ---------- Contact ---------- */
.contact-box {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border-radius: 20px; padding: 56px; color: #fff; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
  box-shadow: var(--shadow-lg);
}
.contact-box h2 { color: #fff; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.contact-box p { color: rgba(255,255,255,0.86); font-size: 1.02rem; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-list a { color: #fff; font-weight: 700; display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.contact-list a:hover { text-decoration: none; opacity: 0.85; }
.contact-list .icon { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.16); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-list .icon svg { width: 18px; height: 18px; }
.contact-list small { display: block; font-weight: 500; color: rgba(255,255,255,0.7); font-size: 0.76rem; }

/* ---------- Footer ---------- */
footer.site {
  padding: 32px 0; text-align: center; color: var(--text-faint); font-size: 0.85rem;
}
footer.site a { color: var(--text-muted); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo-wrap { order: -1; margin-bottom: 12px; }
  .hero-photo { width: min(240px, 60%); }
  .two-col { grid-template-columns: 1fr; gap: 48px; }
  .focus-grid, .project-grid, .cert-grid, .engage-grid, .lang-grid { grid-template-columns: 1fr; }
  .contact-box { grid-template-columns: 1fr; padding: 36px 28px; }
}

@media (max-width: 760px) {
  .nav-links, .nav-tools .lang-switch { display: none; }
  .nav-toggle {
    display: flex; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); align-items: center; justify-content: center; cursor: pointer;
  }
  .nav-toggle svg { width: 20px; height: 20px; color: var(--text); }
  body.nav-open .nav-links {
    display: flex; flex-direction: column; position: fixed; inset: 64px 16px auto 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 10px; box-shadow: var(--shadow-lg); z-index: 99;
  }
  body.nav-open .nav-tools .lang-switch { display: flex; position: fixed; top: 76px; right: 16px; }
  section { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }
}
