/* ==========================================================================
   PRIYAM RUPAPARA — EDITORIAL BRUTALIST & HIGH-TECH AVIONICS DESIGN SYSTEM
   Warm paper (#F5F3EE) · Deep Carbon (#0A0A0A) · Zero Radius · Precision Lines
   Bebas Neue Display · Inter Body · Space Mono Labels
   ========================================================================== */

:root {
  --paper:        #F5F3EE;
  --paper-dark:   #EDE9E0;
  --paper-card:   #FFFFFF;
  --ink:          #0A0A0A;
  --ink-mid:      #2D2D2D;
  --ink-muted:    #666660;
  --ink-dim:      #999990;
  --stamp-bg:     #0A0A0A;
  --stamp-fg:     #F5F3EE;
  --accent:       #1A1AFF;
  --accent-cyan:  #00F0FF;
  --red:          #FF3B2E;
  --green:        #10B981;
  --amber:        #D97706;
  --blue:         #2563EB;
  --line:         #D4D0C8;
  --line-dark:    #B8B4AC;
  --grid-line:    rgba(0, 0, 0, 0.05);
  --grid-size:    32px;

  --font-display: 'Bebas Neue', -apple-system, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;

  --ease-spring:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:     cubic-bezier(0.4, 0, 0.2, 1);

  --nav-h: 58px;
}

[data-theme="dark"] {
  --paper:        #0D0D0B;
  --paper-dark:   #151512;
  --paper-card:   #1A1A17;
  --ink:          #F2EFEB;
  --ink-mid:      #D4D0C8;
  --ink-muted:    #949088;
  --ink-dim:      #605C55;
  --stamp-bg:     #F2EFEB;
  --stamp-fg:     #0D0D0B;
  --line:         #282824;
  --line-dark:    #3A3A34;
  --accent:       #4040FF;
  --grid-line:    rgba(255, 255, 255, 0.045);
  --grid-size:    32px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--paper);
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: 0 0;
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.hidden { display: none !important; }

/* Top scroll progress */
.top-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 300;
  width: 0%;
  transition: width 0.08s linear;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-display {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  letter-spacing: 0.02em;
  line-height: 0.92;
  margin: 0.35rem 0 1rem;
  color: var(--ink);
}

.section-lead {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 620px;
  line-height: 1.65;
}

/* ==========================================================================
   LAYOUT & PERFORMANCE CONTAINMENT
   ========================================================================== */

/* Lean Performance: Isolate offscreen section layouts to reduce browser reflows */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  contain: layout style;
}

#projects,
#surge,
#defence,
#fun-zone,
#about,
#vault {
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.section-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 0.2rem;
}

@media (min-width: 890px) {
  .nav-links {
    display: flex;
    align-items: center;
  }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 0.4rem 0.85rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-cmd-btn {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: var(--paper-dark);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.38rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (min-width: 700px) {
  .nav-cmd-btn { display: inline-flex; }
}

.nav-cmd-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.cmd-kbd {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.1rem 0.35rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--ink);
}

.nav-chat-btn {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.9rem;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}

@media (min-width: 640px) {
  .nav-chat-btn { display: inline-flex; }
}

.nav-chat-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nav-icon-btn:hover { border-color: var(--ink); }
.nav-icon-btn svg { width: 16px; height: 16px; }

.nav-mobile-only { display: flex; }
@media (min-width: 890px) { .nav-mobile-only { display: none; } }

/* Mobile menu drawer */
.mobile-drawer {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 190;
}

.mobile-link {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.mobile-cmd-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.65rem;
  background: var(--paper-dark);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  margin-top: 0.5rem;
}

.mobile-chat-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.75rem;
  background: var(--ink);
  border: none;
  color: var(--paper);
  cursor: pointer;
  margin-top: 0.25rem;
  text-align: center;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
  min-height: 94vh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--paper);
}

/* High-Performance Interactive Cyber Systems Canvas */
.hero-interactive-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}



.hero-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 3;
  gap: 3rem;
}

@media (min-width: 840px) {
  .hero-content {
    grid-template-columns: 1fr auto;
    gap: 4rem;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Kinetic Expressive Scramble Heading */
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 6.4rem);
  letter-spacing: 0.02em;
  line-height: 0.92;
  color: var(--ink);
  cursor: default;
  user-select: none;
}

.kinetic-line {
  display: block;
  white-space: nowrap;
  line-height: 0.92;
}

.char-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(35px) skewX(-6deg);
  transition: opacity 0.35s var(--ease-spring), transform 0.35s var(--ease-spring);
  will-change: transform, opacity;
}

.char-letter.char-space {
  width: 0.32em;
  opacity: 1;
  transform: none;
}

.char-letter.char-linebreak {
  display: block;
  width: 0;
  height: 0;
  opacity: 1;
  transform: none;
}

.char-letter.is-in {
  opacity: 1;
  transform: none;
}

.char-letter:hover {
  color: var(--accent);
  transform: translateY(-8px) skewX(-4deg) !important;
  transition: transform 0.18s var(--ease-spring), color 0.15s ease !important;
}

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 520px;
}

.hero-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.hero-cta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hero-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-live-badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.2rem 0.5rem;
}

.live-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: livePulseDot 1.5s infinite;
}

@keyframes livePulseDot {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}





.hero-cmd-hint {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  cursor: pointer;
}

.hero-cmd-hint kbd {
  background: var(--paper-dark);
  border: 1px solid var(--line);
  padding: 0.15rem 0.4rem;
  color: var(--ink);
}

/* Tilted contact card */
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
}

/* Mark Zuckerberg Style Simple & Funny Business Card */
.hero-tilted-card {
  transform: rotate(-3.5deg);
  transform-origin: center right;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  will-change: transform;
}

