/* ==========================================================================
   Romana Brasser — Abendglut
   ========================================================================== */

:root {
  /* Creme — warm peach base from the horizon */
  --linen-50: #fdf9f4;
  --linen-100: #f9f1e7;
  --linen-200: #f2e5d4;
  --linen-300: #e6d3bc;

  /* Rosé — dusty supporting tone */
  --rose-100: #f6e6e2;
  --rose-200: #ebd2cc;
  --rose-400: #c99d96;
  --rose-500: #b7867f;
  --rose-700: #8a5a55;

  /* Rosa Streifen — the pink streak in the sunset, used for icons */
  --streak: #d88174;

  /* Pflaume — deep dusk tone for headings, buttons, bands */
  --plum-700: #4e3b4a;
  --plum-800: #3e2e3b;
  --plum-900: #2d212b;

  /* Koralle — accent, used sparingly */
  --coral-200: #fadccf;
  --coral-500: #dd7f62;
  --coral-700: #9c4a2b;

  /* Text */
  --ink-900: #2d2629;
  --ink-600: #625659;

  /* Roles */
  --bg: var(--linen-100);
  --surface: var(--linen-50);
  --surface-alt: var(--linen-200);
  --border: var(--linen-300);
  --text: var(--ink-900);
  --text-soft: var(--ink-600);
  --heading: var(--plum-800);
  --primary: var(--plum-800);
  --primary-hover: var(--plum-900);
  --accent: var(--coral-500);
  --accent-text: var(--coral-700);

  /* Type */
  --font-heading: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.4vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.9rem + 2.8vw, 4.25rem);

  /* Layout */
  --container: 44rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 7vw, 5.5rem);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow: 0 1px 2px rgb(62 46 59 / 0.04), 0 12px 32px -12px rgb(62 46 59 / 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
blockquote,
figure {
  margin: 0;
}

a {
  color: inherit;
}

::selection {
  background: var(--coral-200);
  color: var(--plum-900);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: var(--linen-50);
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Layout helpers --------------------------------------------------------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

/* Typography ------------------------------------------------------------- */

.display,
.h2,
.h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--heading);
  font-optical-sizing: auto;
  text-wrap: balance;
}

.display {
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: var(--step-3);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.h3 {
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.3;
}

.eyebrow {
  margin-bottom: 1rem;
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--accent-text);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-soft);
  text-wrap: pretty;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose p {
  color: var(--text-soft);
  text-wrap: pretty;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 var(--step-0) / 1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.25s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--primary);
  color: var(--linen-50);
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--ghost {
  border-color: var(--rose-400);
  color: var(--primary);
}

.btn--ghost:hover {
  background: var(--rose-100);
  border-color: var(--rose-500);
}

.link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.2s;
}

.link:hover {
  text-decoration-color: var(--primary);
}

/* Header ----------------------------------------------------------------- */

.site-header {
  --header-h: 4.75rem;
  position: relative;
  z-index: 50;
}

/* Transparent header laid over the hero photo with white text. A soft dusk
   veil at the top of the photo (see .hero__sky::after) and a faint text
   shadow keep it readable over the light upper sky. */
.site-header--over {
  position: absolute;
  inset: 0 0 auto;
}

.site-header--over .brand,
.site-header--over .nav__list a {
  color: #fff;
  text-shadow: 0 1px 12px rgb(30 22 30 / 0.35);
}

.site-header--over .nav__list a:hover {
  color: #fff;
}

.site-header--over .nav__list a::after {
  background: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__list {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__list a {
  position: relative;
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  color: var(--text-soft);
  transition: color 0.2s;
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.3rem;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__list a:hover {
  color: var(--primary);
}

.nav__list a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  margin-inline: auto;
}

.nav-toggle .nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: calc(4.75rem + clamp(3rem, 7vw, 6rem)) clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

/* Evening sky photo filling the whole hero. A dusky gradient keeps the
   light text readable over the darker lower part of the photo. */
.hero__sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0 0 50% 50% / 0 0 clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3.5rem);
  background: #1e161e;
  pointer-events: none;
}

.hero__sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(30 22 30 / 0.5) 0, rgb(30 22 30 / 0.3) 4rem, rgb(30 22 30 / 0) 10rem),
    linear-gradient(
    to bottom,
    rgb(30 22 30 / 0.05) 0%,
    rgb(30 22 30 / 0.15) 35%,
    rgb(30 22 30 / 0.6) 62%,
    rgb(30 22 30 / 0.82) 100%
  );
}

.hero__sky picture {
  display: block;
  height: 100%;
}

.hero__sky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keep the storks on the chimney in view, right of the portrait */
  object-position: 20% 40%;
}

@media (max-width: 640px) {
  .site-header--over .nav__list a {
    color: var(--heading);
    text-shadow: none;
  }
}

@media (max-width: 640px) {
  .hero__sky img {
    object-position: 64% 40%;
  }
}

/* Light text on the photo */
.hero .eyebrow {
  color: var(--coral-200);
}

.hero .display {
  color: var(--linen-50);
}

.hero .lede {
  color: rgb(251 248 242 / 0.88);
}

.hero .btn--primary {
  background: var(--linen-50);
  color: var(--plum-800);
}

.hero .btn--primary:hover {
  background: var(--rose-100);
}

.hero .link {
  color: var(--linen-50);
  text-decoration-color: rgb(251 248 242 / 0.5);
}

