/* ==========================================================================
   Endcap Design System — Adapted for Didar Lahiry Portfolio
   DARK MODE (Default) + Light Mode Switchable
   Obsidian Dark (#0c0d0e) + High-Voltage Electric Lime (#c8ff32)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Default Theme: DARK MODE */
:root {
  /* Surfaces & Backgrounds */
  --bg-primary: #0b0c0e;          /* Deep obsidian canvas */
  --bg-secondary: #111315;        /* Secondary panel surface */
  --bg-card: #15171a;             /* Elevated dark surface for cards */
  --bg-card-media: #1c1f23;       /* Showcase frame container background */
  --bg-dark: #070809;             /* Maximum depth dark surfaces */
  --paper: #0f1113;               /* Base paper dark for footer & sections */

  /* Text & Inks */
  --ink: #f5f5f0;                 /* Crisp high-contrast light text */
  --ink-secondary: #d4d4ce;       /* Secondary contrast text */
  --muted: #8e9296;               /* Supporting descriptions, metadata, card numbers */

  /* Borders & Dividers */
  --line: #22262a;                /* Refined dark divider borders */
  --line-strong: #33383f;         /* Accent borders */

  /* Signature Brand Accents */
  --accent-brand: #c8ff32;        /* Vibrant high-voltage electric lime */
  --accent-brand-hover: #d8ff39;  /* Hover lime */
  --accent-glow: rgba(200, 255, 50, 0.15);
  --blue: #3b82f6;
  --blue-light: rgba(59, 130, 246, 0.15);

  /* Hero & Banner Surfaces */
  --hero-bg: #111316;
  --hero-border: #22262b;
  --hero-text: #f5f5f0;
  --hero-badge-bg: rgba(200, 255, 50, 0.08);
  --hero-badge-border: rgba(200, 255, 50, 0.25);
  --hero-badge-text: #c8ff32;

  /* Sizing & Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-card: 16px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-main: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-primary: #f4f3ee;
  --bg-secondary: #ebeae3;
  --bg-card: #ecebe4;
  --bg-card-media: #e2e1da;
  --bg-dark: #151614;
  --paper: #f8f7f3;

  --ink: #151614;
  --ink-secondary: #202220;
  --muted: #6c6c67;

  --line: #dddcd5;
  --line-strong: #151614;

  --accent-brand: #c8ff32;
  --accent-brand-hover: #d8ff39;
  --accent-glow: rgba(200, 255, 50, 0.3);

  --hero-bg: #c8ff32;
  --hero-border: rgba(0, 0, 0, 0.1);
  --hero-text: #151614;
  --hero-badge-bg: rgba(21, 22, 20, 0.08);
  --hero-badge-border: rgba(21, 22, 20, 0.15);
  --hero-badge-text: #151614;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--ink);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.nav-locked {
  overflow: hidden;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 600;
  transition: color 0.3s ease;
}

h1.hero-title {
  font-size: clamp(44px, 5.2vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.055em;
  color: var(--hero-text);
}

h2.section-title {
  font-size: clamp(32px, 3.5vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ink);
}

h2.card-title {
  font-size: clamp(22px, 1.8vw, 30px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: var(--ink);
}

h2.giant-cta-title {
  font-size: clamp(64px, 11vw, 150px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 12px;
}

.eyebrow.lime {
  color: #0c0d0e;
  background: var(--accent-brand);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-weight: 700;
}

.hero-deck {
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  max-width: 760px;
}

[data-theme="light"] .hero-deck {
  color: var(--ink);
}

.card-copy {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

/* Container */
.shell {
  width: min(1328px, calc(100% - 112px));
  margin-inline: auto;
}

@media (max-width: 1150px) {
  .shell {
    width: calc(100% - 64px);
  }
}

@media (max-width: 600px) {
  .shell {
    width: calc(100% - 36px);
  }
}

/* Header & Navigation (Always Visible on Scroll) */
header.interior-head {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 76px;
  display: flex;
  align-items: center;
  background: rgba(11, 12, 14, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transform: translateY(0) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] header.interior-head {
  background: rgba(244, 243, 238, 0.92);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.wordmark {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.wordmark span.dot {
  color: var(--accent-brand);
  background: var(--accent-brand);
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(200, 255, 50, 0.6);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

nav.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

nav.desktop-nav a {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--ink-secondary);
  transition: all 0.2s var(--ease-out-expo);
  display: inline-flex;
  align-items: center;
}

nav.desktop-nav a:hover {
  background: var(--bg-card-media);
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

nav.desktop-nav a.active {
  background: var(--accent-brand) !important;
  border-color: var(--accent-brand) !important;
  color: #0c0d0e !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(200, 255, 50, 0.28) !important;
}

nav.desktop-nav a.active::after {
  display: none !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
  background: var(--bg-card-media);
  border-color: var(--accent-brand);
  transform: translateY(-1px);
}

.btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 9px 15px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-ai:hover {
  background: var(--bg-card-media);
  border-color: var(--accent-brand);
}

.btn-talk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-brand);
  color: #0c0d0e;
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--ease-out-expo);
  border: 1px solid transparent;
}

.btn-talk:hover {
  background: var(--accent-brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 255, 50, 0.3);
}

[data-theme="light"] .btn-talk {
  background: var(--ink);
  color: #fff;
}

[data-theme="light"] .btn-talk:hover {
  background: var(--accent-brand);
  color: var(--ink);
}

.menu-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 100px 32px 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-link {
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 16px;
  transition: color 0.2s ease;
}

.drawer-link span.num {
  font-size: 14px;
  color: var(--accent-brand);
  font-family: var(--font-mono);
}

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

.drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-lime-full {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-brand);
  color: #0c0d0e;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

/* HERO SECTION */
.hero-section {
  background: var(--hero-bg);
  padding-block: clamp(68px, 8.5vw, 115px);
  position: relative;
  border-bottom: 1px solid var(--hero-border);
  transition: background-color 0.3s ease;
  overflow: hidden;
}

.hero-main-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-content-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-visual-col {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-portrait-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 420px;
  background: radial-gradient(circle, rgba(200, 255, 50, 0.22) 0%, rgba(200, 255, 50, 0.05) 50%, transparent 75%);
  filter: blur(45px);
  z-index: 1;
  pointer-events: none;
}

.hero-portrait-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  background: linear-gradient(180deg, #181b1f 0%, #0d0f12 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(200, 255, 50, 0.12);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: transform 0.35s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-portrait-frame:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--accent-brand);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75), 0 0 45px rgba(200, 255, 50, 0.25);
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transform-origin: bottom center;
  transition: transform 0.4s var(--ease-out-expo);
}

.hero-portrait-frame:hover .hero-portrait-img {
  transform: scale(1.03);
}

.hero-floating-chip {
  position: absolute;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 16, 19, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(200, 255, 50, 0.35);
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-floating-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent-brand);
}

.chip-text {
  display: flex;
  flex-direction: column;
}

.chip-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.chip-title {
  font-size: 11px;
  color: var(--accent-brand);
  font-weight: 600;
}

[data-theme="light"] .hero-portrait-frame {
  background: linear-gradient(180deg, #ecebe4 0%, #dfded6 100%);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .hero-floating-chip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .chip-name {
  color: #151614;
}

[data-theme="light"] .chip-title {
  color: #555;
}

/* Hero Large Brand Name */
.hero-brand-name {
  font-family: var(--font-main);
  font-size: clamp(52px, 6.8vw, 88px);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.04em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin: 0 0 4px 0;
  padding: 0;
}

.hero-brand-name .name-first {
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(255, 255, 255, 0.16);
  transition: color 0.3s ease;
}

.hero-brand-name .name-last {
  color: var(--accent-brand);
  text-shadow: 0 0 35px rgba(200, 255, 50, 0.45), 0 0 12px rgba(200, 255, 50, 0.3);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

[data-theme="light"] .hero-brand-name .name-first {
  color: #0c0d0e;
  text-shadow: none;
}

[data-theme="light"] .hero-brand-name .name-last {
  color: #5d8200;
  text-shadow: none;
}

.hero-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hero-badge-bg);
  border: 1px solid var(--hero-badge-border);
  color: var(--hero-badge-text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
}

.hero-meta-badge span {
  color: var(--accent-brand);
}

.hero-title {
  max-width: 1050px;
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--hero-text);
}

.hero-title .highlight-text {
  color: var(--accent-brand);
  text-shadow: 0 0 24px rgba(200, 255, 50, 0.25);
}

[data-theme="light"] .hero-title .highlight-text {
  color: var(--ink);
  text-shadow: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-brand);
  color: #0c0d0e;
  padding: 14px 26px;
  border-radius: var(--radius-xs);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s var(--ease-out-expo);
  box-shadow: 0 4px 16px rgba(200, 255, 50, 0.2);
}