.hero-tilted-card:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.02);
}

.zuck-simple-card {
  background: var(--paper-warm, #FBF9F4);
  color: #121417;
  padding: 1.6rem 1.8rem;
  width: 340px;
  max-width: 100%;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 16px 36px -8px rgba(0,0,0,0.16), 0 2px 6px rgba(0,0,0,0.06);
  transition: box-shadow 0.35s ease;
  position: relative;
  border-radius: 2px;
}

.hero-tilted-card:hover .zuck-simple-card {
  box-shadow: 0 26px 52px -12px rgba(0,0,0,0.22), 0 4px 12px rgba(0,0,0,0.08);
}

[data-theme="dark"] .zuck-simple-card {
  background: #121418;
  color: #F8FAFC;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 16px 36px -8px rgba(0,0,0,0.5);
}

[data-theme="dark"] .hero-tilted-card:hover .zuck-simple-card {
  box-shadow: 0 26px 52px -12px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.3);
}

.zsc-quote {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.95rem;
  color: #FF3B2E;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.zsc-center {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0.85rem 0;
}

.zsc-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  line-height: 0.95;
  color: #121417;
  margin: 0;
}

[data-theme="dark"] .zsc-name {
  color: #FFFFFF;
}

.zsc-title {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(0,0,0,0.6);
}

[data-theme="dark"] .zsc-title {
  color: rgba(255,255,255,0.65);
}

.zsc-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(0,0,0,0.65);
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 0.75rem;
}

[data-theme="dark"] .zsc-footer {
  color: rgba(255,255,255,0.65);
  border-top-color: rgba(255,255,255,0.12);
}

.zsc-sep {
  color: #FF3B2E;
  font-weight: 700;
}

.zsc-link {
  color: #0284C7;
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="dark"] .zsc-link {
  color: #38BDF8;
}

.zsc-link:hover {
  color: #FF3B2E;
}

.hero-stamp {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  text-align: right;
}

/* Marquee strip */
.hero-marquee {
  border-top: 1px solid var(--line);
  background: var(--paper-dark);
  overflow: hidden;
  position: relative;
  z-index: 1;
  padding: 0.75rem 0;
}

.marquee-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marqueeScroll 30s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0 1.25rem;
  color: var(--ink-mid);
}