.hero .link:hover {
  text-decoration-color: var(--linen-50);
}

.hero__inner {
  text-align: center;
}

.hero .lede {
  margin-top: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
  margin-top: 2.25rem;
}

.hero__visual {
  position: relative;
  width: min(78%, 20rem);
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: left;
}

.hero__visual::before {
  content: "";
  position: absolute;
  inset: auto -8% -6% auto;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral-200);
  z-index: 0;
  animation: breathe 9s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: scale(1.07) translate(-2%, -2%);
  }
}

.portrait {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  /* Pebble: soft, slightly irregular organic shape */
  border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%;
  background: var(--rose-200);
  overflow: hidden;
}

.portrait picture {
  display: block;
  height: 100%;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Slight parallax while scrolling, set by main.js */
  transform: translateY(var(--parallax, 0px)) scale(1.08);
}

/* Questions -------------------------------------------------------------- */

.h2 + .lede {
  margin-top: 1.25rem;
}

.questions {
  display: grid;
  gap: 1.75rem;
  margin: clamp(2.5rem, 5vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

.question {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1.25rem;
}

.question .icon-circle {
  margin-bottom: 0;
}

.question p {
  font-family: var(--font-heading);
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--heading);
  text-wrap: pretty;
}

/* Story ------------------------------------------------------------------ */

.prose {
  margin-top: 1.75rem;
}

/* Small sprig between sections */
.divider {
  display: flex;
  justify-content: center;
  color: var(--rose-500);
}

.divider svg {
  width: 2.25rem;
  height: 3rem;
}

.pullquote {
  margin: 2.25rem 0;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.25rem);
  background: var(--rose-100);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.5;
  color: var(--plum-800);
}

.pullquote p {
  color: inherit;
}

/* Education -------------------------------------------------------------- */

.education__list {
  display: grid;
  gap: 1rem;
  margin: clamp(2rem, 4vw, 2.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.edu {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.edu__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--rose-100);
  border: 1px solid var(--streak);
  color: var(--streak);
}

.edu__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.edu__meta {
  margin-top: 0.25rem;
  font-size: var(--step--1);
  color: var(--text-soft);
}

.timeline {
  margin: clamp(2.25rem, 4vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.timeline li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.25rem 1.5rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--step--1);
  line-height: 1.55;
}

.timeline__year {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.timeline__text {
  margin: 0;
  color: var(--text);
}

.timeline__org {
  display: block;
  color: var(--text-soft);
}

.timeline--more {
  margin: 0.75rem 0 0;
}

.timeline-more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--primary);
  font-size: var(--step--1);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.2s;
}

.timeline-more summary::-webkit-details-marker {
  display: none;
}

.timeline-more summary:hover {
  text-decoration-color: var(--primary);
}

.timeline-more summary svg {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 0.2s;
}

.timeline-more[open] summary svg {
  transform: rotate(180deg);
}

.timeline-more__close,
.timeline-more[open] .timeline-more__open {
  display: none;
}

.timeline-more[open] .timeline-more__close {
  display: inline;
}

@media (max-width: 480px) {
  .timeline li {
    grid-template-columns: 1fr;
  }
}

.tag {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--coral-200);
  color: var(--coral-700);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Values ----------------------------------------------------------------- */

.values {
  display: grid;
  gap: 1.75rem;
  margin: clamp(2.5rem, 5vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

/* Same arrangement as the questions: icon left, text right */
.value {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1.25rem;
}

.value .icon-circle {
  grid-row: span 2;
  margin-bottom: 0;
}

.icon-circle {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: var(--rose-100);
  border: 1px solid var(--streak);
  color: var(--streak);
}

.icon-circle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.value .h3 {
  margin-bottom: 0.25rem;
}

.value p {
  color: var(--text-soft);
  font-size: var(--step--1);
  line-height: 1.65;
}

/* Contact ---------------------------------------------------------------- */

.contact {
  position: relative;
  padding: clamp(2.25rem, 6vw, 4.5rem);
  background: var(--rose-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.contact::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--rose-200);
}

.contact > * {
  position: relative;
  z-index: 1;
}

.signature {
  margin: 2rem 0;
  font-family: var(--font-heading);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.4;
  color: var(--plum-800);
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  padding-block: 3rem;
  border-top: 1px solid var(--border);
  font-size: var(--step--1);
  color: var(--text-soft);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--primary);
}

/* Reveal on scroll ------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem var(--gutter) 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__list a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-heading);
    font-size: var(--step-1);
    font-weight: 400;
    color: var(--heading);
  }

  .nav__list a::after {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__actions .link {
    margin-inline: auto;
  }
}

/* Legal pages (Impressum, Datenschutz) ----------------------------------- */

.legal .h2 {
  margin-bottom: 1.5rem;
}

.legal .lede {
  margin-bottom: 1rem;
}

.legal section {
  margin-top: 2.5rem;
}

.legal section > * + * {
  margin-top: 0.85rem;
}

.legal .h3 {
  margin-bottom: 0.5rem;
}

.legal p,
.legal li {
  color: var(--text-soft);
  text-wrap: pretty;
}

.legal ul {
  margin: 0;
  padding-left: 1.25rem;
}

.legal__date {
  margin-top: 3rem;
  font-size: var(--step--1);
}

.site-footer a[aria-current="page"] {
  color: var(--primary);
}
