/* ============================================================
   DESIGN SYSTEM
   Farben, Typo, Reset — alles an einem Ort definiert.
   Custom Properties (CSS-Variablen) erlauben es uns,
   alle Werte zentral zu ändern.
   ============================================================ */

:root {
  /* Farb-Palette */
  --bg:          #0a0a0a;       /* Fast-Schwarz — Haupthintergrund */
  --surface:     #111111;       /* Leicht heller — Cards, Panels */
  --border:      #1e1e1e;       /* Subtile Trennlinien */
  --text:        #e8e8e8;       /* Haupttext — kein reines Weiß (zu hart) */
  --muted:       #555555;       /* Sekundärer Text, Labels */
  --accent:      #c8f050;       /* Lime-Grün — der Akzent aus deinem Portfolio */
  --accent-dim:  rgba(200, 240, 80, 0.12); /* Accent für Backgrounds/Glows */

  /* Typografie */
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing-System (8px-Basis) */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-12: 96px;
  --sp-16: 128px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 200ms;
  --t-med: 400ms;
  --t-slow: 700ms;
}

/* ============================================================
   RESET
   Browser-Defaults entfernen, Box-Sizing normalisieren.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  /* scroll-snap-type: y mandatory; — aktivieren wenn wir Snap-Scroll wollen */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  /* Cursor-Trick: wir überschreiben ihn später mit JS für den Custom Cursor */
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* ============================================================
   CUSTOM CURSOR
   Der kleine Dot der dem Maus folgt — gibt sofort
   ein "premium" Gefühl.
   ============================================================ */

.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform var(--t-fast) var(--ease),
              width var(--t-fast) var(--ease),
              height var(--t-fast) var(--ease),
              opacity var(--t-fast);
  mix-blend-mode: difference;
}

.cursor.expanded {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--accent);
}

/* ============================================================
   DOT NAVIGATION (rechts)
   Kleine Punkte die anzeigen wo man gerade ist.
   ============================================================ */

.dot-nav {
  position: fixed;
  right: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.dot-nav__item {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
  position: relative;
}

.dot-nav__item::after {
  content: attr(data-label);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
  letter-spacing: 0.05em;
}

.dot-nav__item:hover::after,
.dot-nav__item.active::after {
  opacity: 1;
}

.dot-nav__item.active {
  background: var(--accent);
  transform: scale(1.5);
}

.dot-nav__item:hover {
  background: var(--text);
}

/* ============================================================
   SECTION BASE
   Alle Sektionen teilen diese Basis-Styles.
   ============================================================ */

section {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-4);
}

/* ============================================================
   SECTION 1: HERO
   Three.js Canvas im Hintergrund, Text obendrauf.
   ============================================================ */

#hero {
  padding: 0;
  overflow: hidden;
}

.hero__light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    circle 420px at var(--lx, 50%) var(--ly, 50%),
    rgba(200, 240, 80, 0.13) 0%,
    rgba(200, 240, 80, 0.04) 45%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  pointer-events: none;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
  opacity: 0;  /* Startzustand — GSAP animiert das rein */
}

.hero__name {
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  opacity: 0;  /* Startzustand */
}

.hero__name span {
  color: var(--accent);
}

.hero__tagline {
  margin-top: var(--sp-4);
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.6vw, 18px);
  color: var(--accent);
  opacity: 0;  /* Startzustand */
}

.hero__scroll-hint {
  position: absolute;
  bottom: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  opacity: 0;
  z-index: 1;
}

.hero__scroll-hint::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: line-pulse 2s ease-in-out infinite;
}

@keyframes line-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(0.7); }
}

/* ============================================================
   SECTION 2: ABOUT
   ============================================================ */

#about {
  background: var(--bg);
  flex-direction: column;
  gap: 0;
}

.about__inner {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--sp-8);
  align-items: center;
}

.about__canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: visible;
}

.border-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}


#about-canvas {
  width: 420px;
  height: 520px;
  max-width: 100%;
  display: block;
}

.about__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.about__heading {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}

.about__text {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

.about__text + .about__text {
  margin-top: var(--sp-2);
}

.about__values {
  width: 100%;
  max-width: 1100px;
  margin-top: var(--sp-10);
}

.about__values-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.about__values-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.about__values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.about__val-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  padding: 24px 20px;
}

.val-mini-canvas {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: block;
}

.about__val-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.about__val-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ============================================================
   SECTION 3: SKILLS
   Radiale SVG-Visualisierung
   ============================================================ */

#skills {
  background: var(--surface);
  flex-direction: column;
  gap: var(--sp-8);
}

.skills__header {
  text-align: center;
}

.skills__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.skills__heading {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.skills__viz {
  position: relative;
  width: min(680px, 92vw);
}

/* ── Terminal HUD ── */
.sh-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding-bottom: 10px;
  margin-bottom: 0;
}

.sh-status {
  color: var(--muted);
  transition: color 0.4s;
}

.sh-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin: 20px 0 6px;
}

.sh-scanbar {
  position: relative;
  height: 2px;
  background: var(--border);
  margin-bottom: 20px;
}

