/* ==========================================================================
   SPARSH SHARMA — PURE BRUTALIST DESIGN SYSTEM
   Theme: Cherry Red (#d2042d) & Absolute Black (#000000)
   ZERO Gradients | ZERO Glows | High-Contrast Architectural Layouts
   ========================================================================== */

:root {
  /* ── Core Palette: Absolute Black & Cherry Red ── */
  --bg: #000000;
  --bg-subtle: #060606;
  --surface: #0a0a0a;
  --surface-hover: #121212;
  --surface-alt: #161616;

  /* ── Crisp Brutalist Borders (No Blurs, No Halos) ── */
  --border: #222222;
  --border-light: #333333;
  --border-heavy: #444444;

  /* ── Cherry Red Accents ── */
  --cherry: #d2042d;
  --cherry-dark: #8b001a;
  --cherry-subtle: #1a0206;
  --cherry-border: #520512;

  /* ── Stark Typography Colors ── */
  --t1: #ffffff;
  --t2: #a0a0a0;
  --t3: #555555;
  --t-dim: #333333;

  /* Legacy color aliases mapped to cherry and stark mono */
  --cyan: var(--cherry);
  --orange: var(--cherry);
  --purple: var(--cherry);
  --ruby: var(--cherry);

  /* ── Typography Families ── */
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', monospace;

  /* ── Layout & Sharp Geometry ── */
  --max: 1280px;
  --radius: 0px; /* Pure Brutalist Sharp Geometry */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Baseline ────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: default;
}

/* Hardware accelerated stacking */
main, header.nav, footer {
  position: relative;
  z-index: 2;
}

/* Off-screen layout optimization — restricted to wide desktop only to prevent mobile scroll jumps & coordinate shifts */
@media (min-width: 1025px) {
  #work, #private, #skills, #clients, #creds, #contact {
    content-visibility: auto;
    contain-intrinsic-size: 1200px;
  }
}

/* Global Interactive Elements */
a, button, [role="button"], .btn, .nav-link, .pcard, .ticket, .cred-card, .cl-item {
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  color: inherit;
}

canvas {
  pointer-events: none !important;
}

ul {
  list-style: none;
}

::selection {
  background: var(--cherry);
  color: #000000;
}

/* ── Crisp Scroll Progress Bar (NO Gradient, NO Glow) ───────────────────── */
.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  background: #111111;
}

.scroll-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cherry);
  transition: width 0.08s linear;
}

/* ── Layout Wrapper ─────────────────────────────────────────────────────── */
.wrap {
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
}

/* Background Layer: Pure Absolute Black, zero gradients */
.bg-layer {
  display: none !important;
}

/* ── Brutalist Navigation Bar ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  background: #000000;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.nav.scrolled {
  background: #000000;
  border-bottom-color: var(--border-light);
}

.nav-inner {
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: auto;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 0;
  object-fit: cover;
  border: 1px solid var(--border-light);
}

.nav-brand:hover .nav-avatar {
  border-color: var(--cherry);
}

.nav-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  color: var(--t1);
  text-transform: uppercase;
}

.nav-name-dim {
  color: var(--cherry);
}

.nav-desktop,
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0;
  color: var(--t2);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #fff;
  border-color: var(--border-light);
  background: var(--surface);
}

.nav-link.nav-active {
  color: var(--cherry);
  border-color: var(--cherry);
  background: var(--surface);
}

.nav-link-num {
  color: var(--t3);
  font-size: 0.65rem;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--t2);
  border: 1px solid var(--border);
  background: #000000;
  transition: all 0.2s;
}

.sound-toggle:hover {
  border-color: var(--cherry);
  color: #fff;
}

.sound-toggle.sfx-active {
  color: #fff;
  border-color: var(--cherry);
  background: var(--cherry);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 0;
  margin-left: 0.5rem;
  background: var(--cherry);
  border: 1px solid var(--cherry);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.nav-cta:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.nav-backdrop,
.nav-drawer {
  display: none !important;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: #000000;
  cursor: pointer;
  z-index: 1005;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.nav-burger:hover {
  border-color: var(--cherry);
  background: var(--surface);
}

.nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
  transform-origin: center;
}

.nav-burger.open {
  border-color: var(--cherry);
  background: #0a0a0f;
}

.nav-burger.open span {
  background: var(--cherry);
}

.nav-burger.open span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-burger.open span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ── Hero Section (Insanely Massive 3D Engineering Megastructure) ────────── */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
  background: #000000;
}

/* 3D WebGL Canvas Mount */
.hero-webgl-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none !important;
}

.hero-webgl-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  pointer-events: none !important;
}

/* Deep Volumetric Cherry Atmosphere */
.hero-glow-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 75% 55% at 72% 38%, rgba(210, 4, 45, 0.32) 0%, rgba(139, 0, 0, 0.12) 45%, transparent 75%),
    radial-gradient(ellipse 50% 40% at 15% 65%, rgba(210, 4, 45, 0.14) 0%, transparent 65%);
  filter: blur(40px);
}

/* Blueprint CAD Grid Overlay */
.hero-grid-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 70px 70px;
  background-position: center center;
  mask-image: radial-gradient(circle at 65% 45%, black 45%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 65% 45%, black 45%, transparent 85%);
}

/* Contrast & Ground Fade Vignette */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: 
    linear-gradient(to bottom, transparent 65%, #000000 100%),
    linear-gradient(to right, rgba(0, 0, 0, 0.65) 0%, transparent 50%, rgba(0, 0, 0, 0.25) 100%);
}

.hero-wrap {
  position: relative;
  z-index: 3;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 950px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Sharp Brutalist Status Pill */
.hero-badge-wrap {
  display: flex;
  align-items: center;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0;
  background: #000000;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.hero-status-pill:hover {
  border-color: var(--cherry);
  background: var(--surface);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--cherry);
  display: inline-block;
  flex-shrink: 0;
}

.radar-ping-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.radar-dot {
  width: 7px;
  height: 7px;
  background: var(--cherry);
}

.radar-ping {
  display: none !important; /* Remove AI glow wave */
}

