@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700&display=swap');

/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
  --bg-base:        #FAF7F0;
  --bg-surface:     #F3EDE2;
  --bg-contact:     #EDE5D4;
  --accent-primary: #D97757;
  --accent-dark:    #C05F3F;
  --text-primary:   #1A1714;
  --text-muted:     #8C857A;
  --glass-bg:       rgba(255, 253, 248, 0.75);
  --glass-border:   rgba(217, 119, 87, 0.2);
  --border:         #E7DED0;
  --nav-height:     72px;
  --container-max:  1100px;
  --radius:         12px;
  --ease:           0.3s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

ul  { list-style: none; }
a   { text-decoration: none; color: inherit; }
svg { display: block; }

/* ─── Canvas ────────────────────────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ─── Utilities ─────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 6rem 0; }

.section-label {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  color: var(--accent-primary);
  letter-spacing: 0.12em;
  margin-bottom: 2.5rem;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}

.btn--primary {
  background: var(--accent-primary);
  color: #fff;
}

.btn--primary:hover {
  box-shadow: 0 0 28px rgba(217, 119, 87, 0.45);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.btn--ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glass-bg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  z-index: -1;
}

.btn--ghost:hover::before  { transform: scaleX(1); }
.btn--ghost:hover          { border-color: var(--accent-primary); box-shadow: 0 0 16px rgba(217,119,87,0.2); }
.btn--large                { padding: 1rem 2.5rem; font-size: 1rem; }

/* ─── Reveal ────────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Navigation ────────────────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--ease), backdrop-filter var(--ease), border-color var(--ease);
}

#site-header.scrolled {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(250, 247, 240, 0.92);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav__logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--accent-primary) 30%, var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity var(--ease);
}
.nav__logo:hover { opacity: 0.75; }

.nav__links { display: flex; gap: 2.5rem; }

.nav__link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--ease);
}

.nav__link:hover,
.nav__link.active              { color: var(--accent-primary); }
.nav__link:hover::after,
.nav__link.active::after       { width: 100%; }

/* Burger button */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Burger → X when open */
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(250, 247, 240, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.is-open { transform: translateY(0); }

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.mobile-menu__link {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  transition: color var(--ease);
}
.mobile-menu__link:hover { color: var(--accent-primary); }

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: fadeUp 0.9s ease-out both;
}

.hero__tag {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--accent-primary);
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.hero__name {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 55%, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 480px;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  opacity: 0.5;
  animation: bounce 2.2s ease-in-out infinite;
}

/* ─── Skills ────────────────────────────────────────────────────────────── */
.skills { text-align: center; }

.skills__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.skill-badge:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(217, 119, 87, 0.2);
  border-color: rgba(217, 119, 87, 0.4);
}

.skill-badge__icon {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* ─── Leistungen ────────────────────────────────────────────────────────── */
.leistungen__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.leistung-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: 0 2px 20px rgba(26, 23, 20, 0.07);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.leistung-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 32px rgba(26, 23, 20, 0.12);
  border-color: rgba(217, 119, 87, 0.3);
}

.leistung-card__icon {
  width: 28px;
  height: 28px;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
}

.leistung-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.leistung-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.65;
}

/* ─── Über mich ─────────────────────────────────────────────────────────── */
.ueber-mich { text-align: center; }

.ueber-mich__content {
  display: inline-flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 600px;
  text-align: left;
}

.ueber-mich__bar {
  flex-shrink: 0;
  width: 3px;
  align-self: stretch;
  min-height: 64px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-dark));
  border-radius: 2px;
}

.ueber-mich__content p {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.85;
}

/* ─── Kontakt ───────────────────────────────────────────────────────────── */
.kontakt {
  background: var(--bg-contact);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.kontakt__heading {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.kontakt__sub {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 2.5rem;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__inner nav { display: flex; gap: 1.5rem; }

.footer__inner nav a {
  color: var(--text-muted);
  transition: color var(--ease);
}
.footer__inner nav a:hover { color: var(--accent-primary); }

/* ─── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links  { display: none; }
  .nav__burger { display: flex; }

  .leistungen__grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .leistungen__grid { grid-template-columns: 1fr; }

  .hero__actions { flex-direction: column; align-items: center; }

  .ueber-mich__content {
    flex-direction: column;
    gap: 1rem;
  }

  .ueber-mich__bar {
    width: 40px;
    height: 3px;
    min-height: unset;
    align-self: auto;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-dark));
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ─── Modal ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 23, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out both;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: #FAF7F0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(26, 23, 20, 0.18);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-surface);
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease), color var(--ease);
  flex-shrink: 0;
}
.modal__close:hover { background: var(--border); color: var(--text-primary); }

.modal__body {
  padding: 1.75rem 2rem 2rem;
  overflow-y: auto;
  line-height: 1.75;
  color: var(--text-primary);
}

.modal__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.modal__body h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin: 1.5rem 0 0.5rem;
}

.modal__body h3:first-of-type { margin-top: 0; }

.modal__body p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.modal__body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.modal__body ul li { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.25rem; }

.modal__body a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; }
.modal__body a:hover { color: var(--accent-dark); }

.modal__body strong { color: var(--text-primary); font-weight: 600; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: var(--radius) var(--radius) 0 0; }
}