.marquee-track .marquee-sep {
  color: var(--ink-dim);
  padding: 0 0.15rem;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   ABOUT SECTION & SKILL PILLS (EDITORIAL DUAL COLUMN)
   ========================================================================== */
.section-about {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.section-tag-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-tag-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--blue, #2563EB);
  text-transform: uppercase;
  white-space: nowrap;
}

.section-tag-line {
  flex: 1;
  height: 1px;
  background: var(--blue, #2563EB);
  opacity: 0.35;
  max-width: 320px;
}

.section-clean-heading {
  font-family: var(--font-body);
  font-size: clamp(2.2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 2rem;
}

.about-grid-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 4.5rem;
  align-items: start;
}

.about-narrative-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-narrative-col p {
  font-size: clamp(0.95rem, 1.35vw, 1.05rem);
  line-height: 1.75;
  color: var(--ink-mid);
  font-weight: 400;
}

.about-narrative-col p strong {
  color: var(--ink);
  font-weight: 600;
}

.about-skills-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-group-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.about-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  background: var(--paper-card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
  user-select: none;
}

.skill-pill:hover {
  border-color: var(--blue, #2563EB);
  color: var(--blue, #2563EB);
  transform: translateY(-1px);
}

/* ==========================================================================
   PROJECTS SECTION & STAMP CARDS
   ========================================================================== */

.section-projects {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

/* Filter pills */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pf-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.85rem;
  background: var(--paper-dark);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pf-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.pf-btn.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Grid layout */
.stamp-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .stamp-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .stamp-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Stamp Card */
.stamp-card {
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  cursor: pointer;
  transition: transform 0.18s var(--ease-spring), background 0.15s ease;
  position: relative;
  min-height: 280px;
}

.stamp-card:hover {
  transform: translate(3px, -3px);
  z-index: 2;
}

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

/* Color Variants */
.stamp-card--primary {
  background: var(--ink);
  color: var(--paper);
}

.stamp-card--secondary {
  background: #181816;
  color: #fff;
}

.stamp-card--dark {
  background: #0f131a;
  color: #fff;
}

.stamp-card--paper {
  background: var(--paper-card);
  color: var(--ink);
}

.sc-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sc-index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.5;
}

.sc-status-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: 1px solid currentColor;
}

.sc-status--green { color: var(--green); }
.sc-status--amber { color: var(--amber); }
.sc-status--blue  { color: #60a5fa; }
.sc-status--gray  { color: var(--ink-dim); }

.sc-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  letter-spacing: 0.02em;
  line-height: 0.92;
  margin: 0.2rem 0;
}

.sc-sub {
  font-size: 0.875rem;
  line-height: 1.55;
  opacity: 0.75;
  max-width: 480px;
  flex: 1;
}

.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  margin-top: auto;
  gap: 0.5rem;
}

.stamp-card--primary .sc-footer,
.stamp-card--secondary .sc-footer,
.stamp-card--dark .sc-footer {
  border-top-color: rgba(255,255,255,0.12);
}

.sc-stack {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

.sc-arrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.stamp-card--primary .sc-arrow,
.stamp-card--secondary .sc-arrow,
.stamp-card--dark .sc-arrow {
  color: #fff;
}

/* Filter hide animation */
.stamp-card.filtered-out {
  display: none !important;
}

/* ==========================================================================
   SURGE 360° SCROLL SHOWCASE
   ========================================================================== */

.section-surge {
  position: relative;
  min-height: 280vh;
  background: var(--paper-dark);
  border-top: 1px solid var(--line);
}

.surge-sticky-header {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  background: var(--paper-dark);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
}

.surge-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.surge-bar-headline {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.surge-phase-stamps {
  display: flex;
  gap: 0.35rem;
}

.phase-stamp {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  color: var(--ink-muted);
}

.phase-done {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.phase-hold {
  border-color: var(--amber);
  color: var(--amber);
}

.surge-scroll-body {
  position: relative;
  min-height: 250vh;
}

.surge-sticky-viewport {
  position: sticky;
  top: calc(var(--nav-h) + 54px);
  height: calc(100vh - var(--nav-h) - 54px);
  min-height: 520px;
  display: flex;
  align-items: center;
}

.surge-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 840px) {
  .surge-split { grid-template-columns: 1fr 1fr; }
}

.surge-bottle-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.surge-bottle-pedestal {
  position: relative;
  max-width: 400px;
  width: 100%;
}

#surge-scroll-bottle-canvas {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

.surge-editorial-note {
  position: absolute;
  top: 1.25rem;
  left: -4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.55rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 200px;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  pointer-events: none;
}

.surge-cities {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--ink);
}

@media (max-width: 900px) {
  .surge-editorial-note {
    left: -1.5rem;
    top: 0.75rem;
    padding: 0.45rem 0.65rem;
    max-width: 175px;
  }
  .surge-cities {
    font-size: 0.875rem;
  }
}

@media (max-width: 600px) {
  .surge-editorial-note {
    left: 0;
    top: 0.25rem;
    padding: 0.35rem 0.55rem;
    max-width: 155px;
  }
  .surge-cities {
    font-size: 0.8rem;
  }
}

.surge-scroll-hint {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

.surge-narrative-col {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
}

.surge-story-card {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.surge-story-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sc-index--light { color: var(--ink-dim); }

.surge-story-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: 0.02em;
  line-height: 0.92;
  color: var(--ink);
}

.surge-story-body {
  font-size: 0.9375rem;
  color: var(--ink-mid);
  line-height: 1.65;
  max-width: 440px;
}

/* ==========================================================================
   3D TACTICAL DRONE AVIONICS STAGE (RIOTTERS INSPIRATION)
   ========================================================================== */

.section-defence {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.drone-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: #000;
  color: #22c55e;
  border: 1px solid #22c55e;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
}

/* Clean Editorial CAD Stage */
.cad-stage-wrapper {
  background: var(--paper-dark);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
  position: relative;
}

.cad-spec-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.cad-spec-item {
  background: var(--paper);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cs-k {
  font-size: 0.6rem;
  color: var(--ink-dim);
  letter-spacing: 0.12em;
}

.cs-v {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--ink);
}

.cad-canvas-wrap {
  position: relative;
  width: 100%;
  height: 480px;
  background: var(--paper-dark);
  overflow: hidden;
}

#hero-drone-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#hero-drone-canvas:active {
  cursor: grabbing;
}

.cad-hotspot-deck {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  z-index: 10;
}

.cad-pill {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cad-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.cad-pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.cad-inspect-card {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.1rem;
  max-width: 320px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.cic-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ink-dim);
  margin-bottom: 0.35rem;
}

.cic-desc {
  font-size: 0.8125rem;
  color: var(--ink);
  line-height: 1.45;
}

.cad-bottom-deck {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

/* ==========================================================================
   FUN ZONE & INTERACTIVE TOOLS
   ========================================================================== */

.section-fun {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.fun-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  margin-bottom: 2rem;
  background: var(--line);
}

.fun-tab {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1rem 1.5rem;
  background: var(--paper-dark);
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.fun-tab:hover {
  color: var(--ink);
  background: var(--paper);
}

.fun-tab.active {
  background: var(--ink);
  color: var(--paper);
}

.fun-panel { display: none; }
.fun-panel.active { display: block; animation: fadeInUp 0.3s var(--ease-spring); }

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

/* Dark Flight Deck & Tactical Simulator Styling */
.game-card-wrapper {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
  border-radius: 14px;
}

.game-card--dark {
  background: #06080D;
  border-color: #1E293B;
  color: #F8FAFC;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.game-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.85rem;
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.8vw, 2.5rem);
  line-height: 0.95;
  color: var(--ink);
  margin-top: 0.2rem;
}

.flight-hud-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.game-score-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.audio-toggle-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: #94A3B8;
  border: 1px solid #334155;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.audio-toggle-btn:hover {
  color: #FFF;
  border-color: #64748B;
}

.audio-toggle-btn.btn--paused {
  background: rgba(245, 158, 11, 0.22);
  color: #F59E0B;
  border-color: #F59E0B;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  animation: pausePulse 1.5s infinite ease-in-out;
}

@keyframes pausePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* UAV Flight Simulator Telemetry Row */
.uav-telemetry-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #1E293B;
  border: 1px solid #1E293B;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}

.uav-tele-item {
  background: #090C12;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.uav-tval {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: #F8FAFC;
}

/* UAV Canvas Viewport */
.uav-canvas-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #030508;
  border: 1px solid #1E293B;
  border-radius: 8px;
  overflow: hidden;
}

#drone-game-canvas,
#ecom-game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 1;
  background: radial-gradient(circle at center, #0B1320 0%, #030508 100%);
  cursor: crosshair;
}

.uav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 8, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  z-index: 10;
}

.uav-overlay.hidden { display: none; }

.uav-overlay-box {
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}

.uav-overlay-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  line-height: 0.95;
  color: #EF4444;
}

.uav-overlay-desc {
  font-size: 0.875rem;
  color: #94A3B8;
  line-height: 1.5;
}

