/* Fonts werden im <head> der HTML-Dateien per <link> geladen (preconnect, schneller als @import). */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f8f8f6;
  --hero-dark:  #0a3d3f;   /* tiefes Petrol — dunkle Variante des Teals */
  --ink:        #111111;
  --ink-mid:    #444444;
  --ink-soft:   #777777;
  --teal:       #0d7377;
  --teal-light: #14a3a8;
  --teal-bright: #4fc3c7;  /* heller — für Teal-Text auf dunklem Petrol (Kontrast) */
  --teal-pale:  #e6f3f4;
  --white:      #ffffff;
  --border:     rgba(0,0,0,0.08);
  --card:       #ffffff;
}

html { scroll-behavior: smooth; }
body { font-family: 'Space Grotesk', sans-serif; background: var(--bg); color: var(--ink); overflow-x: hidden; counter-reset: section-counter; }
/* Versatz für die fixe Navi, damit Anker-Ziele nicht darunter verschwinden */
section[id] { scroll-margin-top: 80px; }
/* Sichtbarer Fokus für Tastaturnutzer */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
}

/* ── NAV ───────────────────────────────────────────── */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 60px;
  background: rgba(248,248,246,0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav .logo { font-family: 'Space Mono', monospace; font-size: 0.85rem; letter-spacing: 0.05em; color: var(--ink); text-decoration: none; }
nav ul { list-style: none; display: flex; gap: 2rem; }
nav ul a { color: var(--ink-soft); text-decoration: none; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
nav ul a:hover { color: var(--teal); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

/* ── HERO ──────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 40% 60%;
  padding-top: 60px;
  overflow: hidden;
}
.hero-content {
  padding: 5rem 5% 5rem 5%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  background: var(--hero-dark);
}
.hero-photo {
  position: relative;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  filter: contrast(1.05);
}
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--hero-dark) 0%, transparent 20%),
              linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 40%);
  pointer-events: none;
}
.hero-bg-text {
  position: absolute;
  bottom: 8rem;
  left: 4%;
  font-family: 'Space Mono', monospace;
  font-size: clamp(8rem, 12vw, 16rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(13,115,119,0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.hero-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--teal-bright);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-label::before { content: ''; width: 40px; height: 1px; background: var(--teal-bright); }
h1 {
  font-size: clamp(3rem, 6.5vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
  max-width: 900px;
}
.hero-content h1 { color: var(--white); }
h1 .line-accent { color: var(--teal-bright); }
h1 .line-soft { color: rgba(255,255,255,0.75); }
.hero-bottom { max-width: 560px; }
.hero-desc {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; align-items: center; }
.btn-primary {
  background: var(--teal);
  color: var(--white);
  padding: 0.9rem 2rem;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  border: 2px solid var(--teal);
  transition: background 0.2s, color 0.2s;
}
.btn-primary:hover { background: transparent; color: var(--teal); }
.btn-ghost {
  border: 2px solid rgba(255,255,255,0.2);
  color: var(--white);
  padding: 0.9rem 2rem;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--white); }

/* ── ABOUT ─────────────────────────────────────────── */
.about {
  padding: 7rem 5% 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}
.about-left { position: sticky; top: 120px; }
.section-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-tag::before {
  counter-increment: section-counter;
  content: counter(section-counter, decimal-leading-zero);
  opacity: 0.4;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
h2 em { color: var(--teal); font-style: normal; }
.ki-card h2 { color: var(--white); margin-bottom: 1.5rem; }
.ki-card .section-tag { color: rgba(255,255,255,0.7); }
.about-text p { color: var(--ink-soft); font-size: 1rem; line-height: 1.8; margin-bottom: 1.5rem; }
.about-text p strong { color: var(--ink); }
.about-cta { margin-top: 2.5rem; }

/* ── SKILLS ────────────────────────────────────────── */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.skill-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--teal);
  background: var(--teal-pale);
  border: 1px solid rgba(13,115,119,0.2);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── WHY ───────────────────────────────────────────── */
.why-section {
  padding: 4rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}
.why-section h2 { margin-bottom: 3rem; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.why-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.why-card:hover {
  background: var(--teal-pale);
  border-color: rgba(13,115,119,0.2);
  transform: translateY(-2px);
}
.why-kicker {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 1.5rem;
}
.why-card h3 {
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 1rem;
}
.why-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ── TIMELINE ──────────────────────────────────────── */
.timeline-section {
  padding: 4rem 5%;
  max-width: 980px;
  margin: 0 auto;
}
.timeline-header { margin-bottom: 4rem; }
.timeline-intro {
  color: var(--ink-mid);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 600px;
  margin-top: 1rem;
}
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 3.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--teal);
}
/* Aus-/Weiterbildung: hohler Punkt, hellere Markierung */
.timeline-item.edu::before {
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--teal-light);
}
.timeline-year {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.timeline-item.edu .timeline-year { color: var(--teal-light); }
.timeline-role {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.3rem;
}
.timeline-org {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}
.timeline-text {
  color: var(--ink-mid);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 1.5rem;
}
.timeline-reflect {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.timeline-reflect > div {
  flex: 1;
  min-width: 240px;
  border-left: 2px solid var(--teal-pale);
  padding-left: 1rem;
}
.timeline-reflect .label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.4rem;
}
.timeline-reflect p {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ── KI BLOCK ──────────────────────────────────────── */
.ki-section {
  padding: 4rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}
.ki-card {
  background: var(--teal);
  padding: 4rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.ki-card p { color: rgba(255,255,255,0.8); line-height: 1.7; font-size: 1rem; margin-bottom: 0; }
.ki-features { display: flex; flex-direction: column; gap: 1rem; }
.ki-feature {
  background: rgba(0,0,0,0.15);
  padding: 1.2rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.ki-feature .icon {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  padding-top: 0.1rem;
  white-space: nowrap;
}
.ki-feature .text { font-size: 0.9rem; color: var(--white); line-height: 1.5; }

/* ── PROJECTS ──────────────────────────────────────── */
.projects-section {
  padding: 4rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; }
.project-tile {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 3rem;
  transition: background 0.2s, border-color 0.2s;
}
.project-tile:hover { background: var(--teal-pale); border-color: rgba(13,115,119,0.2); }
.project-tile .p-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.project-tile h3 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; color: var(--ink); }
.project-tile p { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.7; margin-bottom: 2rem; }
.project-tile .p-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.p-stat .v { font-family: 'Space Mono', monospace; font-size: 1.4rem; font-weight: 700; color: var(--teal); }
.p-stat .l { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.2rem; }

/* ── CONTACT ───────────────────────────────────────── */
.contact-section {
  padding: 4rem 5% 6rem;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.contact-big {
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.contact-big .line { display: block; color: var(--ink); }
.contact-big .line-accent { color: var(--teal); }
.contact-right p { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; margin-bottom: 2rem; }
.contact-social {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.contact-social-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-social a {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.contact-social a:hover { border-color: var(--teal); }

/* ── FORM ──────────────────────────────────────────── */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form-field input,
.form-field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(0,0,0,0.25); }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--teal); }
.form-field textarea { min-height: 130px; }
.form-submit {
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
  padding: 0.95rem 2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
}
.form-submit:hover { background: transparent; color: var(--teal); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-success {
  display: none;
  background: rgba(13,115,119,0.07);
  border: 1px solid rgba(13,115,119,0.3);
  padding: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}
.form-success strong { color: var(--teal); }
.form-error {
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 0.75rem;
  display: none;
}
.form-error a { color: inherit; text-decoration: underline; }

/* ── FOOTER ────────────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer p { color: var(--ink-soft); font-size: 0.8rem; font-family: 'Space Mono', monospace; }
footer a { color: var(--teal); text-decoration: none; }

/* ── BACK TO TOP ───────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(13,115,119,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--teal-light); }

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-photo { height: 60vw; max-height: 420px; }
  /* Einspaltig: linker Verlauf zum Petrol-Panel entfällt — nur dezente Abdunklung unten bleibt */
  .hero-photo::after { background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 40%); }
  .hero-content { padding: 3rem 5% 4rem; }
  .about, .contact-section { grid-template-columns: 1fr; gap: 3rem; }
  .about-left { position: static; }
  .why-section { padding: 3rem 5%; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .timeline-section { padding: 3rem 5%; }
  .ki-card { grid-template-columns: 1fr; padding: 3rem; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-card { min-height: auto; }
}

/* ── MOBILE-NAV (Hamburger) ────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 11px;
  }
  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  nav ul {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(248,248,246,0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.25rem 5% 1rem;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  nav ul.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  nav ul li { width: 100%; }
  nav ul a {
    display: block;
    padding: 0.9rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
  }
  nav ul li:last-child a { border-bottom: none; }
}

/* ── REDUCED MOTION ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .back-to-top { transition: none; }
  .nav-toggle span, nav ul { transition: none; }
}
