/* ==========================================================================
   Ferhan Sevim — Portfolio
   1. Fonts   2. Tokens   3. Base   4. Layout   5. Components   6. Sections
   7. Footer  8. Motion   9. Dark theme  10. Responsive
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: Sora;
  src: url("sora.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("jetbrains-mono.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* 2. Tokens --------------------------------------------------------------- */
:root {
  --mist: #f0e6da;
  --mist-light: #faf6f0;
  --mist-dark: #ddd0bf;
  --teal: #415b06;
  --teal-rgb: 65, 91, 6;
  --teal-mid: #557210;
  --teal-light: #6a8c1a;
  --teal-dark: #293803;
  --sand: #a89070;

  --bg: var(--mist);
  --surface: hsla(33, 42%, 90%, 0.6);
  --surface-strong: hsla(33, 42%, 90%, 0.82);
  --text: #1e1a14;
  --text-mid: #4a3e2e;
  --text-muted: var(--sand);
  --border: rgba(65, 91, 6, 0.16);

  --shadow-xs: 0 1px 4px rgba(41, 56, 3, 0.08);
  --shadow-sm: 0 2px 12px rgba(41, 56, 3, 0.1);
  --shadow-md: 0 8px 32px rgba(41, 56, 3, 0.14);
  --shadow-lg: 0 24px 64px rgba(41, 56, 3, 0.18);

  --font-body: Sora, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-full: 9999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}

/* 3. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -8%, rgba(65, 91, 6, 0.07), transparent 70%),
    radial-gradient(ellipse 60% 45% at 85% 105%, rgba(65, 91, 6, 0.05), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; font-weight: 750; letter-spacing: -0.03em; }
p { line-height: 1.75; color: var(--text-mid); }
a { color: inherit; text-decoration: none; }
img, iframe { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--teal); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--mist-dark); }
::-webkit-scrollbar-thumb { background: var(--teal-mid); border-radius: var(--r-full); }

:focus-visible { outline: 2px solid var(--teal-mid); outline-offset: 3px; }

.skip-link {
  position: fixed; top: -80px; left: 1rem; z-index: 1000;
  padding: .75rem 1rem; border-radius: var(--r-sm);
  background: var(--teal); color: #fff; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* 4. Layout --------------------------------------------------------------- */
.starfield { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.star {
  position: absolute; border-radius: 50%; opacity: .18;
  background: var(--teal-mid); box-shadow: 0 0 8px rgba(var(--teal-rgb), .52);
  animation: twinkle 5s ease-in-out infinite;
}
.main-content, .site-footer { position: relative; z-index: 1; }
.main-content { padding-top: 72px; }

.section { max-width: 1200px; margin: 0 auto; padding: 7rem 2rem; scroll-margin-top: 80px; }
.section-heading {
  position: relative; display: inline-block; margin-bottom: 1rem;
  color: var(--teal-dark); font-size: clamp(2.15rem, 4.5vw, 3.2rem);
}
.section-heading::after {
  content: ""; position: absolute; left: 50%; bottom: -12px;
  width: 52px; height: 4px; transform: translateX(-50%);
  border-radius: 2px; background: linear-gradient(90deg, var(--teal), var(--teal-light));
}
.about-template-header, .projects-template-header, .contact-template-header {
  position: relative; z-index: 1; margin-bottom: 2.8rem; text-align: center;
}
.hero-eyebrow, .section-kicker, .projects-template-eyebrow,
.contact-template-eyebrow, .about-tile-eyebrow {
  margin-bottom: 1rem; color: var(--teal-mid);
  font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .22em;
}

/* Navbar */
.navbar { position: fixed; inset: 0 0 auto; z-index: 100; padding: 1.1rem 0; pointer-events: none; }
.navbar-inner {
  position: relative; max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: center;
}
.navbar-pill {
  pointer-events: auto; display: flex; align-items: center; gap: .2rem;
  padding: .45rem; border-radius: var(--r-full);
  background: var(--surface-strong); border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(180%); box-shadow: var(--shadow-sm);
}
.nav-pill-link {
  position: relative; z-index: 1; padding: .5rem 1rem; border-radius: var(--r-full);
  color: var(--text-muted); font-size: .72rem; font-weight: 750;
  text-transform: uppercase; letter-spacing: .12em; transition: color .2s;
}
.nav-pill-link::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; background: var(--teal); opacity: 0; transition: opacity .2s;
}
.nav-pill-link:hover, .nav-pill-link.active { color: var(--teal); }
.nav-pill-link.active::after { opacity: .09; }
.nav-pill-action { color: var(--teal); border: 1px solid rgba(var(--teal-rgb), .2); }
.navbar-actions {
  position: absolute; right: 2rem; display: flex; align-items: center;
  gap: .75rem; pointer-events: auto;
}
.theme-toggle, .hamburger, .close-btn, .lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: none;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  color: var(--text-mid); transition: .2s;
}
.theme-toggle:hover, .hamburger:hover, .close-btn:hover, .lang-toggle:hover {
  color: var(--text); border-color: var(--teal-mid); background: rgba(var(--teal-rgb), .08);
}
.lang-toggle { font: 700 .7rem var(--font-mono); letter-spacing: .06em; }
.hamburger { display: none; flex-direction: column; gap: 5px; }
.hamburger span { width: 17px; height: 1.5px; background: currentColor; }
.close-btn { font-size: 1.35rem; }

