/* ==========================================================================
   Design-Forward Studio Portfolio v4 (Linear × Raycast × Awwwards Aesthetic)
   - True Neutral Zinc-950 (#09090B) + Rim-Lit Multi-Layer Bento Surfaces
   - Subtle Film-Grain Texture + Top Architectural Light Beam
   - Floating Glassmorphic Pill Navigation + Marquee + Studio-Matted Gallery
   ========================================================================== */
:root {
  --bg: #09090b;
  --surface: linear-gradient(180deg, rgba(255, 255, 255, 0.048) 0%, rgba(255, 255, 255, 0.014) 100%);
  --surface-solid: #111114;
  --mat-bg: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.07), rgba(9, 9, 11, 0.95) 85%);
  --border: rgba(255, 255, 255, 0.085);
  --border-hover: rgba(255, 255, 255, 0.22);
  --rim: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --text: #e4e4e7;
  --text-strong: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --btn-bg: #fafafa;
  --btn-ink: #09090b;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

[data-theme="light"] {
  --bg: #f6f5f1;
  --surface: linear-gradient(180deg, #ffffff 0%, #faf9f6 100%);
  --surface-solid: #ffffff;
  --mat-bg: radial-gradient(circle at 50% 0%, #eae8e1, #e2e0d8 85%);
  --border: rgba(17, 17, 16, 0.09);
  --border-hover: rgba(17, 17, 16, 0.28);
  --rim: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --text: #27272a;
  --text-strong: #09090b;
  --text-muted: #52525b;
  --text-dim: #71717a;
  --accent: #059669;
  --accent-soft: rgba(5, 150, 105, 0.10);
  --btn-bg: #111110;
  --btn-ink: #fafafa;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

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

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Tactile Film Grain & Top Light Beam */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top-beam {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 360px;
  background: radial-gradient(ellipse at center, rgba(52, 211, 153, 0.14) 0%, rgba(52, 211, 153, 0.02) 48%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .top-beam {
  background: radial-gradient(ellipse at center, rgba(5, 150, 105, 0.09) 0%, transparent 65%);
}

/* ==========================================================================
   Floating Glassmorphic Pill Navbar
   ========================================================================== */
.nav-wrapper {
  position: sticky;
  top: 16px;
  z-index: 120;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.nav-pill {
  width: 100%;
  max-width: 960px;
  height: 56px;
  padding: 0 10px 0 14px;
  border-radius: 999px;
  background: rgba(18, 18, 22, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--rim), 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

[data-theme="light"] .nav-pill {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--rim), 0 14px 34px -12px rgba(0, 0, 0, 0.12);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-strong);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.nav-center a {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.16s ease, background 0.16s ease;
}

.nav-center a:hover {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .nav-center a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-cmd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.nav-cmd:hover {
  border-color: var(--border-hover);
  color: var(--text-strong);
}

.nav-cmd kbd,
.cmd-input-row kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon:hover {
  color: var(--text-strong);
  border-color: var(--border-hover);
}

.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 0.82rem;
  font-weight: 700;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ==========================================================================
   Shared Bento Tile Surface
   ========================================================================== */
.bento-tile {
  position: relative;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--rim), 0 24px 60px -20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

[data-theme="light"] .bento-tile {
  box-shadow: var(--rim), 0 14px 36px -18px rgba(0, 0, 0, 0.10);
}

.mono-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.mono-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ==========================================================================
   Architectural Bento Hero
   ========================================================================== */
.hero {
  position: relative;
  z-index: 1;
  padding: 44px 0 36px;
}

.bento-hero {
  display: grid;
  grid-template-columns: 1.38fr 0.92fr;
  gap: 20px;
  align-items: stretch;
}

.hero-main-tile {
  padding: 38px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tile-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}

.avail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-display {
  font-size: clamp(2.5rem, 4.4vw, 3.85rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  margin-bottom: 22px;
}

.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 34px;
  line-height: 1.65;
}

.hero-desc strong {
  color: var(--text-strong);
  font-weight: 600;
}

.hero-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid var(--btn-bg);
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.btn-solid:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-strong);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.btn-glass:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.08);
}

.copy-tag {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-icon-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.btn-icon-link:hover {
  border-color: var(--border-hover);
  color: var(--accent);
}

/* Right Bento Stack */
.hero-side-stack {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 20px;
}

.portrait-tile {
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, rgba(52, 211, 153, 0.14), var(--surface-solid) 72%);
}

.portrait-photo {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.portrait-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg, transparent 52%, rgba(9, 9, 11, 0.92) 100%);
  pointer-events: none;
}

[data-theme="light"] .portrait-vignette {
  background: linear-gradient(180deg, transparent 56%, rgba(255, 255, 255, 0.95) 100%);
}

.portrait-bar {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.p-name {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text-strong);
}

.p-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.p-loc {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--accent);
  background: var(--accent-soft);
}

.mini-bento-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.mini-tile {
  padding: 20px 22px;
}

.mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mini-svg {
  width: 54px;
  height: 18px;
  color: var(--accent);
}

.mini-big {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  line-height: 1.1;
}

.mini-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   Subtle Tech Marquee
   ========================================================================== */
.marquee-wrap {
  margin: 26px 0 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  animation: marquee 34s linear infinite;
}

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

/* ==========================================================================
   Sections & Studio-Framed 2-Column Case Study Gallery
   ========================================================================== */
.section {
  position: relative;
  z-index: 1;
  padding: 76px 0 24px;
}

.section-top {
  margin-bottom: 28px;
}

.section-title {
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text-strong);
  margin-bottom: 10px;
}

.section-lead {
  color: var(--text-muted);
  max-width: 660px;
  font-size: 0.96rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-pill span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.7;
}

.filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-strong);
}