.sh-scanbar-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 6px #c8f05088, 0 0 18px #c8f05033;
}

.sh-scanbar-dot {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 12px var(--accent);
}

.sh-block {
  margin-bottom: 4px;
}

.sh-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 16px;
  border-bottom: 1px solid var(--border);
}

.sh-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}

.sh-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px #c8f05033;
}

/* ============================================================
   SECTION 4: WORK
   ============================================================ */

#work {
  background: var(--bg);
  flex-direction: column;
  gap: var(--sp-8);
}

.work__header {
  text-align: center;
}

.work__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.work__heading {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1400px;
  width: 100%;
}

a.project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card--soon {
  opacity: 0.65;
  cursor: default;
}
.project-card--soon:hover {
  border-color: var(--border);
  transform: none;
}
.project-card__arrow--soon {
  color: var(--border) !important;
  transform: none !important;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: border-color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}

.project-card:hover {
  border-color: rgba(200, 240, 80, 0.35);
  transform: translateY(-3px);
}


/* Visual preview area */
.project-card__visual {
  width: 100%;
  aspect-ratio: 480 / 280;
  overflow: hidden;
  display: block;
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.project-card__visual svg {
  width: 100%;
  height: 100%;
  display: block;
}
.project-card__visual::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  pointer-events: none;
  z-index: 1;
}

/* Info area */
.project-card__info {
  padding: 20px 24px 24px;
}

.project-card__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.project-card__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}

.project-card__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3px 8px;
  letter-spacing: 0.05em;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.project-card:hover .tag {
  color: var(--text);
  border-color: var(--muted);
}

.project-card__arrow {
  font-size: 20px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color var(--t-fast), transform var(--t-fast) var(--ease);
}
.project-card:hover .project-card__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ============================================================
   SECTION 5: QUOTE
   ============================================================ */

#quote {
  background: var(--bg);
  flex-direction: column;
  gap: var(--sp-8);
}

.quote__header {
  text-align: center;
}

.quote__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.quote__heading {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.quote__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-top: 2px solid var(--accent);
  padding: 48px 52px 44px;
  max-width: 900px;
  width: 100%;
  position: relative;
}

.quote__text {
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.9;
  color: var(--muted);
  margin: 0 0 32px;
  quotes: none;
}

.quote__author {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
}

/* ============================================================
   SECTION 7: CONTACT
   ============================================================ */

#contact {
  background: var(--surface);
  flex-direction: column;
  gap: var(--sp-6);
}

.contact__inner {
  max-width: 560px;
  width: 100%;
}

.contact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.contact__heading {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-1);
}

.contact__sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: var(--sp-6);
}

.form__group {
  margin-bottom: var(--sp-3);
}

.form__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}

.form__input,
.form__textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: var(--sp-2) var(--sp-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease);
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

/* Placeholder-Farbe */
.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--muted);
}

.form__submit {
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color var(--t-fast) var(--ease);
}

/* Fill-Effekt beim Hover */
.form__submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease);
  z-index: 0;
}

.form__submit:hover::before {
  transform: scaleX(1);
}

.form__submit:hover {
  color: var(--bg);
}

.form__submit span {
  position: relative;
  z-index: 1;
}

.contact__links {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.contact__link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  transition: color var(--t-fast);
  position: relative;
}

.contact__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--t-med) var(--ease);
}

.contact__link:hover {
  color: var(--accent);
}

.contact__link:hover::after {
  width: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* ============================================================
   UTILITY KLASSEN
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   LIGHT MODE — überschreibt CSS-Variablen wenn data-theme="light"
   ============================================================ */

[data-theme="light"] {
  --bg:         #f4f4ef;
  --surface:    #eaeae3;
  --border:     #d2d2ca;
  --text:       #111111;
  --muted:      #888888;
  --accent:     #5a9600;
  --accent-dim: rgba(90, 150, 0, 0.12);
}

[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

[data-theme="light"] .project-card__visual::after {
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--surface));
}

/* ============================================================
   SITE CONTROLS — Fixed bottom-right: Language + Theme
   ============================================================ */

.site-controls {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 8px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.35);
  transition: background var(--t-med), border-color var(--t-med);
}

.ctrl-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  line-height: 1.4;
  user-select: none;
}

.ctrl-btn:hover {
  color: var(--text);
}

.ctrl-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-btn {
  font-size: 13px;
  padding: 3px 8px;
}

.site-controls__sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 3px;
  flex-shrink: 0;
}

/* ============================================================
   SCROLL-REVEAL BASIS
   Elemente die per GSAP animiert werden starten unsichtbar.
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .about__svg-wrap {
    order: -1;
  }

  /* Value cards: 1 column on mobile */
  .about__values-grid {
    grid-template-columns: 1fr;
  }

  .about__val-card {
    gap: 16px;
    padding: 20px 16px;
  }

  .work__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills__viz {
    width: 100%;
    height: auto;
  }

  #skills {
    overflow: hidden;
  }

  .quote__card {
    padding: 32px 28px;
  }

  .quote__text {
    font-size: 14px;
  }

  .dot-nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .work__grid {
    grid-template-columns: 1fr;
  }
}