/* Mobile menu */
.mobile-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(4, 17, 20, .46); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.mobile-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-menu {
  position: fixed; inset: 0 0 0 auto; z-index: 200; width: min(340px, 86vw);
  display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem; overflow-y: auto;
  background: var(--mist-light); border-left: 1px solid var(--border);
  box-shadow: -8px 0 48px rgba(41, 56, 3, .2);
  transform: translateX(100%); transition: transform .4s var(--ease-out);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.navbar-logo { font-family: var(--font-mono); font-size: .86rem; letter-spacing: .08em; }
.bracket { color: var(--teal); }
.mobile-nav-links { display: flex; flex-direction: column; gap: .25rem; }
.mobile-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: .85rem 1rem; border-radius: 10px; color: var(--text-mid); transition: .25s;
}
.mobile-nav-link span { color: var(--teal); font: .72rem var(--font-mono); }
.mobile-nav-link:hover, .mobile-nav-link.active {
  padding-left: 1.25rem; color: var(--teal); background: rgba(var(--teal-rgb), .08);
}
.mobile-menu-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.mobile-menu-footer p { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }

/* 5. Components ----------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: .78rem 1.75rem; border: 0; border-radius: var(--r-md);
  font-size: .92rem; font-weight: 650;
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn-primary {
  overflow: hidden; color: var(--mist);
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  box-shadow: 0 6px 24px rgba(65, 91, 6, .3), inset 0 1px rgba(255, 255, 255, .15);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0 auto 0 -120%; width: 100%;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .3) 50%, transparent 80%);
  transition: transform .55s;
}
.btn-primary:hover::after { transform: translateX(240%); }
.btn-outline {
  color: var(--teal); background: transparent;
  border: 2px solid rgba(var(--teal-rgb), .35); box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
  border-color: var(--teal); background: rgba(var(--teal-rgb), .06); box-shadow: var(--shadow-sm);
}

.glass {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--surface); backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(var(--teal-rgb), .12);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.glass-strong {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--surface-strong); backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(var(--teal-rgb), .18); box-shadow: var(--shadow-md);
}
.glass::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  pointer-events: none; transition: left .65s;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
}
.glass:hover::after { left: 140%; }

.card-3d { transition: transform .5s var(--ease-spring), box-shadow .5s, border-color .35s; }
.card-3d:hover {
  transform: translateY(-9px) rotateX(4deg) rotateY(-2deg) scale(1.012);
  box-shadow: var(--shadow-lg); border-color: rgba(var(--teal-rgb), .28);
}

.text-gradient-shimmer {
  display: inline-block; color: transparent; background-clip: text;
  background-image:
    linear-gradient(110deg, transparent 44%, rgba(255, 255, 255, .75) 50%, transparent 56%),
    linear-gradient(135deg, var(--teal-dark), var(--teal-light));
  background-size: 200% 100%, 100% 100%;
  animation: shimmer 3.2s linear infinite;
}

.monogram {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 180px; height: 180px; border-radius: 50%;
  border: 3px solid var(--teal-mid); color: var(--teal-dark);
  background: linear-gradient(145deg, var(--mist-light), var(--mist-dark));
  font-size: 3.4rem; font-weight: 760; letter-spacing: -.08em;
}
.monogram i { display: block; width: 1px; height: 50px; background: var(--teal-mid); transform: rotate(16deg); }
.monogram-small { width: 42px; height: 42px; gap: 3px; border-width: 1px; font-size: .78rem; letter-spacing: -.03em; }
.monogram-small i { height: 14px; }

/* 6. Sections ------------------------------------------------------------- */
/* Hero */
.section-hero {
  position: relative; min-height: calc(100vh - 72px);
  display: flex; align-items: center; padding: 4rem 2rem 6rem;
}
.section-hero::before, .section-hero::after,
.contact-template::before, .contact-template::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(110px); opacity: .25; pointer-events: none;
  animation: orb 12s ease-in-out infinite;
}
.section-hero::before { width: 320px; height: 320px; top: -120px; left: -120px; background: rgba(65, 91, 6, .45); }
.section-hero::after { width: 360px; height: 360px; right: -140px; bottom: -160px; background: rgba(106, 140, 26, .35); animation-delay: 4s; }

