/* ============================================================
   DevWright Labs — 3D Immersive Site
   Design system: deep-space navy + emerald/cyan glow, glassmorphism,
   real 3D transforms. Zero-build, pairs with a Three.js WebGL scene.
   ============================================================ */

:root {
  --bg: #04060d;
  --bg-2: #070b16;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.02);
  --brd: rgba(255, 255, 255, 0.09);
  --brd-strong: rgba(255, 255, 255, 0.16);
  --txt: #e9f2f0;
  --muted: #92a6ad;
  --muted-2: #6b7d86;

  --g1: #13c08a;   /* emerald  */
  --g2: #0fa866;   /* deep green (brand) */
  --c1: #22d3ee;   /* cyan */
  --c2: #38f0b6;   /* mint */
  --grad: linear-gradient(120deg, #0fa866 0%, #13c08a 45%, #22d3ee 105%);
  --grad-soft: linear-gradient(120deg, rgba(19,192,138,.18), rgba(34,211,238,.14));

  --maxw: 1200px;
  --r: 18px;
  --r-lg: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 40px rgba(19, 192, 138, 0.35);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: radial-gradient(1200px 800px at 70% -10%, #0a1626 0%, var(--bg) 55%) fixed;
  color: var(--txt);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .brand, .num {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.9em; color: var(--c2); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.grad-txt {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ============================================================
   WEBGL BACKGROUND
   ============================================================ */
.webgl-wrap {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none;
}
#scene { width: 100%; height: 100%; display: block; }
.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(19, 192, 138, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 192, 138, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  opacity: 0.6;
}
.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(4, 6, 13, 0.65) 100%);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn-primary { background: var(--grad); color: #03110c; box-shadow: 0 10px 34px -8px rgba(19, 192, 138, 0.6); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -8px rgba(34, 211, 238, 0.6); }
.btn-ghost { background: var(--panel); border-color: var(--brd); color: var(--txt); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--g1); background: rgba(19, 192, 138, 0.1); transform: translateY(-2px); }
.btn-lg { padding: 1.05rem 2rem; font-size: 1.02rem; }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 8, 16, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--brd);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-size: 1.28rem; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; background: var(--grad);
  display: inline-grid; place-items: center; color: #03110c; font-weight: 800; font-size: 1rem;
  box-shadow: var(--glow); transform: translateZ(0);
  animation: floaty 6s ease-in-out infinite;
}
.brand-text span { color: var(--g1); }
.nav-links { display: flex; align-items: center; gap: 2.1rem; font-size: 0.95rem; color: var(--muted); font-weight: 500; }
.nav-links a { position: relative; transition: color 0.25s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad); transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--txt); }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 0.9rem; }
.menu-btn { display: none; background: none; border: 0; color: var(--txt); cursor: pointer; padding: 6px; }
.menu-btn svg { width: 26px; height: 26px; }

.mobile-menu {
  position: fixed; inset: 74px 0 auto 0; z-index: 99;
  background: rgba(5, 8, 16, 0.96); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--brd);
  display: grid; gap: 0.4rem; padding: 18px 24px 26px;
  transform: translateY(-120%); transition: transform 0.4s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { padding: 0.75rem 0.4rem; color: var(--muted); border-bottom: 1px solid var(--brd); font-weight: 500; }
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 0.6rem; justify-content: center; }

/* ============================================================
   SECTION PRIMITIVES
   ============================================================ */
.section { position: relative; padding: 120px 0; }
.section-head { max-width: 720px; margin: 0 auto 62px; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--g1); font-weight: 600; margin-bottom: 1rem;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--g1); opacity: 0.7; }
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); margin-bottom: 1rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero { min-height: 100svh; display: grid; place-items: center; text-align: center; padding-top: 90px; }
.hero .wrap { position: relative; z-index: 3; }
.pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.82rem; color: var(--muted); font-weight: 500;
  border: 1px solid var(--brd); background: var(--panel);
  padding: 0.5rem 1.05rem; border-radius: 999px; margin-bottom: 1.7rem;
  backdrop-filter: blur(8px);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 14px var(--c2); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 5.2rem); font-weight: 700; margin-bottom: 1.4rem; }