.status-main {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-sep {
  color: var(--t3);
  font-family: var(--mono);
}

.status-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cherry);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Massive Brutalist Headline */
.hero-title {
  font-size: clamp(3rem, 7.2vw, 5.8rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #ffffff;
  text-transform: uppercase;
}

.h-row {
  display: block;
}

.h-inner {
  display: inline-block;
}

.h-row-accent .h-inner em {
  font-family: inherit;
  font-weight: 900;
  font-style: normal;
  color: var(--cherry);
  text-transform: uppercase;
  padding: 0;
  text-shadow: 0 0 28px rgba(210, 4, 45, 0.45);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.65;
  color: var(--t2);
  max-width: 720px;
}

/* Telemetry Tape HUD: Raw Flight-Computer Grid (Flat, Solid, No Glows) */
.hero-telemetry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  background: #000000;
  margin: 0.5rem 0;
}

.telemetry-card {
  background: #000000;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-right: 1px solid var(--border);
  border-radius: 0;
  transition: background 0.2s, border-color 0.2s;
}

.telemetry-card:last-child {
  border-right: none;
}

.telemetry-card:hover {
  background: var(--surface);
  border-color: var(--cherry);
}

.telemetry-val {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cherry);
  letter-spacing: -0.02em;
  line-height: 1;
}

.telemetry-unit {
  font-size: 0.8rem;
  color: #ffffff;
  font-weight: 600;
  margin-left: 2px;
}

.telemetry-lbl {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

/* Sharp Brutalist Action Buttons */
.hero-btns {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.btn-fill {
  background: var(--cherry);
  color: #ffffff;
  border: 1px solid var(--cherry);
}

.btn-fill:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.btn-line {
  background: #000000;
  color: #ffffff;
  border: 1px solid var(--border-light);
}

.btn-line:hover {
  border-color: #ffffff;
  background: var(--surface);
}

.btn-sub-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 0;
  background: #222222;
  color: var(--cherry);
}

.hero-term-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.25rem;
  border-radius: 0;
  background: #000000;
  border: 1px solid var(--border);
  color: var(--t2);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.hero-term-btn:hover {
  border-color: var(--cherry);
  color: #ffffff;
  background: var(--surface);
}

.term-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 0;
  background: #222222;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cherry);
}

/* ── Section Dividers & Headers ─────────────────────────────────────────── */
.sect {
  padding: clamp(5rem, 9vw, 8rem) 0;
  border-top: 1px solid var(--border);
  background: #000000;
  position: relative;
}

.sect-head {
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.sect-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cherry);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sect-tag::before {
  content: '//';
  color: var(--cherry);
}

.sect-title {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-transform: uppercase;
}

.sect-sub {
  color: var(--t2);
  font-size: 1rem;
  max-width: 600px;
  line-height: 1.6;
}

/* ── SECTION 1: Selected Works (Wide Architectural Editorial Rows) ──────── */
/* Distinct layout: Full-width stacked architectural rows with sharp borders */
#work .pcard {
  position: relative;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 0;
  margin-bottom: 1.5rem;
  background: #050505;
  padding: clamp(2rem, 3.5vw, 3rem);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

#work .pcard:hover {
  border-color: var(--border-light);
  border-left-color: var(--cherry);
  background: #0a0a0a;
}

#work .pcard::before {
  display: none !important; /* NO gradient spotlights */
}

.pcard-inner {
  display: grid;
  grid-template-columns: 160px 1fr 200px;
  gap: 2.5rem;
  align-items: start;
}

.pcard-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pcard-num {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--cherry);
  line-height: 1;
}

.pcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pcard-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--t2);
  background: #000000;
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 0;
}

.pcard-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pcard-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.1;
}

.pcard-desc {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--t2);
  max-width: 680px;
}

.pcard-feats {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.pcard-feats li {
  font-size: 0.88rem;
  color: var(--t2);
  position: relative;
  padding-left: 1.2rem;
  line-height: 1.5;
}

.pcard-feats li::before {
  content: '■';
  position: absolute;
  left: 0;
  color: var(--cherry);
  font-size: 0.5rem;
  top: 0.25rem;
}

.pcard-right {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
}

.pcard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 0;
  background: var(--cherry);
  border: 1px solid var(--cherry);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.pcard-link:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.pcard-link-sec {
  background: #000000;
  border: 1px solid var(--border);
  color: var(--t2);
}

.pcard-link-sec:hover {
  border-color: #ffffff;
  color: #ffffff;
  background: var(--surface);
}

.pcard-accent {
  display: none !important;
}

/* ── SECTION 2: In the Lab (Blueprint / Dossier Specification Cards) ─────── */
/* ── SECTION 2: In the Lab (Experimental Engineering Dossier) ────────── */
.lab-dossier-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lab-dossier-card {
  position: relative;
  border: 1px dashed rgba(167, 139, 250, 0.4);
  background: #07070a;
  padding: clamp(2rem, 3.5vw, 3rem);
  transition: all 0.25s ease;
  overflow: hidden;
}

.lab-dossier-card:hover {
  border-color: var(--purple);
  border-style: solid;
  background: #0a0910;
  box-shadow: 0 0 35px rgba(167, 139, 250, 0.08);
}

.lab-dossier-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.8rem;
}

.lab-dossier-code {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.08em;
}

.lab-dossier-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.lab-dossier-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: 0.4rem;
}