.btn-hero-primary:hover {
  background: var(--accent-brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(200, 255, 50, 0.35);
}

[data-theme="light"] .btn-hero-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21, 22, 20, 0.15);
}

[data-theme="light"] .btn-hero-primary:hover {
  background: #000;
}

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 14px 22px;
  border-radius: var(--radius-xs);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-hero-ghost:hover {
  background: var(--bg-card-media);
  border-color: var(--accent-brand);
  transform: translateY(-1px);
}

[data-theme="light"] .btn-hero-ghost {
  background: transparent;
  border-color: var(--ink);
}

[data-theme="light"] .btn-hero-ghost:hover {
  background: rgba(21, 22, 20, 0.08);
}

.hero-highlights-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.highlight-box {
  display: flex;
  flex-direction: column;
}

.highlight-num {
  font-size: clamp(26px, 2.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent-brand);
  line-height: 1;
}

[data-theme="light"] .highlight-num {
  color: var(--ink);
}

.highlight-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 6px;
}

/* SECTION HEADINGS */
.section-pad {
  padding-block: clamp(68px, 7vw, 108px);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 40px;
}

.section-head.between {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.section-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 600px;
}

/* SERVICES 6-CARD GRID (From REA Blueprint Section 3) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  position: relative;
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-brand);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.card-badge {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
}

.card-arrow-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card-media);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: all 0.25s var(--ease-out-expo);
}

.service-card:hover .card-arrow-badge {
  background: var(--accent-brand);
  border-color: var(--accent-brand);
  color: #0c0d0e;
  transform: translate(2px, -2px);
}

.card-body h3 {
  margin-bottom: 12px;
}

.card-body p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag-pill {
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-card-media);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 12px;
  color: var(--ink-secondary);
}

/* PROJECTS SHOWCASE SECTION */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-brand);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.project-media {
  background: var(--bg-card-media);
  width: 100%;
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out-expo);
}