.hero .sub { font-size: clamp(1.05rem, 2.2vw, 1.32rem); color: var(--muted); max-width: 660px; margin: 0 auto 2.4rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 2.4rem; justify-content: center; flex-wrap: wrap;
  margin-top: 3.6rem; color: var(--muted);
}
.hero-stats .num { display: block; font-size: 1.85rem; color: var(--txt); }
.hero-stats span.lbl { font-size: 0.82rem; }
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 3; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2);
  display: grid; justify-items: center; gap: 8px;
}
.scroll-cue .mouse {
  width: 22px; height: 36px; border: 1.5px solid var(--brd-strong); border-radius: 12px; position: relative;
}
.scroll-cue .mouse::after {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 7px; border-radius: 2px; background: var(--g1); animation: wheel 1.8s infinite;
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { padding: 34px 0; border-top: 1px solid var(--brd); border-bottom: 1px solid var(--brd); overflow: hidden; background: rgba(5,8,16,.4); }
.marquee-track { display: flex; gap: 3.4rem; width: max-content; animation: slide 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { color: var(--muted-2); font-family: "Space Grotesk"; font-weight: 600; font-size: 1.05rem; white-space: nowrap; opacity: 0.8; }
.marquee-track span::before { content: "◇"; color: var(--g1); margin-right: 0.9rem; opacity: 0.6; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.about-copy h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 1.3rem; }
.about-copy p { color: var(--muted); margin-bottom: 1.1rem; font-size: 1.05rem; }
.about-copy .lede { color: var(--txt); font-size: 1.18rem; }
.about-points { display: grid; gap: 0.75rem; margin-top: 1.6rem; }
.about-points li { list-style: none; display: flex; gap: 0.7rem; color: var(--muted); }
.about-points li::before { content: "▸"; color: var(--g1); }
.about-visual {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  padding: 34px; min-height: 340px;
  background: var(--grad-soft); border: 1px solid var(--brd);
  display: grid; align-content: center; gap: 18px; box-shadow: var(--shadow);
}
.about-visual .orb {
  position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.55;
}
.about-visual .orb.a { width: 220px; height: 220px; background: var(--g1); top: -60px; right: -40px; }
.about-visual .orb.b { width: 180px; height: 180px; background: var(--c1); bottom: -50px; left: -30px; opacity: 0.4; }
.mini-stat { position: relative; z-index: 2; }
.mini-stat .num { font-size: 2.4rem; }
.mini-stat span { color: var(--muted); font-size: 0.92rem; }

/* ============================================================
   CARDS (shared tilt)
   ============================================================ */
.tilt { transform-style: preserve-3d; transition: transform 0.18s var(--ease); will-change: transform; }
.tilt .tilt-inner { transform: translateZ(28px); }

.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; perspective: 1100px; }
.svc-card {
  position: relative; padding: 34px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--brd); overflow: hidden;
  min-height: 260px;
}
.svc-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(19,192,138,0.14), transparent 40%);
}
.svc-card:hover::before { opacity: 1; }
.svc-card:hover { border-color: var(--brd-strong); }
.svc-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--brd); margin-bottom: 1.2rem;
}
.svc-icon svg { width: 26px; height: 26px; stroke: var(--g1); }
.svc-card h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }
.svc-card p { color: var(--muted); margin-bottom: 1.1rem; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.svc-tags span { font-size: 0.76rem; color: var(--muted); border: 1px solid var(--brd); border-radius: 999px; padding: 0.3rem 0.75rem; }

/* ============================================================
   PROCESS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative; padding: 30px 26px; border-radius: var(--r-lg);
  background: var(--panel-2); border: 1px solid var(--brd);
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: "Space Grotesk"; font-size: 2.6rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.85; display: block; margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* ============================================================
   WORK / PORTFOLIO
   ============================================================ */
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; perspective: 1200px; }
.work-card {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: var(--panel); border: 1px solid var(--brd); min-height: 230px;
  display: flex; flex-direction: column;
}
.work-card:hover { border-color: var(--brd-strong); }
.work-media {
  height: 130px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0a1a24, #071018);
  display: grid; place-items: center;
}
.work-media::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120px circle at 50% 40%, rgba(34,211,238,0.22), transparent 70%);
}
.work-media .glyph { font-size: 2rem; opacity: 0.5; z-index: 2; }
.work-tag {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(5,8,16,0.7); border: 1px solid var(--brd); color: var(--g1);
  padding: 0.3rem 0.6rem; border-radius: 999px; backdrop-filter: blur(6px);
}
.work-body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.work-body h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.work-body p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.work-link { margin-top: 0.9rem; color: var(--g1); font-size: 0.85rem; font-weight: 600; }

