/* ====================================================================
   LUXURY TECH MONOCHROME DESIGN SYSTEM — PROJECT SHOWCASE
   Crafted to Apple, Linear, Stripe & OpenAI Interface Standards
   Palette: Day Theme / High-Contrast Obsidian & Crisp Zinc
   Fully Responsive: 320px Mobile -> 4K Ultra-Wide
==================================================================== */

:root {
  /* Day Theme - Obsidian & Zinc Monochrome */
  --primary: #09090b;
  --primary-hover: #18181b;
  --primary-dark: #000000;
  --primary-light: #f4f4f5;
  --primary-subtle: #fafafa;

  /* Surfaces & Backgrounds */
  --bg-body: #fafafa;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f4f4f5;
  --bg-glass: rgba(255, 255, 255, 0.85);

  /* Hairline Precision Borders */
  --border-card: #e4e4e7;
  --border-card-subtle: #f1f1f4;
  --border-hover: #09090b;
  --border-focus: #18181b;

  /* High-Fidelity Typography */
  --text-main: #09090b;
  --text-body: #3f3f46;
  --text-muted: #71717a;
  --text-light: #a1a1aa;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Beautiful Multi-Layered Shadows (No Colored Tinting) */
  --shadow-sm: 0px 2px 3px -1px rgba(0,0,0,0.06), 0px 1px 0px 0px rgba(0,0,0,0.02), 0px 0px 0px 1px rgba(0,0,0,0.04);
  --shadow-card: 0px 0px 0px 1px rgba(0,0,0,0.06), 0px 1px 2px -0.5px rgba(0,0,0,0.04), 0px 3px 6px -1.5px rgba(0,0,0,0.03);
  --shadow-hover: 0px 0px 0px 1px rgba(9,9,11,0.12), 0px 3px 6px -1px rgba(0,0,0,0.05), 0px 8px 16px -3px rgba(0,0,0,0.06), 0px 20px 32px -6px rgba(0,0,0,0.05);
  --shadow-modal: 0 0 0 1px rgba(0,0,0,0.08), 0 8px 16px -4px rgba(0,0,0,0.08), 0 24px 48px -12px rgba(0,0,0,0.16);

  /* Timing & Motion */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.2, 0, 0, 1);
  --duration-micro: 0.15s;
  --duration-ui: 0.22s;
  --max-w: 1240px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

::selection {
  background: #09090b;
  color: #ffffff;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  text-wrap: balance;
  letter-spacing: -0.03em;
}

p {
  text-wrap: pretty;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* ================= SLEEK MINIMAL SCROLLBAR ================= */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 999px;
  transition: background var(--duration-micro) ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.32);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.16) transparent;
}

/* ================= AMBIENT CANVAS ================= */
.bg-ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.glow-orb-top {
  position: absolute;
  top: -140px;
  right: 8%;
  width: min(560px, 92vw);
  height: min(560px, 92vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 0%, transparent 70%);
}

.glow-orb-bottom {
  position: absolute;
  bottom: 5%;
  left: -140px;
  width: min(600px, 92vw);
  height: min(600px, 92vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.015) 0%, transparent 70%);
}

