@font-face {
    font-family: Poppins;
    src: url(Poppins/Poppins-Regular.ttf);
    font-weight: 400;
}

@font-face {
    font-family: Poppins;
    src: url(Poppins/Poppins-SemiBold.ttf);
    font-weight: 600;
}

@font-face {
    font-family: Poppins;
    src: url(Poppins/Poppins-Bold.ttf);
    font-weight: 700;
}

* {
    font-family:'Poppins'
}


/* ========== Design Tokens ========== */
:root {
  /* Default: Dark Mode */
  --bg: #0b0f1a;
  --panel: rgba(15,21,36,0.9);
  --panel-2: rgba(18,26,46,0.9);
  --text: #e6ebff;
  --muted: #a9b3d6;
  --brand: #5b8cff;
  --brand-2: #7a7dff;
  --accent: #39e1b6;
  --border: 1px solid rgba(255,255,255,0.08);
  --radius: 16px;
  --shadow: 0 10px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.03);

  --header-bg: rgba(10,14,25,0.6);
  --footer-bg: rgba(10,14,25,0.6);
  --card-bg: rgba(18,26,46,0.9);
  --link: var(--brand);
}

/* Light Mode */
:root[data-theme="light"] {
  --bg: #f5f6fb;
  --panel: rgba(255,255,255,0.95);
  --panel-2: rgba(249,250,255,0.95);
  --text: #1a1c26;
  --muted: #555e77;
  --brand: #355cff;
  --brand-2: #6a72ff;
  --accent: #1cc79f;
  --border: 1px solid rgba(0,0,0,0.06);
  --shadow: 0 6px 18px rgba(0,0,0,0.08);

  --header-bg: rgba(255,255,255,0.85);
  --footer-bg: #f3f4f6;
  --card-bg: rgba(255,255,255,0.95);
  --link: #2563eb;
}

/* ========== Base ========== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  /* WICHTIG: kein color-Transition mehr, nur Background darf weich wechseln */
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  will-change: background-color;
}


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

.container { width: min(1100px, 92%); margin: 0 auto; }

/* ========== Header ========== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background-color: var(--header-bg);
  border-bottom: var(--border);
  color: var(--text);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

/* --- Navigation Buttons --- */
.nav-btn {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease, color 0.3s ease;
  color: var(--muted);
}

.nav-btn:hover {
  background: rgba(123,116,255,0.1);
  transform: scale(1.05);
  color: var(--text);
}

.nav-btn[aria-current="page"] {
  background: rgba(123,116,255,0.18);
  color: var(--text);
}

/* main-nav default (desktop) */
.main-nav { display: flex; gap: 1rem; font-weight: 600; }

/* ========== Theme Toggle Button ========== */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem; /* behält dein rechteckiges Layout */
  border-radius: 0.5rem; /* deine Rundung */
  background: var(--card);
  cursor: pointer;
  border: 1px solid var(--border);
}

/* Icons übereinander legen */
.theme-toggle .icon {
  position: absolute;
  font-size: 1.2rem;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

/* Lightmode: Sonne sichtbar */
:root[data-theme="light"] .theme-toggle .sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
:root[data-theme="light"] .theme-toggle .moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Darkmode: Mond sichtbar */
:root[data-theme="dark"] .theme-toggle .sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
:root[data-theme="dark"] .theme-toggle .moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.theme-toggle:hover {
  background: rgba(123,116,255,0.1);
  transform: scale(1.05);
}

/* Buchstaben beim Tippen */
.typed-letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

/* Hover Effekt für jeden Buchstaben */
.typed-letter:hover {
    transform: translateY(-3px) scale(1.05);
    color: var(--brand);
}

/* Fester Cursor */
.typing-cursor {
    display: inline-block;
    font-weight: bold;
    color: var(--brand);
    margin-left: 0.05em;
}

/* Emoji */
.emoji {
    display: inline-block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: inherit;
    margin-left: 0.3em; /* Abstand zum Text */
}

/* ========== Hero ========== */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 40px;
  border-bottom: var(--border);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--muted);
}