.hero-grid {
  position: relative; z-index: 1; width: 100%;
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 3rem; align-items: center;
}
.hero-title { margin-bottom: 1.15rem; font-size: clamp(3rem, 7vw, 5.2rem); line-height: .96; color: var(--teal-dark); }
.hero-subtitle { max-width: 590px; margin-bottom: 2.5rem; font-size: clamp(1rem, 2.1vw, 1.18rem); }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-panel { padding: 1.75rem; border-radius: var(--r-xl); display: flex; flex-direction: column; gap: 1.35rem; }
.hero-profile { position: relative; width: 180px; height: 180px; margin: 0 auto 1rem; display: grid; place-items: center; }
.hero-profile-glow {
  position: absolute; inset: -16px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--teal-rgb), .24), transparent 70%);
  animation: glow 4s ease-in-out infinite;
}
.profile-photo {
  position: relative; z-index: 2; width: 180px; height: 180px;
  border-radius: 50%; object-fit: cover; border: 3px solid var(--teal-mid);
  box-shadow: var(--shadow-md), 0 0 0 6px rgba(var(--teal-rgb), .08), 0 0 0 12px rgba(var(--teal-rgb), .04);
  transition: transform .6s var(--ease-spring), box-shadow .6s;
}
.hero-profile:hover .profile-photo {
  transform: scale(1.06) rotateY(7deg) rotateX(3deg);
  box-shadow: var(--shadow-lg), 0 0 0 8px rgba(var(--teal-rgb), .12), 0 0 0 16px rgba(var(--teal-rgb), .05);
}
.hero-panel-title { color: var(--text-muted); font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .22em; }
.hero-panel-list { display: grid; gap: .5rem; font-size: .86rem; color: var(--text-mid); }
.hero-panel-list li::before { content: "—"; margin-right: .5rem; color: var(--teal-mid); }
.hero-panel-stats { padding-top: 1rem; border-top: 1px solid var(--border); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.stat-card {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: 1rem .55rem; text-align: center; border-radius: var(--r-md);
}
.stat-value { font-size: 1.28rem; line-height: 1; color: var(--teal); }
.stat-value.dark { color: var(--teal-dark); }
.stat-value.sand { color: var(--sand); }
.stat-value.light { color: var(--teal-light); }
.stat-label {
  white-space: nowrap; color: var(--text-muted);
  font-size: clamp(.47rem, .65vw, .58rem); text-transform: uppercase; letter-spacing: .04em;
}

/* About */
.about-template-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto 220px 180px;
  grid-template-areas:
    "profile craft craft"
    "mindset center education"
    "mindset location education";
}
.about-tile { position: relative; min-height: 160px; padding: 1.5rem; overflow: hidden; border-radius: var(--r-lg); }
.about-tile-profile { grid-area: profile; display: flex; flex-direction: column; gap: .75rem; }
.about-tile-craft { grid-area: craft; }
.about-tile-mindset { grid-area: mindset; }
.about-tile-education { grid-area: education; }
.about-tile-center {
  grid-area: center; display: grid; place-items: center; align-self: center;
  padding: 0; min-height: 0; aspect-ratio: 1200 / 630;
}
.social-card { width: 100%; height: 100%; object-fit: cover; }
.about-tile-location { grid-area: location; padding: 0; background: var(--teal-dark); }

