/* ================================
   Design Tokens / CSS Variables
================================ */
:root {
  /* Colors - Dark Theme (Warm Orange/Amber) */
  --bg-primary: #1c1917;
  --bg-secondary: #292524;
  --bg-tertiary: #44403c;
  --fg-primary: #fafaf9;
  --fg-secondary: #e7e5e4;
  --fg-muted: #b8b4af;
  --fg-accent: #fb923c;
  --border-color: rgb(255 255 255 / 6%);
  --border-color-strong: rgb(255 255 255 / 12%);

  /* Accent colors - Warm Orange primary with teal secondary */
  --accent-primary: #ea580c;
  --accent-secondary: #0d9488;
  --accent-primary-rgb: 234, 88, 12;
  --accent-secondary-rgb: 13, 148, 136;
  --accent-primary-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
  --accent-primary-gradient-hover: linear-gradient(135deg, #c2410c 0%, #ea580c 50%, #f97316 100%);
  --accent-secondary-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #2dd4bf 100%);
  --accent-secondary-gradient-hover: linear-gradient(135deg, #0a7c74 0%, #0d9488 50%, #14b8a6 100%);
  --field-badge-gradient: linear-gradient(135deg, #7c2d12 0%, #9a3412 50%, #b45309 100%);

  /* Success / Error */
  --success-bg: rgb(34 197 94 / 15%);
  --success-fg: #4ade80;
  --success-border: rgb(34 197 94 / 30%);
  --error-bg: rgb(239 68 68 / 15%);
  --error-fg: #f87171;
  --error-border: rgb(239 68 68 / 30%);
  --warning-bg: rgb(245 158 11 / 15%);
  --warning-fg: #fbbf24;
  --warning-border: rgb(245 158 11 / 30%);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 30%);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / 40%);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 50%);
  --shadow-lg: 0 8px 32px rgb(0 0 0 / 60%);
  --shadow-xl: 0 16px 48px rgb(0 0 0 / 70%);

  /* Spacing */
  --space-2xs: 0.125rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans:
    'Inter', system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Transitions */
  --ease-out: cubic-bezier(0.2, 0.9, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --header-height: 72px;
  --container-max: 1200px;
  --container-narrow: 800px;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--fg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
  transition:
    background-color var(--duration-normal) var(--ease-out),
    color var(--duration-normal) var(--ease-out);
  position: relative;
}

/* ================================
   Typography
================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--fg-primary);
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  color: var(--fg-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--fg-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.sr-only:not(:focus, :active) {
  clip-path: inset(50%);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 300;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  color: var(--fg-primary);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

@supports selector(:focus-visible) {
  .skip-link:focus:not(:focus-visible) {
    transform: translateY(-200%);
  }
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

/* ================================
   Layout
================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.main-content {
  flex: 1;
  padding-top: var(--header-height);
}

html.mobile-nav-open,
body.mobile-nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (forced-colors: active) {
  .skip-link {
    background: Canvas;
    color: CanvasText;
    border-color: ButtonText;
  }

  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .btn-success {
    background: Canvas;
    color: ButtonText;
    border: 2px solid ButtonBorder;
    box-shadow: none;
  }

  .btn:hover,
  .btn:focus-visible {
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }

  .text-input:focus {
    outline: 2px solid Highlight;
    outline-offset: 1px;
    border-color: Highlight;
  }

  .card:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }

  /* Gradient text becomes invisible in forced-colors; reset to system text */
  .hero-header h1,
  .about-stat-value,
  .quick-facts-card h3,
  .edu-stat-value,
  .proj-stat-value,
  .summary-value,
  .name,
  .home-stat-value,
  .stat-value {
    background: none;
    -webkit-text-fill-color: CanvasText;
    color: CanvasText;
  }
}

/* ================================
   Header
================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-primary);
  /* stylelint-disable-next-line property-no-vendor-prefix -- Safari still needs the prefixed backdrop filter. */
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition:
    background-color var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out);
}

.header-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--fg-primary);
  font-weight: var(--font-extrabold);
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  transition: transform var(--duration-fast) var(--ease-out);
}

.logo:hover {
  transform: scale(1.02);
  color: var(--fg-primary);
}

.logo-icon {
  font-size: 1.5em;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--fg-primary);
  background: var(--bg-tertiary);
}

.nav-link.active {
  color: var(--fg-accent);
  background: rgb(var(--accent-primary-rgb), 0.1);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  cursor: pointer;
  position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--fg-primary);
  border-radius: 2px;
  transition: all var(--duration-fast) var(--ease-out);
}