.uav-btn-primary {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.5rem;
  background: #00F0FF;
  color: #030508;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.uav-btn-primary:hover {
  transform: translateY(-2px);
  background: #38BDF8;
}

/* UAV Controls Bar */
.uav-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.uav-key-hints {
  color: #64748B;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
}

.uav-touch-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.4rem;
  width: 100%;
}

.touch-ctrl-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 0.65rem;
  background: #0F172A;
  color: #F8FAFC;
  border: 1px solid #1E293B;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
  user-select: none;
}

.touch-ctrl-btn:hover,
.touch-ctrl-btn:active {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #38BDF8;
  transform: translateY(-1px);
}

.touch-ctrl-btn--boost {
  border-color: #0D9488;
  background: #0F766E;
  color: #2DD4BF;
}

.touch-ctrl-btn--boost:hover,
.touch-ctrl-btn--boost:active {
  background: #14B8A6;
  color: #030508;
}

/* ==========================================================================
   GAME 2: VAIBHAV LAB ASTM 30s TRIAGE SPRINT STYLES
   ========================================================================== */
.pl-station-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .pl-station-grid {
    grid-template-columns: 1fr;
  }
}

.pl-serial-crt {
  background: #07090E;
  border: 1px solid #1E293B;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pl-raw-stream {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #38BDF8;
  line-height: 1.6;
  height: 100%;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  padding: 0.85rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.p-byte-ack { color: #10B981; font-weight: 700; }
.p-byte-frame { color: #F8FAFC; }

.pl-sample-display {
  background: #0B0E14;
  border: 1px solid #1E293B;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.pl-sample-meta {
  color: #94A3B8;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

.pl-test-display {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.pl-analyte {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #00F0FF;
}

.pl-value {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4.5rem);
  line-height: 0.95;
  color: #FFFFFF;
}

.pl-reference {
  color: #94A3B8;
  font-size: 0.6875rem;
}

.pl-decision-deck {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 540px) {
  .pl-decision-deck {
    grid-template-columns: 1fr;
  }
}

.pl-btn {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.15s ease;
  border: 1px solid var(--line);
}

.pl-btn--normal {
  background: var(--paper-dark);
  color: var(--ink);
}

.pl-btn--normal:hover, .pl-btn--normal:active {
  background: #10B981;
  color: #FFFFFF;
  border-color: #10B981;
  transform: translateY(-2px);
}

.pl-btn--critical {
  background: var(--paper-dark);
  color: var(--ink);
}

.pl-btn--critical:hover, .pl-btn--critical:active {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #EF4444;
  transform: translateY(-2px);
}

.game-end-panel {
  background: #090C12;
  border: 1px solid #1E293B;
  color: #F8FAFC;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  align-items: center;
}

.game-end-panel.hidden { display: none; }

.ge-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 0.95;
  color: #F8FAFC;
}

.ge-desc {
  font-size: 0.9375rem;
  color: #94A3B8;
  line-height: 1.6;
  max-width: 520px;
}

/* Swipe Arena */
.swipe-arena {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 350px;
  position: relative;
  margin-bottom: 1.5rem;
}

.swipe-card-stack {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 330px;
}

.swipe-idea-card {
  position: absolute;
  inset: 0;
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.3s var(--ease-spring), transform 0.3s var(--ease-spring);
  pointer-events: none;
  border: 1px solid var(--line);
}

.swipe-idea-card.card-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.swipe-idea-card.card-exit-yes {
  opacity: 0;
  transform: translateX(100px) rotate(8deg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.swipe-idea-card.card-exit-no {
  opacity: 0;
  transform: translateX(-100px) rotate(-8deg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sic-emoji { font-size: 2.5rem; }

.sic-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: #fff;
}

.sic-desc {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  flex: 1;
}

.sic-reality {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem;
  background: rgba(255,255,255,0.12);
  color: #FCD34D;
  width: fit-content;
}

.sic-count {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: rgba(255,255,255,0.35);
  margin-top: auto;
}

.swipe-result {
  position: absolute;
  inset: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.swipe-result-inner {
  text-align: center;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
}

.sr-heading {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.sr-stats {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-mid);
  line-height: 1.65;
}

.sr-restart {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.75rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  align-self: center;
}

.swipe-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.swipe-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.85rem 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.swipe-btn--yes:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.swipe-btn--no:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.swipe-hint { text-align: center; margin-top: 0.75rem; }

/* Quiz Styles */
.quiz-wrapper { max-width: 680px; }
.quiz-q-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.quiz-question {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }

.quiz-option {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.1rem 1.35rem;
  text-align: left;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.quiz-option:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.quiz-option-key {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ink-dim);
  flex-shrink: 0;
}

.quiz-option:hover .quiz-option-key { color: rgba(255,255,255,0.4); }

.quiz-result {
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.qr-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.qr-answer { padding: 1.5rem 1.75rem; }
.qr-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.qr-body {
  font-size: 1rem;
  color: var(--ink-mid);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.qr-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.qr-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.65rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
}

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

/* Chaos Dial */
.dial-wrapper {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dial-labels { display: flex; justify-content: space-between; }
.dial-label-left, .dial-label-right {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.dial-track {
  position: relative;
  width: 100%;
  height: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.dial-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--ink);
  transition: width 0.2s ease;
}

.chaos-dial-input {
  -webkit-appearance: none;
  position: absolute;
  inset: -6px;
  width: 100%;
  height: calc(100% + 12px);
  background: transparent;
  cursor: pointer;
}

.chaos-dial-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  background: var(--ink);
  border: 2px solid var(--paper);
  outline: 2px solid var(--ink);
  cursor: pointer;
}

.dial-commentary {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.35rem 1.6rem;
  font-size: 1rem;
  color: var(--ink-mid);
  line-height: 1.65;
  font-style: italic;
  min-height: 80px;
}

.dial-projects-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dial-proj-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  color: var(--ink-mid);
}

.dial-proj-tag.chaos-active { background: var(--red); color: #fff; border-color: var(--red); }
.dial-proj-tag.order-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ASTM Live Tool */
.astm-tool-wrapper, .d2c-tool-wrapper {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.astm-header-row, .d2c-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.astm-select {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: var(--paper-dark);
  border: 1px solid var(--line);
  color: var(--ink);
}

.astm-grid-split, .d2c-grid-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .astm-grid-split, .d2c-grid-split { grid-template-columns: 1fr 1fr; }
}

.astm-pane-title {
  font-size: 0.625rem;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.astm-textarea {
  width: 100%;
  background: var(--paper-dark);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.75rem;
  line-height: 1.45;
  resize: vertical;
  margin-bottom: 0.75rem;
}

.tool-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  width: 100%;
}

.astm-output-box {
  background: var(--paper-dark);
  border: 1px solid var(--line);
  padding: 1rem;
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.astm-empty-hint { color: var(--ink-dim); text-align: center; margin-top: 4rem; }

/* D2C Calculator */
.d2c-inputs-col { display: flex; flex-direction: column; gap: 1rem; }
.d2c-input-group { display: flex; flex-direction: column; gap: 0.35rem; }
.d2c-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.d2c-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--line);
}

.d2c-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--ink);
  cursor: pointer;
}

.d2c-stat-card {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.d2c-stat-label { color: rgba(255,255,255,0.4); margin-bottom: 0.25rem; }
.d2c-stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--green);
  line-height: 0.95;
}

.d2c-stat-sub { font-size: 0.8125rem; color: rgba(255,255,255,0.7); margin-top: 0.25rem; }

.d2c-breakdown-table {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.d2c-row { display: flex; justify-content: space-between; padding: 0.2rem 0; }
.d2c-row--highlight { border-top: 1px solid var(--line); padding-top: 0.35rem; font-weight: 700; }
.d2c-verdict {
  margin-top: 0.75rem;
  font-size: 0.6875rem;
  color: var(--red);
}

/* ==========================================================================
   CONTACT SECTION (MATCHING IMAGE 1 CLEAN CARD)
   ========================================================================== */

.section-contact {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.contact-card-clean {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 0.5rem;
  max-width: 900px;
}

.contact-clean-lead {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink-mid);
  max-width: 680px;
}

.contact-clean-email-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.contact-clean-email {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 3.8vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  transition: color 0.2s ease;
  word-break: break-all;
}

.contact-clean-email .cce-arrow {
  font-family: var(--font-mono);
  font-size: 0.65em;
  font-weight: 400;
  color: var(--blue, #2563EB);
  transition: transform 0.2s ease;
}

.contact-clean-email:hover {
  color: var(--blue, #2563EB);
}

.contact-clean-email:hover .cce-arrow {
  transform: translate(2px, -2px);
}

.contact-copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.85rem;
  background: var(--paper-dark);
  border: 1px solid var(--line);
  color: var(--ink-mid);
  cursor: pointer;
  border-radius: 9999px;
  transition: all 0.2s ease;
  user-select: none;
}

.contact-copy-pill .copy-svg {
  opacity: 0.75;
}

.contact-copy-pill:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.contact-copy-pill:hover .copy-svg {
  stroke: var(--paper);
  opacity: 1;
}

.contact-clean-divider {
  height: 1px;
  background: var(--line);
  width: 100%;
  margin: 0.25rem 0;
}

.contact-clean-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  flex-wrap: wrap;
}

.contact-clean-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-decoration: none;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

.contact-clean-link:hover {
  color: var(--blue, #2563EB);
}

.contact-link-pill:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0;
  background: transparent;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left { display: flex; flex-direction: column; gap: 0.2rem; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}

/* ==========================================================================
   COMMAND PALETTE (⌘K)
   ========================================================================== */

.cmd-palette-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(3rem, 12vh, 8rem);
}

.cmd-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(4px);
}

.cmd-box {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink);
  width: min(620px, 92vw);
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  animation: cmdIn 0.2s var(--ease-spring);
}

@keyframes cmdIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cmd-search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.cmd-input::placeholder { color: var(--ink-dim); }

.cmd-results-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--ink);
  color: var(--paper);
}

.cmd-item-left { display: flex; align-items: center; gap: 0.75rem; }
.cmd-item-title { font-size: 0.875rem; font-weight: 600; }
.cmd-item-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  padding: 0.15rem 0.4rem;
  background: var(--paper-dark);
  color: var(--ink-muted);
}