.filter-pill.active {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-ink);
}

/* Spacious 2-Column Editorial Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.case-card {
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--rim), 0 20px 50px -22px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease, box-shadow 0.28s ease;
}

[data-theme="light"] .case-card {
  box-shadow: var(--rim), 0 12px 30px -16px rgba(0, 0, 0, 0.10);
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

/* Studio Mat Frame around Screenshot */
.case-mat {
  position: relative;
  padding: 16px 16px 0;
  background: var(--mat-bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.case-screen-frame {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: 0;
  aspect-ratio: 16 / 10;
  background: #080d0a;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

.case-screen-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.case-card:hover .case-screen-frame img {
  transform: scale(1.035);
}

.case-screens-pill {
  position: absolute;
  top: 26px;
  right: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fafafa;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.case-body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.case-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.case-cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.case-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.case-title {
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: var(--text-strong);
  margin-bottom: 10px;
}

.case-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.case-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.case-metric-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.case-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.case-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
  transition: color 0.18s ease, transform 0.18s ease;
}

.case-card:hover .case-cta {
  color: var(--accent);
  transform: translateX(3px);
}

/* ==========================================================================
   Capabilities, Stack & Contact
   ========================================================================== */
.cap-bento,
.stack-bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.cap-tile {
  padding: 30px;
}

.cap-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.cap-idx {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.cap-tile h3 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin-bottom: 10px;
}

.cap-tile p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.stack-card {
  padding: 26px;
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.stack-pills span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.contact-tile {
  padding: 58px 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(52, 211, 153, 0.12), var(--surface-solid) 65%);
}

.contact-display {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text-strong);
  margin-bottom: 14px;
}

.contact-lead {
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 30px;
}

.contact-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer {
  margin-top: 48px;
  padding: 26px 0 36px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer a:hover {
  color: var(--text-strong);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* ==========================================================================
   Slide-Over Case Study Drawer
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: flex-end;
}

.drawer-panel {
  width: 100%;
  max-width: 820px;
  height: 100vh;
  background: var(--surface-solid);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  animation: slideDrawer 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDrawer {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-top {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-crumb {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
}

.drawer-crumb span:first-child {
  color: var(--accent);
}

.drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.drawer-close:hover {
  border-color: var(--border-hover);
  color: var(--text-strong);
}

.drawer-scroll {
  overflow-y: auto;
  padding: 28px 32px 48px;
}

.drawer-scroll h2 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin-bottom: 10px;
}

.drawer-summary {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.drawer-stage {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.drawer-stage-mat {
  padding: 14px;
  background: var(--mat-bg);
}

.drawer-stage-mat img {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  border-radius: 10px;
  margin: 0 auto;
}

.drawer-stage-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.zoom-tag {
  color: var(--accent);
  flex-shrink: 0;
}

.drawer-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
}

.drawer-thumb-btn {
  width: 112px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: #080d0a;
  cursor: pointer;
  opacity: 0.55;
  flex-shrink: 0;
}

.drawer-thumb-btn.active,
.drawer-thumb-btn:hover {
  opacity: 1;
  border-color: var(--accent);
}

.drawer-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-metrics {
  margin: 26px 0;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.drawer-metrics dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.drawer-metrics dd {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2px;
}

.drawer-block {
  margin-bottom: 22px;
}

.drawer-block h4 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.drawer-block p,
.drawer-block li {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.drawer-block ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-outcome {
  padding: 13px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text-strong) !important;
  border-radius: 0 10px 10px 0;
}

.drawer-actions {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Command Palette */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
}

.cmd-box {
  width: 100%;
  max-width: 580px;
  background: var(--surface-solid);
  border: 1px solid var(--border-hover);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.cmd-icon { color: var(--accent); font-family: var(--font-mono); }

.cmd-input-row input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text-strong);
  font-size: 0.94rem;
}

.cmd-results { max-height: 360px; overflow-y: auto; padding: 8px; }

.cmd-row {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
}

.cmd-row:hover {
  background: var(--accent-soft);
  color: var(--text-strong);
}

.cmd-row-title { font-size: 0.88rem; font-weight: 600; }
.cmd-row-sub { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); flex-shrink: 0; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(5, 5, 7, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox img { max-width: 92vw; max-height: 85vh; border-radius: 10px; }

.lb-close,
.lb-nav {
  position: fixed;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(20, 20, 24, 0.88);
  color: #fff;
  cursor: pointer;
}

.lb-close { top: 20px; right: 24px; width: 42px; height: 42px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 1.5rem; }
.lb-nav.prev { left: 20px; }
.lb-nav.next { right: 20px; }

.lb-caption {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e4e4e7;
  background: rgba(20, 20, 24, 0.9);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .bento-hero,
  .gallery-grid,
  .cap-bento,
  .stack-bento { grid-template-columns: 1fr; }
  .hero-main-tile { padding: 28px 24px; }
  .nav-center { display: none; }
}

@media (max-width: 640px) {
  .mini-bento-row,
  .drawer-metrics { grid-template-columns: 1fr; }
  .nav-cmd { display: none; }
  .drawer-scroll { padding: 20px; }
  .contact-tile { padding: 40px 22px; }
}