.hero-cta .btn {
  display: inline-block;
  padding: 0.9rem 1.3rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.hero-cta .btn:hover { transform: scale(1.05); }

/* === Scroll Fade-In === */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === About Section === */
#about p {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 800px;
}

.hero-inner { text-align: center; }
.hero-inner h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.hero-inner h2 {
  color: var(--text);
}
.hero-inner p {
  color: var(--muted);
}
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.2; margin: 0 0 .5rem; }
.hero p { margin: 0 auto 1.2rem; max-width: 720px; color: var(--muted); }

.grad { position: absolute; filter: blur(60px); opacity: .7; }
.grad-1 { width: 380px; height: 380px; background: radial-gradient(circle at 30% 30%, #7a7dff, transparent 60%); top: -60px; left: -60px; }
.grad-2 { width: 420px; height: 420px; background: radial-gradient(circle at 70% 30%, #5b8cff, transparent 60%); top: -80px; right: -80px; }

.grad-1, .grad-2 {
    will-change: transform;
    transition: transform 0.1s linear; /* optional für extra Glätte */
}

/* ========== Main Content Flex ========== */
main {
  flex: 1; /* füllt den Raum zwischen Header und Footer */
}

/* ========== Sections & Cards ========== */
.section { padding: 40px 0 80px; }
.section-title { font-size: 1.6rem; margin: 0 0 1rem; }
.card-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }

.card {
  position: relative;
  overflow: hidden;
  background-color: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: grid;
  gap: .4rem;
  transform: scale(1);
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(123,116,255,0.1);
  opacity: 0;
  border-radius: var(--radius);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::before { opacity: 1; }

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}

.card h3 { margin: .1rem 0; }
.card p { color: var(--muted); margin: 0; }

.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: #0b0f1a;
  background: var(--accent);
  padding: .2rem .6rem;
  border-radius: 999px;
  font-weight: 700;
  width: max-content;
  height: 1.6rem;
}

.card-link {
  margin-top: .2rem;
  font-weight: 600;
  color: var(--link);
  opacity: .85;
  transition: color 0.3s ease;
}

@media (min-width: 640px){ .card{ grid-column: span 6; } }
@media (min-width: 960px){ .card{ grid-column: span 4; } }

/* ========== Course pages ========== */
.lead { color: var(--muted); margin-top: .2rem; }
.breadcrumb { display: inline-block; margin-bottom: .6rem; color: var(--muted); }
.info-grid { display: grid; gap: 1rem; margin: 1.2rem 0 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 860px){ .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info-card {
  background-color: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  color: inherit;
}

.link-list a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.3s ease;
}
.link-list a:hover { color: var(--brand-1);}
.info-card h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin: .3rem 0; }

/* ========== Table ========== */
.table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: var(--border);
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  color: inherit;
}

.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td {
  padding: .75rem .9rem; border-bottom: 1px solid rgba(255,255,255,0.06); text-align: left;
}
.table thead th {
  position: sticky; top: 0; background-color: var(--header-bg); backdrop-filter: blur(6px);
  font-size: .9rem; letter-spacing: .02em;
}
.table tbody tr:hover { background: rgba(123,116,255,0.08); }
.table tbody tr:last-child td { border-bottom: none; }

/* ========== Footer ========== */
.site-footer {
  border-top: var(--border);
  background-color: var(--footer-bg);
  color: inherit;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 72px;
  color: var(--muted);
}
.footer-inner a { color: var(--link); transition: color 0.3s ease; }
.footer-inner a:hover { color: var(--brand-1); transition: color 0.3s ease; }

/* ========== Utilities ========== */
.btn { cursor: pointer; }

/* === Page Transition === */
body {
  opacity: 0;
  transform: translateY(15px);
}

body.page-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================
   Fade-In beim ersten Laden, nicht beim Theme-Wechsel
   ===================================== */
