/* maxheinzelbecker.com – ein Stylesheet für alle Seiten.
   Bewusst ohne Fremd-Schriften: die Systemschrift des Geräts (schnell, keine Daten an Dritte). */

:root {
  color-scheme: light dark;
  --bg: #f6f6f3;
  --fg: #161616;
  --muted: #64645f;
  --line: #d8d8d2;
  --mark: #fff1a8;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 70rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --fg: #ededea;
    --muted: #9d9d97;
    --line: #2e2e2b;
    --mark: #5c5212;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.2s ease;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

mark {
  background: var(--mark);
  color: inherit;
  padding: 0 0.15em;
}

/* ---------- Startseite ---------- */

.card {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--pad) 1.5rem;
  display: grid;
  align-content: center;
  gap: 2.25rem;
}

.portrait {
  margin: 0;
  width: min(70%, 18rem);
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  background: #1c1c1c;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 3.6vw + 1.4rem, 4.75rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
h1 span { display: block; }

.tagline {
  margin: 1.1rem 0 0;
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.375rem);
  color: var(--muted);
}

.block {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.block h2 {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.block p { margin: 0; }
.block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.block li + li { margin-top: 0.3rem; }
.block .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin-top: 0.75rem;
}
.block .links li + li { margin-top: 0; }
.arrow {
  display: inline-block; /* ohne Unterstrich */
  margin-left: 0.2em;
  font-size: 0.85em;
  color: var(--muted);
}
.nowrap { white-space: nowrap; }

@media (min-width: 50rem) {
  .card {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(3rem, 7vw, 6.5rem);
  }
  .portrait { width: 100%; }
}

/* ---------- Fußzeile ---------- */

.footer {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad) 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Textseiten: Impressum, 404 ---------- */

.text {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 5rem) var(--pad) 2rem;
}
.text h1 {
  font-size: clamp(2.1rem, 2.5vw + 1.4rem, 3rem);
  line-height: 1.05;
  margin-bottom: 1.75rem;
}
.text h2 {
  margin: 3rem 0 0.75rem;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.text h3 {
  margin: 1.75rem 0 0.35rem;
  font-size: 1rem;
  line-height: 1.4;
}
.text p { margin: 0 0 1rem; }
.text .back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
.text .small {
  margin-top: 2.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- sanftes Einblenden ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}