.lab-dossier-sub {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.lab-dossier-modules {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.lab-mod-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 0.85rem 1.1rem;
  transition: border-color 0.2s;
}

.lab-mod-item:hover {
  border-color: rgba(167, 139, 250, 0.4);
}

.lab-mod-icon {
  color: var(--purple);
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.lab-mod-item strong {
  display: block;
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.lab-mod-item p {
  font-size: 0.82rem;
  color: var(--t2);
  line-height: 1.45;
  margin: 0;
}

.lab-dossier-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  background: #000000;
  border: 1px solid var(--border);
  padding: 1.6rem;
  height: 100%;
}

.lab-spec-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lab-spec-lbl {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-spec-val {
  font-size: 0.88rem;
  color: #ffffff;
  font-weight: 600;
}

/* ── SECTION 3: Commercial Clients (High-Contrast Commercial Banners) ───────── */
.client-banners-list {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-top: 0.5rem;
}

.client-banner {
  position: relative;
  background: #050508;
  border: 1px solid var(--border);
  border-left: 6px solid var(--cherry);
  padding: clamp(1.6rem, 2.5vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: all 0.25s ease;
}

.client-banner:hover {
  background: #09090e;
  border-color: rgba(255, 255, 255, 0.25);
  border-left-color: var(--cherry);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.cbanner-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.8rem;
}

.cbanner-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--cherry);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cbanner-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cherry);
  animation: beaconPulse 1.8s infinite;
}

.cbanner-id {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--t3);
  letter-spacing: 0.06em;
}

.cbanner-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.cbanner-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.cbanner-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cbanner-title {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}

.cbanner-subtitle {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--t2);
  letter-spacing: 0.03em;
}

.cbanner-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.25rem 0.6rem;
  letter-spacing: 0.06em;
}

.cbanner-desc {
  font-size: 0.94rem;
  color: var(--t1);
  line-height: 1.65;
}

.cbanner-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  background: #000000;
  border: 1px solid var(--border);
  padding: 0.9rem 1.2rem;
}

.cspec-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cspec-lbl {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cspec-val {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
}

.cbanner-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.cbanner-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cbanner-pills span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--t2);
  background: #000000;
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  transition: all 0.2s;
}

.cbanner-pills span:hover {
  border-color: var(--cherry);
  color: #ffffff;
}

.cbanner-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* ── SECTION 4: Stack & Capabilities (Clean Architecture Grid) ──────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stack-card {
  position: relative;
  background: #060608;
  border: 1px solid var(--border);
  padding: clamp(1.4rem, 2.2vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.stack-card:hover {
  background: #09090e;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.stack-card-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
}

.stack-card-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.stack-icon-lang { color: #38bdf8; border-color: rgba(56, 189, 248, 0.3); }
.stack-icon-frontend { color: #00d8ff; border-color: rgba(0, 216, 255, 0.3); }
.stack-icon-ai { color: var(--cherry); border-color: rgba(225, 29, 72, 0.3); }
.stack-icon-backend { color: #a78bfa; border-color: rgba(167, 139, 250, 0.3); }

.stack-card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.stack-card-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.08em;
}

.stack-card-title {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stack-card-badge {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.55rem;
  background: #000000;
  border: 1px solid var(--border);
  color: var(--t2);
  text-transform: uppercase;
  white-space: nowrap;
}

.stack-card-desc {
  font-size: 0.85rem;
  color: var(--t3);
  line-height: 1.5;
  margin: 0;
}

.stack-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: #000000;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.stack-item:hover {
  background: #0d0d14;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(3px);
}

.stack-item-primary {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.16);
}

.stack-item-primary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.35);
}

.tech-name {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.tech-role {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--t3);
  letter-spacing: 0.02em;
  text-align: right;
}

.stack-item-primary .tech-role {
  color: var(--t2);
}

/* ── Brutalist Marquee ──────────────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  contain: paint;
  max-width: 100vw;
  width: 100%;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #000000;
  white-space: nowrap;
}

.marquee {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #222222;
  text-transform: uppercase;
  animation: marqueeRoll 25s linear infinite;
}

@keyframes marqueeRoll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* ── SECTION 5: Expansive Executive Engineering Dossiers ─────────────────── */
.exp-dossier-list {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-top: 1rem;
}

.exp-dossier-card {
  position: relative;
  border: 1px solid var(--border);
  border-left: 5px solid var(--cherry);
  background: #060608;
  padding: clamp(2rem, 3.2vw, 2.8rem);
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 2.5rem;
  align-items: start;
  transition: all 0.25s ease;
}

.exp-dossier-card:hover {
  background: #0a0a0e;
  border-color: rgba(255, 255, 255, 0.2);
  border-left-color: var(--cherry);
  transform: translateX(4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.exp-dossier-left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-right: 1px solid var(--border);
  padding-right: 1.5rem;
}

.exp-period-badge {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--cherry);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #000000;
  border: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  display: inline-block;
  align-self: flex-start;
}

.exp-beacon-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.exp-beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--t3);
}

.exp-beacon-dot.active {
  background: var(--cherry);
  animation: beaconPulse 1.8s infinite;
}

.exp-beacon-status {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--t2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exp-location-tag {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--t3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exp-dossier-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.exp-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.exp-role-title {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.exp-org-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--t2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exp-team-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--cherry);
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.3);
  padding: 0.15rem 0.5rem;
}

.exp-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.exp-action-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--cherry);
  border: 1px solid var(--cherry);
  padding: 0.35rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  text-decoration: none;
}

.exp-action-btn:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.exp-btn-sec {
  background: #000000;
  border-color: var(--border);
  color: var(--t2);
}

.exp-btn-sec:hover {
  background: var(--surface);
  border-color: #ffffff;
  color: #ffffff;
}

.exp-summary {
  font-size: 0.94rem;
  color: var(--t1);
  line-height: 1.6;
}

.exp-impact-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
}

.exp-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: var(--t2);
  line-height: 1.5;
}

.exp-bullet-sym {
  color: var(--cherry);
  font-size: 0.52rem;
  margin-top: 0.32rem;
  flex-shrink: 0;
}

.exp-bullet-item strong {
  color: #ffffff;
}

.exp-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}

.exp-pill-row span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--t2);
  padding: 0.2rem 0.55rem;
  background: #000000;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.exp-pill-row span:hover {
  border-color: var(--cherry);
  color: #ffffff;
}

