/* =========================
Design System
========================== */
:root {
  /* Background */
  --bg: #1b1822;

  /* Border */
  --border: rgba(255, 255, 255, 0.1);

  /* Text Hierarchie */
  --text: rgba(255, 255, 255, 0.78);
  --text-strong: rgba(255, 255, 255, 0.94);
  --text-soft: rgba(255, 255, 255, 0.58);
  --text-faint: rgba(255, 255, 255, 0.42);

  /* Links/Nav */
  --text-nav: rgba(255, 255, 255, 0.62);

  /* Accent */
  --accent: #ff8a3d;

  /* Extra Ink - blaugrauer Kontrastton für Headlines / Key-Text */
  --headline-ink: #282342;

  /* Typography */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Motion */
  --t-fast: 200ms;
  --t-med: 600ms;
  --t-slow: 900ms;
  --ease: ease;

  /* globale Typo-Skalierung (nur Schriftgröße) */
  --ui-scale: 1.12;
}

/* =========================
Base
========================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: calc(16px * var(--ui-scale));
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.6;

  background: radial-gradient(circle at top, #603a57, #8b85c2);

  color: var(--text);
  font-size: 1rem;
}

a {
  color: inherit;
}

/* =========================
Global Scroll /Anchor
========================= */

/* Beim Springen zu Ankern: oben etwas Luft */
.block,
.footer,
:target {
  scroll-margin-top: 24px;
}

/* =========================
Canvas Layer
========================= */
#thoughts {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  /* Canvas ist nur sichtbar.. wenn active (Hover / Tap) */
  opacity: 0;
  transition: opacity 300ms ease;
}

body.active #thoughts {
  opacity: 1;
}

.thoughts-intro {
  margin: 1.2rem 0 2.2rem;
  max-width: 38rem;
}

.thoughts-intro p {
  margin: 0 0 0.9rem;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.65;
  letter-spacing: 0.015em;
}

.thoughts-intro p:last-child {
  margin-bottom: 0;
}

/* =========================
Layout
========================= */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 72px;
  position: relative;
  z-index: 2;
}

/* =========================
Navigation (oben: dezent)
========================= */
.nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.nav a {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.55);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition:
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.nav a:hover {
  color: rgba(255, 255, 255, 0.92);
  border-bottom-color: currentColor;
}

/* =========================
Hero
========================= */
.role {
  margin: 0 0 22px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: 0.65;
  border-left: 2px solid rgba(0, 0, 0, 0.25);
  padding-left: 12px;
}

.hero {
  padding-bottom: 3rem;
}

.hero h1 {
  margin: 0;

  /* größer, aber sauber ohne „vw * var()“-Lint-Probleme */
  font-size: clamp(3.25rem, 6vw, 4.75rem);

  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--text-strong);
  -webkit-font-smoothing: antialiased;
}

/* Kein Umbruch auf Desktop.. damit der Titel nicht springt */
@media (min-width: 560px) {
  .hero h1 {
    white-space: nowrap;
  }
}

.hero-intro {
  margin: 42px 0 0;
  max-width: 32rem;

  font-size: 0.98rem;
  line-height: 1.5;
  letter-spacing: 0.015em;

  color: var(--text);

  opacity: 0.92;

  border-left: 1px solid var(--border);
  padding-left: 12px;

  transition: color 400ms ease;
}

body.active .hero-intro {
  color: var(--accent);
  opacity: 0.7;
  /*margin-top: 48px; optional: etwas mehr Abstand.. wenn die Reveal da ist*/
}

/* =========================
Tagline + Reveal (Text Shimmer)
========================= */

.tagline {
  margin: 14px 0 0;
  position: relative;
  z-index: 5;
  color: var(--headline-ink);
  display: inline-block;
  width: fit-content;
}

.tagline-base {
  position: relative;
  display: inline-block;

  white-space: nowrap;

  font-size: 1.5rem;
  font-weight: 650;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Schimmer / Lichtreflex */
.tagline-base::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    110deg,
    transparent 40%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 60%
  );

  transform: translateX(-35%);
  opacity: 0;

  pointer-events: none;

  transition:
    opacity 200ms ease,
    transform 650ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .tagline-base:hover::before {
    opacity: 0.6;
    transform: translateX(20%);
  }
}

.tagline-base:focus-visible {
  outline: none;
}

/* Reveal */

.tagline-reveal {
  display: block;
  margin-top: 10px;

  font-size: 2.25rem;
  line-height: 1.15;

  opacity: 0;
  transform: translateY(10px);

  transition:
    opacity var(--t-med) var(--ease),
    transform var(--t-med) var(--ease);
}

body.active .tagline-reveal {
  opacity: 1;
  transform: translateY(0);
  font-weight: 700;
}