.project-card:hover .project-media img {
  transform: scale(1.03);
}

.project-media-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(12, 13, 14, 0.85);
  color: var(--accent-brand);
  border: 1px solid rgba(200, 255, 50, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.project-media-action {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.25s ease;
}

.project-card:hover .project-media-action {
  background: var(--accent-brand);
  border-color: var(--accent-brand);
  color: #0c0d0e;
  transform: translate(2px, -2px);
}

.project-details {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.project-header-info {
  margin-bottom: 16px;
}

.project-subtitle {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

[data-theme="light"] .project-subtitle {
  color: var(--muted);
}

.project-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.project-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 18px;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.tech-tag {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--bg-card-media);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  color: var(--ink-secondary);
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.btn-proj-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.btn-proj-link:hover {
  color: var(--accent-brand);
}

.btn-proj-modal {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-card-media);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 7px 15px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-proj-modal:hover {
  background: var(--accent-brand);
  border-color: var(--accent-brand);
  color: #0c0d0e;
}

/* VIDEO SPOTLIGHT CARD */
.video-spotlight {
  grid-column: span 2;
  background: #0f1013;
  color: #fff;
  border-radius: var(--radius-card);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  border: 1px solid var(--line);
}

.video-spotlight h3, .video-spotlight h4, .video-spotlight p {
  color: #fff;
}

.video-spotlight p {
  color: #9ba0a6;
}

.video-player-container {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 480px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
  border: 1px solid #22252a;
  margin: 0 auto;
}

.video-player-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.video-info-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-meta-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.video-pill {
  font-size: 11px;
  font-weight: 700;
  background: #181b20;
  color: var(--accent-brand);
  border: 1px solid rgba(200, 255, 50, 0.2);
  padding: 4px 10px;
  border-radius: 12px;
}

/* SPECIALIZED AI & REA SPLIT (From REA Blueprint Section 4) */
.split-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.split-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  padding: 36px;
}

.split-card h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.split-card .split-desc {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
}

.split-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.split-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.split-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card-media);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.split-text h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.split-text p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* FILTER DIRECTORY ("Find your page" / "BY SPECIALIZATION, STACK, SOLUTION") - REA Section 5 */
.directory-section {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 36px;
}

.directory-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-brand);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--accent-brand);
  margin-bottom: 8px;
}

