/* ==========================================================================
   NINJACODER — DESIGN SYSTEM & STYLESHEET (PERFORMANCE & CLS OPTIMIZED)
   Aesthetic: Dark Technical / Premium Engineering
   Palette: Obsidian (#0A0A0F), Neon Green (#00FF88), Cyan Tint (#00E5FF)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (CSS VARIABLES) & FONT METRIC FALLBACKS
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg-dark: #0A0A0F;
  --bg-surface: #12121A;
  --bg-surface-elevated: #181824;
  --bg-glass: rgba(18, 18, 26, 0.7);
  --bg-glass-hover: rgba(24, 24, 36, 0.85);

  --accent-primary: #00FF88;
  --accent-primary-glow: rgba(0, 255, 136, 0.25);
  --accent-primary-dim: rgba(0, 255, 136, 0.1);
  --accent-cyan: #00E5FF;
  --accent-cyan-glow: rgba(0, 229, 255, 0.2);

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 255, 136, 0.25);
  --border-accent-glow: rgba(0, 255, 136, 0.5);

  /* Fonts & Precise Fallback Stacks (FOUT / CLS Prevention) */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', Consolas, Monaco, monospace;

  /* FLUID TYPOGRAPHY CLAMP SCALE */
  --font-size-display: clamp(2.5rem, 5vw + 1rem, 5.25rem);
  --font-size-h1: clamp(2rem, 3.8vw + 0.8rem, 3.75rem);
  --font-size-h2: clamp(1.5rem, 2.5vw + 0.5rem, 2.5rem);
  --font-size-h3: clamp(1.2rem, 1.8vw + 0.4rem, 1.75rem);
  --font-size-h4: clamp(1.05rem, 1.2vw + 0.3rem, 1.35rem);
  --font-size-body: clamp(0.95rem, 0.9vw + 0.3rem, 1.15rem);
  --font-size-small: clamp(0.825rem, 0.7vw + 0.25rem, 0.95rem);
  --font-size-code: clamp(0.8rem, 0.7vw + 0.2rem, 0.925rem);

  /* Fluid Spacing Scale */
  --space-xs: clamp(0.5rem, 1vw, 0.75rem);
  --space-sm: clamp(0.75rem, 1.5vw, 1.25rem);
  --space-md: clamp(1.25rem, 2.5vw, 2rem);
  --space-lg: clamp(2rem, 4vw, 3.5rem);
  --space-xl: clamp(3.5rem, 7vw, 6.5rem);

  /* Micro-interaction Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Radius & Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --container-max: 1280px;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES (ASPECT RATIO & CLS ENFORCEMENT)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-dark);
  color: var(--text-main);
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.6;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

/* Enforce Aspect-Ratio and Intrinsic Dimensions on Media */
img, svg, video, iframe, embed {
  max-width: 100%;
  height: auto;
  display: block;
}

img:not([aspect-ratio]) {
  aspect-ratio: attr(width) / attr(height);
}

::selection {
  background-color: var(--accent-primary-dim);
  color: var(--accent-primary);
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
   3. REUSABLE UTILITIES & LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.section-padding {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.text-highlight {
  color: var(--accent-primary);
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

/* Section Header Component */
.section-header {
  max-width: 760px;
  margin-bottom: var(--space-lg);
  min-height: 120px; /* Layout reservation */
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--accent-primary-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--font-size-small);
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--font-size-h1);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: var(--font-size-body);
  color: var(--text-muted);
  line-height: 1.7;
}

/* Glassmorphism Card Base (GPU Accelerated transform/opacity only) */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
  will-change: transform;
}

.glass-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px -5px var(--accent-primary-glow);
  transform: translateY(-4px);
}

/* Custom Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  min-height: 48px; /* Reserved height for touch targets & CLS */
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-body);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out-expo), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.btn-primary {
  background: var(--accent-primary);
  color: #0A0A0F;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 20px var(--accent-primary-glow);
}

.btn-primary:hover {
  background: #00e077;
  border-color: #00e077;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-accent);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-icon {
  transition: transform 0.25s var(--ease-out-expo);
  width: 18px;
  height: 18px;
  aspect-ratio: 1 / 1;
}

.btn:hover .btn-icon {
  transform: translateX(4px);
}

/* Custom Cursor Follower */
.cursor-dot, .cursor-glow {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  z-index: 9999;
  transition: opacity 0.3s ease;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.cursor-glow {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
  border: 1px solid rgba(0, 255, 136, 0.3);
  transition: width 0.2s var(--ease-out-expo), height 0.2s var(--ease-out-expo), border-color 0.2s;
}

body:hover .cursor-glow {
  opacity: 1;
}

@media (max-width: 768px) {
  .cursor-dot, .cursor-glow { display: none !important; }
}

/* --------------------------------------------------------------------------
   4. NAVIGATION (HEADER) — CLS PREVENTED WITH FIXED HEIGHT
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px; /* Fixed height reservation */
  padding: 1rem 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 0 12px var(--accent-primary-glow));
  transition: transform 0.3s var(--ease-elastic);
}