.hamburger {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hamburger::before,
.hamburger::after {
  content: '';
  left: 0;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

.mobile-menu-btn[aria-expanded='true'] .hamburger {
  background: transparent;
}

.mobile-menu-btn[aria-expanded='true'] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.mobile-menu-btn[aria-expanded='true'] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  min-height: calc(100dvh - var(--header-height));
  max-height: calc(100dvh - var(--header-height));
  padding: var(--space-md) var(--space-lg) calc(var(--space-xl) + env(safe-area-inset-bottom));
  flex-direction: column;
  gap: var(--space-xs);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav .nav-link {
  width: 100%;
  justify-content: flex-start;
  padding: var(--space-sm) var(--space-lg);
  min-height: 44px;
}

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

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-color);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-logo {
  font-weight: var(--font-extrabold);
  font-size: var(--text-xl);
  color: var(--fg-primary);
}

.footer-tagline {
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

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

.footer-nav-section .footer-heading {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.footer-nav-section a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--fg-secondary);
  font-size: var(--text-sm);
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-nav-section a:hover {
  color: var(--fg-accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  font-size: var(--text-sm);
  color: var(--fg-muted);
}

.tech-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

/* ================================
   Buttons
================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-primary-gradient);
  color: white;
  box-shadow:
    var(--shadow-sm),
    0 4px 16px rgb(var(--accent-primary-rgb), 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-primary-gradient-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-md),
    0 8px 24px rgb(var(--accent-primary-rgb), 0.35);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--fg-primary);
  border: 1px solid var(--border-color-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(
    135deg,
    rgb(255 255 255 / 12%) 0%,
    rgb(255 255 255 / 8%) 100%
  );
  border-color: rgb(234 88 12 / 30%);
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-sm),
    0 4px 16px rgb(234 88 12 / 15%);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--fg-primary);
}

.btn-success {
  background: var(--success-fg);
  color: white;
}

.btn-success:hover:not(:disabled) {
  filter: brightness(1.1);
  color: white;
  transform: translateY(-1px);
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
}

.btn-icon {
  transition: transform var(--duration-fast) var(--ease-out);
}

.page-cta-section .btn-icon {
  display: inline-block;
  transition: transform var(--duration-fast);
}

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

.btn-text {
  display: inline;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn-loading-indicator {
  display: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 2px solid currentcolor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.htmx-request .btn-loading-indicator,
.htmx-request.btn-loading-indicator,
.btn-loading.is-loading .btn-loading-indicator {
  display: inline-flex;
}

.btn-loading[aria-busy='true'] {
  cursor: progress;
}

a.btn-loading[aria-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
  cursor: progress;
}

/* ================================
   Cards
================================ */
.card {
  padding: var(--space-xl);
  background: linear-gradient(135deg, rgb(255 255 255 / 5%) 0%, rgb(255 255 255 / 2%) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.card > * {
  position: relative;
  z-index: 1;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(234 88 12 / 8%) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  z-index: 0;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgb(234 88 12 / 40%);
  box-shadow: var(--shadow-xl), 0 0 40px rgb(234 88 12 / 15%), inset 0 0 16px rgb(234 88 12 / 5%);
}

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

/* Card Variants */
.card--compact {
  padding: var(--space-lg);
}

.card--compact:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 32px rgb(234 88 12 / 15%), inset 0 0 12px rgb(234 88 12 / 5%);
}

.card--teal::before {
  background: linear-gradient(135deg, rgb(13 148 136 / 8%) 0%, transparent 60%);
}

.card--teal:hover {
  border-color: rgb(13 148 136 / 40%);
  box-shadow: var(--shadow-xl), 0 0 40px rgb(13 148 136 / 15%), inset 0 0 16px rgb(13 148 136 / 5%);
}

/* ================================
   Pills / Badges
================================ */
.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  background: rgb(var(--accent-primary-rgb), 0.1);
  color: var(--fg-accent);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  border: 1px solid rgb(var(--accent-primary-rgb), 0.2);
}

.footer-bottom .tech-pill {
  padding: var(--space-xs) var(--space-md);
}

/* ================================
   Form Elements
================================ */
.text-input {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  transition: all var(--duration-fast) var(--ease-out);
}

.text-input:focus {
  outline: 2px solid transparent;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgb(var(--accent-primary-rgb), 0.15);
}

.text-input:focus-visible {
  outline: 2px solid transparent;
}

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

.text-input[aria-invalid='true'] {
  border-color: var(--error-fg);
  box-shadow: 0 0 0 3px var(--error-bg);
}

.text-input[aria-invalid='false'] {
  border-color: var(--success-fg);
  box-shadow: 0 0 0 3px var(--success-bg);
}

.form-error {
  display: block;
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--error-bg);
  color: var(--error-fg);
  border: 1px solid var(--error-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: var(--font-medium);
  color: var(--fg-primary);
}

.form-hint {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--fg-muted);
}

/* ================================
   Loading States
================================ */
.skeleton {
  background: linear-gradient(
    110deg,
    var(--bg-tertiary) 25%,
    var(--border-color-strong) 37%,
    var(--bg-tertiary) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* HTMX Loading */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: flex;
}

.htmx-request.htmx-indicator {
  display: flex;
}

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color-strong);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================
   CTA Sections (shared across pages)
================================ */

/* ================================
   Animations
================================ */
.fade-in {
  animation: fade-in var(--duration-normal) var(--ease-out);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* ================================
   Hero Sections (shared across pages)
================================ */
.hero-header {
  max-width: var(--container-narrow);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-header h1 {
  margin-bottom: var(--space-md);
}

.page-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-lg);
}

.lead {
  font-size: var(--text-xl);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
}

.hero-header .lead a {
  color: var(--fg-accent);
  font-weight: var(--font-medium);
}

.lead strong,
.lead em {
  color: var(--fg-accent);
  font-style: normal;
}

/* ================================
   Shared Section Labels
================================ */
.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-accent);
}

