/*
 * hosting@schüri Stylesheet
 * Design-Konzept: Dunkles Layout wie bei der Schwesterseite lucee@schüri, aber eigene
 * Marke — Grün/Sky statt Violett/Cyan, damit beide Seiten verwandt, nicht verwechselbar sind.
 */

@import url('/web-libs/fonts/fonts.css');

:root {
  /* Farbpalette */
  --bg-color: #080f14;
  --bg-card: rgba(15, 28, 30, 0.5);
  --bg-card-hover: rgba(22, 40, 42, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);

  --primary: #22c55e; /* Gruen */
  --primary-glow: rgba(34, 197, 94, 0.15);
  --secondary: #38bdf8; /* Sky */
  --secondary-glow: rgba(56, 189, 248, 0.15);
  --accent: #14b8a6; /* Teal */
  --accent-glow: rgba(20, 184, 166, 0.15);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;

  /* Schriftarten */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Sonstiges */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glow: 0 0 25px rgba(34, 197, 94, 0.2);
}

/* CSS-Reset & Basis-Styling */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Zusammen mit dem overflow des body: Erst wenn html den Wert an den Viewport abgibt,
     clippt der body wirklich selbst und die absolut positionierten Deko-Blobs weiten das
     Layout nicht mehr auf. Steht es nur am body, gilt der selbst als "visible". */
  overflow-x: hidden;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  /* clip statt hidden: hidden auf EINER Achse zwingt die Gegenachse auf "auto", der body
     wird damit zu einem eigenen Scrollcontainer und alles, was unter ihn ragt (ein Blob mit
     bottom: -5% genügt), erzeugt einen zweiten senkrechten Scrollbalken. clip klippt
     identisch, ohne Scrollcontainer zu werden. Beleg: Rule frontend-web.md. */
  overflow: clip;
  position: relative;
}

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

/* Skip-Link: erst bei Tastaturfokus sichtbar. Über dem sticky Header (z-index 100), der im
   DOM danach kommt und ihn sonst verdeckt. Dunkle Schrift, weil Weiß auf dem Grün
   nicht genug Kontrast hat. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 101;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--bg-color);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* Scrollbar Anpassung */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Interaktiver Canvas-Hintergrund */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* Deko-Blobs für atmosphärischen Glow */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
  animation: float-blob 20s infinite ease-in-out alternate;
}

.blob-1 {
  top: 8%;
  left: 12%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.blob-2 {
  top: 48%;
  right: 8%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  animation-delay: -5s;
}

.blob-3 {
  bottom: 2%;
  left: 18%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation-delay: -10s;
}

@keyframes float-blob {
  0% { transform: translate(0, 0); }
  50% { transform: translate(30px, -40px); }
  100% { transform: translate(-20px, 30px); }
}

/* Layout-Grundlagen */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 86px 0;
  position: relative;
}

.section-tight {
  padding: 40px 0;
}

.section-header {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

h1, h2, h3, h4 {
  font-family: var(--font-headings);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
}

.gradient {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

/* Header / Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 0;
  transition: var(--transition-smooth);
}

header.scrolled {
  padding: 10px 0;
  background: rgba(8, 15, 20, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo, .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 600;
}

.logo svg, .footer-logo svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.logo .logo-accent {
  color: var(--secondary);
}

.footer-logo .logo-accent {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-main);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px;
}

/* Schaltflächen */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-headings);
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #04120b;
  border: 1px solid transparent;
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  padding-top: 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
}

/* Grid-Kinder haben min-width: auto und werden nie schmaler als ihr breitester
   unumbrechbarer Inhalt — ohne diese Zeile weitet eine lange Zeile das Layout auf. */