/* ── Dedicated Verified Credentials Section ──────────────────────────────── */
.certs-section {
  margin-top: 4.5rem;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.certs-head {
  margin-bottom: 1.8rem;
}

.certs-title {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.cert-card {
  position: relative;
  border: 1px solid var(--border);
  border-top: 3px solid var(--cherry);
  background: #060608;
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.25s ease;
}

.cert-card:hover {
  background: #09090d;
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: var(--cherry);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.cert-plaque-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.65rem;
}

.cert-security-seal {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 0.08em;
}

.cert-meta-tags {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cert-id-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--cherry);
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.25);
  padding: 0.15rem 0.45rem;
  letter-spacing: 0.05em;
}

.cert-year-badge {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cert-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.cert-issuer-badge {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.cert-org-highlight {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 900;
  color: var(--cherry);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cert-issuer-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--t3);
  letter-spacing: 0.06em;
}

.cert-name {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cert-desc {
  font-size: 0.84rem;
  color: var(--t2);
  line-height: 1.55;
}

.cert-rubric-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  margin-top: 0.2rem;
}

.rubric-title {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.08em;
}

.cert-competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.comp-pill {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--t2);
  background: #000000;
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
}

.comp-pill:hover {
  border-color: var(--cherry);
  color: #ffffff;
}

.cert-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.cert-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--cherry);
  background: rgba(225, 29, 72, 0.1);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
}

.cert-btn:hover {
  background: var(--cherry);
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.35);
  color: #ffffff;
}

.exp-end-marker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 2.5rem 0 1.5rem;
}

.exp-end-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--t3);
  letter-spacing: 0.15em;
}

/* ── SECTION 6: Project Inquiry & Tracking (Brutalist Inquiry Console) ───── */
.hire-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

.inquiry-form-wrap {
  border: 1px solid var(--border);
  border-radius: 0;
  background: #060606;
  padding: clamp(2rem, 3.5vw, 3rem);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.field-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--t2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field-label .req {
  color: var(--cherry);
}

.field-input {
  background: #000000;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0.85rem 1rem;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.field-input:focus {
  border-color: var(--cherry);
  background: #0a0a0a;
}

.field-input::placeholder {
  color: var(--t3);
}

.field-ta {
  resize: vertical;
  min-height: 120px;
}

.field-err {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cherry);
}

.hire-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.track-lookup {
  border: 1px solid var(--border);
  border-radius: 0;
  background: #060606;
  padding: 1.8rem;
}

.sidebar-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cherry);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.track-input-row {
  display: flex;
  gap: 0.5rem;
}

.track-result {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 0;
  background: #000000;
  border: 1px solid var(--cherry);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #ffffff;
}

.contact-links {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 0;
}

.cl-item {
  padding: 1rem 1.2rem;
  background: #000000;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.cl-item:last-child {
  border-bottom: none;
}

.cl-item:hover {
  background: var(--surface);
  border-left: 3px solid var(--cherry);
}

.cl-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cl-val {
  font-family: var(--mono);
  color: var(--t2);
  font-size: 0.82rem;
  transition: color 0.2s;
}

.cl-item:hover .cl-val {
  color: var(--cherry);
}

/* ── Interactive Terminal Overlay (`sparsh-shell ~ zsh`) ───────────────── */
.terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.terminal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.terminal-window {
  width: min(820px, 100%);
  height: 520px;
  max-height: 85vh;
  border-radius: 0;
  border: 1px solid var(--cherry);
  background: #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.term-header {
  padding: 0.75rem 1rem;
  background: #0a0a0a;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.term-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--t2);
  letter-spacing: 0.05em;
}

.term-close {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cherry);
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--cherry);
}

.term-body {
  flex: 1;
  padding: 1.2rem;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--t1);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.term-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.term-input-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: #050505;
}

.term-prompt {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cherry);
  font-weight: 700;
  white-space: nowrap;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.82rem;
}

/* ── AI Assistant Widget (Manshverse Brutalist Console 2.0) ────────────────── */
.chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9900;
}

.chat-toggle {
  width: 54px;
  height: 54px;
  border-radius: 0;
  background: #060609;
  border: 1px solid rgba(210, 4, 45, 0.7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.85), 0 0 16px rgba(210, 4, 45, 0.25);
}

.chat-toggle:hover {
  background: #0c0c14;
  border-color: var(--cherry);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(210, 4, 45, 0.5), 0 0 12px rgba(255, 255, 255, 0.2);
}

.chat-toggle-beacon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  background: var(--cherry);
  box-shadow: 0 0 8px var(--cherry);
  animation: beaconPulse 1.2s ease-in-out infinite alternate;
}

@keyframes beaconPulse {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.3); }
}

.chat-toggle-badge {
  position: absolute;
  bottom: -6px;
  background: var(--cherry);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 5px;
}

.chat-panel {
  position: absolute;
  bottom: 66px;
  right: 0;
  width: clamp(340px, 90vw, 440px);
  height: 570px;
  max-height: calc(100vh - 100px);
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 6, 9, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(210, 4, 45, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.chat-widget.open .chat-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-header {
  padding: 0.85rem 1.1rem;
  background: #09090e;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: #000000;
  border: 1px solid var(--cherry);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cherry);
  position: relative;
  flex-shrink: 0;
}

.chat-avatar-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 6px;
  height: 6px;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.chat-name {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.78rem;
  color: #ffffff;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chat-status {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--t2);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: uppercase;
  margin-top: 1px;
}

.chat-status-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 7px #22c55e;
  animation: pulseGreen 1.5s ease-in-out infinite alternate;
}

@keyframes pulseGreen {
  from { opacity: 0.6; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.25); }
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-action-btn,
.chat-close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chat-action-btn:hover,
.chat-close-btn:hover {
  color: #ffffff;
  border-color: var(--border-light);
  background: #14141c;
}

/* ── Quick Directives Bar ─────────────────────────────────────────────────── */
.chat-quick-bar {
  padding: 0.65rem 1rem;
  background: #040407;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.chat-quick-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-quick-label {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--cherry);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-quick-sub {
  font-family: var(--mono);
  font-size: 0.52rem;
  color: var(--t3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-chips-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chat-chips-scroll::-webkit-scrollbar {
  display: none;
}

.chat-chip {
  flex-shrink: 0;
  padding: 0.34rem 0.7rem;
  background: #08080d;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--t2);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chat-chip:hover {
  border-color: var(--cherry);
  color: #ffffff;
  background: rgba(210, 4, 45, 0.18);
  transform: translateY(-1px);
}

/* ── Messages Container ───────────────────────────────────────────────────── */
.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-light);
}