.label-line {
  width: 32px;
  height: 2px;
  background: var(--accent-primary-gradient);
  border-radius: var(--radius-full);
}

/* ================================
   Shared Animations
================================ */
@keyframes card-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
   Stagger Entrance Animation
================================ */
.stagger-enter {
  animation: card-fade-in 0.6s var(--ease-out) both;
}

.stagger-enter:nth-child(1) { animation-delay: 0.1s; }
.stagger-enter:nth-child(2) { animation-delay: 0.2s; }
.stagger-enter:nth-child(3) { animation-delay: 0.3s; }
.stagger-enter:nth-child(4) { animation-delay: 0.4s; }
.stagger-enter:nth-child(5) { animation-delay: 0.5s; }
.stagger-enter:nth-child(6) { animation-delay: 0.6s; }
.stagger-enter:nth-child(7) { animation-delay: 0.7s; }
.stagger-enter:nth-child(8) { animation-delay: 0.8s; }

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ================================
   Shared Page CTA Section
================================ */
.page-cta-section {
  background: linear-gradient(
    135deg,
    rgb(234 88 12 / 12%) 0%,
    rgb(13 148 136 / 8%) 100%
  );
  border: 1px solid rgb(var(--accent-primary-rgb), 0.2);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-3xl);
  overflow: hidden;
  padding: var(--space-3xl) var(--space-2xl);
  position: relative;
  text-align: center;
}

.page-cta-section .cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(
    ellipse,
    rgb(var(--accent-primary-rgb), 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.page-cta-section > * {
  position: relative;
  z-index: 1;
}

.page-cta-section h2 {
  margin-bottom: var(--space-sm);
  font-size: var(--text-2xl);
}

.page-cta-section .cta-subtitle {
  color: var(--fg-muted);
  margin-bottom: var(--space-xl);
  font-size: var(--text-base);
}

.page-cta-section .btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

/* ================================
   Shared Hero Base
================================ */
.page-hero[class],
.skills-hero[class] {
  --page-hero-bg-position: center 30%;
  --page-hero-content-max-width: min(44rem, 100%);
  --page-hero-copy-max-width: min(38rem, 100%);
  --page-hero-min-height: clamp(20rem, 42vw, 28rem);
  --page-hero-padding-inline: clamp(var(--space-md), 4vw, var(--space-2xl));
  --page-hero-padding-block-start:
    clamp(
      calc(var(--header-height) + var(--space-xl)),
      15vw,
      calc(var(--header-height) + var(--space-3xl))
    );
  --page-hero-padding-block-end: clamp(var(--space-2xl), 7vw, var(--space-3xl));
  --page-hero-overlay-start: rgb(28 25 23 / 62%);
  --page-hero-overlay-end: rgb(28 25 23 / 76%);

  display: grid;
  place-items: center;
  min-height: var(--page-hero-min-height);
  padding:
    var(--page-hero-padding-block-start)
    var(--page-hero-padding-inline)
    var(--page-hero-padding-block-end);
  text-align: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: var(--space-lg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--page-hero-bg-position);
}

.page-hero[class]::before,
.skills-hero[class]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--page-hero-overlay-start) 0%,
    var(--page-hero-overlay-end) 100%
  );
  z-index: 0;
}

.page-hero[class] > *,
.skills-hero[class] > * {
  position: relative;
  z-index: 2;
}

