/* ==============================================================================
   HIGH-PERFORMANCE MODERN DESIGN SYSTEM
   Modern, State-of-the-Art, Glassmorphic, Zero-Bloat (<25KB)
   ============================================================================== */

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

:root {
  /* Modern Light Theme Tokens */
  --bg-main: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-card-hover: #ffffff;
  
  --border-color: rgba(226, 232, 240, 0.9);
  --border-color-hover: rgba(148, 163, 184, 0.6);
  --border-glow: rgba(37, 99, 235, 0.3);
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --accent-border: #bfdbfe;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
  --accent-gradient-glow: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);

  --accent-emerald: #059669;
  --accent-emerald-light: #ecfdf5;
  --accent-emerald-border: #a7f3d0;
  
  --accent-amber: #d97706;
  --accent-amber-light: #fffbeb;
  --accent-amber-border: #fde68a;
  
  --accent-purple: #7c3aed;
  --accent-purple-light: #f5f3ff;
  --accent-purple-border: #ddd6fe;

  --accent-cyan: #0284c7;
  --accent-cyan-light: #f0f9ff;
  --accent-cyan-border: #bae6fd;

  --hero-glow-1: rgba(37, 99, 235, 0.12);
  --hero-glow-2: rgba(124, 58, 237, 0.08);

  --terminal-bg: #090d16;
  --terminal-header: #0f172a;
  --terminal-border: rgba(255, 255, 255, 0.1);
  --terminal-text: #e2e8f0;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 14px 32px -4px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 8px 30px rgba(37, 99, 235, 0.15);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  color-scheme: light dark;
}

/* Modern Dark Theme Tokens */
html.dark {
  --bg-main: #07090e;
  --bg-secondary: #0d121c;
  --bg-card: rgba(14, 20, 32, 0.75);
  --bg-card-solid: #0e1420;
  --bg-card-subtle: rgba(20, 29, 46, 0.5);
  --bg-card-hover: rgba(22, 32, 52, 0.9);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.18);
  --border-glow: rgba(56, 189, 248, 0.35);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #38bdf8;
  --accent-primary-hover: #0284c7;
  --accent-light: rgba(56, 189, 248, 0.12);
  --accent-border: rgba(56, 189, 248, 0.3);
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --accent-gradient-glow: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(192, 132, 252, 0.15) 100%);

  --accent-emerald: #34d399;
  --accent-emerald-light: rgba(52, 211, 153, 0.12);
  --accent-emerald-border: rgba(52, 211, 153, 0.3);
  
  --accent-amber: #fbbf24;
  --accent-amber-light: rgba(251, 191, 36, 0.12);
  --accent-amber-border: rgba(251, 191, 36, 0.3);
  
  --accent-purple: #c084fc;
  --accent-purple-light: rgba(192, 132, 252, 0.12);
  --accent-purple-border: rgba(192, 132, 252, 0.3);

  --accent-cyan: #38bdf8;
  --accent-cyan-light: rgba(56, 189, 248, 0.12);
  --accent-cyan-border: rgba(56, 189, 248, 0.3);

  --hero-glow-1: rgba(56, 189, 248, 0.16);
  --hero-glow-2: rgba(168, 85, 247, 0.12);

  --terminal-bg: #070a12;
  --terminal-header: #0d121e;
  --terminal-border: rgba(255, 255, 255, 0.1);
  --terminal-text: #f1f5f9;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 18px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 8px 32px rgba(56, 189, 248, 0.15);
}

/* ==============================================================================
   Reset & Base Standards
   ============================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--hero-glow-1), transparent 70%),
    radial-gradient(circle at 80% 20%, var(--hero-glow-2), transparent 50%);
  background-attachment: fixed;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color-hover);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -0.025em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

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

code, pre {
  font-family: var(--font-mono);
}

/* Gradient Text Effect */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem auto;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==============================================================================
   Glassmorphic Floating Navigation
   ============================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .site-nav {
  background: rgba(7, 9, 14, 0.8);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-brand-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-ring 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  background: var(--bg-card-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card-solid);
  box-shadow: var(--shadow-sm);
}