.bg-canvas-pattern {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

/* ================= STICKY TOP NAVIGATION ================= */
.site-nav {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  z-index: 900;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: var(--duration-ui);
  transition-timing-function: ease;
}

.site-nav.scrolled {
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 32px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.brand-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #09090b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.brand-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-counter {
  font-size: 11px;
  font-weight: 600;
  color: #18181b;
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.nav-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  min-height: 38px;
  box-shadow: var(--shadow-sm);
  transition-property: transform, border-color, background-color, box-shadow, color;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.nav-btn-back i {
  color: var(--text-muted);
  font-size: 11.5px;
  transition-property: transform, color;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.nav-btn-back:hover {
  border-color: #09090b;
  color: #09090b;
  background: #fdfdfd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.nav-btn-back:hover i {
  transform: translateX(-3px);
  color: #09090b;
}

.nav-btn-back:active {
  transform: scale(0.96);
}

/* ================= MAIN CONTAINER ================= */
.main-wrapper {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) clamp(16px, 3vw, 28px) clamp(64px, 8vw, 96px);
}

/* ================= HERO SECTION ================= */
.hero-showcase {
  text-align: center;
  padding: clamp(24px, 4vw, 44px) 12px clamp(24px, 3.5vw, 36px);
  margin-bottom: 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition-property: transform, border-color, box-shadow;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.hero-badge:hover {
  transform: translateY(-1px);
  border-color: #09090b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pulse-indicator {
  position: relative;
  width: 10px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-core {
  width: 7px;
  height: 7px;
  background: #09090b;
  border-radius: 50%;
  display: block;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #71717a;
  opacity: 0.35;
  animation: pulseRipple 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulseRipple {
  0% { transform: scale(0.8); opacity: 0.5; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hero-heading {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
  color: var(--text-main);
}

.hero-tagline {
  font-size: clamp(14.5px, 1.8vw, 16.5px);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Hero Metrics Dock */
.hero-metrics-strip {
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 24px);
  padding: 8px clamp(14px, 2.5vw, 24px);
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.metric-unit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-body);
}

.metric-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #09090b;
  font-size: 12.5px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.metric-unit i {
  color: #09090b;
}

.metric-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.metric-val {
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.metric-sep {
  width: 1px;
  height: 22px;
  background: var(--border-card);
}

/* ================= HORIZONTAL SCROLLABLE FILTER BAR ================= */
.gallery-controls {
  position: sticky;
  top: 64px;
  z-index: 800;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 6px 8px;
  margin-bottom: 34px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-scroll-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  flex-shrink: 0;
  cursor: pointer;
  transition-property: transform, background-color, border-color, color;
  transition-duration: var(--duration-micro);
  transition-timing-function: ease;
}

.filter-scroll-btn:hover:not(:disabled) {
  background: #09090b;
  border-color: #09090b;
  color: #ffffff;
}

.filter-scroll-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.filter-scroll-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

.filter-tabs-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.filter-tabs-wrapper::before,
.filter-tabs-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  pointer-events: none;
  z-index: 2;
}

.filter-tabs-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.96), transparent);
}

.filter-tabs-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.96), transparent);
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px;
  width: 100%;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  flex-shrink: 0;
  transition-property: color, background-color, border-color, transform, box-shadow;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.tab-btn i {
  font-size: 11.5px;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.tab-btn.active {
  background: #09090b;
  color: #ffffff;
  border-color: #09090b;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.14);
}

.tab-btn.active i {
  color: #ffffff;
}

.tab-btn:active {
  transform: scale(0.96);
}

/* ================= FEATURED SPOTLIGHT CARD ================= */
.spotlight-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: clamp(22px, 3.5vw, 36px);
  margin-bottom: 34px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 3.5vw, 40px);
  align-items: center;
  position: relative;
  overflow: hidden;
  transition-property: border-color, box-shadow, transform;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #09090b;
}

.spotlight-card:hover {
  border-color: #09090b;
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: var(--primary-light);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.spotlight-badge i {
  color: #09090b;
}

.spotlight-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.3vw, 25px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-main);
}

.spotlight-desc {
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.62;
  margin-bottom: 18px;
}

/* ================= MACOS APP WINDOW FRAME SYSTEM ================= */
.window-frame {
  background: #09090b;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.16);
  border: 1px solid #27272a;
}

.project-item .window-frame {
  border-radius: 15px 15px 0 0;
  border: none;
  border-bottom: 1px solid #27272a;
}

.window-header {
  height: 34px;
  background: #18181b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
  user-select: none;
  border-bottom: 1px solid #27272a;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.window-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.window-dots .dot.red { background: #ef4444; }
.window-dots .dot.yellow { background: #eab308; }
.window-dots .dot.green { background: #22c55e; }

.window-address-bar {
  flex: 1;
  max-width: 200px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #a1a1aa;
  letter-spacing: -0.01em;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-address-bar i {
  font-size: 8.5px;
  color: #ffffff;
  flex-shrink: 0;
}

.window-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.window-badge i {
  font-size: 7px;
  color: #ffffff;
}

.window-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.window-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================= RESPONSIVE BENTO / GRID SHOWCASE ================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: clamp(20px, 2.5vw, 30px);
}

/* Project Card */
.project-item {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition-property: transform, border-color, box-shadow;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.project-item:hover {
  transform: translateY(-4px);
  border-color: #09090b;
  box-shadow: var(--shadow-hover);
}

/* Card Content Area */
.card-body {
  padding: clamp(18px, 2.5vw, 24px);
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 8px;
}

.card-text {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* Tech Tags */
.card-tech-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-body);
  transition-property: background-color, border-color, color;
  transition-duration: var(--duration-micro);
  transition-timing-function: ease;
}

.tech-tag i {
  color: #09090b;
  font-size: 11px;
}

.tech-tag:hover {
  background: #09090b;
  border-color: #09090b;
  color: #ffffff;
}

.tech-tag:hover i {
  color: #ffffff;
}

/* Card Footer Actions */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-card);
}

.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  background: #09090b;
  border: 1px solid #09090b;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 4px rgba(0, 0, 0, 0.12);
  min-height: 38px;
  transition-property: transform, background-color, border-color, box-shadow;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.btn-action-primary:hover {
  background: #27272a;
  border-color: #27272a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.btn-action-primary:active {
  transform: scale(0.96);
}

.btn-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  min-height: 38px;
  box-shadow: var(--shadow-sm);
  transition-property: transform, color, background-color, border-color, box-shadow;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.btn-details-toggle:hover {
  border-color: #09090b;
  color: #09090b;
  background: var(--bg-subtle);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.btn-details-toggle:active {
  transform: scale(0.96);
}

/* ================= EMPTY STATE ================= */
.empty-state {
  display: none;
  text-align: center;
  padding: clamp(48px, 8vw, 72px) 24px;
  background: #ffffff;
  border: 1px dashed var(--border-card);
  border-radius: 18px;
  margin: 24px 0 40px;
  box-shadow: var(--shadow-sm);
}

.empty-state.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state i {
  font-size: 38px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 650;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 420px;
}

/* ================= DEEP DIVE ARCHITECTURE MODAL ================= */
.deep-dive-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition-property: opacity, visibility;
  transition-duration: var(--duration-ui);
  transition-timing-function: ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 24px);
}