.page-hero[class] .hero-header,
.skills-hero[class] .hero-header {
  width: var(--page-hero-content-max-width);
}

.page-hero[class] .hero-header h1,
.skills-hero[class] .hero-header h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--font-bold);
  margin-bottom: var(--space-md);
  color: var(--fg-primary);
  background: var(--accent-primary-gradient);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-wrap: balance;
}

.page-hero[class] :is(.lead, .hero-subtitle),
.skills-hero[class] :is(.lead, .hero-subtitle) {
  max-width: var(--page-hero-copy-max-width);
  margin-inline: auto;
  text-wrap: pretty;
}

.page-hero[class] .lead,
.skills-hero[class] .lead {
  font-size: clamp(var(--text-base), 1rem + 0.5vw, var(--text-xl));
}

.page-hero[class] .hero-subtitle,
.skills-hero[class] .hero-subtitle {
  color: var(--fg-muted);
}

/* ================================
   Shared Hero Badge
================================ */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-lg);
  border: 1px solid rgb(var(--accent-primary-rgb), 0.4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--fg-accent);
  background: rgb(var(--accent-primary-rgb), 0.08);
  margin-bottom: var(--space-lg);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ================================
   Shared Icon Wrap
================================ */
.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgb(234 88 12 / 15%) 0%,
    rgb(249 115 22 / 8%) 100%
  );
  margin-bottom: var(--space-md);
  transition: all var(--duration-normal) var(--ease-out);
  font-size: var(--text-2xl);
}

.card:hover .icon-wrap {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgb(234 88 12 / 20%);
}

/* ================================
   Alerts
================================ */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  border: 1px solid;
}

.alert--success {
  background: var(--success-bg);
  color: var(--success-fg);
  border-color: var(--success-border);
}

.alert--error {
  background: var(--error-bg);
  color: var(--error-fg);
  border-color: var(--error-border);
}

.alert--warning {
  background: var(--warning-bg);
  color: var(--warning-fg);
  border-color: var(--warning-border);
}

/* ================================
   Shared Layout Utilities
================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--fg-primary);
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--fg-muted);
  max-width: var(--container-narrow);
  margin-inline: auto;
  line-height: var(--leading-relaxed);
}

/* ================================
   No Results / Empty Filter State
================================ */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-lg);
  padding: var(--space-2xl);
  background: linear-gradient(135deg, rgb(var(--accent-primary-rgb), 0.12) 0%, rgb(var(--accent-secondary-rgb), 0.08) 100%);
  border: 1px solid rgb(var(--accent-primary-rgb), 0.22);
  border-radius: var(--radius-lg);
  text-align: center;
}

.no-results-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgb(var(--accent-primary-rgb), 0.16) 0%, rgb(var(--accent-secondary-rgb), 0.14) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%);
  font-size: 1.8rem;
}

.no-results h3 {
  margin: 0;
}

.no-results p {
  margin: 0;
  color: var(--fg-primary);
}

.no-results .hint {
  font-size: var(--text-sm);
  color: var(--fg-secondary);
}

/* ================================
   Responsive
================================ */
@media (width <= 1024px) {
  :root {
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
  }

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

  .footer-main {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 1200px) {
  .main-nav {
    gap: 0;
  }

  .nav-link {
    padding: var(--space-xs) var(--space-sm);
  }
}

@media (width <= 1120px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (width <= 768px) {
  :root {
    --header-height: 64px;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .page-hero[class],
  .skills-hero[class] {
    --page-hero-bg-position: center 35%;
    --page-hero-content-max-width: min(36rem, 100%);
    --page-hero-copy-max-width: min(32rem, 100%);
    --page-hero-min-height: clamp(18rem, 60vw, 24rem);
    --page-hero-padding-inline: var(--space-md);
    --page-hero-padding-block-start:
      calc(var(--header-height) + var(--space-xl) + var(--space-sm));
    --page-hero-padding-block-end: var(--space-2xl);
  }
}

@media (width <= 480px) {
  :root {
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
    --text-2xl: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .container {
    padding: 0 var(--space-md);
  }

  .page-cta-section {
    padding: var(--space-2xl) var(--space-lg);
  }

  .page-hero[class],
  .skills-hero[class] {
    --page-hero-bg-position: center 38%;
    --page-hero-content-max-width: 100%;
    --page-hero-copy-max-width: 100%;
    --page-hero-min-height: 17rem;
    --page-hero-padding-inline: var(--space-sm);
    --page-hero-padding-block-start: calc(var(--header-height) + var(--space-xl));
    --page-hero-padding-block-end: var(--space-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hero-badge-dot {
    animation: none !important;
  }
}
