/* Farben aus Logo und Projektlebenslauf */
:root {
  --sage: #b4cac7;
  --sage-soft: #e7efee;
  --sage-mist: #f4f8f7;
  --petrol: #64878d;
  --petrol-ink: #46686e;   /* Petrol für Text auf hellem Grund (ausreichender Kontrast) */
  --deep: #2f4a4e;         /* dunkle Abschnitte */
  --deeper: #253c3f;
  --slate: #51565c;
  --ink: #2c3135;
  --muted: #5d6469;
  --white: #fff;
  --line: #d3dfdd;

  --font: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --head-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 8px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol-ink); text-underline-offset: 3px; }
a:hover { color: var(--deep); }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 300; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 300; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--deep); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }

/* Gesperrte Versalien wie im Lebenslauf */
.kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--petrol-ink);
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: .85em 1.6em;
  background: var(--deep);
  color: var(--white);
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--deeper); color: var(--white); }
.btn--small { padding: .55em 1.1em; font-size: .9rem; }
.btn--light { background: var(--sage); color: var(--deeper); }
.btn--light:hover { background: var(--white); color: var(--deeper); }

.link-arrow { font-weight: 700; text-decoration: none; font-size: .95rem; }
.link-arrow::after { content: ' →'; transition: margin .2s; }
.link-arrow:hover::after { margin-left: 4px; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.top.is-scrolled { border-color: var(--line); }
.top__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--slate); }
.brand__mark { width: 38px; }
.brand__name { font-size: .82rem; letter-spacing: .3em; text-transform: uppercase; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: .95rem; position: relative; }
.nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--sage); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); }

.menu-btn { display: none; }

@media (max-width: 820px) {
  .menu-btn {
    display: block; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; cursor: pointer; position: relative;
  }
  .menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
    position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); transition: transform .25s, opacity .25s;
  }
  .menu-btn__bars { top: 21px; }
  .menu-btn__bars::before, .menu-btn__bars::after { content: ''; left: 0; }
  .menu-btn__bars::before { top: -7px; }
  .menu-btn__bars::after { top: 7px; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: absolute; top: var(--head-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--sage-soft); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; text-align: center; }
}
@media (max-width: 400px) {
  .brand__name { letter-spacing: .2em; font-size: .75rem; }
}

/* ---------- Startbereich ---------- */
.hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--sage-mist) 100%);
  padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 96px);
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero__sub { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 2rem; }

.hero__portrait { position: relative; margin: 0; justify-self: center; width: min(100%, 380px); aspect-ratio: 1; }
.hero__portrait img {
  position: absolute; inset: 9%;
  width: 82%; height: 82%; object-fit: cover; object-position: 50% 15%;
  border-radius: 50%;
  box-shadow: 0 20px 50px -20px rgba(47, 74, 78, .45);
}
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit__ring { fill: none; stroke: var(--sage); stroke-width: 1.5; stroke-dasharray: 3 7; }
.orbit__nodes circle { fill: var(--petrol); }
.orbit__nodes circle:nth-child(2n) { fill: var(--sage); }
.orbit__nodes circle:nth-child(3) { fill: var(--slate); }
.orbit__nodes { transform-origin: 200px 200px; animation: orbit 90s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__portrait { order: -1; width: min(70%, 280px); }
}

