/* ═══════════════════════════════════════════════════════════════
   DEMO — Online-Bewerbungs-Portfolio
   styles.css · Design-System Foundation
   ───────────────────────────────────────────────────────────────
   Pro Version wird über css/themes/<version>.css getuned. Diese
   Datei definiert alle gemeinsamen Komponenten und Tokens.
   Themes überschreiben nur die --t-* Custom Properties.
   ═══════════════════════════════════════════════════════════════ */

/* Font-Loading: index.html lädt Inter + JetBrains-Mono bereits via
   <link rel="stylesheet"> mit korrektem preconnect. Der frühere base.css
   @import duplizierte das und zog zusätzlich Fraunces + Space-Grotesk
   nach (in keiner Regel referenziert) → 152 font-faces für 2 effektiv
   genutzte Familien registriert. Entfernt: spart ~80 KB render-blocking
   font-CSS + einen HTTP-Round-Trip. */

/* ─── Theme-Tokens (Default · wird pro Version überschrieben) ─── */
:root {
  /* Farben */
  --t-bg:            #FAFAF8;
  --t-bg-alt:        #F2F1ED;
  --t-surface:       #FFFFFF;
  --t-text:          #0E0E0E;
  --t-text-mute:     #6B6560;
  --t-text-soft:     #9A938C;
  --t-border:        #E5E3DE;
  --t-border-strong: #C7C3BC;

  --t-accent:        #228385;     /* hauptakzent */
  --t-accent-2:      #2DAEAE;     /* glow / gradient */
  --t-accent-soft:   rgba(34,131,133,.10);
  --t-accent-pale:   rgba(34,131,133,.05);
  --t-accent-on:     #FFFFFF;     /* text-color auf accent-bg */

  /* Typo */
  --t-font-display:  'Fraunces', 'Inter', serif;
  --t-font-body:     'Inter', system-ui, -apple-system, sans-serif;
  --t-font-mono:     'JetBrains Mono', ui-monospace, Menlo, monospace;
  --t-font-weight-display: 600;
  --t-font-weight-body:    400;
  --t-letter-display:      -0.025em;

  /* Layout */
  --t-container-max: 1200px;
  --t-container-pad: clamp(1.25rem, 4vw, 3rem);
  --t-section-py:    clamp(4.5rem, 9vw, 8rem);
  --t-radius:        14px;
  --t-radius-sm:     8px;
  --t-radius-pill:   999px;

  /* Schatten + Effekte */
  --t-shadow-sm:     0 1px 2px rgba(0,0,0,.04);
  --t-shadow:        0 6px 24px -8px rgba(0,0,0,.10);
  --t-shadow-lg:     0 20px 60px -20px rgba(0,0,0,.18);
  --t-grain-opacity: 0.025;

  /* Misc */
  --t-nav-h:         72px;
  --t-ease:          cubic-bezier(.22,.61,.36,1);
  --t-dur:           .35s;
}

/* ═══ Reset + Base ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--t-font-body);
  background: var(--t-bg);
  color: var(--t-text);
  font-size: 1.0625rem;
  font-weight: var(--t-font-weight-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtile Grain-Textur für Premium-Feel */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--t-grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .8 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--t-accent); color: var(--t-accent-on); }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }
input, textarea, select, button { font-family: inherit; }

/* ═══ Accessibility ═══ */
:focus-visible {
  outline: 2px solid var(--t-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══ Custom Cursor (Desktop only — JS aktiviert) ═══ */
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:has(#cu-dot) { cursor: none; }
  body:has(#cu-dot) a,
  body:has(#cu-dot) button,
  body:has(#cu-dot) [role="button"] { cursor: none; }
}
#cu-dot, #cu-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  border-radius: 50%;
  will-change: transform;
}
#cu-dot {
  width: 6px; height: 6px;
  background: var(--t-accent);
  transition: transform .05s linear, width .25s, height .25s, opacity .25s;
}
#cu-ring {
  width: 32px; height: 32px;
  border: 1.5px solid var(--t-accent);
  transition: width .25s var(--t-ease), height .25s var(--t-ease),
              border-color .25s, transform .05s linear, opacity .25s;
}
body.cursor-hover #cu-ring {
  width: 54px; height: 54px;
  margin: -11px 0 0 -11px;
  border-color: var(--t-accent-2);
  background: var(--t-accent-soft);
}
body.cursor-hover #cu-dot { opacity: 0; }

/* ═══ Container ═══ */
.container {
  max-width: var(--t-container-max);
  margin: 0 auto;
  padding: 0 var(--t-container-pad);
  position: relative;
  z-index: 2;
}

main { position: relative; z-index: 2; }

section {
  padding: var(--t-section-py) 0;
  position: relative;
}

/* ═══ Typography ═══ */
h1, h2, h3, h4 {
  font-family: var(--t-font-display);
  font-weight: var(--t-font-weight-display);
  line-height: 1.02;
  letter-spacing: var(--t-letter-display);
  color: var(--t-text);
  text-wrap: balance;
}

h1 { font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 700; }
h2 { font-size: clamp(2.25rem, 5.5vw, 4.5rem); line-height: 1.04; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); line-height: 1.2; letter-spacing: -0.015em; }

p  { color: var(--t-text); }
strong { font-weight: 600; color: var(--t-text); }

/* ═══ Section-Header mit Auto-Nummerierung (data-num via JS) ═══ */
.section-header {
  display: flex; align-items: center; gap: .9rem;
  margin-bottom: 1.5rem;
  font-family: var(--t-font-mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--t-text-mute);
}
.section-header::before {
  content: '';
  width: 28px; height: 1px;
  background: currentColor;
  opacity: .5;
}
.section-label {
  display: inline-flex; align-items: baseline; gap: .6rem;
  position: relative;
}
.section-label[data-num]::before {
  content: attr(data-num) ' /';
  color: var(--t-accent);
  font-weight: 700;
  letter-spacing: .05em;
}

/* ═══ Reveal-Animationen Setup (Werte in animations.css) ═══ */
.reveal, .reveal-left, .reveal-right, .reveal-fade { opacity: 0; }
.reveal.visible, .reveal-left.visible, .reveal-right.visible, .reveal-fade.visible { opacity: 1; }