.fade-in {
  opacity: 1;               /* sichtbar standardmäßig */
  transform: translateY(0); /* Position normal */
  transition: none;         /* keine Animation beim Theme-Wechsel */
}

/* Klasse für initiales Scroll- oder Page-Load-Fade */
.fade-in.initial {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.7s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== MOBILE-SPECIFIC: Anpassungen & Hamburger ========== */
@media (max-width: 640px) {

  .menu-toggle {
    display: block;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.3rem 0.6rem;
    z-index: 100;
  }

  /* Mobile Nav Animation */
  .main-nav {
    flex-direction: column;
    gap: 0.8rem;
    background: var(--panel);
    padding: 0 1rem;       /* nur horizontales padding initial */
    border-bottom: var(--border);
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;

    /* Animation */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.25s ease;
  }

  /* Menü offen */
  .main-nav.open {
    display: flex;
    max-height: 500px;       /* genug Platz für alle Links */
    opacity: 1;
    padding-top: 1rem;      /* jetzt Padding einblenden */
    padding-bottom: 1rem;
  }
}

/* Sicherstellen: Desktop Anzeige wie gehabt */
@media (min-width: 641px) {
  .menu-toggle { display: none; }
  .site-header .main-nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    gap: 1rem;
    padding: 0;
    background: transparent;
    border: none;
    max-height: none;
    opacity: 1;
  }
}


/* ===== Mobile Navigation mit Animation ===== */
@media (max-width: 640px) {
  .menu-toggle {
    display: block;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.3rem 0.6rem;
    z-index: 100;
  }

  .main-nav {
    flex-direction: column;
    gap: 0.8rem;
    background: var(--panel);
    padding: 0 1rem; /* erst padding horizontal */
    border-bottom: var(--border);
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;

    /* Animation */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.25s ease;
  }

  .main-nav.open {
    display: flex;
    max-height: 500px; /* genug Platz */
    opacity: 1;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

   /* Cards: eine Spalte, volle Breite */
  .card-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .card {
    width: 100%;
    padding: 1rem;
  }

  /* Karteninhalt evtl. Textgröße anpassen */
  .card h3 {
    font-size: 1.1rem;
  }

  .card p {
    font-size: 0.95rem;
  }

  .card-link {
    font-size: 0.95rem;
  }
}


/* Überschriften: niemals faden beim Theme-Switch */
h1, h2, h3, h4, h5, h6, strong, p,
.section-title {
  color: var(--text) !important;
  transition-property: none !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}



/* -----------------------
   Theme toggle icon animation (Sun <-> Moon)
   Paste near the end of style.css
   ----------------------- */

/* Screen-reader helper */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Keep button layout (non-round) — adapt to your visual style */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.8rem;
  border-radius: 10px;            /* behalte dein Aussehen */
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

/* small container so icons overlap perfectly */
.theme-toggle .icon-wrap {
  position: relative;
  width: 1.2rem;
  height: 1.2rem;
  display: inline-block;
}

/* Icons positioned exactly on top of each other */
.theme-toggle .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(0.9);
  display: inline-block;
  line-height: 1;
  font-size: 1.05rem;
  transition: opacity .30s ease, transform .42s cubic-bezier(.2,.9,.2,1);
  will-change: opacity, transform;
  pointer-events: none;
}

/* Light mode: sun visible, moon hidden */
:root[data-theme="light"] .theme-toggle .sun {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}
:root[data-theme="light"] .theme-toggle .moon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-40deg) scale(.6);
}

/* Dark mode: moon visible, sun hidden */
:root[data-theme="dark"] .theme-toggle .sun {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(40deg) scale(.6);
}
:root[data-theme="dark"] .theme-toggle .moon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* small "burst" micro animation when toggled: add class via JS briefly */
.theme-toggle.animate .icon.sun {
  transition: opacity .28s ease, transform .36s cubic-bezier(.18,.9,.32,1);
}
.theme-toggle.animate .icon.moon {
  transition: opacity .28s ease, transform .36s cubic-bezier(.18,.9,.32,1);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .theme-toggle .icon { transition: none !important; }
}