.cmd-item:hover .cmd-item-tag, .cmd-item.selected .cmd-item-tag {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.cmd-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  background: var(--paper-dark);
  border-top: 1px solid var(--line);
  font-size: 0.625rem;
  color: var(--ink-dim);
}

.cmd-footer kbd {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.1rem 0.35rem;
  color: var(--ink);
}

/* ==========================================================================
   PROJECT DETAIL MODAL
   ========================================================================== */

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: stretch;
}

.pm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.65);
}

.pm-panel {
  position: relative;
  background: var(--paper);
  border-left: 1px solid var(--line);
  width: min(880px, 100vw);
  margin-left: auto;
  height: 100vh;
  overflow-y: auto;
  padding: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: pmSlideIn 0.3s var(--ease-spring);
}

@keyframes pmSlideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.pm-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pm-close {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pm-close:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.pm-project-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.pm-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: 0.02em;
  line-height: 0.92;
  color: var(--ink);
  margin: 0.25rem 0;
}

.pm-status-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.pm-status-pill {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  color: var(--ink-mid);
}

.pm-status-pill--active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pm-status-pill--amber  { background: rgba(217, 119, 6, 0.1); border-color: var(--amber); color: var(--amber); }

.pm-divider { height: 1px; background: var(--line); }

.pm-section-heading {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

/* Modal Diagrams */
.pm-flow-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pm-flow-node {
  background: var(--paper-dark);
  border: 1px solid var(--line);
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}

.pm-flow-node--highlight { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pm-flow-arrow { color: var(--ink-dim); font-size: 1.125rem; font-weight: 300; }

.pm-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.pm-stat {
  background: var(--paper);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pm-stat-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 0.95;
}

.pm-stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.pm-before-after {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 600px) {
  .pm-before-after { grid-template-columns: 1fr 1fr; }
}

.pm-ba-col { background: var(--paper); padding: 1.25rem; }
.pm-ba-col--after { background: var(--ink); color: var(--paper); }
.pm-ba-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.pm-ba-col--after .pm-ba-label { color: rgba(255,255,255,0.45); }
.pm-ba-text { font-size: 0.9375rem; line-height: 1.55; color: var(--ink-mid); }
.pm-ba-col--after .pm-ba-text { color: rgba(255,255,255,0.85); }

.pm-bar-chart { display: flex; flex-direction: column; gap: 0.75rem; }
.pm-bar-row { display: flex; align-items: center; gap: 0.75rem; }
.pm-bar-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-muted);
  width: 140px;
  flex-shrink: 0;
  text-align: right;
}

