/* ============================================================
   ENSAR YABANTAS — PORTFOLIO
   Konzept: "Digitales Handwerk" — warmes Creme, Terracotta
   (Claude-Markenfarbe #D97757), editoriale Serife + Terminal.
   ============================================================ */

:root {
  --bg: #faf5ec;
  --bg2: #f2ebdd;
  --bg3: #eae1cf;
  --ink: #2c241b;
  --muted: #837763;
  --line: rgba(44, 36, 27, 0.13);
  --acc: #d97757;
  --acc-soft: rgba(217, 119, 87, 0.13);
  --acc-bright: #bd5836;

  --font-display: "Fraunces", serif;
  --font-body: "Schibsted Grotesk", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--acc); color: var(--bg); }

a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }

@media (pointer: fine) {
  body, a, button { cursor: none; }
}

/* ===== Grain ===== */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ===== Custom Cursor ===== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--acc);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(217, 119, 87, 0.5);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              border-color 0.25s, background 0.25s;
}
.cursor-ring.hovering {
  width: 56px; height: 56px;
  background: rgba(217, 119, 87, 0.1);
  border-color: var(--acc);
}
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ===== Scroll-Progress ===== */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 1001;
}
.progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--acc), var(--acc-bright));
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  transition: background 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(250, 245, 236, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px clamp(20px, 5vw, 64px);
  border-bottom-color: var(--line);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 26px;
  letter-spacing: -0.02em;
}
.logo-dot { color: var(--acc); }
.nav-links { display: flex; gap: 36px; }
.nav-link {
  font-size: 14px; font-weight: 500;
  color: var(--muted);
  transition: color 0.25s;
  position: relative;
}
.nav-link::after {
  content: ""; position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 1px;
  background: var(--acc);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: 18px; }

.lang-toggle {
  background: none; border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-family: var(--font-mono); font-size: 12px;
  padding: 7px 14px;
  display: flex; gap: 5px; align-items: center;
  transition: border-color 0.25s;
}
.lang-toggle:hover { border-color: var(--acc); }
.lang-opt { transition: color 0.25s; }
.lang-opt.active { color: var(--acc); font-weight: 500; }
.lang-sep { opacity: 0.35; }

/* Burger */
.burger {
  display: none;
  background: none; border: none;
  width: 36px; height: 36px;
  flex-direction: column; justify-content: center; gap: 7px;
  z-index: 1002;
}
.burger span {
  display: block; height: 2px; width: 26px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}
.burger.open span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger.open span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(250, 245, 236, 0.97);
  backdrop-filter: blur(20px);
  z-index: 1001;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 34px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 34px;
  border-radius: 99px;
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--acc); color: #fff;
}
.btn-primary:hover {
  background: var(--acc-bright);
  box-shadow: 0 8px 40px rgba(217, 119, 87, 0.35);
}
.btn-ghost {
  border-color: var(--line); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--acc); color: var(--acc-bright); }
.btn-small { padding: 10px 22px; font-size: 13px; background: var(--acc); color: #fff; }
.btn-small:hover { background: var(--acc-bright); }

/* ===== Hero ===== */
.hero {
  min-height: 100svh;
  position: relative;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 140px clamp(20px, 5vw, 64px) 80px;
  overflow: clip;
}
#glyphs {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(217, 119, 87, 0.13) 0%, transparent 62%);
  z-index: 0;
  animation: glow-breathe 7s ease-in-out infinite;
}
@keyframes glow-breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.08); }
}
.hero-inner { position: relative; z-index: 2; max-width: 1200px; }

.hero-eyebrow {
  font-size: 13px;
  color: var(--acc-bright);
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}
.blink { animation: blink 1.6s steps(2) infinite; font-size: 9px; vertical-align: 2px; }
@keyframes blink { 50% { opacity: 0.15; } }

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(56px, 11.5vw, 168px);
  line-height: 0.93;
  letter-spacing: -0.03em;
  margin-bottom: 38px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .outline .char {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  transition: color 0.4s, -webkit-text-stroke-color 0.4s;
}
.hero-title .outline:hover .char {
  color: var(--acc);
  -webkit-text-stroke-color: var(--acc);
}
/* Buchstaben-Reveal */
.char {
  display: inline-block;
  transform: translateY(110%);
  animation: char-up 0.9s var(--ease-out) forwards;
  animation-delay: calc(var(--ci) * 0.045s + var(--li) * 0.25s + 0.2s);
}
@keyframes char-up { to { transform: translateY(0); } }