.hero-grid > * {
  min-width: 0;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.hero-text p {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 1.06rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.hero-card-badge {
  font-family: var(--font-headings);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-card-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.hero-card-body {
  padding: 8px 18px;
}

.status-list {
  list-style: none;
}

.status-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.status-list li:last-child {
  border-bottom: none;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  flex-shrink: 0;
}

.status-name {
  font-family: var(--font-headings);
  overflow-wrap: anywhere;
}

.status-state {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hero-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Kennzahlen */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
}

.stat-item {
  min-width: 0;
  text-align: center;
}

.stat-number {
  font-family: var(--font-headings);
  font-size: 1.9rem;
  font-weight: 600;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Projekte */
.project-grid {
  display: grid;
  /* min() haelt die Spalte auf schmalen Geraeten kleiner als ihre Mindestbreite —
     sonst bleibt sie 320px breit, auch wenn der Container nur 312px hat. */
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
}

.project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  color: var(--primary);
}

/* The platform favicons are 16x16 px; an exact 2x keeps every pixel square,
   pixelated keeps the edges sharp instead of blurring them. */
.project-icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.project-card h3 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.project-tag, .skill-tag {
  padding: 5px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--primary);
  font-family: var(--font-headings);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.project-link:hover {
  gap: 12px;
}

/* Geschichte / Zeitleiste */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  top: 6px;
  left: -32px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px var(--primary-glow);
}

.timeline-year {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--secondary);
  font-family: var(--font-headings);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.timeline-content p {
  color: var(--text-muted);
}

/* Leistungen */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.service-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--secondary-glow);
  color: var(--secondary);
}

.service-card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* Über mich */
.about-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 36px;
  max-width: 920px;
  margin: 0 auto;
  padding: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.about-card > * {
  min-width: 0;
}

.about-avatar {
  width: 140px;
  height: 140px;
  border: 2px solid var(--border-color-hover);
  border-radius: 50%;
  object-fit: cover;
}

.about-text h2 {
  margin-bottom: 12px;
}

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

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  list-style: none;
}

.about-text .about-social {
  justify-content: flex-start;
  margin-top: 20px;
}

/* Kontakt: das Formular gestaltet /web-libs/css/contact-form.css (bindet das Modul
   ui/contact-form selbst ein) und liest dafür die Tokens aus :root. */

/* Footer */
footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Runde Symbol-Links (Über mich) und Pillen mit Namen (Schwesterseiten im Footer) */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.social-icon:hover {
  color: var(--text-main);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

.site-link {
  width: auto;
  gap: 8px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-link-accent {
  color: var(--primary);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* Legal links and copyright belong together: pulls the second row up from the 18px flex gap
   to 6px */
.copyright + .copyright {
  margin-top: -12px;
}

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

.copyright a:hover {
  color: var(--text-main);
}

/* Scroll-Reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .glow-blob {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Rechtsseiten aus cf-shared.
   Das Markup der geteilten Module setzt Bootstrap voraus (py-5, mb-4, h4 ...). Diese App
   bindet kein Bootstrap ein, deshalb werden hier genau die genutzten Stufen nachgebaut —
   sonst erbt jeder <section>-Abschnitt das section { padding: 100px 0 } von oben. */
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.legal-page section {
  padding: 0;
  margin-bottom: 32px;
}

.legal-page h1 {
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  margin-bottom: 24px;
}

.legal-page h2,
.legal-page .h4 {
  font-family: var(--font-headings);
  font-size: 1.16rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page li {
  color: var(--text-muted);
}

.legal-page p {
  margin-bottom: 12px;
}

.legal-page ul,
.legal-page ol {
  margin: 0 0 16px 20px;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page .py-5 {
  padding: 0;
}

.legal-page .mb-4 {
  margin-bottom: 24px;
}

.legal-page .mb-1 {
  margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text p {
    max-width: none;
  }

  .about-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .skill-tags,
  .about-text .about-social {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  section {
    padding: 72px 0;
  }

  .menu-btn {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
    background: rgba(8, 15, 20, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    display: none;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  header {
    position: sticky;
  }

  .nav-container {
    position: relative;
  }

  .glow-blob {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stats-row {
    padding: 22px 16px;
  }

  .project-card, .service-card, .about-card {
    padding: 22px;
  }
}
