/* ==========================================================
   Portfolio Lucas Ulrich – Stylesheet
   Farben, Schriften und Abstände zentral in :root
   ========================================================== */

/* Schriften lokal eingebunden (DSGVO-konform, keine Google-Server) */
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-regular.woff") format("woff"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-bold.woff") format("woff"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  --bg: #111317;
  --surface: #181B21;
  --surface-2: #1A1D23;
  --chip: #22262D;
  --line: #262A32;
  --line-strong: #3A3F48;
  --text: #ECEDEF;
  --text-2: #C9CDD4;
  --muted: #A3A9B3;
  --number: #4A505B;
  --accent: #9FE0C4;

  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --container: 1200px;
  --gutter: 32px;
  --radius-l: 32px;
  --radius-xl: 40px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--text); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0; }
p { margin: 0; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 12px 20px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  padding-top: 28px; padding-bottom: 28px;
}
.logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-weight: 600; font-size: 20px;
  color: var(--text); text-decoration: none;
}
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }

.nav {
  display: flex; gap: 4px; padding: 6px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 15px; font-weight: 500;
}
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; text-decoration: none; color: var(--text-2);
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--chip); color: var(--text); }
.nav a.nav-cta { background: var(--text); color: var(--bg); padding: 0 20px; }
.nav a.nav-cta:hover { background: #fff; }

/* ---------- Buttons ---------- */
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; min-height: 56px; padding: 0 30px;
  border-radius: 999px; font-weight: 600; text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; color: var(--bg); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(620px, 88vh, 860px); display: flex; align-items: center; }
.hero-inner { position: relative; z-index: 2; width: 100%; will-change: transform, opacity; }
.eyebrow { margin-bottom: 28px; font-size: 15px; font-weight: 500; color: var(--muted); }
.hero h1 {
  max-width: 780px;
  font-size: clamp(48px, 7vw, 88px); line-height: 1; letter-spacing: -0.03em;
}
.hero-lead { margin-top: 32px; max-width: 540px; font-size: 19px; color: var(--muted); }
.hero .btn-row { margin-top: 44px; }

/* ---------- Sektionen ---------- */
.section { padding-top: 80px; padding-bottom: 80px; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  margin-bottom: 48px;
}
.section-head h2, .about h2 { font-size: clamp(38px, 5vw, 56px); letter-spacing: -0.03em; line-height: 1.05; }
.section-head p { font-size: 15px; color: var(--muted); }

/* ---------- Projekt-Karten ---------- */
.card {
  position: relative; overflow: hidden;
  padding: 44px; border-radius: var(--radius-l);
  background: var(--surface); border: 1px solid var(--line);
}
.card-feature { padding: 56px; }

.feature-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.feature-num { grid-column: span 2; font-family: var(--font-head); font-weight: 600; font-size: 64px; line-height: 1; color: var(--number); }
.feature-body { grid-column: 3 / span 6; }
.feature-stat { grid-column: 9 / span 4; align-self: center; }

.card h3 { font-size: 28px; line-height: 1.2; margin-bottom: 14px; }
.card-feature h3 { font-size: 34px; line-height: 1.15; margin-bottom: 16px; }
.card p.desc { font-size: 16px; color: var(--muted); }
.card-feature p.desc { font-size: 17px; }

.stat-value { font-family: var(--font-head); font-weight: 600; font-size: clamp(56px, 6vw, 80px); line-height: 1; letter-spacing: -0.03em; color: var(--accent); }
.stat-label { margin-top: 8px; font-size: 15px; color: var(--muted); }

.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; padding: 0; list-style: none; }
.tags li { padding: 7px 14px; border-radius: 999px; background: var(--chip); font-size: 13px; color: var(--text-2); line-height: 1.4; }
.tech { margin-top: 20px; font-size: 14px; color: var(--text-2); }

.card-num { font-family: var(--font-head); font-weight: 600; font-size: 40px; line-height: 1; color: var(--number); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.badge { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; color: var(--text-2); line-height: 1.4; }

/* Screenshot mit Parallax im Rahmen */
.shot {
  position: relative; margin-top: 40px; height: 360px;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg);
}
.shot-inner {
  position: absolute; left: 0; right: 0; top: -80px; height: calc(100% + 160px);
  will-change: transform;
}
.shot-inner img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot-placeholder {
  height: 100%; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line-strong); border-radius: 20px;
  font-size: 14px; color: var(--muted);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.grid-2 > .card { will-change: transform; }