.deep-dive-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.deep-dive-modal {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-modal);
  max-width: 640px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  border: 1px solid var(--border-card);
  transform: scale(0.96) translateY(12px);
  transition-property: transform;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
  position: relative;
}

.deep-dive-backdrop.open .deep-dive-modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.modal-spec-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  min-height: 32px;
  transition-property: background-color, border-color, color, transform;
  transition-duration: var(--duration-micro);
  transition-timing-function: ease;
}

.modal-close-btn:hover {
  background: #09090b;
  border-color: #09090b;
  color: #ffffff;
}

.modal-close-btn:active {
  transform: scale(0.96);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-section {
  padding: 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid var(--border-card);
  background: #ffffff;
}

.modal-section.problem {
  background: #fafafa;
}

.modal-section.problem strong {
  color: #09090b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-section.problem strong i {
  color: #71717a;
}

.modal-section.solution {
  background: #fafafa;
}

.modal-section.solution strong {
  color: #09090b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-section.solution strong i {
  color: #09090b;
}

.modal-section.specs {
  background: var(--bg-subtle);
}

.modal-section.specs strong {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-card);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-subtle);
}

/* ================= FLOATING SCROLL TOP BUTTON ================= */
.scroll-top-fab {
  position: fixed;
  bottom: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  z-index: 990;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition-property: transform, opacity, visibility, background-color, border-color, color, box-shadow;
  transition-duration: var(--duration-ui);
  transition-timing-function: var(--ease-spring);
}

.scroll-top-fab.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-fab:hover {
  border-color: #09090b;
  background: #09090b;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.scroll-top-fab:active {
  transform: scale(0.96);
}

/* ================= SITE FOOTER ================= */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-card);
  padding: clamp(34px, 5vw, 48px) 20px;
  text-align: center;
  position: relative;
  z-index: 1;
  padding-bottom: max(34px, env(safe-area-inset-bottom));
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-logo i {
  color: #09090b;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  font-size: 13.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  transition: color var(--duration-micro) ease;
}

.footer-nav a:hover {
  color: #09090b;
  text-decoration: underline;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-light);
}

/* ====================================================================
   DEVICE-SPECIFIC RESPONSIVE BREAKPOINTS (ALL SCREENS & RETINA / IOS)
==================================================================== */

/* --- TABLETS & MEDIUM SCREENS (<= 1024px) --- */
@media (max-width: 1024px) {
  .spotlight-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* --- SMALL TABLETS & LARGE PHONES (<= 768px) --- */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics-strip {
    gap: 12px;
    padding: 10px 14px;
  }

  .metric-sep {
    display: none;
  }

  .card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-action-primary,
  .btn-details-toggle {
    width: 100%;
    justify-content: center;
  }

  .spotlight-card .card-footer > div {
    width: 100%;
    flex-direction: column;
  }

  .spotlight-card .card-footer .btn-action-primary,
  .spotlight-card .card-footer .btn-details-toggle {
    width: 100%;
    justify-content: center;
  }
}

/* --- MOBILE PHONES & COMPACT SCREENS (<= 480px) --- */
@media (max-width: 480px) {
  .nav-inner {
    padding: 0 14px;
    height: 58px;
  }

  .brand-text {
    font-size: 15px;
  }

  .nav-btn-back {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 36px;
  }

  .main-wrapper {
    padding: 16px 12px 64px;
  }

  .hero-showcase {
    padding: 16px 6px 18px;
  }

  .hero-heading {
    font-size: 24px;
    letter-spacing: -0.03em;
  }

  .hero-tagline {
    font-size: 13.5px;
    margin-bottom: 16px;
  }

  .gallery-controls {
    padding: 6px 8px;
    margin-bottom: 20px;
    top: 58px;
  }

  .tab-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 34px;
  }

  .spotlight-card {
    padding: 16px;
    border-radius: 14px;
  }

  .project-item {
    border-radius: 14px;
  }

  .card-body {
    padding: 16px;
  }

  .card-title {
    font-size: 16.5px;
  }

  .card-text {
    font-size: 13px;
  }

  /* Deep Dive Modal Bottom Sheet on Mobile */
  .deep-dive-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .deep-dive-modal {
    border-radius: 18px 18px 0 0;
    max-height: 88vh;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .modal-header {
    padding: 16px 18px;
  }

  .modal-body {
    padding: 16px 18px;
  }

  .modal-footer {
    padding: 14px 18px;
    flex-direction: column;
  }

  .modal-footer .btn-details-toggle,
  .modal-footer .btn-action-primary {
    width: 100%;
    justify-content: center;
  }
}
