/* ============================================
   Portfolio – Clean & Minimal
   ============================================ */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --text: #1a1d23;
  --text-muted: #5c6370;
  --border: #e7e9ee;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --green: #16a34a;
  --red: #dc2626;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 24, 38, 0.08);
  --hero-from: #fbfcfe;
  --hero-to: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.75);
  --mesh-1: rgba(37, 99, 235, 0.10);
  --mesh-2: rgba(34, 197, 94, 0.08);
  --max: 1120px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', var(--font);
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg: #0b0e14;
  --bg-alt: #11151f;
  --surface: #151b27;
  --surface-2: #1b2231;
  --text: #e8ecf3;
  --text-muted: #9aa6b8;
  --border: #262e3d;
  --accent: #6ea8ff;
  --accent-2: #4f8cff;
  --accent-soft: rgba(110, 168, 255, 0.14);
  --green: #34d399;
  --red: #f87171;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  --hero-from: #0b0e14;
  --hero-to: #0e121b;
  --nav-bg: rgba(11, 14, 20, 0.78);
  --mesh-1: rgba(110, 168, 255, 0.12);
  --mesh-2: rgba(52, 211, 153, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

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

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

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.scrolled {
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(20, 24, 38, 0.06);
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--accent);
}
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a { font-size: 15px; font-weight: 500; color: var(--text-muted); transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
  background: var(--surface);
}
.nav__cta:hover { border-color: var(--accent); color: var(--accent) !important; }

.nav__right { display: flex; align-items: center; gap: 18px; }

.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang__btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s, color .2s;
}
.lang__btn:hover { color: var(--text); }
.lang__btn.is-active { background: var(--accent); color: #fff; }
[data-theme="dark"] .lang__btn.is-active { color: #0b0e14; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; }

/* Dark-Mode-Schalter */
.theme {
  position: relative;
  width: 40px; height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  transition: border-color .2s, background .3s;
  overflow: hidden;
}
.theme:hover { border-color: var(--accent); }
.theme__icon {
  position: absolute;
  top: 3px;
  display: grid;
  place-items: center;
  width: 16px; height: 16px;
  color: var(--text-muted);
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .3s, color .2s;
}
.theme__icon--sun { left: 3px; }
.theme__icon--moon { right: 3px; }
/* Helles Theme: aktiv ist Sonne */
.theme .theme__icon--moon { transform: translateY(24px); opacity: 0; }
.theme .theme__icon--sun { transform: translateY(0); opacity: 1; color: #f59e0b; }
/* Dunkles Theme: aktiv ist Mond */
[data-theme="dark"] .theme .theme__icon--moon { transform: translateY(0); opacity: 1; color: #a78bfa; }
[data-theme="dark"] .theme .theme__icon--sun { transform: translateY(-24px); opacity: 0; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--hero-from), var(--hero-to));
}
.hero__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 400px at 80% 20%, var(--mesh-1), transparent 60%),
    radial-gradient(500px 380px at 15% 85%, var(--mesh-2), transparent 60%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__hello { color: var(--accent); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: .85rem; }
.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  font-weight: 700;
  line-height: 1.05;
  margin: .3em 0;
}
.hero__role { font-size: clamp(1.1rem, 3vw, 1.6rem); color: var(--text-muted); font-weight: 500; }
.hero__tagline { max-width: 560px; margin: 1.2em 0 2em; color: var(--text-muted); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero__down {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: .92rem;
}
.hero__down:hover { color: var(--accent); }
.hero__down-arrow {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  animation: down-bounce 1.8s ease-in-out infinite;
  transition: border-color .2s, background .2s;
}
.hero__down:hover .hero__down-arrow { border-color: var(--accent); background: var(--accent-soft); }
@keyframes down-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn--primary { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn--primary { background: var(--accent); color: #0b0e14; }
.btn--primary:hover { box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35); transform: translateY(-2px); }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sektionen ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.section__lead { max-width: 640px; color: var(--text-muted); margin-bottom: 40px; }

/* ---------- Über ---------- */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.about__text p { color: var(--text-muted); margin-bottom: 1em; }
.about__text p:first-child { color: var(--text); font-size: 1.1rem; }
.about__stats { display: flex; flex-direction: column; gap: 16px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  box-shadow: var(--shadow);
}
.stat__num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--accent); }
.stat__label { color: var(--text-muted); font-weight: 500; }

/* ---------- Skills ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s, box-shadow .25s;
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.skill-card h3 { font-family: var(--font-display); margin-bottom: 14px; font-size: 1.15rem; }
.skill-card ul { list-style: none; }
.skill-card li { color: var(--text-muted); padding: 6px 0 6px 22px; position: relative; }
.skill-card li::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Projekte ---------- */
.projects__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project-card__thumb { height: 160px; }
.project-card__body { padding: 24px; }
.project-card__body h3 { font-family: var(--font-display); margin-bottom: 8px; }
.project-card__body p { color: var(--text-muted); font-size: .95rem; }
.project-card__tags { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.project-card__tags span {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline__item { position: relative; margin-bottom: 40px; }
.timeline__item:last-child { margin-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -32px; top: 5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
}
.timeline__content h3 { font-family: var(--font-display); font-size: 1.2rem; }
.timeline__meta { display: block; color: var(--accent); font-weight: 600; font-size: .85rem; margin: 4px 0 8px; }
.timeline__content p { color: var(--text-muted); }

/* ---------- Minecraft ---------- */
.mc__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: transform .25s, box-shadow .25s;
}
.mc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.mc-card__icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border-radius: 14px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.mc-card h3 { font-family: var(--font-display); margin-bottom: 10px; }
.mc-card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 16px; }
.mc-card .link { color: var(--accent); font-weight: 600; font-size: .92rem; }
.mc-card .link:hover { text-decoration: underline; }

/* ---------- Lizenz ---------- */
.license__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.license-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.license-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.license-card--wide { grid-column: span 3; }

.license-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.license-card__head h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0; }