.pm-bar-track {
  flex: 1;
  height: 24px;
  background: var(--paper-dark);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.pm-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--ink);
  transition: width 1s var(--ease-spring);
}

.pm-bar-fill--accent { background: var(--accent); }
.pm-bar-fill--red    { background: var(--red); }
.pm-bar-fill--amber  { background: var(--amber); }

.pm-bar-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  width: 50px;
  flex-shrink: 0;
}

.pm-body-text { font-size: 0.9375rem; color: var(--ink-mid); line-height: 1.7; }
.pm-honest-callout {
  background: var(--paper-dark);
  border-left: 3px solid var(--ink);
  padding: 1.1rem 1.35rem;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--ink-mid);
  line-height: 1.6;
}

.pm-timeline {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--line);
  padding-left: 1.5rem;
}

.pm-tl-item { padding-bottom: 1.5rem; position: relative; }
.pm-tl-item::before {
  content: '';
  position: absolute;
  left: -1.625rem;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--ink);
  border: 2px solid var(--paper);
  outline: 2px solid var(--ink);
}

.pm-tl-date {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  margin-bottom: 0.2rem;
}

.pm-tl-event { font-size: 0.9375rem; font-weight: 600; color: var(--ink); margin-bottom: 0.15rem; }
.pm-tl-detail { font-size: 0.8125rem; color: var(--ink-muted); line-height: 1.5; }

.pm-tech-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pm-tech-pill {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  color: var(--ink-mid);
}

/* ==========================================================================
   PRIYAM AI CLONE (FLOATING DRAWER)
   ========================================================================== */

.ai-widget-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.ai-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.65rem 1.15rem;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.ai-trigger-btn:hover { opacity: 0.85; transform: translateY(-2px); }
.ai-trigger-btn.active { display: none; }

.ai-trigger-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: dotPulse 2s infinite;
}

.ai-drawer {
  width: min(440px, 95vw);
  background: rgba(10, 15, 23, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 240, 255, 0.22);
  animation: aiDrawerIn 0.25s var(--ease-spring);
  max-height: 82vh;
  box-shadow: 0 24px 50px rgba(0,0,0,0.45), 0 0 20px rgba(0,240,255,0.06);
}

@keyframes aiDrawerIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-drawer-header {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(0, 240, 255, 0.03);
}

.ai-header-status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-status-badge {
  font-size: 0.5625rem;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.ai-header-name { font-size: 0.9375rem; font-weight: 700; color: #fff; display: inline-block; }
.ai-header-sub { color: rgba(255,255,255,0.45); display: block; margin-top: 0.25rem; font-size: 0.625rem; }

.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-header-tool-btn,
.ai-close-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-header-tool-btn:hover,
.ai-close-btn:hover { color: #fff; background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }

.ai-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 220px;
  max-height: 48vh;
  scroll-behavior: smooth;
}

.ai-msg {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 92%;
  position: relative;
  word-break: break-word;
}

.ai-msg--bot {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0, 240, 255, 0.18);
  color: rgba(255,255,255,0.92);
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ai-msg--user {
  background: rgba(0, 240, 255, 0.18);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #fff;
  align-self: flex-end;
}

.ai-rag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.5rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}
.ai-rag-badge span {
  color: #00F0FF;
  font-weight: 800;
}

.genz-sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  margin: 0.25rem 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(249, 115, 22, 0.2));
  border: 1px dashed rgba(0, 240, 255, 0.7);
  border-radius: 6px;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.25);
  transform: rotate(-1.5deg);
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.genz-sticker:hover {
  transform: rotate(0deg) scale(1.05);
}

.ai-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.ai-action-chip {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #00F0FF;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ai-action-chip:hover {
  background: #00F0FF;
  color: #000;
  transform: translateY(-1px);
}

/* Typing Indicator Animation */
.ai-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.4rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  align-self: flex-start;
}

.ai-typing-indicator span {
  width: 5px;
  height: 5px;
  background: #00F0FF;
  border-radius: 50%;
  animation: aiTypingBounce 1.2s infinite ease-in-out;
}

.ai-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiTypingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.ai-chips-row {
  padding: 0.55rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: thin;
  background: rgba(0,0,0,0.2);
}

.ai-chip {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.65rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ai-chip:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: #00F0FF;
  color: #fff;
}

.ai-input-row {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 0.5rem;
  background: rgba(0,0,0,0.3);
}