/* ============================================================
   STACK
   ============================================================ */
.stack-grid { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; max-width: 900px; margin: 0 auto; }
.stack-grid span {
  padding: 0.6rem 1.15rem; border-radius: 999px; border: 1px solid var(--brd);
  background: var(--panel); color: var(--muted); font-size: 0.92rem; font-weight: 500;
  transition: transform 0.25s var(--ease), color 0.25s, border-color 0.25s;
}
.stack-grid span:hover { transform: translateY(-3px); color: var(--txt); border-color: var(--g1); }

/* ============================================================
   STATS
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-box { padding: 34px 20px; border-radius: var(--r-lg); background: var(--panel-2); border: 1px solid var(--brd); }
.stat-box .num { font-size: clamp(2.2rem, 5vw, 3.2rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-box span.lbl { color: var(--muted); font-size: 0.95rem; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.carousel { position: relative; max-width: 820px; margin: 0 auto; }
.carousel-track { position: relative; min-height: 220px; }
.quote-card {
  position: absolute; inset: 0; opacity: 0; transform: translateY(16px) scale(0.98);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  padding: 42px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--brd); text-align: center;
  pointer-events: none;
}
.quote-card.active { opacity: 1; transform: none; pointer-events: auto; }
.quote-card blockquote { font-size: 1.3rem; font-family: "Space Grotesk"; line-height: 1.45; margin-bottom: 1.4rem; }
.quote-card cite { color: var(--g1); font-style: normal; font-size: 0.95rem; font-weight: 600; }
.carousel-dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: 26px; }
.carousel-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brd-strong); transition: width 0.3s, background 0.3s;
}
.carousel-dots button.active { width: 26px; border-radius: 6px; background: var(--grad); }

/* ============================================================
   WHY
   ============================================================ */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card { padding: 30px; border-radius: var(--r-lg); background: var(--panel-2); border: 1px solid var(--brd); }
.why-card .why-ic { font-size: 1.6rem; margin-bottom: 0.8rem; }
.why-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.why-card p { color: var(--muted); font-size: 0.96rem; }

/* ============================================================
   CTA
   ============================================================ */
.cta-panel {
  position: relative; overflow: hidden; text-align: center;
  padding: 70px 30px; border-radius: 30px;
  background: var(--grad-soft); border: 1px solid var(--brd-strong); box-shadow: var(--shadow);
}
.cta-panel::before, .cta-panel::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4;
}
.cta-panel::before { width: 320px; height: 320px; background: var(--g1); top: -140px; left: -60px; }
.cta-panel::after { width: 280px; height: 280px; background: var(--c1); bottom: -140px; right: -60px; }
.cta-panel h2 { position: relative; font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 1rem; }
.cta-panel p { position: relative; color: var(--muted); max-width: 520px; margin: 0 auto 2rem; font-size: 1.08rem; }
.cta-panel .hero-cta { position: relative; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 54px; }
.contact-copy h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1.1rem; }
.contact-copy p { color: var(--muted); margin-bottom: 1.8rem; }
.contact-list { display: grid; gap: 1rem; }
.contact-list a, .contact-list div { display: flex; gap: 0.8rem; align-items: center; color: var(--muted); }
.contact-list .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--brd); color: var(--g1); flex-shrink: 0; }
.contact-list strong { color: var(--txt); font-weight: 600; display: block; font-size: 0.95rem; }
.contact-list small { color: var(--muted-2); }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 34px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--brd); }
.field { display: grid; gap: 0.4rem; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  background: rgba(0,0,0,0.25); border: 1px solid var(--brd); border-radius: 12px;
  padding: 0.85rem 1rem; color: var(--txt); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--g1); box-shadow: 0 0 0 3px rgba(19,192,138,0.15); }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status { font-size: 0.9rem; color: var(--g1); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--brd); padding: 50px 0 40px; background: rgba(4,6,13,0.6); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-inner p { color: var(--muted-2); font-size: 0.9rem; }
