/* Schrift, Farb-Tokens (hell/dunkel), Reset und Fokus kommen aus /shared/core.css.
   Hier nur, was die Landingpage zusaetzlich braucht. */

:root {
  --container: 1080px;
  --header-h: 68px;
  --node-line: rgba(26, 26, 28, 0.16);
  --node-dot: rgba(230, 57, 70, 0.55);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --node-line: rgba(242, 242, 244, 0.14);
  --node-dot: rgba(230, 57, 70, 0.75);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --node-line: rgba(242, 242, 244, 0.14);
    --node-dot: rgba(230, 57, 70, 0.75);
  }
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.sr-only,
.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px;
  width: auto; height: auto; clip: auto;
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 8px; z-index: 200;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-mark {
  width: 14px; height: 14px; border-radius: 5px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.logo-text { letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-menu a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-menu a:hover { color: var(--text); }
.nav-menu a.is-current { color: var(--text); }
.nav-menu a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
@media (max-width: 860px) {
  .nav-menu a.is-current::after { left: 0; right: auto; width: 18px; bottom: 6px; }
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(-15deg); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle-bar {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

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

.hero {
  position: relative;
  padding: clamp(72px, 14vw, 150px) 0 clamp(64px, 10vw, 120px);
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero-eyebrow {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.hero-title {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 20px;
}
.hero-subtitle {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-socials { display: flex; gap: 22px; list-style: none; flex-wrap: wrap; }
.hero-socials a {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); }

.hero-glow {
  position: absolute;
  top: -8%;
  right: -6%;
  width: min(620px, 60vw);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
.hero-glow circle.node-dot { fill: var(--node-dot); }
.hero-glow circle.node-hub { fill: var(--accent); }
.hero-glow line { stroke: var(--node-line); stroke-width: 1.5; }

@media (max-width: 860px) {
  .hero-glow { width: min(440px, 75vw); opacity: 0.7; }
}

.section { padding: clamp(64px, 11vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
}
.section-intro {
  margin: -28px 0 36px;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.skills-note {
  margin-top: 34px;
  max-width: 64ch;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.section-title {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 46px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 12px;
}

.about-text { max-width: 64ch; }
.about-text p { margin-bottom: 18px; color: var(--text-muted); }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 56px;
  margin-top: 40px;
}
.stat-row dt {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 500;
  line-height: 1;
  color: var(--text);
}
.stat-row dd {
  margin-top: 9px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { color: var(--text); border-color: var(--text-muted); }
.filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-top-color 0.2s ease;
}
.project-card:hover { border-top-color: var(--accent); }
.project-card.is-hidden { display: none; }
.grid-note { grid-column: 1 / -1; color: var(--text-muted); }

.project-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-thumb img { transform: scale(1.04); }

.project-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.project-tags span {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.project-tags span::before { content: "#"; color: var(--accent); }
.project-title { font-size: 1.25rem; letter-spacing: -0.01em; }
.project-desc { color: var(--text-muted); font-size: 0.95rem; flex: 1; }
.project-links { display: flex; gap: 18px; margin-top: 4px; }
.project-links a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.project-links a:hover { border-color: var(--accent); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.skill-group h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.skill-group ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.skill-group li { color: var(--text-muted); font-size: 0.95rem; }

.contact-list { max-width: 520px; margin-top: 40px; }
.contact-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.contact-list .contact-row:last-child { border-bottom: 1px solid var(--border); }
.contact-row dt {
  flex: none;
  width: 92px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.contact-row dd {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.contact-row a {
  font-family: var(--mono);
  font-size: 1.02rem;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact-row a:hover,
.contact-row a:focus-visible { color: var(--accent); border-color: var(--accent); }
#copyMail { cursor: pointer; }
#copyMail.is-done { color: var(--accent); border-color: var(--accent); }
.contact-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.notfound {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 40px 24px;
}
.nf-code {
  font-size: clamp(3.5rem, 14vw, 6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.notfound h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.notfound p:not(.nf-code) { color: var(--text-muted); max-width: 32rem; }
.notfound .btn { margin-top: 14px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.to-top { font-weight: 600; transition: color 0.2s ease; }
.to-top:hover { color: var(--accent); }

/* Impressum / Datenschutz / Nutzungsbedingungen */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
/* Startseite: eigene Zeile unter Copyright und "Nach oben" */
.footer-inner > .footer-links { order: 3; flex-basis: 100%; font-size: 0.85rem; }
.footer-links a, .legal-footer a { transition: color 0.2s ease; }
.footer-links a:hover, .legal-footer a:hover,
.footer-links a[aria-current="page"], .legal-footer a[aria-current="page"] { color: var(--accent); }

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 18px 24px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.legal-main + .legal-footer { border-top: 1px solid var(--border); }

/* 404/Wartung: Inhalt mittig, Footer am unteren Rand statt unter dem Falz */
body:has(> .notfound) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body:has(> .notfound) > .notfound { flex: 1; min-height: 0; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  .nav-menu.is-open { transform: translateY(0); }
  .nav-menu a { display: block; padding: 12px 0; font-size: 1.05rem; width: 100%; }
  .nav-menu li { width: 100%; }
  .theme-toggle { margin-top: 8px; }

  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-actions .btn { flex: 1; }
}