.chat-welcome-box {
  padding: 1.1rem;
  background: #08080e;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cherry);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.83rem;
  color: var(--t2);
  line-height: 1.55;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.chat-welcome-title {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.76rem;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-welcome-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--cherry);
}

.chat-msg {
  padding: 0.8rem 1rem;
  border-radius: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  max-width: 92%;
  word-break: break-word;
  animation: fadeInMsg 0.2s ease;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.ai {
  align-self: flex-start;
  background: #09090f;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid var(--cherry);
  color: var(--t1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.chat-msg.user {
  align-self: flex-end;
  background: rgba(210, 4, 45, 0.22);
  border: 1px solid rgba(210, 4, 45, 0.5);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(210, 4, 45, 0.15);
}

.chat-msg.user p {
  margin: 0;
}

/* AI Message Markdown Elements */
.chat-msg.ai p {
  margin: 0 0 0.5rem 0;
}
.chat-msg.ai p:last-child {
  margin-bottom: 0;
}

.chat-msg.ai ul,
.chat-msg.ai ol {
  margin: 0.4rem 0 0.6rem 1.2rem;
  padding: 0;
}

.chat-msg.ai li {
  margin-bottom: 0.35rem;
  line-height: 1.5;
}

.chat-msg.ai strong {
  color: #ffffff;
  font-weight: 700;
}

.chat-msg.ai code {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: #ff4d6d;
  background: rgba(210, 4, 45, 0.14);
  border: 1px solid rgba(210, 4, 45, 0.3);
  padding: 0.12rem 0.4rem;
}

/* Code Block Wrapper with Header & Copy */
.chat-code-block {
  margin: 0.75rem 0;
  background: #030305;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 2px solid var(--cyan);
  overflow: hidden;
}

.chat-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.65rem;
  background: #08080d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* KaTeX Math Typesetting in Chat */
.chat-msg .katex {
  font-size: 1.05em;
  color: #f1f1f1;
  text-rendering: auto;
}

.chat-msg .katex-display {
  margin: 0.75rem 0;
  padding: 0.6rem 0.85rem;
  background: #030306;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 2px solid var(--cyan);
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

.chat-msg .katex-display > .katex {
  white-space: normal;
  text-align: center;
}

.chat-code-lang {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--cyan);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chat-code-copy {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--t2);
  font-family: var(--mono);
  font-size: 0.58rem;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-code-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--cyan);
}

.chat-code-block pre {
  margin: 0;
  padding: 0.75rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-x: auto;
  color: #a5f3fc;
}

.chat-code-block code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

.chat-msg.ai a {
  color: var(--cherry);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.chat-msg.ai a:hover {
  color: #ff4d6d;
}

/* Action Pills inside AI messages (e.g. "Fill Inquiry Form") */
.chat-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(210, 4, 45, 0.15);
  border: 1px solid var(--cherry);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.chat-action-pill:hover {
  background: var(--cherry);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(210, 4, 45, 0.4);
}

/* Follow-up suggestions box */
.chat-followup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.chat-followup-chip {
  padding: 0.25rem 0.55rem;
  background: #0c0c14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--t2);
  font-family: var(--mono);
  font-size: 0.62rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chat-followup-chip:hover {
  border-color: var(--cherry);
  color: #ffffff;
  background: rgba(210, 4, 45, 0.12);
}

/* Typing indicator */
.chat-msg.typing {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
}

.chat-typing-wave {
  display: flex;
  gap: 4px;
  align-items: center;
}

.chat-typing-dot {
  width: 5px;
  height: 5px;
  background: var(--cherry);
  animation: typingDot 1s infinite alternate;
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  from { opacity: 0.3; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-4px); }
}

.chat-typing-text {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--t2);
  text-transform: uppercase;
}

/* ── Input Row ────────────────────────────────────────────────────────────── */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: #060609;
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.chat-input::placeholder {
  color: var(--t3);
  font-size: 0.76rem;
}

.chat-send {
  width: 34px;
  height: 34px;
  border-radius: 0;
  background: var(--cherry);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  border: none;
}

.chat-send:hover {
  background: #ff1744;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(210, 4, 45, 0.5);
}

.chat-send:active {
  transform: scale(0.96);
}

.chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Footer Status Bar ────────────────────────────────────────────────────── */
.chat-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem;
  background: #040407;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
  font-size: 0.54rem;
  color: var(--t3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-footer-dot {
  width: 3px;
  height: 3px;
  background: var(--border-light);
  border-radius: 50%;
}

/* ── Mobile Viewport Adaptations ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .chat-widget {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .chat-widget.open .chat-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 80vh;
    max-height: 85vh;
    border-right: none;
    border-left: none;
    border-bottom: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.95);
  }
}


/* ── Preloader ──────────────────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.preloader-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cherry);
  letter-spacing: 0.1em;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: #000000;
  position: relative;
  z-index: 3;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--t3);
  font-size: 0.75rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MONUMENTAL NAME OPENING SLIDE & CINEMATIC TRANSITION
   ═══════════════════════════════════════════════════════════════════════════ */
.intro-portal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 99999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.75s;
}

.intro-portal.intro-done {
  opacity: 0;
  transform: scale(1.08);
  visibility: hidden;
  pointer-events: none;
}

.intro-webgl-mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.intro-webgl-mount canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  pointer-events: none;
}

.intro-flash-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.08s ease-out;
}

.intro-hud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3rem);
  pointer-events: none;
  z-index: 10;
}

.intro-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.intro-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--cherry);
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
}