.ai-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  padding: 0.65rem 0.95rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.ai-input:focus { border-color: #00F0FF; box-shadow: 0 0 10px rgba(0,240,255,0.15); }
.ai-input::placeholder { color: rgba(255,255,255,0.35); }

.ai-send-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.65rem 1rem;
  background: #00F0FF;
  color: #000;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-send-btn:hover { background: #38BDF8; transform: translateY(-1px); }

/* Canvas Mobile & Web Ultra-Performance GPU Optimizations */
#drone-game-canvas, #ecom-game-canvas, .hero-interactive-canvas, #hero-drone-canvas, #surge-scroll-bottle-canvas {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

/* ==========================================================================
   TOASTS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: var(--paper);
  padding: 0.65rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  animation: toastIn 0.3s var(--ease-spring);
  pointer-events: auto;
  border: 1px solid var(--line);
}

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

/* Epic Stalk Interactive Game Styles */
.stalk-input-box {
  padding: 1.25rem;
  background: var(--paper-dark);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.stalk-input {
  flex: 1;
  min-width: 260px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.stalk-input:focus {
  border-color: var(--ink);
}

.stalk-preset-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.stalk-dossier-card {
  margin-top: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease;
}

.sd-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.sd-avatar-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sd-avatar-icon {
  width: 48px;
  height: 48px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.sd-handle {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.sd-name {
  font-size: 0.75rem;
  color: var(--ink-dim);
}

.sd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.sd-box {
  background: var(--paper);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sd-k {
  font-size: 0.625rem;
  color: var(--ink-dim);
}

.sd-v {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.sd-roast-block {
  padding: 1rem 1.25rem;
  background: var(--paper-dark);
  border-left: 3px solid var(--ink);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.5;
}

.sd-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE SUITE (MOBILE & TABLET EXCELLENCE)
   ========================================================================== */

/* Touch Action Optimizations for High Responsiveness */
button, .touch-ctrl-btn, .pl-btn, .ai-chip, .ai-action-chip, .stamp-card, .contact-link-pill {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Tablet Optimizations (641px to 1024px) */
@media (max-width: 1024px) {
  :root {
    --nav-h: 56px;
  }

  .section-container {
    padding: 0 clamp(1.25rem, 3.5vw, 2.5rem);
  }

  .hero-content {
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3.5vw, 2.5rem);
    gap: 2.5rem;
  }

  .stamp-cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pm-panel {
    width: min(720px, 94vw);
    padding: 2rem 2.25rem;
  }
}

/* Medium Tablets & Stacked Layouts (max-width: 840px) */
@media (max-width: 840px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 2.5rem;
  }

  .hero-right {
    align-items: flex-start;
    width: 100%;
  }

  .zuck-simple-card {
    width: 100%;
    max-width: 380px;
  }

  /* SURGE Scroll-Driven Bottle on Tablet */
  .surge-sticky-viewport {
    position: sticky;
    top: calc(var(--nav-h) + 48px);
    height: calc(100vh - var(--nav-h) - 48px);
    max-height: calc(100dvh - var(--nav-h) - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .surge-scroll-body {
    min-height: 250vh;
  }

  .surge-split {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
  }

  .surge-bottle-col {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .surge-bottle-pedestal {
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
    position: relative;
  }

  #surge-scroll-bottle-canvas {
    max-height: 46vh;
    width: 100%;
    height: auto;
    aspect-ratio: 400 / 560;
    object-fit: contain;
  }

  .surge-narrative-col {
    display: grid;
    grid-template-columns: 1fr;
    position: relative;
    width: 100%;
  }

  .surge-story-card {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.25rem 1.5rem;
    background: var(--paper);
    border: 1px solid var(--line);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
  }

  .surge-story-card.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .surge-story-title {
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    line-height: 0.95;
  }

  .surge-story-body {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .surge-phase-stamps {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .cad-canvas-wrap {
    height: 340px;
  }

  .uav-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .uav-touch-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    width: 100%;
    gap: 0.4rem;
  }

  /* About & Contact on Tablet */
  .about-grid-layout {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
  }

  .contact-card-clean {
    padding: 2.25rem 2rem;
    border-radius: 14px;
  }
}

/* Phone Layouts (max-width: 640px) */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .nav-center {
    display: none;
  }

  .nav-chat-btn {
    display: none;
  }

  .hero-headline {
    font-size: clamp(2.4rem, 10vw, 3.6rem);
    line-height: 0.94;
  }

  .hero-actions-row {
    gap: 0.85rem;
  }

  .hero-tilted-card {
    transform: rotate(-1deg);
    width: 100%;
  }

  .zuck-simple-card {
    padding: 1.25rem;
    min-height: auto;
    width: 100%;
  }

  /* About Section on Phone */
  .about-grid-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-narrative-col p {
    font-size: 0.9375rem;
    line-height: 1.62;
  }

  .about-skills-col {
    gap: 1.5rem;
  }

  .section-tag-line {
    max-width: 140px;
  }

  .section-clean-heading {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
  }

  .stamp-cards-grid {
    grid-template-columns: 1fr;
  }

  .stamp-card {
    padding: 1.25rem 1.25rem 1.5rem;
    min-height: auto;
  }

  .sc-headline {
    font-size: 2rem;
  }

  /* Contact Section on Phone */
  .contact-card-clean {
    padding: 1.35rem 1.15rem;
    border-radius: 12px;
    gap: 1.15rem;
  }

  .contact-clean-lead {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  .contact-clean-email {
    font-size: clamp(1.2rem, 5.5vw, 1.65rem);
  }

  .contact-clean-links {
    gap: 0.65rem 1.25rem;
  }

  .contact-clean-link {
    font-size: 0.6875rem;
  }

  /* SURGE Scroll-Driven Bottle on Phone: Header scrolls naturally, Viewport is clean full-screen sticky split */
  .surge-sticky-header {
    position: relative;
    top: auto;
    z-index: 10;
    padding: 1.15rem 0 0.85rem;
    border-bottom: 1px solid var(--line);
  }

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

  .surge-bar-headline {
    font-size: 0.9375rem;
    line-height: 1.25;
  }

  .surge-phase-stamps {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .phase-stamp {
    font-size: 0.5625rem;
    padding: 0.22rem 0.45rem;
  }

  .surge-sticky-viewport {
    position: sticky;
    top: var(--nav-h);
    height: calc(100svh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0 1rem;
    overflow: hidden;
    z-index: 20;
  }

  .surge-scroll-body {
    min-height: 260vh;
  }

  .surge-split {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    gap: 0.5rem;
  }

  .surge-bottle-col {
    flex: 0 0 38%;
    max-height: 38%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 0;
    padding-top: 0.25rem;
  }

  .surge-bottle-pedestal {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 190px;
    margin: 0 auto;
  }

  #surge-scroll-bottle-canvas {
    max-height: 27vh;
    height: 100%;
    width: auto;
    aspect-ratio: 400 / 560;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,0.22));
  }

  .surge-editorial-note {
    display: none;
  }

  .surge-scroll-hint {
    font-size: 0.5625rem;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
    color: var(--ink-dim);
  }

  .surge-narrative-col {
    flex: 1 1 62%;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    position: relative;
    min-height: 0;
    width: 100%;
  }

  .surge-story-card {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    overflow-y: auto;
    border-radius: 8px;
  }

  .surge-story-card.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .surge-story-title {
    font-size: clamp(1.2rem, 4.8vw, 1.55rem);
    line-height: 1.0;
    margin: 0;
  }

  .surge-story-body {
    font-size: clamp(0.76rem, 2.3vw, 0.83rem);
    line-height: 1.38;
    color: var(--ink-mid);
  }

  /* Fun Zone Simulator on Phone */
  .cad-canvas-wrap {
    height: 280px;
  }

  .game-card-wrapper {
    padding: 1rem 0.75rem;
    gap: 0.65rem;
    border-radius: 10px;
  }

  .game-header-bar {
    gap: 0.4rem;
    padding-bottom: 0.5rem;
  }

  .game-title {
    font-size: 1.35rem;
    line-height: 1.05;
  }

  .flight-hud-pills {
    gap: 0.3rem;
  }

  .game-score-badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
  }

  .audio-toggle-btn {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
  }

  .uav-telemetry-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .uav-tele-item {
    padding: 0.4rem 0.6rem;
  }

  .uav-tval {
    font-size: 0.8125rem;
  }

  .uav-canvas-container {
    width: 100%;
    aspect-ratio: 2 / 1;
    height: auto;
    border-radius: 6px;
  }

  #drone-game-canvas {
    width: 100%;
    height: 100%;
    aspect-ratio: 2 / 1;
    max-height: none;
    min-height: 0;
  }

  .uav-key-hints {
    display: none;
  }

  .uav-touch-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
  }

  .uav-touch-controls .touch-ctrl-btn {
    padding: 0.5rem 0.2rem;
    font-size: 0.65rem;
    border-radius: 4px;
  }

  .uav-touch-controls .touch-ctrl-btn:nth-child(1) {
    grid-column: span 2;
  }

  .uav-touch-controls .touch-ctrl-btn:nth-child(2) {
    grid-column: span 2;
  }

  .pl-station-grid {
    grid-template-columns: 1fr;
  }

  .pl-decision-deck {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .pl-btn {
    padding: 0.95rem 1rem;
    font-size: 0.8125rem;
  }

  /* Project Detail Modal on Phone */
  .project-modal {
    align-items: flex-end;
  }

  .pm-panel {
    width: 100vw;
    height: 94vh;
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 1.25rem 2.5rem;
    gap: 1.25rem;
  }

  .pm-headline {
    font-size: 2.3rem;
  }

  .pm-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pm-stat-val {
    font-size: 1.7rem;
  }

  .pm-before-after {
    grid-template-columns: 1fr;
  }

  /* AI Chatbot Drawer on Phone */
  .ai-widget-wrapper {
    bottom: 16px;
    right: 16px;
  }

  .ai-trigger-btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.65rem;
  }

  .ai-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-height: 86vh;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
  }

  .ai-messages {
    max-height: 44vh;
    min-height: 180px;
    padding: 0.85rem;
  }

  .ai-msg {
    max-width: 96%;
    font-size: 0.8125rem;
    padding: 0.75rem 0.85rem;
  }

  .ai-chips-row {
    padding: 0.45rem 0.65rem;
  }

  .ai-input-row {
    padding: 0.65rem;
  }

  .ai-input {
    font-size: 0.8125rem;
    padding: 0.55rem 0.75rem;
  }

  /* Command Palette on Phone */
  .cmd-panel {
    width: 95vw;
    margin: 1.5rem auto auto;
    border-radius: 10px;
  }

  .cmd-input {
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
  }

  .cmd-results-list {
    max-height: 280px;
  }

  /* Stalk Card on Phone */
  .stalk-input-row {
    flex-direction: column;
  }

  .stalk-input {
    min-width: 100%;
  }

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

/* Extra Small Phones (max-width: 380px) */
@media (max-width: 380px) {
  .hero-headline {
    font-size: 2.1rem;
  }

  .sc-headline {
    font-size: 1.75rem;
  }

  .pm-stat-grid {
    grid-template-columns: 1fr;
  }

  .uav-telemetry-bar {
    grid-template-columns: 1fr;
  }
}
