/* ═══════════════════════════════════════════════════════════════
   DANIEL HERZOG — PORTFOLIO
   Dual-theme (light/dark) with teal accent
   Fonts: Syne (display) + Outfit (body)
   WCAG 2.1 AA compliant
   ═══════════════════════════════════════════════════════════════ */

/* ─── LIGHT MODE (default) ───────────────────────────────────── */

:root,
[data-theme="light"] {
  --bg-deep: #efefeb;
  --bg-primary: #f8f8f6;
  --bg-elevated: #ffffff;
  --bg-surface: #eaeae5;
  --text-primary: #1c1c2e;
  --text-secondary: #4a4a60;
  --text-muted: #656580;
  --accent: #2b6cb0;
  --accent-hover: #235a94;
  --accent-subtle: rgba(43, 108, 176, 0.06);
  --accent-glow: rgba(43, 108, 176, 0.14);
  --border: #d8d8d2;
  --border-subtle: #e4e4df;
  --nav-bg: rgba(248, 248, 246, 0.92);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 12px 36px rgba(0, 0, 0, 0.09);
  --grain-opacity: 0.008;
  --grain-blend: multiply;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --section-padding: 5.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── DARK MODE ──────────────────────────────────────────────── */

[data-theme="dark"] {
  --bg-deep: #0c0c12;
  --bg-primary: #13131b;
  --bg-elevated: #1c1c26;
  --bg-surface: #252530;
  --text-primary: #e8e6e1;
  --text-secondary: #a5a09a;
  --text-muted: #8a8580;
  --accent: #5a9fd4;
  --accent-hover: #6fb3e8;
  --accent-subtle: rgba(90, 159, 212, 0.07);
  --accent-glow: rgba(90, 159, 212, 0.16);
  --border: #2a2a36;
  --border-subtle: #20202a;
  --nav-bg: rgba(19, 19, 27, 0.92);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.18);
  --shadow-hover: 0 16px 50px rgba(0, 0, 0, 0.3);
  --grain-opacity: 0.018;
  --grain-blend: overlay;
}

/* ─── THEME TRANSITION ───────────────────────────────────────── */

.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* ─── BASE ───────────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ─── WCAG: FOCUS ────────────────────────────────────────────── */

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline-offset: 3px;
}

/* ─── WCAG: SKIP LINK ────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  z-index: 200;
  border-radius: 0 0 4px 4px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* ─── WCAG: REDUCED MOTION ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-stagger .reveal-child {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-prefix,
  .hero-name,
  .hero-line,
  .hero-role,
  .hero-tagline,
  .hero-actions,
  .scroll-hint {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── BULMA OVERRIDES ────────────────────────────────────────── */

.section {
  background: transparent;
  padding: var(--section-padding) 1.5rem;
}

.title,
.subtitle {
  color: var(--text-primary);
}

.title {
  font-family: var(--font-display);
  font-weight: 700;
}

.subtitle {
  font-family: var(--font-body);
  color: var(--text-secondary);
}

.content p,
.content li {
  color: var(--text-secondary);
}

.content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content a:hover {
  color: var(--accent-hover);
}

strong {
  color: var(--text-primary);
}

.label {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── NAVIGATION ─────────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.site-nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--border);
}

.site-nav .navbar {
  background: transparent !important;
  box-shadow: none !important;
}

.site-nav .navbar-brand .navbar-item {
  font-family: var(--font-display) !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--accent) !important;
  letter-spacing: 0.03em;
  background: transparent !important;
}

.site-nav .navbar-end .navbar-item {
  font-family: var(--font-display) !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  color: var(--text-secondary) !important;
  transition: color 0.3s ease;
  background: transparent !important;
}

.site-nav .navbar-end .navbar-item:hover {
  color: var(--accent) !important;
}

.site-nav .navbar-burger {
  color: var(--text-secondary);
}

.site-nav .navbar-burger span {
  background-color: var(--text-secondary) !important;
  height: 2px !important;
}

.site-nav .navbar-burger:hover {
  background: transparent !important;
}

.site-nav .navbar-burger:hover span {
  background-color: var(--accent) !important;
}

@media screen and (max-width: 1023px) {
  .site-nav .navbar-menu {
    background: var(--bg-elevated) !important;
    box-shadow: var(--shadow-hover);
    padding: 0.5rem 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  .site-nav .navbar-menu .navbar-item {
    color: var(--text-secondary) !important;
    padding: 0.75rem 1.5rem;
  }

  .site-nav .navbar-menu .navbar-item:hover {
    color: var(--accent) !important;
    background: var(--accent-subtle) !important;
  }
}

/* ─── THEME TOGGLE ───────────────────────────────────────────── */

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: color 0.3s ease, border-color 0.3s ease;
  padding: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

[data-theme="light"] .theme-toggle .fa-sun { display: none; }
[data-theme="light"] .theme-toggle .fa-moon { display: inline; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline; }

/* ─── HERO ───────────────────────────────────────────────────── */

.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, var(--accent-subtle) 0%, var(--bg-primary) 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 6rem 2rem 4rem;
}

.hero-prefix {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  opacity: 0;
  transform: translateY(10px);
  animation: heroReveal 0.6s var(--ease-out) 0.1s forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(12px);
  animation: heroReveal 0.7s var(--ease-out) 0.2s forwards;
}

.hero-line {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 1.25rem;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  animation: lineReveal 0.5s var(--ease-out) 0.45s forwards;
}