.intro-top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.intro-sound-btn {
  pointer-events: auto;
  padding: 0.45rem 0.85rem;
  background: rgba(210, 4, 45, 0.12);
  border: 1px solid rgba(210, 4, 45, 0.45);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.intro-sound-btn:hover {
  background: rgba(210, 4, 45, 0.25);
  border-color: var(--cherry);
  transform: translateY(-1px);
}

.intro-sound-btn.needs-activation {
  animation: sfxPulse 1.1s ease-in-out infinite alternate;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

@keyframes sfxPulse {
  from { transform: scale(0.97); box-shadow: 0 0 0 rgba(210, 4, 45, 0); }
  to { transform: scale(1.03); box-shadow: 0 0 16px rgba(210, 4, 45, 0.7); }
}

.intro-skip-btn {
  pointer-events: auto;
  padding: 0.45rem 0.95rem;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--t2);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.intro-skip-btn:hover {
  border-color: var(--cherry);
  color: #fff;
  background: rgba(210, 4, 45, 0.2);
  transform: translateY(-1px);
}

/* ── Monumental Name Stage ────────────────────────────────────────────────── */
.intro-name-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 3;
  perspective: 1200px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  padding: 1rem;
}

.intro-badge-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.intro-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  background: rgba(210, 4, 45, 0.12);
  border: 1px solid rgba(210, 4, 45, 0.4);
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #ffffff;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-badge-code {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--t3);
  letter-spacing: 0.1em;
}

.intro-pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--cherry);
  display: inline-block;
  animation: introDotPulse 0.8s ease-in-out infinite alternate;
}

@keyframes introDotPulse {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.4); }
}

/* ── Monolithic Name Block with Chromatic Aberration ───────────────────────── */
.intro-monumental-block {
  position: relative;
  display: inline-block;
  margin: 0.5rem 0 1.2rem;
  overflow: visible;
  transform-style: preserve-3d;
}

.intro-hero-name {
  font-family: var(--sans);
  font-size: clamp(2.8rem, 9.5vw, 7.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 0.95;
  margin: 0;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  text-shadow: 0 0 35px rgba(210, 4, 45, 0.75);
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), letter-spacing 0.65s ease-out, filter 0.65s ease-out, opacity 0.55s ease-in;
}

.intro-hero-name span.intro-char {
  display: inline-block;
  transform-origin: 50% 50%;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
}

.intro-hero-name span.intro-char.scrambling {
  color: var(--cherry);
  opacity: 0.9;
}

.intro-hero-name span.intro-char.resolved {
  color: #ffffff;
  text-shadow: 0 0 35px rgba(210, 4, 45, 0.9);
}

.intro-title-ghost {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-family: var(--sans);
  font-size: clamp(2.8rem, 9.5vw, 7.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: opacity 0.3s ease-out;
}

.intro-title-ghost.ghost-cyan {
  color: #00f0ff;
  mix-blend-mode: screen;
  transform: translate(-3px, 1px);
}

.intro-title-ghost.ghost-red {
  color: #ff003c;
  mix-blend-mode: screen;
  transform: translate(3px, -1px);
}

.intro-title-ghost.ghost-cyan.active {
  opacity: 0.65;
  animation: chromaticJitterCyan 0.12s steps(2, start) infinite alternate;
}

.intro-title-ghost.ghost-red.active {
  opacity: 0.65;
  animation: chromaticJitterRed 0.12s steps(2, start) infinite alternate;
}

@keyframes chromaticJitterCyan {
  0% { transform: translate(-3px, 1px); }
  100% { transform: translate(-5px, -1px); }
}

@keyframes chromaticJitterRed {
  0% { transform: translate(3px, -1px); }
  100% { transform: translate(5px, 1px); }
}


/* ── Laser Slicer Sheen ───────────────────────────────────────────────────── */
.intro-laser-slice {
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 90px;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), rgba(210, 4, 45, 0.8), transparent);
  box-shadow: 0 0 35px #ffffff, 0 0 70px var(--cherry);
  transform: skewX(-20deg) translateX(-350%);
  opacity: 0;
}