.about-tile-title { font-size: 1.6rem; }
.about-tile-subtitle { font-size: .85rem; color: var(--text-muted); }
.about-tile-bio, .about-tile-text { font-size: .84rem; line-height: 1.65; }
.about-tile-heading { margin-bottom: .75rem; font-size: 1rem; }
.about-pill-row { display: flex; gap: .55rem; flex-wrap: wrap; }
.about-pill {
  padding: .35rem .75rem; border-radius: var(--r-full);
  color: var(--teal); background: rgba(var(--teal-rgb), .1); font-size: .7rem; font-weight: 650;
}
.about-pill-outline { color: var(--text-mid); background: transparent; border: 1px solid rgba(var(--teal-rgb), .2); }
.about-list { display: grid; gap: .68rem; }
.about-list-compact { gap: .88rem; }
.about-list-title { display: block; font-size: .84rem; font-weight: 680; }
.about-list-subtitle { display: block; font-size: .74rem; color: var(--text-muted); line-height: 1.45; }
.about-list-status {
  display: inline-block; margin-top: .25rem; padding: .17rem .55rem;
  border-radius: var(--r-full); color: var(--teal); background: rgba(var(--teal-rgb), .1);
  font-size: .62rem; font-weight: 650;
}
.about-location-map {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; border: 0;
  opacity: .7; filter: saturate(.7) brightness(.85); transition: .3s;
}
.about-tile-location:hover .about-location-map { opacity: 1; filter: none; }
.about-location-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .45));
}
.about-location-content {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; pointer-events: none;
}
.about-location-city, .about-location-subtitle {
  border-radius: var(--r-full); color: var(--teal-dark);
  box-shadow: var(--shadow-xs); text-transform: uppercase; font-weight: 700;
}
.about-location-city { padding: .35rem .6rem; background: hsla(33, 42%, 90%, .9); font-size: .85rem; letter-spacing: .08em; }
.about-location-subtitle { width: fit-content; padding: .25rem .6rem; background: hsla(33, 42%, 90%, .85); color: var(--teal); font-size: .7rem; letter-spacing: .12em; }

/* Projects */
.projects-template, .contact-template { position: relative; overflow: hidden; }
.projects-template-background { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.projects-orb { position: absolute; width: 340px; height: 340px; border-radius: 50%; filter: blur(120px); opacity: .3; animation: orb 10s ease-in-out infinite; }
.projects-orb-left { top: 12%; left: -8%; background: rgba(65, 91, 6, .3); }
.projects-orb-right { right: -10%; bottom: 10%; background: rgba(106, 140, 26, .28); animation-delay: 4s; }
.projects-template-subtitle, .contact-template-subtitle { max-width: 680px; margin: 1.25rem auto 0; font-size: .95rem; }

.projects-template-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.65rem; }
.project-link { display: block; height: 100%; }
.project-card {
  position: relative; height: 100%; min-height: 290px; overflow: hidden;
  display: flex; flex-direction: column; gap: .85rem;
  padding: 1.6rem; border-radius: var(--r-lg);
  background: hsla(33, 42%, 90%, .7); border: 1px solid rgba(var(--teal-rgb), .15);
}
.project-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: linear-gradient(135deg, transparent 35%, rgba(var(--teal-rgb), .4));
}
.project-card:hover::before { opacity: .18; }
.project-top { display: flex; align-items: center; justify-content: space-between; }
.project-icon, .contact-icon {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); color: var(--teal); background: rgba(var(--teal-rgb), .1);
  font: 650 .78rem var(--font-mono);
}
.project-arrow { color: var(--text-muted); }
.project-title { font-size: 1.05rem; }
.project-desc { flex: 1; font-size: .84rem; line-height: 1.65; }
.project-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.project-tag {
  padding: .25rem .6rem; border-radius: var(--r-full);
  color: var(--text-muted); background: rgba(255, 255, 255, .35);
  border: 1px solid rgba(var(--teal-rgb), .2); font-size: .7rem; font-weight: 600;
}
.projects-template-footer { position: relative; z-index: 1; margin-top: 2.5rem; text-align: center; }
.projects-template-linkout {
  position: relative; color: var(--teal);
  font-size: .84rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em;
}
.projects-template-linkout::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 60%; height: 2px;
  transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