.footer-nav { display: flex; gap: 1.6rem; }
.footer-nav a { color: var(--muted); font-size: 0.9rem; transition: color 0.25s; }
.footer-nav a:hover { color: var(--g1); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes wheel { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 18px; } }
@keyframes slide { to { transform: translateX(-50%); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .section { padding: 88px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .menu-btn { display: inline-grid; }
  .steps { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.6rem; }
  .tilt { transform: none !important; }
}

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

/* ============================================================
   SUBPAGE COMPATIBILITY — projects/*.html + contact.html
   Keeps the dedicated pages on-brand with the new design system.
   ============================================================ */
.project-page, .contact-page { min-height: 100vh; }
.bg-layer { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.bg-handshake {
  position: absolute; inset: 0;
  background:
    radial-gradient(720px 520px at 74% 8%, rgba(19, 192, 138, 0.16), transparent 60%),
    radial-gradient(620px 520px at 18% 82%, rgba(34, 211, 238, 0.11), transparent 60%);
}
.bg-veil { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, transparent 42%, rgba(4, 6, 13, 0.72) 100%); }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: 74px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 60px);
  background: rgba(5, 8, 16, 0.72); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--brd);
}
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); box-shadow: var(--glow); display: inline-block; }
.primary-nav { display: flex; gap: 1.8rem; font-size: 0.95rem; color: var(--muted); font-weight: 500; }
.primary-nav a { position: relative; transition: color 0.25s; }
.primary-nav a:hover { color: var(--txt); }

.content-shell { max-width: 900px; margin: 0 auto; padding: 140px 24px 40px; position: relative; z-index: 2; }
.content-shell h1 { font-size: clamp(2.2rem, 5.4vw, 3.4rem); margin: 0.5rem 0 1rem; }
.content-shell h2 { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.02em; }
.content-shell ul { margin: 1rem 0 0 1.15rem; display: grid; gap: 0.55rem; color: var(--muted); }
.breadcrumb { display: inline-block; color: var(--g1); font-size: 0.9rem; font-weight: 600; margin-bottom: 1.4rem; transition: opacity 0.25s; }
.breadcrumb:hover { opacity: 0.75; }
.section-sub { color: var(--muted); font-size: 1.12rem; max-width: 680px; }

.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 1.2rem; }
.media-grid figure { margin: 0; }
.media-grid figcaption { color: var(--muted-2); font-size: 0.85rem; margin-top: 0.55rem; }
.placeholder-media {
  aspect-ratio: 16 / 10; border-radius: var(--r);
  border: 1px dashed var(--brd-strong); background: var(--panel);
  display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: 0.9rem; padding: 1rem;
}

/* contact.html form uses .field-wide (legacy) alongside the new grid */
.field-wide { grid-column: 1 / -1; }
.contact-page .contact-form { max-width: 760px; margin: 0 auto; }

/* legacy subpage footer (direct <p> + <nav> children) */
.project-page .site-footer, .contact-page .site-footer { text-align: center; padding: 44px 24px; }
.project-page .site-footer nav, .contact-page .site-footer nav { display: inline-flex; gap: 1.4rem; margin-top: 0.6rem; justify-content: center; }
.project-page .site-footer nav a, .contact-page .site-footer nav a { color: var(--muted); font-size: 0.9rem; }
.project-page .site-footer nav a:hover, .contact-page .site-footer nav a:hover { color: var(--g1); }

@media (max-width: 640px) {
  .primary-nav { display: none; }
  .media-grid { grid-template-columns: 1fr; }
}