/* ---------- Über mich ---------- */
.about { padding-top: 120px; padding-bottom: 120px; }
.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.about-grid h2 { grid-column: span 5; }
.about-body { grid-column: 7 / span 6; }
.about-body > p { margin-bottom: 32px; font-size: 19px; line-height: 1.7; color: var(--text-2); }
.skills { display: flex; gap: 10px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
.skills li { padding: 10px 18px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; line-height: 1.4; }

/* ---------- Kontakt ---------- */
.contact { padding-top: 40px; padding-bottom: 48px; }
.contact-box { padding: 80px 56px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); }
.contact-box h2 { max-width: 700px; font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -0.025em; }
.contact-box p { margin: 20px 0 36px; font-size: 18px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 48px; font-size: 14px; color: var(--muted);
}
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Rechtstexte (Impressum, Datenschutz) ---------- */
.legal { max-width: 760px; padding-top: 40px; padding-bottom: 80px; }
.legal h1 { font-size: clamp(40px, 6vw, 56px); letter-spacing: -0.03em; margin-bottom: 40px; }
.legal h2 { font-size: 24px; margin: 40px 0 12px; }
.legal h3 { font-size: 19px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal .back { display: inline-flex; margin-bottom: 32px; color: var(--muted); }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .feature-grid, .about-grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .feature-num, .feature-body, .feature-stat, .about-grid h2, .about-body { grid-column: auto; }
  .feature-num { font-size: 48px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .nav a:not(.nav-cta) { display: none; }
  .nav { padding: 4px; }
  .card, .card-feature { padding: 28px; border-radius: 24px; }
  .contact-box { padding: 48px 28px; border-radius: 28px; }
  .shot { height: 240px; }
  .about { padding-top: 80px; padding-bottom: 80px; }
}

/* ==========================================================
   Ergänzungen Phase 2
   ========================================================== */

/* Platzhalter: deutlich sichtbar, damit nichts Unfertiges live geht */
.ph { outline: 1px dashed #E0B45F; outline-offset: 3px; border-radius: 4px; color: #E0B45F !important; }

/* Hero mit Foto */
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.hero-text { grid-column: span 8; }
.hero-photo { grid-column: 10 / span 3; }
.hero-photo img, .photo-placeholder {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-l);
  border: 1px solid var(--line); background: var(--surface);
}
.photo-placeholder { display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-size: 14px; color: #E0B45F; border: 1px dashed #E0B45F; }

/* Kurzprofil */
.intro { padding-top: 40px; padding-bottom: 40px; }
.intro p { max-width: 820px; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.5; color: var(--text-2); }

/* Zahlen auf einen Blick */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stats .card { padding: 36px; }
.stats .stat-value { font-size: clamp(44px, 5vw, 64px); }

/* Kenntnisse */
.skill-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.skill-groups h3 { font-size: 22px; margin-bottom: 20px; }
.skill-note { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* Lebenslauf */
.cv-box { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cv-box h2 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.02em; }
.cv-box p { margin-top: 10px; color: var(--muted); }

.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { color: #fff; }
.card-link { display: inline-flex; margin-top: 28px; }

/* Fallstudie */
.case { max-width: 860px; padding-top: 40px; padding-bottom: 80px; }
.case h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.03em; }
.case .lead { margin-top: 24px; font-size: 20px; color: var(--muted); }
.case h2 { margin: 72px 0 20px; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.02em; }
.case p + p { margin-top: 14px; }
.case p, .case li { color: var(--text-2); }
.case .back { display: inline-flex; margin-bottom: 32px; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; padding: 0; list-style: none; }
.facts li { padding: 8px 16px; border-radius: 999px; background: var(--chip); font-size: 14px; color: var(--text-2); }

/* Ablauf als Schrittfolge */
.flow { counter-reset: step; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.flow li {
  position: relative; padding: 20px 18px 22px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.5;
  hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word;
}
.flow li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 10px; font-family: var(--font-head); font-weight: 600; font-size: 24px; color: var(--accent);
}
.flow li strong { display: block; margin-bottom: 4px; color: var(--text); }
.flow li:not(:last-child)::after {
  content: "→"; position: absolute; right: -11px; top: 22px; z-index: 1;
  width: 10px; text-align: center; color: var(--muted);
}
.case .shot { height: 420px; }

.criteria { width: 100%; border-collapse: collapse; font-size: 15px; }
.criteria th, .criteria td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.criteria th { color: var(--muted); font-weight: 500; }

/* Consent-Banner */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 720px; margin: 0 auto; padding: 28px;
  border-radius: 24px; background: var(--surface-2); border: 1px solid var(--line-strong);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.consent[hidden] { display: none; }
.consent h2 { font-size: 22px; margin-bottom: 10px; }
.consent p { font-size: 15px; color: var(--text-2); }
.consent p a { color: var(--text); }
.consent-options { display: grid; gap: 12px; margin-top: 18px; }
.consent-options[hidden] { display: none; }
.consent-options label { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.consent-options input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.consent-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.consent .btn { min-height: 48px; padding: 0 22px; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; }
.consent .btn-ghost { background: transparent; border: 1px solid var(--line-strong); }

.linkbutton { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.linkbutton:hover { color: var(--text); }
.linkbutton[hidden] { display: none; }

/* 404 */
.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.notfound h1 { font-size: clamp(48px, 7vw, 88px); letter-spacing: -0.03em; }

@media (max-width: 860px) {
  .hero-grid, .stats, .skill-groups { grid-template-columns: minmax(0, 1fr); }
  .hero-text, .hero-photo { grid-column: auto; }
  .hero-photo { max-width: 260px; order: -1; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li:not(:last-child)::after { content: "↓"; right: auto; left: 28px; top: auto; bottom: -15px; }
}
@media (max-width: 640px) {
  .consent { padding: 22px; left: 10px; right: 10px; bottom: 10px; }
  .consent-buttons .btn { flex: 1 1 100%; justify-content: center; }
}