/* Rotator */
.hero-rotator {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(20px, 2.6vw, 30px);
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.rotator-prefix { color: var(--muted); }
.rotator-window {
  display: inline-block;
  height: 1.35em;
  overflow: hidden;
  vertical-align: bottom;
}
.rotator-track {
  display: flex; flex-direction: column;
  transition: transform 0.7s var(--ease-out);
}
.rotator-track span {
  font-family: var(--font-display);
  font-style: italic; font-weight: 600;
  color: var(--acc-bright);
  height: 1.35em;
  line-height: 1.35;
  white-space: nowrap;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* Terminal */
/* Terminal bleibt bewusst dunkel — Kontrast-Anker im hellen Theme */
.terminal {
  position: absolute;
  right: clamp(20px, 5vw, 64px);
  bottom: 110px;
  width: min(420px, calc(100vw - 40px));
  background: rgba(42, 35, 27, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 30px 70px rgba(44, 36, 27, 0.3);
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.red { background: #ff5f57; }
.t-dot.ylw { background: #febc2e; }
.t-dot.grn { background: #28c840; }
.terminal-title {
  margin-left: 10px;
  font-size: 11px; color: #9c9180;
}
.terminal-body {
  padding: 18px;
  font-size: 12.5px;
  line-height: 1.9;
  min-height: 150px;
  color: #f2ecdf;
}
.terminal-body .t-prompt { color: #e89070; }
.terminal-body .t-dim { color: #9c9180; }
.terminal-body .t-ok { color: #28c840; }
.t-caret {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--acc);
  vertical-align: -2px;
  animation: blink 1.1s steps(2) infinite;
}

/* Scroll-Hint */
.scroll-hint {
  position: absolute;
  left: clamp(20px, 5vw, 64px);
  bottom: 36px;
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}
.scroll-line {
  display: block; width: 56px; height: 1px;
  background: var(--line);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ""; position: absolute;
  left: 0; top: 0; height: 100%; width: 40%;
  background: var(--acc);
  animation: scroll-slide 1.8s var(--ease-out) infinite;
}
@keyframes scroll-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ===== Marquee ===== */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  overflow: hidden;
  background: var(--bg2);
}
.marquee-track {
  display: flex; align-items: center; gap: 38px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee-track span:hover { color: var(--acc-bright); }
.marquee-track i {
  color: var(--acc);
  font-style: normal; font-size: 14px;
  animation: spin 6s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Sections ===== */
.section {
  padding: clamp(90px, 12vw, 160px) clamp(20px, 5vw, 64px);
  max-width: 1340px;
  margin: 0 auto;
}
.section-head {
  display: flex; align-items: baseline; gap: 26px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-num {
  font-size: 13px; color: var(--acc);
  letter-spacing: 0.1em;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 76px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.section-title em {
  font-style: italic;
  color: var(--acc-bright);
}
.section-sub {
  font-size: 13px; color: var(--muted);
  letter-spacing: 0.06em;
  margin: 48px 0 24px;
}

/* ===== Projekte ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.projects-grid.clients { grid-template-columns: repeat(2, 1fr); }
/* Bei ungerader Anzahl: letzte Kundenkarte volle Breite */
.projects-grid.clients .project-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

.project-card.featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  margin-bottom: 10px;
}
.project-card.featured .card-cover { height: 100%; min-height: 280px; }
.project-card.featured .card-body {
  padding: 40px;
  display: flex; flex-direction: column; justify-content: center;
}
.project-card.featured .card-top h3 { font-size: 34px; }

.project-card {
  display: block;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.2s ease-out, box-shadow 0.4s;
  will-change: transform;
}
.project-card:hover {
  border-color: rgba(217, 119, 87, 0.45);
  box-shadow: 0 20px 50px rgba(44, 36, 27, 0.14);
}
.card-cover {
  height: 190px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  transition: transform 0.6s var(--ease-out);
}
.project-card:hover .card-cover img { transform: scale(1.06); }
.cover-shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.14) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.8s var(--ease-out);
}
.project-card:hover .cover-shine { transform: translateX(110%); }

.cover-gold   { background: linear-gradient(135deg, #6b4a16, #b38000); }
.cover-violet { background: linear-gradient(135deg, #3b2b73, #7c5cfc); }
.cover-teal   { background: linear-gradient(135deg, #0f4d4a, #1aa39b); }
.cover-blue   { background: linear-gradient(135deg, #1d3a63, #3f7fd1); }
.cover-red    { background: linear-gradient(135deg, #6b2424, #c25339); }
.cover-green  { background: linear-gradient(135deg, #234d2a, #4d9e58); }
.cover-amber  { background: linear-gradient(135deg, #6e4413, #cf8b2e); }
.cover-connecto { background: linear-gradient(135deg, #1f8a5b, #f0883c); }
.cover-newsless { background: linear-gradient(135deg, #7a4a2c, #d97757); }

/* Produkt-Grid (eigene Produkte mit Modal) */
.projects-grid.products { grid-template-columns: repeat(2, 1fr); margin-bottom: 10px; }

/* Karten, die ein Modal öffnen (button statt a) */
button.project-card {
  font: inherit; text-align: left; cursor: pointer;
  appearance: none; color: inherit; width: 100%;
}

/* "In Entwicklung"-Badge auf dem Cover */
.dev-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: 0.04em;
  color: #faf5ec;
  background: rgba(44, 36, 27, 0.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px; padding: 5px 12px 5px 11px;
}
.dev-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 0 0 rgba(217, 119, 87, 0.6);
  animation: devPulse 2s var(--ease-out) infinite;
}
@keyframes devPulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 87, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(217, 119, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 87, 0); }
}

.card-body { padding: 26px; }
.card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.card-top h3 {
  font-family: var(--font-display);
  font-weight: 600; font-size: 24px;
  letter-spacing: -0.01em;
}
.card-arrow {
  color: var(--acc);
  font-size: 22px;
  transition: transform 0.35s var(--ease-out);
}
.project-card:hover .card-arrow { transform: translate(4px, -4px); }
.card-link { font-size: 12px; color: var(--acc-bright); }
.card-body p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.card-tags span {
  font-size: 11px;
  color: var(--acc-bright);
  background: var(--acc-soft);
  border-radius: 99px;
  padding: 4px 12px;
}

/* ===== Leistungen ===== */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.service {
  padding: 44px 38px;
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}
.service:nth-child(odd) { border-right: 1px solid var(--line); }
.service:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
.service::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(217, 119, 87, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
}
.service:hover::before { opacity: 1; }
.service-num {
  font-size: 12px; color: var(--acc);
  display: block; margin-bottom: 18px;
}
.service h3 {
  font-family: var(--font-display);
  font-size: 27px; font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.service p { color: var(--muted); font-size: 15.5px; max-width: 46ch; }

/* ===== Über mich ===== */
.about {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(40px, 6vw, 90px);
}
.about-lead {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}
.about-text p:not(.about-lead) {
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 62ch;
}
.about-stats {
  display: flex; flex-direction: column; gap: 36px;
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 3vw, 48px);
}
.stat-num, .stat-plus {
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 68px);
  font-weight: 600;
  color: var(--acc-bright);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 8px;
  text-transform: uppercase;
}

/* ===== Claude Section ===== */
.claude-section {
  max-width: none;
  background: var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  position: relative;
  overflow: clip;
}
.claude-section::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 80vw; height: 80vw;
  max-width: 1100px; max-height: 1100px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(217, 119, 87, 0.09) 0%, transparent 60%);
  pointer-events: none;
}
.claude-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}
.claude-spark-wrap {
  width: 76px; height: 76px;
  margin: 0 auto 30px;
  color: var(--acc);
}
.claude-spark {
  width: 100%; height: 100%;
  animation: spark-spin 24s linear infinite;
  filter: drop-shadow(0 0 24px rgba(217, 119, 87, 0.45));
}
@keyframes spark-spin { to { transform: rotate(360deg); } }
.claude-label {
  font-size: 13px; color: var(--acc-bright);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.claude-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}
.claude-title em {
  font-style: italic;
  color: var(--acc-bright);
  white-space: nowrap;
}
.claude-cursor {
  font-style: normal;
  color: var(--acc);
  animation: blink 1.1s steps(2) infinite;
  font-size: 0.75em;
}
.claude-body {
  color: var(--muted);
  font-size: 16.5px;
  margin-bottom: 38px;
}
.claude-badge {
  display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid rgba(217, 119, 87, 0.45);
  background: var(--acc-soft);
  color: var(--acc-bright);
  border-radius: 99px;
  padding: 13px 26px;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: background 0.3s, box-shadow 0.3s, color 0.3s;
}
.claude-badge:hover {
  background: var(--acc);
  color: #fff;
  box-shadow: 0 10px 50px rgba(217, 119, 87, 0.4);
}
.claude-badge svg { width: 19px; height: 19px; }

/* ===== Kontakt ===== */
.contact { text-align: left; }
.contact-lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 52ch;
  margin-bottom: 50px;
}
.contact-mail {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 5vw, 64px);
  letter-spacing: -0.02em;
  position: relative;
  margin-bottom: 54px;
  word-break: break-all;
}
.contact-mail .char {
  animation: none;
  transform: none;
  transition: transform 0.3s var(--ease-out), color 0.3s;
}
.contact-mail:hover .char {
  color: var(--acc-bright);
  transform: translateY(-6px);
  transition-delay: calc(var(--ci) * 0.018s);
}
.mail-underline {
  position: absolute;
  left: 0; bottom: -8px;
  width: 100%; height: 2px;
  background: var(--line);
  overflow: hidden;
}
.mail-underline::after {
  content: ""; position: absolute; inset: 0;
  background: var(--acc);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.contact-mail:hover .mail-underline::after { transform: scaleX(1); }
.contact-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 50px clamp(20px, 5vw, 64px) 34px;
}
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 38px;
  flex-wrap: wrap; gap: 20px;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 30px;
}
.footer-claude {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
  color: var(--acc-bright);
  letter-spacing: 0.04em;
}
.footer-spark {
  width: 17px; height: 17px;
  animation: spark-spin 24s linear infinite;
}
.footer-bottom {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
  flex-wrap: wrap; gap: 10px;
}

/* ===== Scroll-Reveals ===== */
.reveal-up {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--rd, 0s);
}
.reveal-up.in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Projekt-Modal + Galerie ===== */
.pm {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.pm.open { opacity: 1; visibility: visible; }
.pm-backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 22, 16, 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pm-panel {
  position: relative; z-index: 1;
  width: min(920px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 22px; padding: 36px;
  box-shadow: 0 40px 100px rgba(28, 22, 16, 0.4);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.4s var(--ease-out);
}
.pm.open .pm-panel { transform: none; }
.pm-close {
  position: absolute; top: 18px; right: 18px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pm-close:hover { background: var(--acc); color: #fff; border-color: var(--acc); }

.pm-head { margin-bottom: 22px; padding-right: 40px; }
.pm-head .dev-badge {
  position: static; display: inline-flex; margin-bottom: 14px;
  color: var(--acc-bright); background: var(--acc-soft);
  border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.pm-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 32px; letter-spacing: -0.01em; margin-bottom: 12px;
}
.pm-desc { color: var(--muted); font-size: 15.5px; line-height: 1.7; max-width: 70ch; }
.pm-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pm-tags span {
  font-size: 11px; color: var(--acc-bright);
  background: var(--acc-soft); border-radius: 99px; padding: 4px 12px;
}

.pm-stage {
  position: relative; border-radius: 16px; overflow: hidden;
  background: var(--bg3); border: 1px solid var(--line);
  aspect-ratio: 1280 / 800;
}
.pm-stage img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pm-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(250, 245, 236, 0.92); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pm-nav:hover { background: var(--acc); color: #fff; }
.pm-nav.prev { left: 14px; }
.pm-nav.next { right: 14px; }
.pm-counter {
  position: absolute; bottom: 12px; right: 14px;
  font-size: 11px; color: #faf5ec;
  background: rgba(28, 22, 16, 0.6); border-radius: 99px; padding: 4px 10px;
}
.pm-caption {
  text-align: center; color: var(--muted);
  font-size: 13.5px; margin: 16px 0 18px; min-height: 1.2em;
}
.pm-thumbs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pm-thumbs button {
  width: 84px; height: 54px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; padding: 0; background: none;
  opacity: 0.5; transition: opacity 0.2s, border-color 0.2s;
}
.pm-thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pm-thumbs button.active { opacity: 1; border-color: var(--acc); }
.pm-thumbs button:hover { opacity: 1; }
/* Einzelbild: Navigation ausblenden */
.pm.single .pm-nav,
.pm.single .pm-counter,
.pm.single .pm-thumbs { display: none; }
body.pm-lock { overflow: hidden; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .terminal { position: relative; right: auto; bottom: auto; margin-top: 60px; }
  .project-card.featured { grid-template-columns: 1fr; }
  .project-card.featured .card-cover { min-height: 200px; }
}
@media (max-width: 820px) {
  .nav-links, .nav-right { display: none; }
  .burger { display: flex; }
  .projects-grid, .projects-grid.clients, .projects-grid.products { grid-template-columns: 1fr; }
  .pm-panel { padding: 24px; }
  .pm-title { font-size: 26px; }
  .services { grid-template-columns: 1fr; }
  .service:nth-child(odd) { border-right: none; }
  .service:nth-last-child(-n+2) { border-bottom: none; }
  .service:last-child { border-bottom: 1px solid var(--line); }
  .about { grid-template-columns: 1fr; }
  .about-stats {
    flex-direction: row; flex-wrap: wrap; gap: 28px;
    border-left: none; padding-left: 0;
    border-top: 1px solid var(--line); padding-top: 32px;
  }
  .scroll-hint { display: none; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .char { transform: none; }
  .reveal-up { opacity: 1; transform: none; }
}