/* ---------- Kennzahlen ---------- */
.facts { background: var(--deep); color: var(--white); padding: clamp(36px, 5vw, 56px) 0; }
.facts__list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.facts li { border-left: 2px solid var(--petrol); padding-left: 18px; }
.facts strong { display: block; font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 300; line-height: 1.1; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.facts span { font-size: .92rem; color: var(--sage); line-height: 1.45; display: block; }
@media (max-width: 900px) { .facts__list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .facts__list { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Einstieg ---------- */
.intro { padding: clamp(56px, 8vw, 100px) 0; }
.lead { font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 300; line-height: 1.5; color: var(--ink); }
.intro p:not(.lead) { color: var(--muted); }

/* ---------- Abschnitte ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tint { background: var(--sage-soft); }
.section--dark { background: var(--deep); color: #e3ecea; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .kicker { color: var(--sage); }
.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head p:last-child { color: var(--muted); }
.section--dark .section__head p:last-child { color: #c9d7d5; }

/* ---------- Leistungen ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service {
  background: var(--white);
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  position: relative;
  border-top: 3px solid var(--sage);
}
.service--main { border-top-color: var(--petrol); }
.service__no { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .2em; color: var(--petrol); margin-bottom: 10px; }
.service > p { color: var(--muted); }
.service ul, .points ul { list-style: none; padding: 0; margin: 0; }
.service li { padding: 8px 0 8px 22px; border-top: 1px solid var(--sage-soft); position: relative; font-size: .97rem; }
.service li::before {
  content: ''; position: absolute; left: 2px; top: 1.05em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage);
}
.service--main li::before { background: var(--petrol); }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }

/* ---------- Was mich ausmacht ---------- */
.profile { display: grid; grid-template-columns: 360px 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.table-graphic { margin: 0; position: sticky; top: calc(var(--head-h) + 32px); }
.table-graphic svg { width: 100%; overflow: visible; }
.tg__lines line { stroke: var(--petrol); stroke-width: 1.5; stroke-dasharray: 180; stroke-dashoffset: 180; transition: stroke-dashoffset 1.4s ease; }
.tg__lines line:nth-child(n+5) { stroke: rgba(180, 202, 199, .35); stroke-dasharray: 4 6; stroke-dashoffset: 0; opacity: 0; transition: opacity 1s ease 1.2s; }
.tg__center { fill: var(--sage); opacity: 0; transform-origin: 180px 180px; transform: scale(.4); transition: opacity .6s ease 1.4s, transform .6s ease 1.4s; }
.tg__node circle { fill: var(--deep); stroke: var(--sage); stroke-width: 2.5; }
.tg__node text { fill: #dbe6e4; font-family: var(--font); font-size: 13px; letter-spacing: .08em; text-anchor: middle; }
.table-graphic.is-visible .tg__lines line { stroke-dashoffset: 0; }
.table-graphic.is-visible .tg__lines line:nth-child(n+5) { opacity: 1; }
.table-graphic.is-visible .tg__center { opacity: 1; transform: scale(1); }
.table-graphic.is-visible .tg__center { animation: pulse 4s ease-in-out 2.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }

.points { display: grid; gap: 8px; }
.point { padding: 24px 0; border-top: 1px solid rgba(180, 202, 199, .25); }
.point:first-child { border-top: 0; padding-top: 0; }
.point h3 { font-size: 1.25rem; font-weight: 400; color: var(--white); }
.point p { margin: 0; color: #c9d7d5; }
@media (max-width: 900px) {
  .profile { grid-template-columns: 1fr; }
  .table-graphic { position: static; max-width: 320px; margin: 0 auto; }
}

/* ---------- Projekte ---------- */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project { background: var(--white); padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; }
.project__figure { font-size: 1.9rem; font-weight: 300; color: var(--petrol-ink); line-height: 1.15; margin-bottom: 16px; }
.project__figure small { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.project h3 { font-size: 1.05rem; }
.project p:not([class]) { color: var(--muted); font-size: .97rem; }
.project__meta { margin-top: auto; margin-bottom: 0; padding-top: 12px; font-size: .85rem; color: var(--petrol-ink); }
@media (max-width: 960px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .projects { grid-template-columns: 1fr; } }

.refs { margin: 40px 0 0; display: grid; gap: 12px; }
.refs div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
.refs dt { font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--petrol-ink); padding-top: 3px; }
.refs dd { margin: 0; }
@media (max-width: 560px) { .refs div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Vorgehen ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); border: 2px solid var(--petrol); color: var(--petrol-ink); font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: ''; position: absolute; top: 22px; left: 56px; right: -20px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--petrol) 0 4px, transparent 4px 10px);
}
.steps p { color: var(--muted); font-size: .97rem; }
.frame { margin: 40px 0 0; padding: 20px 24px; background: var(--white); border-left: 3px solid var(--petrol); max-width: 820px; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 8px; }
  .steps li { padding: 0 0 20px 64px; }
  .steps li::after { display: none; }
  .steps li:not(:last-child)::after {
    display: block; top: 52px; left: 21px; right: auto; bottom: 0; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--petrol) 0 4px, transparent 4px 10px);
  }
  .steps li:nth-child(2)::after { display: block; }
}