/* Video-Portfolio — nutzt dieselben Tokens, Radien und Hover-Effekte wie die Projektkarten */
.back-link { color: var(--teal-mid); letter-spacing: inherit; }
.back-link:hover { color: var(--teal); }

.video-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.65rem;
  /* start statt stretch: die Kartenhöhe kommt allein aus aspect-ratio,
     auch wenn eine Karte später einmal mehr Inhalt bekommt. */
  align-items: start;
}
.video-card {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-lg); border: 1px solid rgba(var(--teal-rgb), .15);
  background: hsla(33, 42%, 90%, .7); box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease-spring), box-shadow .5s, border-color .35s;
}
.video-card:hover, .video-card:focus-visible {
  transform: translateY(-9px) scale(1.012);
  box-shadow: var(--shadow-lg); border-color: rgba(var(--teal-rgb), .28);
}
.video-thumb {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease-spring), filter .35s;
}
.video-card:hover .video-thumb, .video-card:focus-visible .video-thumb {
  transform: scale(1.04); filter: saturate(1.05);
}
.video-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(41, 56, 3, .55));
}
.video-play {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  display: grid; place-items: center; width: 58px; height: 58px;
  transform: translate(-50%, -50%);
  border-radius: 50%; color: var(--mist-light);
  background: rgba(41, 56, 3, .55); border: 1.5px solid rgba(250, 246, 240, .7);
  backdrop-filter: blur(4px);
  transition: transform .35s var(--ease-spring), background .3s;
}
.video-play svg { margin-left: 3px; }
.video-card:hover .video-play, .video-card:focus-visible .video-play {
  transform: translate(-50%, -50%) scale(1.1); background: rgba(65, 91, 6, .8);
}
.video-duration {
  position: absolute; right: .7rem; bottom: .7rem; z-index: 1;
  padding: .18rem .5rem; border-radius: var(--r-full);
  color: var(--mist-light); background: rgba(41, 56, 3, .6);
  font: 650 .68rem var(--font-mono); letter-spacing: .04em;
}
.video-meta {
  position: absolute; left: .85rem; bottom: .7rem; z-index: 1;
  display: flex; flex-direction: column; gap: 1px; text-align: left; color: var(--mist-light);
}
.video-meta strong { font-size: .84rem; }
.video-meta small { font-size: .7rem; opacity: .85; }