.license-card__icon {
  flex: none;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.license-card__icon--allowed { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.license-card__icon--denied  { color: var(--red);   background: color-mix(in srgb, var(--red) 12%, transparent); }

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

/* ---------- Kontakt ---------- */
.contact__inner { text-align: center; }
.contact__inner .section__title, .contact__inner .section__lead { margin-left: auto; margin-right: auto; }
.contact__row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--bg-alt); }
.footer .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer span { font-family: var(--font-display); font-weight: 700; color: var(--accent); }
.footer p { color: var(--text-muted); font-size: .9rem; }

/* ---------- Zurück nach oben ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 48px; height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .3s, transform .3s, visibility .3s, border-color .2s, background .2s, color .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--accent); color: var(--accent); }
.to-top:hover svg { animation: up-bounce 1s ease-in-out infinite; }
@keyframes up-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Sanfte Theme-Übergänge für Elemente */
.nav, .section, .section--alt, .stat, .skill-card, .project-card, .mc-card,
.license-card, .lang, .theme, .footer, .to-top {
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease,
              transform .25s, color .2s;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .skills__grid, .projects__grid, .mc__grid { grid-template-columns: 1fr 1fr; }
  .license__grid { grid-template-columns: 1fr 1fr; }
  .license-card--wide { grid-column: span 2; }
  .about__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .nav__links {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 260px;
    flex-direction: column;
    justify-content: center;
    background: var(--surface);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    gap: 24px;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__toggle { display: flex; }
  .nav__right { gap: 0; }
  .nav__toggle { z-index: 110; position: relative; }
  .skills__grid, .projects__grid, .mc__grid, .license__grid { grid-template-columns: 1fr; }
  .license-card--wide { grid-column: span 1; }
  .contact__row { flex-direction: column; align-items: center; }
}