.brand-logo:hover .brand-logo-icon {
  transform: rotate(90deg) scale(1.1);
}

.brand-logo span {
  color: var(--accent-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: var(--font-size-small);
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.25s var(--ease-out-expo);
  box-shadow: 0 0 8px var(--accent-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta-btn {
  padding: 0.6rem 1.25rem;
  font-size: var(--font-size-small);
  min-height: 40px;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 6px;
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s ease;
}

@media (max-width: 992px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-150%);
    transition: transform 0.35s var(--ease-out-expo);
    z-index: 999;
  }

  .nav-menu.open {
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   5. HERO SECTION — ZERO CLS LAYOUT CONTAINMENT
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(8rem, 15vw, 12rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  contain: layout style; /* Performance & CLS Containment */
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 100%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.45;
}

.hero-orb-1 {
  width: 650px;
  height: 650px;
  aspect-ratio: 1 / 1;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
}

.hero-orb-2 {
  width: 450px;
  height: 450px;
  aspect-ratio: 1 / 1;
  top: 30%;
  right: -100px;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  min-height: 520px; /* Prevents hero reflow during font/JS loading */
}

.hero-content {
  z-index: 2;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: var(--font-size-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-subheadline {
  font-size: var(--font-size-body);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  min-height: 48px;
}

/* Proof Bar below CTAs */
.hero-proof-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  min-height: 80px;
}

.proof-item {
  display: flex;
  flex-direction: column;
}

.proof-number {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
  color: var(--text-main);
}

.proof-number span {
  color: var(--accent-primary);
}

.proof-label {
  font-size: var(--font-size-small);
  color: var(--text-dim);
}

/* Live Terminal IDE Mockup — RESERVED DIMENSIONS & ZERO SHIFT */
.hero-terminal-wrapper {
  position: relative;
  z-index: 2;
  min-height: 380px; /* Fixed container height reservation */
  contain: layout size;
}

.terminal-card {
  background: #0E0E16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.7), 0 0 30px var(--accent-primary-dim);
  overflow: hidden;
  height: 340px; /* Strict height reservation to eliminate CLS */
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: #141420;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  height: 44px;
  flex-shrink: 0;
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 11px;
  height: 11px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}
.dot-red { background-color: #FF5F56; }
.dot-yellow { background-color: #FFBD2E; }
.dot-green { background-color: #27C93F; }

.terminal-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  min-height: 28px;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  aspect-ratio: 1 / 1;
  background-color: var(--accent-primary);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  line-height: 1.7;
  color: #E2E8F0;
  height: 296px;
  overflow-y: auto;
  overflow-x: auto;
  contain: layout;
}

.code-line {
  display: flex;
  gap: 1.25rem;
  min-height: 1.7em; /* Reserved line height to prevent vertical jitter */
}

.line-num {
  color: var(--text-dim);
  user-select: none;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.code-content {
  flex-grow: 1;
}

.token-keyword { color: #F472B6; }
.token-function { color: #60A5FA; }
.token-string { color: var(--accent-primary); }
.token-comment { color: #64748B; font-style: italic; }
.token-var { color: #FBBF24; }
.token-type { color: #A78BFA; }

.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background-color: var(--accent-primary);
  vertical-align: middle;
  animation: blink 1s step-start infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* Floating Metric Overlay Badge */
.floating-metric-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 3;
  width: 240px; /* Fixed dimension reservation */
  height: 64px;
}

.metric-circle {
  width: 44px;
  height: 44px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.1);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.95rem;
  flex-shrink: 0;
}

@media (max-width: 992px) {
  .hero-layout { grid-template-columns: 1fr; }
  .floating-metric-badge { left: 10px; bottom: -10px; }
}

/* --------------------------------------------------------------------------
   6. STACK & TECHNICAL CAPABILITY GRID
   -------------------------------------------------------------------------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
}

.stack-card {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  min-height: 280px; /* Reserved card height */
  position: relative;
  overflow: hidden;
}

.stack-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.stack-icon-wrapper {
  width: 52px;
  height: 52px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  transition: border-color 0.3s ease, background 0.3s ease;
  flex-shrink: 0;
}

.stack-card:hover .stack-icon-wrapper {
  border-color: var(--accent-primary);
  background: var(--accent-primary-dim);
}

.stack-badge {
  font-family: var(--font-mono);
  font-size: var(--font-size-small);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.stack-title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.stack-desc {
  font-size: var(--font-size-body);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.stack-snippet {
  background: #08080C;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  color: var(--accent-primary);
  white-space: nowrap;
  overflow-x: auto;
  min-height: 40px;
}

/* --------------------------------------------------------------------------
   7. PORTFOLIO SHOWCASE
   -------------------------------------------------------------------------- */
.portfolio-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
  min-height: 48px;
}

.portfolio-filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--font-size-small);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out-expo), background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  min-height: 40px;
}

.portfolio-filter-btn:hover, .portfolio-filter-btn.active {
  background: var(--accent-primary-dim);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: var(--space-md);
  min-height: 440px;
}

.portfolio-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.portfolio-preview {
  position: relative;
  background: #141420;
  border-bottom: 1px solid var(--border-subtle);
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
}

.portfolio-frame-bar {
  height: 28px;
  background: #0E0E16;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.portfolio-preview-graphic {
  width: 100%;
  height: calc(100% - 28px);
  position: relative;
  background-size: cover;
  background-position: top center;
  transition: transform 0.6s var(--ease-out-expo);
  will-change: transform;
}

.portfolio-card:hover .portfolio-preview-graphic {
  transform: scale(1.04);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.portfolio-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.portfolio-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.portfolio-title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.portfolio-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--font-size-small);
  color: var(--accent-primary);
  font-weight: 600;
  margin-top: auto;
  padding-top: 1rem;
}

/* --------------------------------------------------------------------------
   8. HOW IT WORKS (4-STEP PROCESS)
   -------------------------------------------------------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.process-card {
  padding: var(--space-md);
  position: relative;
  min-height: 240px;
}

.process-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
  height: 1.1em;
}

.process-card:hover .process-number {
  color: var(--accent-primary-dim);
  -webkit-text-stroke: 1px var(--accent-primary);
}

.process-title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.process-desc {
  font-size: var(--font-size-body);
  color: var(--text-muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   9. TESTIMONIALS & PROOF
   -------------------------------------------------------------------------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
}

.testimonial-card {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
}

.testimonial-stars {
  display: flex;
  gap: 4px;
  color: #FBBF24;
  margin-bottom: 1.25rem;
}

.testimonial-quote {
  font-size: var(--font-size-body);
  color: var(--text-main);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1.75rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.author-info h4 {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: 600;
}

.author-info p {
  font-size: var(--font-size-small);
  color: var(--text-dim);
}

.testimonial-placeholder-tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  border: 1px dashed var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   10. CONVERSION CTA & QUOTE FORM
   -------------------------------------------------------------------------- */
.cta-box {
  background: linear-gradient(135deg, rgba(18, 18, 26, 0.9) 0%, rgba(10, 10, 15, 0.95) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: 0 20px 60px -20px var(--accent-primary-dim);
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.cta-info h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-h1);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.cta-info p {
  color: var(--text-muted);
  font-size: var(--font-size-body);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.guarantee-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  min-height: 72px;
}

.guarantee-icon {
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* Form Controls */
.quote-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 460px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  min-height: 76px; /* Layout reservation to eliminate validation CLS */
}

.form-label {
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  min-height: 48px;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-size-body);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-primary-dim);
}

.form-input.invalid, .form-select.invalid, .form-textarea.invalid {
  border-color: #FF5F56;
  box-shadow: 0 0 10px rgba(255, 95, 86, 0.2);
}

.form-input.valid, .form-select.valid, .form-textarea.valid {
  border-color: var(--accent-primary);
}

.field-error {
  font-size: 0.78rem;
  color: #FF5F56;
  display: block;
  min-height: 1.2em; /* Reserved space so error text doesn't push form fields */
  visibility: hidden;
  margin-top: 2px;
}

.field-error.visible {
  visibility: visible;
}

.form-submit-btn {
  width: 100%;
  padding: 1.1rem;
  margin-top: 0.5rem;
}

/* Custom Interactive Success Modal State */
.form-success-state {
  display: none;
  text-align: center;
  padding: 3rem 1.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.form-success-state.active {
  display: flex;
}

.success-icon-circle {
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--accent-primary-dim);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 30px var(--accent-primary-glow);
  animation: scaleUp 0.4s var(--ease-elastic);
}

@keyframes scaleUp {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@media (max-width: 992px) {
  .cta-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   11. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: #060609;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: var(--font-size-body);
  margin-top: 1rem;
  max-width: 320px;
}

.system-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.4rem 0.85rem;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-primary);
  min-height: 32px;
}

.footer-column-title {
  font-family: var(--font-display);
  font-size: var(--font-size-h4);
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: var(--font-size-small);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-small);
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* --------------------------------------------------------------------------
   12. SCROLL REVEAL ANIMATIONS (TRANSFORM / OPACITY ONLY)
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
  will-change: transform, opacity;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