html.dark .nav-link:hover, html.dark .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Modern Icon Buttons */
.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.btn-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.nav-toggle {
  display: none;
}

.nav-mobile-only {
  display: none;
}

.nav-toggle .close-icon {
  display: none;
}

.nav-toggle.active .hamburger-icon {
  display: none;
}

.nav-toggle.active .close-icon {
  display: block;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body.menu-open {
  overflow: hidden;
}

/* ==============================================================================
   Modern Button System
   ============================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.38);
  filter: brightness(1.05);
}

.btn-outline {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--accent-primary);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Arrow micro-animation on hover */
.btn .arrow-icon {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==============================================================================
   Hero Section
   ============================================================================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  padding: 3rem 0 2rem 0;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-tag .tag-highlight {
  color: var(--accent-primary);
  font-weight: 700;
}

.hero-title {
  margin-bottom: 1.25rem;
  font-weight: 800;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Hero Proof-Points / Metrics Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-val {
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
  font-weight: 800;
  font-family: var(--font-sans);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  text-align: center;
}

.metric-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  max-width: 250px;
}

/* ==============================================================================
   Interactive Multi-Tab Terminal / Architecture Studio
   ============================================================================== */
.terminal {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 35px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  font-family: var(--font-mono);
  position: relative;
}

.terminal-header {
  background: var(--terminal-header);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--terminal-border);
  gap: 0.75rem;
}

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

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

/* Interactive Terminal Tabs */
.terminal-tabs {
  display: flex;
  gap: 4px;
  flex-grow: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.terminal-tab {
  background: transparent;
  border: none;
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.terminal-tab:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
}

.terminal-tab.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

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

.terminal-copy {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
}

.terminal-copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
}

.terminal-body {
  padding: 1.25rem 1.4rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--terminal-text);
  overflow-x: auto;
  min-height: 240px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-pane.active {
  display: block;
}

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

/* Syntax Highlighting */
.syn-keyword { color: #f472b6; font-weight: 600; }
.syn-func { color: #60a5fa; font-weight: 600; }
.syn-doc { color: #94a3b8; font-style: italic; }
.syn-str { color: #34d399; }
.syn-key { color: #a78bfa; }
.syn-sym { color: #cbd5e1; }
.syn-num { color: #fbbf24; }
.syn-comment { color: #64748b; font-style: italic; }

.terminal-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.terminal-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0 !important;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s ease;
}

.terminal-social-link:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8 !important;
}

.terminal-footer {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 1.4rem;
  border-top: 1px solid var(--terminal-border);
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==============================================================================
   Modern Bento Grid & Card Components
   ============================================================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Top Glow Hairline for Featured Cards */
.card-featured {
  border-color: var(--accent-border);
  background: var(--bg-card);
}

.card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: var(--radius-pill);
}

/* Bento Badge Styling */
.card-badge {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}

.badge-blue { 
  background: var(--accent-light); 
  color: var(--accent-primary); 
  border: 1px solid var(--accent-border); 
}
.badge-emerald { 
  background: var(--accent-emerald-light); 
  color: var(--accent-emerald); 
  border: 1px solid var(--accent-emerald-border); 
}
.badge-purple { 
  background: var(--accent-purple-light); 
  color: var(--accent-purple); 
  border: 1px solid var(--accent-purple-border); 
}
.badge-amber { 
  background: var(--accent-amber-light); 
  color: var(--accent-amber); 
  border: 1px solid var(--accent-amber-border); 
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card h3 a {
  color: var(--text-primary);
}

.card h3 a:hover {
  color: var(--accent-primary);
}

.card p {
  flex-grow: 1;
  margin-bottom: 1.4rem;
  font-size: 0.98rem;
  color: var(--text-secondary);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
}

/* Modern Tag System */
.tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.85rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* ==============================================================================
   Modern Career Timeline Component
   ============================================================================== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 24px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-purple), var(--border-color));
}

.timeline-item {
  position: relative;
  padding-left: 68px;
  margin-bottom: 3rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 0 5px var(--bg-main), 0 0 15px rgba(56, 189, 248, 0.4);
  z-index: 2;
  transition: transform 0.2s ease;
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.15);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
}

.company-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  padding: 7px;
  border: 1px solid var(--border-color);
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.company-title-wrap h3 {
  margin-bottom: 0.25rem;
}

.role-pill {
  background: var(--accent-light);
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-border);
  display: inline-block;
}

.role-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* ==============================================================================
   Footer
   ============================================================================== */
.site-footer {
  margin-top: auto;
  padding: 3.5rem 0 2.5rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-social-link {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.18s ease;
}

.footer-social-link:hover {
  color: var(--accent-primary);
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==============================================================================
   Specialized Page Components
   ============================================================================== */
.experience-cta-group {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.experience-list {
  margin-left: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.gist-card {
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.gist-title {
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  margin-bottom: 1.25rem;
}

.gist-embed-wrapper {
  margin: 1.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  max-width: 100%;
}

.gist-embed-wrapper .gist,
.gist-embed-wrapper .gist-file {
  max-width: 100% !important;
}

.gist-embed-wrapper .gist-data {
  overflow-x: auto !important;
  max-width: 100% !important;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-color);
  background: #000;
  box-shadow: var(--shadow-lg);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-content-card {
  padding: 2.5rem;
  line-height: 1.85;
  word-break: break-word;
}

.article-content-card pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  margin: 1.5rem 0;
  color: var(--terminal-text);
}

.article-content-card table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content-card img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.card-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.not-found-card {
  padding: 3.5rem 2rem;
  align-items: center;
}

.not-found-code {
  font-size: clamp(4rem, 15vw, 6rem);
  line-height: 1;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

/* ==============================================================================
   Comprehensive Mobile & Tablet Responsive Architecture
   ============================================================================== */

/* 1. Large Tablets & Small Desktops (<= 1024px) */
@media screen and (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .metrics-strip {
    grid-template-columns: repeat(3, 1fr);
    max-width: 860px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 2. Tablets & Mobile Landscape (<= 860px) */
@media screen and (max-width: 860px) {
  .metrics-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 2rem;
    margin-top: 2.5rem;
  }
  .metric-card {
    padding: 1.2rem 0.9rem;
  }
  .metric-val {
    font-size: 1.45rem;
  }
  .metric-label {
    font-size: 0.8rem;
  }
}

/* 3. Mobile Viewports (<= 768px) */
@media screen and (max-width: 768px) {
  .section {
    padding: 3.25rem 0;
  }

  .section-header {
    margin-bottom: 2.25rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  /* Sticky Navigation & Mobile Drawer */
  .nav-wrapper {
    height: 64px;
  }

  .nav-menu {
    display: flex;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card-solid);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    flex-direction: column;
    padding: 1.25rem 1.25rem 1.75rem 1.25rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
  }

  html.dark .nav-menu {
    background: rgba(14, 20, 32, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu li {
    width: 100%;
    list-style: none;
  }

  .nav-menu .nav-link {
    display: flex;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-md);
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    background: var(--accent-light);
    color: var(--accent-primary);
  }

  html.dark .nav-menu .nav-link:hover,
  html.dark .nav-menu .nav-link.active {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
  }

  .nav-mobile-only {
    display: block;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
  }

  .nav-mobile-cta {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    text-align: center;
  }

  .nav-toggle {
    display: flex;
  }

  /* Hero Section Responsiveness */
  .hero-grid {
    gap: 2.25rem;
    padding: 1.5rem 0 1rem 0;
  }

  .hero-tag {
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
    max-width: 100%;
    white-space: normal;
  }

  .hero-title {
    font-size: clamp(1.9rem, 6.5vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 1.75rem;
  }

  .hero-cta-group {
    gap: 0.75rem;
  }

  /* Terminal Studio Responsive Layout */
  .terminal {
    border-radius: var(--radius-md);
  }

  .terminal-header {
    padding: 0.55rem 0.75rem;
    gap: 0.5rem;
  }

  .terminal-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .terminal-tab {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .terminal-copy {
    padding: 4px 8px;
    font-size: 0.7rem;
    flex-shrink: 0;
  }

  .terminal-body {
    padding: 1rem;
    font-size: 0.82rem;
    min-height: 200px;
    line-height: 1.6;
  }

  .terminal-footer {
    padding: 0.45rem 0.85rem;
    font-size: 0.72rem;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  /* Grids */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Cards */
  .card {
    padding: 1.4rem;
    border-radius: var(--radius-md);
  }

  .gist-card,
  .article-content-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }

  /* Timeline */
  .timeline::before {
    left: 18px;
  }

  .timeline-marker {
    left: 6px;
    width: 24px;
    height: 24px;
  }

  .timeline-item {
    padding-left: 48px;
    margin-bottom: 2.25rem;
  }

  .company-logo {
    width: 42px;
    height: 42px;
  }

  .company-title-wrap h3 {
    font-size: 1.15rem;
  }
}

/* 4. Small Mobile Phones (<= 640px) */
@media screen and (max-width: 640px) {
  .section {
    padding: 2.5rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  /* Center Metrics on Small Screens */
  .metrics-strip {
    grid-template-columns: 1fr;
    max-width: 380px;
    gap: 0.85rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .metric-card {
    padding: 1.15rem 1.25rem;
  }

  .metric-val {
    font-size: 1.55rem;
  }

  .metric-label {
    font-size: 0.85rem;
  }

  /* Hero CTA full-width buttons or stacked */
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
    padding: 0.8rem 1.2rem;
  }

  /* Compact Brand in Nav */
  .nav-brand-title {
    font-size: 0.95rem;
  }

  .nav-brand-sub {
    font-size: 0.65rem;
  }

  /* Experience Header buttons full width on small phones */
  .experience-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .experience-cta-group .btn {
    width: 100%;
  }

  /* Experience list padding */
  .experience-list {
    margin-left: 0.85rem;
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .timeline-date {
    font-size: 0.78rem;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  /* Card footer buttons */
  .card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .card-footer .card-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .card-footer .btn {
    flex: 1 1 auto;
    text-align: center;
  }

  /* Footer */
  .site-footer {
    padding: 2.5rem 0 2rem 0;
  }

  .footer-socials {
    gap: 0.75rem;
  }

  .footer-social-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
  }
}

/* 5. Extra-Small Mobile Viewports (<= 420px) */
@media screen and (max-width: 420px) {
  /* Prevent Header Crowding */
  .nav-connect-btn {
    display: none;
  }

  .nav-brand-sub {
    display: none;
  }

  .timeline::before {
    left: 14px;
  }

  .timeline-marker {
    left: 3px;
    width: 22px;
    height: 22px;
  }

  .timeline-item {
    padding-left: 38px;
  }

  .company-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .role-location {
    display: block;
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .card {
    padding: 1.15rem 1rem;
  }

  .gist-card,
  .article-content-card {
    padding: 1.15rem 1rem;
  }

  .not-found-card {
    padding: 2.5rem 1rem;
  }
}

/* ==========================================================================
   Projects Toolbar, Search & Filter Pills
   ========================================================================== */
.projects-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.search-box-wrapper {
  position: relative;
  max-width: 500px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
}

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

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.filter-pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #0f172a;
  font-weight: 600;
}

/* Blueprint Modal Viewer */
.blueprint-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 29, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.blueprint-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.blueprint-modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.blueprint-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.blueprint-modal-close:hover {
  background: var(--accent-primary);
  color: #0f172a;
  border-color: var(--accent-primary);
}

.no-results-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 1rem;
}