[data-theme="light"] .directory-col-title {
  color: var(--muted);
  border-bottom-color: var(--ink);
}

.directory-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.directory-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 14.5px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.directory-row:hover {
  padding-left: 8px;
  color: var(--accent-brand);
  font-weight: 600;
}

[data-theme="light"] .directory-row:hover {
  color: #000;
}

.directory-row span.arrow {
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.directory-row:hover span.arrow {
  transform: translate(2px, -2px);
  color: var(--accent-brand);
}

/* EXPERIENCE & EDUCATION SECTION */
.credentials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.timeline-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-brand);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.timeline-role {
  font-size: 18px;
  font-weight: 700;
}

.timeline-period {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-brand);
  background: rgba(200, 255, 50, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(200, 255, 50, 0.2);
}

[data-theme="light"] .timeline-period {
  color: var(--muted);
  background: #fff;
  border-color: var(--line);
}

.timeline-dept {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-desc ul {
  padding-left: 18px;
  margin-top: 6px;
}

.timeline-desc li {
  margin-bottom: 4px;
}

/* ABOUT SECTION - Studio Note */
.about-banner {
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.about-banner h2 {
  margin-bottom: 20px;
}

.about-banner p {
  color: var(--muted);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.65;
  margin-bottom: 16px;
}

.about-quote-box {
  background: rgba(200, 255, 50, 0.04);
  border-left: 3px solid var(--accent-brand);
  padding: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-left-color: var(--accent-brand);
}

.about-quote-box p {
  font-size: 15px;
  font-style: italic;
  color: var(--ink-secondary);
  margin-bottom: 0;
}

/* MASSIVE CONTACT BANNER (Section 7 in REA Blueprint) */
.contact-banner {
  background: #111316;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(72px, 9vw, 120px);
}

[data-theme="light"] .contact-banner {
  background: var(--accent-brand);
}

.contact-content {
  display: flex;
  flex-direction: column;
}

.contact-deck {
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 500;
  color: var(--muted);
  max-width: 820px;
  line-height: 1.4;
  margin-top: 16px;
  margin-bottom: 36px;
}

[data-theme="light"] .contact-deck {
  color: var(--ink);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.btn-contact-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-brand);
  color: #0c0d0e;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 30px;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all 0.2s var(--ease-out-expo);
  box-shadow: 0 4px 20px rgba(200, 255, 50, 0.25);
}

.btn-contact-main:hover {
  background: var(--accent-brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 255, 50, 0.4);
}

[data-theme="light"] .btn-contact-main {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 14px rgba(21, 22, 20, 0.2);
}

.contact-alt-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

/* TWO-TIER FOOTER & ANIMATED BRAND SIGNOFF (Section 8 in REA Blueprint) */
footer.interior-foot {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-top: 80px;
  padding-bottom: 40px;
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 64px;
}

.footer-brand h4 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--accent-brand);
  text-decoration: underline;
}

/* TYPOGRAPHIC SIGNOFF (Staggered animated letters) */
.ed-signoff {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  overflow: hidden;
}