.hero-role {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateY(8px);
  animation: heroReveal 0.6s var(--ease-out) 0.55s forwards;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
  opacity: 0;
  animation: heroReveal 0.6s var(--ease-out) 0.65s forwards;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(8px);
  animation: heroReveal 0.6s var(--ease-out) 0.75s forwards;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  animation: heroReveal 0.6s var(--ease-out) 1.4s forwards;
}

.scroll-hint span {
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-hint-line {
  width: 1px;
  height: 20px;
  position: relative;
  overflow: hidden;
}

.scroll-hint-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollLine 2s ease-in-out infinite;
}

/* ─── BUTTONS ────────────────────────────────────────────────── */

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-subtle);
  color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-fullwidth {
  width: 100%;
  justify-content: center;
}

/* ─── SECTION HEADERS ────────────────────────────────────────── */

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-number {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 1.8rem !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem !important;
}

.section-subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.section-divider {
  width: 32px;
  height: 2px;
  background: var(--accent);
  margin: 1rem auto 0;
  border-radius: 1px;
}

/* ─── CONTENT SECTIONS ───────────────────────────────────────── */

.content-section {
  padding: var(--section-padding) 1.5rem;
}

.content-section.alt-bg {
  background: var(--bg-deep);
}

/* ─── CARDS ──────────────────────────────────────────────────── */

.card-refined {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}

.card-refined:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.card-refined h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-refined .card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.card-refined .card-list li {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.2rem 0 0.2rem 0.9rem;
  position: relative;
}

.card-refined .card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 4px;
  height: 1px;
  background: var(--accent);
}

/* ─── STATS ──────────────────────────────────────────────────── */

.stats-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 0;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--border);
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--accent);
  display: block;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── TECH SECTION ───────────────────────────────────────────── */

.tech-row {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.tech-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tech-row:first-child {
  padding-top: 0;
}

.tech-row h4 {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tech-row h4 i {
  color: var(--accent);
  font-size: 0.72rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag-refined {
  display: inline-block;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.tag-refined:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.tag-muted {
  border-color: var(--border);
  color: var(--text-muted);
  background: transparent;
}

/* ─── TIMELINE ───────────────────────────────────────────────── */

.timeline-section h3 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-section h3 i {
  color: var(--accent);
  font-size: 0.85rem;
}

.timeline-dark {
  position: relative;
  padding-left: 2.25rem;
  border-left: 2px solid var(--border);
}

.timeline-entry {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-2.25rem - 5px);
  top: 0.3rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg-deep);
}

.timeline-entry .entry-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.timeline-entry .entry-company {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}

.timeline-entry .entry-date {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-entry .entry-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── PROJECT CONTENT ────────────────────────────────────────── */

.project-tags {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.project-role {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.project-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
}

/* ─── CERTIFICATION CARDS ────────────────────────────────────── */

.cert-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease;
}

.cert-card:hover {
  border-color: var(--accent);
}

.cert-icon {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cert-card h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.cert-card .cert-date {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── CONTACT ────────────────────────────────────────────────── */

.contact-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.contact-box h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.4rem 0;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-link i {
  color: var(--accent);
  font-size: 0.85rem;
  width: 1.1rem;
  text-align: center;
}

.dark-input,
.dark-textarea {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.dark-input:focus,
.dark-textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
  outline: none;
}

.dark-input::placeholder,
.dark-textarea::placeholder {
  color: var(--text-muted) !important;
}

.form-success {
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--font-body);
  padding: 0.85rem;
  margin-top: 0.75rem;
  display: none;
}

.form-success.show {
  display: block;
}

.contact-notice {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.site-footer p {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ─── IMPRESSUM / LEGAL ──────────────────────────────────────── */

.legal-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.legal-box.accent-border {
  border-left: 3px solid var(--accent);
}

.legal-box h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.legal-box h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  margin-top: 1.1rem;
}

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

.legal-box p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.legal-box a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-box a:hover {
  color: var(--accent-hover);
}

.legal-box ul {
  padding-left: 0.75rem;
}

.legal-box ul li {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.15rem 0 0.15rem 0.6rem;
  position: relative;
  list-style: none;
}

.legal-box ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 4px;
  height: 1px;
  background: var(--accent);
}

.legal-box .small-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.legal-highlight {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.1rem;
  margin-top: 0.85rem;
}

.legal-highlight h3 {
  margin-top: 0;
}

/* ─── ANIMATIONS ─────────────────────────────────────────────── */

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lineReveal {
  to {
    transform: scaleX(1);
  }
}

@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 0; }
  100% { top: 100%; }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger .reveal-child {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.reveal-stagger.visible .reveal-child {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.visible .reveal-child:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible .reveal-child:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.visible .reveal-child:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.visible .reveal-child:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.visible .reveal-child:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.visible .reveal-child:nth-child(6) { transition-delay: 300ms; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media screen and (max-width: 768px) {
  :root,
  [data-theme="light"],
  [data-theme="dark"] {
    --section-padding: 3.5rem;
  }

  .section-title {
    font-size: 1.4rem !important;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .stats-band {
    padding: 1.5rem 0;
    margin-top: 2rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stat-item + .stat-item::before {
    display: none;
  }

  .card-refined,
  .contact-box {
    padding: 1.25rem;
  }

  .scroll-hint {
    bottom: 1.25rem;
  }

  .hero-content {
    padding: 5rem 1.5rem 3rem;
  }
}

@media screen and (max-width: 480px) {
  .stat-number {
    font-size: 1.05rem;
  }

  .stat-label {
    font-size: 0.6rem;
  }

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

/* ─── SCROLLBAR ──────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ─── SELECTION ──────────────────────────────────────────────── */

::selection {
  background: var(--accent-glow);
  color: var(--text-primary);
}