/* ---------- Über mich ---------- */
.about { display: grid; grid-template-columns: 320px 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about__photo { margin: 0; position: relative; }
.about__photo::before {
  content: ''; position: absolute; inset: 16px -16px -16px 16px; background: var(--sage-soft); z-index: -1;
}
.about__photo img { width: 100%; }
.about__text h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
.about__text p:not(.kicker) { color: var(--muted); }
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 260px; }
}

.cv { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); margin-top: clamp(48px, 7vw, 80px); }
.cv h3 { font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; color: var(--petrol-ink); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.cv h3:not(:first-child) { margin-top: 36px; }
.timeline, .plain { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid var(--sage-soft); margin-left: 5px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--petrol); }
.timeline li:first-child::before { background: var(--petrol); }
.timeline span { display: block; font-size: .85rem; font-weight: 700; color: var(--petrol-ink); }
.timeline strong, .plain strong { display: block; font-weight: 700; font-size: .98rem; line-height: 1.4; }
.timeline em, .plain em { display: block; font-style: normal; font-size: .9rem; color: var(--muted); }
.plain li { margin-bottom: 14px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--sage-soft); padding: 6px 12px; border-radius: 999px; font-size: .88rem; }
@media (max-width: 820px) { .cv { grid-template-columns: 1fr; } }

/* ---------- Kontakt ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact__text > p { color: #c9d7d5; }
.contact__list { list-style: none; margin: 28px 0 0; padding: 0; }
.contact__list li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(180, 202, 199, .25); }
.contact__list span { font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--sage); padding-top: 4px; }
.contact__list a { color: var(--white); overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--sage); }

.form { background: var(--deeper); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); }
.form h3 { font-weight: 400; font-size: 1.3rem; margin-bottom: 20px; }
.form__row { margin-bottom: 16px; }
.form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: block; font-size: .88rem; margin-bottom: 6px; color: #dbe6e4; }
.form abbr { text-decoration: none; color: var(--sage); }
.form input:not([type="checkbox"]), .form textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 1rem;
  background: rgba(255, 255, 255, .06); color: var(--white);
  border: 1px solid rgba(180, 202, 199, .35); border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--sage); background: rgba(255, 255, 255, .1); }
.form textarea { resize: vertical; min-height: 120px; }
.form ::placeholder { color: rgba(219, 230, 228, .5); }
.form .is-invalid { border-color: #e9a99b !important; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__check { display: flex !important; gap: 10px; align-items: flex-start; font-size: .85rem !important; line-height: 1.5; margin: 8px 0 20px; }
.form__check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--sage); flex: none; }
.form__check a { color: var(--sage); }
.form__check.is-invalid span { color: #f2c2b7; }
.form__status { margin: 14px 0 0; font-size: .95rem; min-height: 1.5em; }
.form__status.is-ok { color: var(--sage); }
.form__status.is-error { color: #f2c2b7; }
.form button[disabled] { opacity: .6; cursor: wait; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .form__pair { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Fußzeile ---------- */
.foot { background: var(--deeper); color: #a9bcb9; font-size: .88rem; padding: 24px 0; }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: #dbe6e4; text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }

/* ---------- Rechtstexte ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.15rem; font-weight: 700; margin-top: 2em; }
.legal__date { margin-top: 2.5em; color: var(--muted); font-size: .9rem; }

/* ---------- Einblenden beim Scrollen ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .tg__lines line { stroke-dashoffset: 0 !important; }
  .tg__lines line:nth-child(n+5), .tg__center { opacity: 1 !important; transform: none !important; }
}