.intro-laser-slice.active {
  opacity: 1;
  animation: laserSliceSweep 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes laserSliceSweep {
  0% { transform: skewX(-20deg) translateX(-350%); opacity: 1; }
  100% { transform: skewX(-20deg) translateX(350%); opacity: 0; }
}

/* ── Subtitle & Tags ──────────────────────────────────────────────────────── */
.intro-sub-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.intro-sub-title {
  font-family: var(--mono);
  font-size: clamp(0.75rem, 1.8vw, 1.15rem);
  font-weight: 800;
  color: var(--cherry);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-sub-title.active {
  opacity: 1;
  transform: translateY(0);
}

.intro-sub-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: clamp(0.6rem, 1.2vw, 0.72rem);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-sub-tags.active {
  opacity: 1;
  transform: translateY(0);
}

.intro-tag-sep {
  color: var(--cherry);
  opacity: 0.6;
}

/* ── System Boot Progress Bar ─────────────────────────────────────────────── */
.intro-progress-wrap {
  margin-top: 1.6rem;
  width: clamp(240px, 35vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.intro-progress-track {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.intro-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cherry), #ffffff);
  box-shadow: 0 0 12px var(--cherry);
  transition: width 0.08s linear;
}

.intro-progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--t3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intro-progress-val {
  color: var(--cherry);
  font-weight: 700;
}

/* ── HUD Bottom ───────────────────────────────────────────────────────────── */
.intro-hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--t3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.intro-metric {
  color: var(--cherry);
  font-weight: 600;
}

/* ── Climax Transition Outro Effect ───────────────────────────────────────── */
.intro-portal.intro-warp-out .intro-hero-name {
  transform: scale(4.2) translateZ(280px);
  letter-spacing: 0.45em;
  filter: blur(16px);
  opacity: 0;
  text-shadow: 0 0 90px rgba(210, 4, 45, 1), 0 0 160px rgba(255, 255, 255, 0.8);
}

.intro-portal.intro-warp-out .intro-title-ghost {
  opacity: 0 !important;
}

.intro-portal.intro-warp-out .intro-badge-row,
.intro-portal.intro-warp-out .intro-sub-row,
.intro-portal.intro-warp-out .intro-progress-wrap,
.intro-portal.intro-warp-out .intro-hud-top,
.intro-portal.intro-warp-out .intro-hud-bottom {
  opacity: 0;
  transform: translateY(20px);
}

@media (max-width: 768px) {
  .intro-hud-bottom {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
  }
}

/* ── Responsive Adaptations ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pcard-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .pcard-right {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hire-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
  .lab-dossier-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .exp-dossier-card {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .exp-dossier-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .certs-grid {
    grid-template-columns: 1fr;
  }
  .exp-block {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}

@media (max-width: 768px) {
  /* ── Viewport & Overflow Containment ─────────────────────────────────── */
  html, body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
  }

  .wrap {
    width: min(var(--max), calc(100% - 2rem));
  }

  .sect {
    padding: clamp(4rem, 8vw, 6rem) 0;
  }

  .sect-title {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  /* ── Mobile Navigation Backdrop & Full-Height Drawer ───────────────── */
  .nav-desktop {
    display: none !important;
  }

  .nav-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: rgba(0, 0, 0, 0.88) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    z-index: 99998 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s !important;
  }

  .nav-backdrop.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .nav-burger {
    display: flex !important;
    margin-left: auto;
    z-index: 1005;
    position: relative;
  }

  .nav-drawer {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: min(340px, 86vw) !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #060608 !important;
    border-left: 1px solid var(--border) !important;
    flex-direction: column !important;
    padding: 1.25rem 1.35rem 1.8rem !important;
    gap: 0.6rem !important;
    z-index: 99999 !important;
    box-shadow: -18px 0 55px rgba(0, 0, 0, 0.98) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateX(105%) !important;
    visibility: hidden !important;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s !important;
  }

  .nav-drawer.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .nav-drawer-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 0.95rem !important;
    border-bottom: 1px solid var(--border) !important;
    margin-bottom: 0.4rem !important;
  }

  .nav-drawer-header-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
  }

  .nav-drawer-tag {
    font-family: var(--mono) !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    color: var(--t3) !important;
    text-transform: uppercase !important;
  }

  .nav-drawer-status {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    font-family: var(--mono) !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    color: #10b981 !important;
  }

  .nav-drawer-dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: #10b981 !important;
    box-shadow: 0 0 8px #10b981 !important;
  }

  .nav-drawer-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border: 1px solid var(--border) !important;
    background: #000000 !important;
    color: var(--t2) !important;
    font-size: 1.1rem !important;
    font-family: var(--mono) !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
  }

  .nav-drawer-close:hover {
    border-color: var(--cherry) !important;
    color: #ffffff !important;
    background: var(--surface) !important;
  }

  .nav-drawer-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15rem !important;
  }

  .nav-drawer-link {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 0.65rem !important;
    font-family: var(--mono) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    min-height: 48px !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
  }

  .nav-drawer-link:hover,
  .nav-drawer-link.nav-active {
    background: rgba(225, 29, 72, 0.08) !important;
    border-color: rgba(225, 29, 72, 0.3) !important;
    color: var(--cherry) !important;
    padding-left: 0.95rem !important;
  }

  .nav-drawer-link-num {
    font-size: 0.75rem !important;
    color: var(--cherry) !important;
    font-weight: 800 !important;
    width: 28px !important;
    flex-shrink: 0 !important;
  }

  .nav-drawer-link-text {
    flex-grow: 1 !important;
  }

  .nav-drawer-link-arrow {
    font-size: 0.85rem !important;
    color: var(--t3) !important;
    transition: transform 0.2s, color 0.2s !important;
  }

  .nav-drawer-link:hover .nav-drawer-link-arrow {
    transform: translateX(4px) !important;
    color: var(--cherry) !important;
  }

  .nav-drawer-controls {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    margin-top: 0.4rem !important;
  }

  .nav-drawer-ctrl-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0.75rem 0.85rem !important;
    background: #000000 !important;
    border: 1px solid var(--border) !important;
    color: var(--t1) !important;
    font-family: var(--mono) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    min-height: 44px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
  }

  .nav-drawer-ctrl-btn:hover {
    border-color: var(--cherry) !important;
    background: var(--surface) !important;
  }

  .nav-drawer-ctrl-btn.cta-btn {
    background: var(--cherry) !important;
    border-color: var(--cherry) !important;
    color: #ffffff !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
  }

  .nav-drawer-ctrl-btn.cta-btn:hover {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #000000 !important;
  }

  .sfx-badge {
    padding: 0.2rem 0.45rem !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--border) !important;
    font-size: 0.68rem !important;
  }

  .sfx-badge.active {
    background: var(--cherry) !important;
    color: #ffffff !important;
    border-color: var(--cherry) !important;
  }

  .nav-drawer-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
    margin-top: auto !important;
    padding-top: 1.25rem !important;
    border-top: 1px solid var(--border) !important;
  }

  .nav-drawer-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    padding: 0.75rem !important;
    background: #000000 !important;
    border: 1px solid var(--border) !important;
    color: var(--t1) !important;
    font-family: var(--mono) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    min-height: 44px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
  }

  .nav-drawer-btn:hover {
    border-color: var(--cherry) !important;
    color: #ffffff !important;
    background: var(--surface) !important;
  }

  .nav-drawer-btn-icon {
    color: var(--cherry) !important;
  }

  .nav-drawer-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-family: var(--mono) !important;
    font-size: 0.68rem !important;
  }

  .nav-drawer-avail {
    color: #10b981 !important;
    font-weight: 700 !important;
  }

  .nav-drawer-socials {
    display: flex !important;
    gap: 0.8rem !important;
  }

  .nav-drawer-socials a {
    color: var(--t3) !important;
    transition: color 0.2s !important;
    font-weight: 700 !important;
  }

  .nav-drawer-socials a:hover {
    color: var(--cherry) !important;
  }

  /* ── Hero High-Contrast Mobile Backing ──────────────────────────────── */
  .hero-content {
    position: relative !important;
    z-index: 10 !important;
  }

  .hero-content::before {
    content: '' !important;
    position: absolute !important;
    inset: -1.5rem -1rem !important;
    background: radial-gradient(ellipse 95% 75% at 50% 38%, rgba(0, 0, 0, 0.90) 0%, rgba(0, 0, 0, 0.65) 65%, transparent 100%) !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  /* ── Hero Section ────────────────────────────────────────────────────── */
  .hero {
    padding: 6.5rem 0 3.5rem;
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(2.4rem, 8.5vw, 3.8rem);
  }

  .hero-sub {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .hero-telemetry {
    grid-template-columns: repeat(2, 1fr);
    border: 1px solid var(--border);
    margin: 0.8rem 0;
  }

  .hero-telemetry .telemetry-card {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0.9rem;
  }

  .hero-telemetry .telemetry-card:nth-child(2n) {
    border-right: none;
  }

  .hero-telemetry .telemetry-card:nth-child(3),
  .hero-telemetry .telemetry-card:nth-child(4) {
    border-bottom: none;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-btns .btn,
  .hero-btns .hero-term-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* ── Projects (#work) ────────────────────────────────────────────────── */
  #work .pcard {
    padding: 1.4rem 1.15rem;
    border-left-width: 3px;
    margin-bottom: 1.2rem;
  }

  .pcard-inner {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .pcard-title {
    font-size: clamp(1.5rem, 5vw, 2.1rem);
  }

  .pcard-desc {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .pcard-right {
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
  }

  .pcard-right .pcard-link {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.78rem;
  }

  /* ── Lab / Research (#private) ───────────────────────────────────────── */
  .lab-dossier-card {
    padding: 1.4rem 1.15rem;
  }

  .lab-dossier-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .lab-dossier-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  .lab-mod-item {
    padding: 0.75rem 0.9rem;
  }

  /* ── Clients (#clients) ──────────────────────────────────────────────── */
  .client-banner {
    padding: 1.4rem 1.15rem;
  }

  .cbanner-title {
    font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  }

  .cbanner-specs {
    grid-template-columns: repeat(2, 1fr);
    padding: 0.75rem 0.9rem;
    gap: 0.75rem;
  }

  .cbanner-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cbanner-actions {
    width: 100%;
  }

  .cbanner-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }

  /* ── Stack & Skills (#skills) ────────────────────────────────────────── */
  .skills-filter-bar {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    margin-bottom: 1.2rem;
    scrollbar-width: none;
    gap: 0.5rem;
  }

  .skills-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .skills-filter-btn {
    flex-shrink: 0;
    padding: 0.5rem 0.9rem;
    font-size: 0.72rem;
  }

  .stack-tabs-bar {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
    margin-bottom: 1.2rem;
    gap: 0.5rem;
  }

  .stack-tabs-bar::-webkit-scrollbar {
    display: none;
  }

  .stack-tab-btn {
    flex-shrink: 0;
    padding: 0.5rem 0.85rem;
    font-size: 0.72rem;
  }

  .stack-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .stack-item {
    padding: 0.6rem 0.8rem;
  }

  .stack-matrix-grid {
    grid-template-columns: 1fr;
  }

  .skill-telemetry-hud {
    grid-template-columns: 1fr;
  }

  /* ── Credentials (#creds) ────────────────────────────────────────────── */
  .exp-dossier-card {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 1.4rem 1.15rem;
    border-left-width: 4px;
  }

  .exp-dossier-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 0.9rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }

  .exp-dossier-role {
    font-size: 1.2rem;
  }

  .certs-grid {
    grid-template-columns: 1fr;
  }

  .cert-card {
    padding: 1.2rem 1rem;
  }

  .exp-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  /* ── Contact & Inquiry Form (#contact) ───────────────────────────────── */
  .hire-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .inquiry-panel,
  .contact-card {
    padding: 1.4rem 1.15rem;
  }

  /* Enforce 16px to prevent iOS Safari auto-zoom on field focus */
  .field-input,
  .field-textarea,
  .chat-input,
  .term-input {
    font-size: 16px !important;
  }

  .pill-select {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .pill {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .form-actions {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }

  .form-actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  /* ── Chat Widget & Terminal Modal ────────────────────────────────────── */
  .chat-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .chat-toggle {
    width: 48px;
    height: 48px;
  }

  .chat-widget.open .chat-panel {
    position: fixed;
    inset: auto 0 0 0;
    width: 100% !important;
    max-width: 100vw;
    height: 82vh;
    height: 82dvh;
    max-height: 85vh;
    bottom: 0;
    right: 0;
    left: 0;
    border-right: none;
    border-left: none;
    border-bottom: none;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.95);
  }

  .chat-chips-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem;
    padding-bottom: 0.25rem;
  }

  .chat-chips-scroll::-webkit-scrollbar {
    display: none;
  }

  .chat-chip {
    flex-shrink: 0;
  }

  .terminal-window {
    width: calc(100% - 1.5rem) !important;
    max-height: 90vh;
    max-height: 90dvh;
  }

  /* ── Intro Screen Typography Clamp ──────────────────────────────────── */
  .intro-hero-name {
    font-size: clamp(1.7rem, 7.8vw, 7.8rem);
  }

  .intro-title-ghost {
    font-size: clamp(1.7rem, 7.8vw, 7.8rem);
  }

  .intro-hud {
    padding: clamp(1rem, 3.5vw, 3rem);
  }

  .foot-inner {
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
  }
}

/* ── Extra Small Viewports (<= 480px) ────────────────────────────────────── */
@media (max-width: 480px) {
  .wrap {
    width: calc(100% - 1.5rem);
  }

  .sect {
    padding: clamp(3.2rem, 7vw, 4.5rem) 0;
  }

  .sect-title {
    font-size: clamp(1.8rem, 7.2vw, 2.4rem);
  }

  .cbanner-specs {
    grid-template-columns: 1fr;
  }

  .pcard-num {
    font-size: 1.3rem;
  }

  .pcard-feats li {
    font-size: 0.84rem;
  }

  .exp-dossier-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero-status-pill {
    padding: 0.35rem 0.65rem;
    font-size: 0.68rem;
  }
}