.signoff-letters {
  display: flex;
  gap: clamp(10px, 3vw, 40px);
  font-size: clamp(60px, 12.5vw, 175px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.08);
  width: 100%;
  justify-content: space-between;
}

[data-theme="light"] .signoff-letters {
  color: rgba(21, 22, 20, 0.12);
}

.mo-letter {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.8s var(--ease-out-expo), opacity 0.8s ease, color 0.3s ease;
  transition-delay: calc(var(--i) * 0.08s);
}

.ed-signoff.is-visible .mo-letter {
  transform: translateY(0);
  opacity: 1;
}

.mo-letter:hover {
  color: var(--accent-brand);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}

/* MODAL SYSTEM (Project Detail & Video Player & AI Chat) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 9, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  position: relative;
  border: 1px solid var(--line-strong);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s var(--ease-out-expo);
}

.modal-overlay.is-active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink);
  z-index: 10;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--accent-brand);
  border-color: var(--accent-brand);
  color: #0c0d0e;
}

.modal-content-body {
  padding: 36px;
}

.modal-media-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card-media);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}

.modal-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-media-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.modal-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-brand);
  margin-top: 20px;
  margin-bottom: 6px;
}

[data-theme="light"] .modal-section-title {
  color: var(--muted);
}

.modal-bullet-list {
  padding-left: 20px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-secondary);
  font-size: 14.5px;
}

/* AI CHATBOT DRAWER (Robot Assistant from Live Portfolio) */
.ai-drawer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(440px, calc(100vw - 32px));
  height: 600px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(120%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out-expo), opacity 0.3s ease;
}

.ai-drawer.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.ai-header {
  background: var(--bg-dark);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-brand);
  color: #0c0d0e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.ai-title {
  font-size: 14px;
  font-weight: 700;
}

.ai-status {
  font-size: 11px;
  color: var(--accent-brand);
}

.ai-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.ai-close:hover {
  color: #fff;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-primary);
}

.ai-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-msg.bot {
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.ai-msg.user {
  background: var(--accent-brand);
  color: #0c0d0e;
  font-weight: 500;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.ai-chips {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.ai-chip {
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--ink-secondary);
  transition: all 0.2s ease;
}

.ai-chip:hover {
  background: var(--accent-brand);
  color: #0c0d0e;
  border-color: var(--accent-brand);
}

.ai-input-bar {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
}

.ai-input-bar input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}

.ai-input-bar input:focus {
  border-color: var(--accent-brand);
}

.ai-input-bar button {
  background: var(--accent-brand);
  color: #0c0d0e;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ai-input-bar button:hover {
  background: var(--accent-brand-hover);
}

/* Page Intro Header (For Sub-pages) */
.page-intro-header {
  padding-top: clamp(48px, 6vw, 84px);
  padding-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.page-intro-header h1 {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.page-intro-header p {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--muted);
  max-width: 720px;
  line-height: 1.5;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 992px) {
  .hero-main-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content-col {
    align-items: center;
  }
  .hero-brand-name {
    justify-content: center;
  }
  .hero-deck {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-portrait-frame {
    max-width: 300px;
  }
  .services-grid,
  .projects-grid,
  .credentials-grid,
  .split-sections {
    grid-template-columns: 1fr;
  }
  .video-spotlight {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .directory-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-banner {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .hero-highlights-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  header.interior-head {
    min-height: auto;
    padding-block: 12px;
  }
  .nav-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  nav.desktop-nav {
    display: flex !important;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    order: 3;
  }
  nav.desktop-nav::-webkit-scrollbar {
    display: none;
  }
  nav.desktop-nav a {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-xs);
    border: 1px solid var(--line);
    color: var(--ink-secondary);
  }
  nav.desktop-nav a.active {
    background: var(--accent-brand);
    color: #0c0d0e !important;
    font-weight: 700;
    border-color: var(--accent-brand);
  }
  nav.desktop-nav a.active::after {
    display: none;
  }
  .menu-toggle {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
  .hero-highlights-strip {
    grid-template-columns: 1fr;
  }
  .signoff-letters {
    font-size: clamp(48px, 15vw, 84px);
  }
}