/* Lightbox */
.video-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1.5rem; }
.video-modal[hidden] { display: none; }
.video-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 11, 9, .82); backdrop-filter: blur(6px);
  animation: fade .25s var(--ease-out);
}
.video-modal-inner {
  position: relative; z-index: 1;
  /* Breite folgt der Höhe, damit das 9:16-Video nie über den Viewport hinauswächst. */
  width: min(100%, calc((100vh - 8rem) * 9 / 16));
  width: min(100%, calc((100dvh - 8rem) * 9 / 16));
  animation: rise .35s var(--ease-out);
}
.video-modal-frame {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: var(--r-lg); background: #000; box-shadow: var(--shadow-lg);
}
.video-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-modal-close {
  position: absolute; top: -3rem; right: 0;
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); font-size: 1.5rem; line-height: 1;
  color: var(--mist-light); background: rgba(250, 246, 240, .1);
  border: 1.5px solid rgba(250, 246, 240, .35); transition: .2s;
}
.video-modal-close:hover { background: rgba(250, 246, 240, .2); border-color: var(--mist-light); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

/* Contact */
.contact-template::before { width: 300px; height: 300px; left: -120px; bottom: -140px; background: rgba(65, 91, 6, .35); }
.contact-template::after { width: 260px; height: 260px; right: -110px; top: -140px; background: rgba(106, 140, 26, .3); animation-delay: 6s; }
.contact-template-grid { position: relative; z-index: 1; display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.75rem; }
.contact-template-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; transition: .35s var(--ease-spring); }
.contact-card:hover { transform: translateX(8px); }
.contact-icon.sand { color: var(--sand); background: hsla(34, 24%, 55%, .12); }
.contact-icon.light { color: var(--teal-light); }
.contact-card-title, .contact-card-text { display: block; }
.contact-card-title { margin-bottom: 2px; font-size: .875rem; }
.contact-card-text { color: var(--text-muted); font-size: .78rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.15rem; padding: 2rem; }
.form-title { font-size: 1.2rem; color: var(--teal-dark); }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label { color: var(--text-mid); font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.form-input {
  width: 100%; padding: .7rem .9rem; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); outline: none; resize: vertical;
  color: var(--text); background: rgba(255, 255, 255, .5); font-size: .88rem;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.form-input:focus {
  border-color: var(--teal-mid); background: rgba(255, 255, 255, .8);
  box-shadow: 0 0 0 3px rgba(var(--teal-rgb), .1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input[aria-invalid="true"] { border-color: #a8452f; }
.field-error { color: #a8452f; font-size: .74rem; font-weight: 600; }
.form-status {
  padding: .65rem 1rem; border-radius: var(--r-sm); font-size: .8rem; text-align: center;
  color: var(--teal); background: rgba(var(--teal-rgb), .09); border: 1px solid rgba(var(--teal-rgb), .2);
}
.form-status-error { color: #a8452f; background: rgba(168, 69, 47, .08); border-color: rgba(168, 69, 47, .25); }
.form-note a { color: var(--teal); text-decoration: underline; }
/* Honeypot: für Menschen unsichtbar, für Screenreader ausgeblendet, für Bots sichtbar. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-submit { width: 100%; margin-top: .25rem; }
.form-note { font-size: .72rem; text-align: center; color: var(--text-muted); }

/* 7. Footer --------------------------------------------------------------- */
.site-footer { margin-top: 3.5rem; padding: 2rem 1.5rem; border-top: 1px solid var(--border); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 2.5rem 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; align-items: start; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: .18rem; }
.footer-brand .monogram { margin-bottom: .45rem; }
.brand-title { color: var(--teal-dark); }
.brand-sub { color: var(--text-muted); font-size: .78rem; }
.brand-desc { max-width: 360px; margin-top: .6rem; font-size: .82rem; }
.footer-heading { margin-bottom: .75rem; color: var(--teal); font-size: .78rem; text-transform: uppercase; letter-spacing: .2em; }
.footer-col { padding-left: 1.25rem; border-left: 1px solid var(--border); }
.footer-list { display: grid; gap: .55rem; }
.footer-list a { color: var(--text-mid); font-size: .84rem; font-weight: 620; }
.footer-list a:hover { color: var(--teal); }
.footer-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 2.25rem; color: var(--text-muted); font-size: .82rem;
}
.footer-legal { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; }
.footer-legal a:hover { color: var(--teal); }
.back-to-top { padding-left: .85rem; border-left: 1px solid var(--border); }

/* 8. Motion --------------------------------------------------------------- */
.reveal-up, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0; transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}
.reveal-up { transform: perspective(1200px) translateY(70px) rotateX(8deg); }
.reveal-left { transform: perspective(1200px) translateX(-75px) rotateY(9deg); }
.reveal-right { transform: perspective(1200px) translateX(75px) rotateY(-9deg); }
.reveal-scale { transform: perspective(1200px) scale(.88) rotateX(6deg); }
.is-visible { opacity: 1 !important; transform: none !important; }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .3s; }

@keyframes shimmer { from { background-position: 100% 0, 0 0; } to { background-position: -100% 0, 0 0; } }
@keyframes orb { 0%, 100% { transform: scale(1); opacity: .22; } 50% { transform: scale(1.1); opacity: .35; } }
@keyframes glow { 0%, 100% { transform: scale(1); opacity: .6; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes twinkle {
  0%, 100% { opacity: .08; transform: scale(.75); }
  45% { opacity: .38; transform: scale(1.25); }
  70% { opacity: .16; transform: scale(.9); }
}
.animate-float { animation: float 5s ease-in-out infinite; }

/* 9. Dark theme ----------------------------------------------------------- */
[data-theme="dark"] {
  --mist: #14110d;
  --mist-light: #1c1813;
  --mist-dark: #0f0d0a;
  --sand: #b9ab95;
  --bg: #0e0b09;
  --surface: rgba(20, 17, 13, .6);
  --surface-strong: rgba(20, 17, 13, .85);
  --text: #f5efe6;
  --text-mid: #d6cab8;
  --text-muted: #b9ab95;
  --border: rgba(199, 178, 148, .2);
  --shadow-xs: 0 1px 4px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -8%, rgba(106, 140, 26, .08), transparent 70%),
    radial-gradient(ellipse 60% 45% at 85% 105%, rgba(65, 91, 6, .06), transparent 70%);
}
[data-theme="dark"] .navbar-pill,
[data-theme="dark"] .glass-strong { border-color: hsla(33, 30%, 70%, .18); }
[data-theme="dark"] .glass {
  border-color: hsla(33, 30%, 70%, .12);
  box-shadow: var(--shadow-sm), inset 0 1px rgba(255, 255, 255, .06);
}
[data-theme="dark"] .nav-pill-link.active { color: var(--text); }
[data-theme="dark"] .project-card,
[data-theme="dark"] .video-card { background: rgba(20, 17, 13, .7); }
[data-theme="dark"] .btn-outline { color: var(--text); border-color: hsla(33, 30%, 70%, .3); }
[data-theme="dark"] .form-input { background: rgba(20, 17, 13, .7); }
[data-theme="dark"] .form-input:focus { background: rgba(20, 17, 13, .9); box-shadow: 0 0 0 3px rgba(106, 140, 26, .18); }

/* 10. Responsive ---------------------------------------------------------- */
@media (max-width: 1050px) {
  .hero-grid { gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-template-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) {
  .about-template-grid {
    grid-template-columns: repeat(2, 1fr); grid-template-rows: auto;
    grid-template-areas: "profile craft" "mindset education" "location education";
  }
  .about-tile-center { display: none; }
  .contact-template-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .navbar-pill { display: none; }
  .hamburger { display: inline-flex; }
  .navbar-inner { justify-content: flex-end; padding: 0 1.25rem; }
  .navbar-actions { position: static; }
  .section { padding: 5rem 1.25rem; }
  .section-hero { padding: 3rem 1.25rem 4.5rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-subtitle { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero-panel { max-width: 560px; width: 100%; margin: 0 auto; }
  .about-template-grid { grid-template-columns: 1fr; grid-template-areas: "profile" "craft" "mindset" "education" "location"; }
  .about-tile-location { min-height: 220px; }
  .footer-inner { padding: 2rem .25rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col { padding: 1.25rem 0 0; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .main-content { padding-top: 64px; }
  .hero-title { font-size: clamp(2.7rem, 15vw, 4rem); }
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; }
  .projects-template-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; max-width: 340px; margin-inline: auto; }
  .video-modal { padding: 1rem; }
  .video-modal-inner {
    width: min(100%, calc((100vh - 9.5rem) * 9 / 16));
    width: min(100%, calc((100dvh - 9.5rem) * 9 / 16));
  }
  .video-modal-close { top: auto; bottom: -3.2rem; right: 50%; transform: translateX(50%); }
  .contact-form { padding: 1.35rem; }
  .footer-meta { align-items: flex-start; flex-direction: column; }
  .back-to-top { padding: 0; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal-up, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; }
}