/* Fokus-Zustand: nur Hero sichtbar */

body.active .wrap > *:not(.hero) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

/* =========================
Content Blocks
========================= */
.block {
  margin-top: 44px;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.72);
}

h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.18);
}

p {
  margin: 0 0 12px;
}

.muted {
  color: var(--text-soft);
}

/* =========================
Cards / Projekte (Editorial)
========================= */
.card {
  border: 0;
  border-radius: 0;
  padding: 18px 0;
  margin-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.card:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
  color: var(--headline-ink);
}

/* Marker aus */
.card summary::-webkit-details-marker {
  display: none;
}

/* beim Öffnen mehr Luft */
.card[open] summary.card-title {
  margin-bottom: 14px;
}

/* kleines Plus/Minus rechts */
.card summary.card-title::after {
  content: "+";
  float: right;
  opacity: 0.35;
  font-weight: 600;
}

.card[open] summary.card-title::after {
  content: "–";
}

/* =========================
Projekt-Abschnitte
========================= */
.project-section {
  margin-top: 1.5rem;
}
.project-section:first-of-type {
  margin-top: 0;
}

.project-section h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--headline-ink);
}

.project-section p,
.project-section ul {
  margin-top: 0.5rem;
}

/* =========================
Screenshots
========================= */
.project-media {
  margin-top: 2rem;
}

.screenshot {
  margin: 1.2rem 0;
}

.screenshot img {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.screenshot figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* =========================
Heart Study (Canvas in Card)
========================= */
.heart-canvas-wrap {
  margin-top: 16px;
  width: 100%;
  height: clamp(220px, 34vh, 340px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  border-radius: 12px;

  /* standardmäßig „zu“ */
  display: none;
}

.heart-canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

#heartCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Nur wenn die Details-Card offen ist: Canvas anzeigen */
.heart-card[open] .heart-canvas-wrap {
  display: block;
}

/* =========================
Growing Lines (Canvas in Card) – eigenständig
========================= */
.lines-canvas-wrap {
  margin-top: 16px;
  width: 100%;
  height: clamp(220px, 34vh, 340px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  border-radius: 12px;

  /* standardmäßig unsichtbar.. wie beim Herz */
  display: none;
}

/* Subtiles Glass / Glow Layer */
.lines-canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

#linesCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Nur wenn die Lines-Card offen ist: Canvas anzeigen */
.lines-card[open] .lines-canvas-wrap {
  display: block;
}

/* Optional: leichtes Feedback beim Hover */
.lines-canvas-wrap:hover {
  filter: brightness(1.02);
}

/* =========================
Breathing Study (Canvas in Card)
========================= */
.breathing-canvas-wrap {
  margin-top: 16px;
  width: 100%;
  height: clamp(220px, 34vh, 340px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  border-radius: 12px;

  /* standardmäßig „zu“ */
  display: none;
}

/* Subtiles Glass / Glow Layer */
.breathing-canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

#breathingCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Nur wenn die Breathing-Card offen ist: Canvas anzeigen */
.breathing-card[open] .breathing-canvas-wrap {
  display: block;
}

/* Optional: leichtes Feedback beim Hover */
.breathing-canvas-wrap:hover {
  filter: brightness(1.02);
}

/* =========================
Hint unter dem Canvas (für alle)
========================= */
.canvas-hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* =========================
Footer (blass)
========================= */
.footer {
  margin-top: 56px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.footer a:hover {
  color: rgba(0, 0, 0, 0.7);
  border-bottom-color: currentColor;
}

/* =========================
Scroll Fade-in
========================= */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 800ms ease,
    transform 800ms ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
Codepen-Link unter Studies
========================= */

.codepen-section {
  margin-top: 3rem;
  padding: 1.6rem 0;

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.codepen-inner {
  max-width: 32rem;
}

.codepen-text {
  margin: 0;

  font-size: 0.92rem;
  line-height: 1.6;
  letter-spacing: 0.01em;

  color: var(--text-faint);
}

.codepen-text a {
  color: inherit;
  text-decoration: none;

  border-bottom: 1px solid rgba(255, 255, 255, 0.2);

  transition:
    color 300ms ease,
    border-color 300ms ease;
}

.codepen-text a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================
Kontakt Links (wie Navigation)
========================= */
.contact-links {
  margin-top: 10px;
  display: flex;
  gap: 18px;
}

.contact-links a {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-decoration: none;

  padding-bottom: 4px;
  border-bottom: 1px solid transparent;

  transition:
    color 200ms ease,
    border-color 200ms ease;
}

.contact-links a:hover {
  color: rgba(255, 255, 255, 0.92);
  border-bottom-color: currentColor;
}
