/* ============================================
   AL-XORAZMIY — MIDNIGHT MATH DESIGN SYSTEM
   v2.0 — Dark-first, geometric, premium
   ============================================ */

/* Fonts loaded via <link> in HTML head for performance.
   See preconnect hints in each public HTML page. */

/* ── DESIGN TOKENS (light defaults; dark overrides in dark-theme.css) ── */
:root {
  /* Brand */
  --brand-1: #6366F1;
  --brand-2: #8B5CF6;
  --brand-3: #EC4899;
  --brand-gradient: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 50%, var(--brand-3) 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(99,102,241,.12) 0%, rgba(139,92,246,.12) 100%);

  /* Subject palette */
  --sub-math: #3B82F6;
  --sub-physics: #8B5CF6;
  --sub-informatics: #10B981;
  --sub-chemistry: #F59E0B;
  --sub-biology: #EC4899;
  --sub-languages: #06B6D4;

  /* Surfaces (light) */
  --bg-base: #FAFAFA;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F5F5F8;
  --bg-inset: #F0F0F4;
  --bg-navbar: rgba(255, 255, 255, 0.72);
  --bg-footer: #0A0A12;

  /* Borders */
  --border: #E5E7EB;
  --border-subtle: #F0F0F4;
  --border-strong: #CBD5E1;

  /* Text */
  --text-hi: #0F172A;
  --text-mid: #475569;
  --text-lo: #94A3B8;
  --text-on-brand: #FFFFFF;

  /* Status */
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, .12);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, .12);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, .12);
  --info: #06B6D4;
  --info-bg: rgba(6, 182, 212, .12);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, .08), 0 4px 12px rgba(15, 23, 42, .04);
  --shadow-xl: 0 32px 64px rgba(15, 23, 42, .10), 0 8px 16px rgba(15, 23, 42, .06);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, .25);

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  /* Legacy aliases (existing code) */
  --space-xs: var(--s-1);
  --space-sm: var(--s-2);
  --space-md: var(--s-4);
  --space-lg: var(--s-6);
  --space-xl: var(--s-8);
  --space-2xl: var(--s-12);
  --space-3xl: var(--s-16);
  --space-4xl: var(--s-24);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;
  --radius-sm: var(--r-sm);
  --radius-md: var(--r-md);
  --radius-lg: var(--r-lg);
  --radius-xl: var(--r-xl);
  --radius-full: var(--r-full);

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 150ms var(--ease-out);
  --t-base: 280ms var(--ease-out);
  --t-slow: 480ms var(--ease-out);
  --transition-fast: var(--t-fast);
  --transition-base: var(--t-base);
  --transition-slow: var(--t-slow);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: var(--font-body);

  /* Layout */
  --navbar-h: 72px;
  --container-w: 1280px;
  --container-max: var(--container-w);
  --navbar-height: var(--navbar-h);

  /* Legacy primary aliases */
  --primary: var(--brand-1);
  --primary-hover: var(--brand-2);
  --primary-light: #818CF8;
  --primary-bg: rgba(99, 102, 241, .10);

  --bg-primary: var(--bg-base);
  --bg-secondary: var(--bg-elevated);
  --bg-tertiary: var(--bg-inset);
  --bg-card: var(--bg-surface);
  --text-primary: var(--text-hi);
  --text-secondary: var(--text-mid);
  --text-tertiary: var(--text-lo);
  --text-inverse: #F8FAFC;
  --border-color: var(--border);
  --border-hover: var(--border-strong);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv01", "cv11";
  color: var(--text-hi);
  background: var(--bg-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--t-base), color var(--t-base);
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--brand-1); color: white; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-hi);
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; font-weight: 600; }
p { color: var(--text-mid); line-height: 1.65; }
.text-mono { font-family: var(--font-mono); }
.text-display { font-family: var(--font-display); }
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LAYOUT ── */
.container { width: 100%; max-width: var(--container-w); margin: 0 auto; padding: 0 var(--s-6); }
.section { padding: var(--s-24) 0; position: relative; }
@media (max-width: 768px) { .section { padding: var(--s-16) 0; } }
.section-header { text-align: center; margin-bottom: var(--s-16); max-width: 720px; margin-left: auto; margin-right: auto; }
.section-header p { max-width: 600px; margin: var(--s-4) auto 0; font-size: 1.0625rem; }

/* Section label (eyebrow) */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--brand-1);
  padding: 6px 14px; border-radius: var(--r-full);
  background: var(--brand-gradient-soft);
  margin-bottom: var(--s-4);
  border: 1px solid rgba(99,102,241,.18);
}
.section-label::before { content: '▸'; font-size: 0.65rem; }

/* Grid */
.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--s-2); }
.gap-md { gap: var(--s-4); }
.gap-lg { gap: var(--s-6); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; font-size: 0.9375rem; font-weight: 600;
  font-family: var(--font-body); letter-spacing: -0.01em;
  border-radius: var(--r-md); border: 1.5px solid transparent;
  position: relative; overflow: hidden; cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-base), background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  isolation: isolate;
}
.btn-primary {
  background: var(--brand-gradient); color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, .35), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99, 102, 241, .45), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-surface); color: var(--text-hi);
  border-color: var(--border); box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--brand-1); color: var(--brand-1); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text-hi);
  border-color: rgba(255,255,255,.14);
}
.btn-ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.28); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; }
.btn-sm { padding: 9px 18px; font-size: 0.875rem; }
.btn-lg { padding: 18px 36px; font-size: 1rem; }
.btn-icon { padding: 12px; border-radius: var(--r-md); }

/* ── CARDS ── */
.card {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-subtle);
  padding: var(--s-8);
  position: relative; overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.card-hover { cursor: pointer; }
.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--brand-1);
  box-shadow: var(--shadow-xl);
}
.card-img { border-radius: var(--r-md); overflow: hidden; margin-bottom: var(--s-4); position: relative; aspect-ratio: 16/10; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.card-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.45) 0%, transparent 50%);
  opacity: 0; transition: opacity var(--t-base);
}
.card-hover:hover .card-img img { transform: scale(1.06); }
.card-hover:hover .card-img::after { opacity: 1; }
.card-badge {
  position: absolute; top: var(--s-4); right: var(--s-4);
  background: var(--brand-gradient); color: white;
  padding: 4px 12px; border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600;
  font-family: var(--font-mono);
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-navbar);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  height: var(--navbar-h);
  transition: background var(--t-base), border-color var(--t-base);
}
.navbar.scrolled { border-bottom-color: var(--border-subtle); box-shadow: 0 1px 0 var(--border-subtle); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.navbar-logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; color: var(--text-hi); letter-spacing: -0.02em; transition: opacity var(--t-fast); }
.navbar-logo:hover { opacity: 0.85; }
.navbar-logo-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: #FFFFFF;
  border-radius: var(--r-md);
  padding: 5px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.12), inset 0 0 0 1px rgba(0,0,0,.04);
  transition: transform var(--t-base) var(--ease-spring), box-shadow var(--t-base);
}
.navbar-logo:hover .navbar-logo-icon { transform: scale(1.05); box-shadow: 0 6px 20px rgba(99,102,241,.25), inset 0 0 0 1px rgba(99,102,241,.15); }
.navbar-logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.navbar-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.navbar-logo small { display: block; font-size: 0.6875rem; font-weight: 400; color: var(--text-lo); margin-top: 2px; font-family: var(--font-mono); letter-spacing: 0; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative;
  padding: 10px 16px; border-radius: var(--r-md); font-size: 0.9375rem;
  font-weight: 500; color: var(--text-mid); transition: color var(--t-fast);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--brand-gradient); border-radius: 2px;
  transition: width var(--t-base);
}
.nav-links a:hover { color: var(--text-hi); }
.nav-links a:hover::after, .nav-links a.active::after { width: 24px; }
.nav-links a.active { color: var(--text-hi); font-weight: 600; }

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

/* Language Switcher */
.lang-switcher { position: relative; display: flex; align-items: center; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-md);
  font-size: 0.8125rem; font-weight: 600; font-family: var(--font-mono);
  color: var(--text-mid); background: var(--bg-elevated);
  border: 1px solid var(--border-subtle); cursor: pointer;
  transition: all var(--t-fast);
}
.lang-btn:hover { color: var(--brand-1); border-color: var(--brand-1); }
.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all var(--t-fast); z-index: 10; overflow: hidden;
  padding: 6px;
}
.lang-switcher.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 0.875rem; color: var(--text-hi);
  transition: background var(--t-fast);
}
.lang-dropdown a:hover { background: var(--bg-elevated); }
.lang-dropdown a.active { color: var(--brand-1); font-weight: 600; background: var(--brand-gradient-soft); }

.theme-toggle {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); color: var(--text-mid);
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  cursor: pointer; transition: all var(--t-fast);
}
.theme-toggle:hover { color: var(--brand-1); border-color: var(--brand-1); transform: rotate(15deg); }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 10px; cursor: pointer; z-index: 1001; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-hi); border-radius: 2px; transition: all var(--t-fast); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── HERO ── */
.hero {
  min-height: 92vh;
  display: flex; align-items: center; position: relative;
  margin-top: var(--navbar-h);
  background:
    radial-gradient(ellipse at top right, rgba(139,92,246,.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(99,102,241,.18) 0%, transparent 50%),
    radial-gradient(ellipse at center, rgba(236,72,153,.08) 0%, transparent 50%),
    #0A0A12;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 20% 30%, rgba(99,102,241,.4) 0, transparent 35%),
    radial-gradient(circle at 80% 60%, rgba(139,92,246,.4) 0, transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(236,72,153,.25) 0, transparent 40%);
  filter: blur(60px);
  animation: meshFloat 24s ease-in-out infinite alternate;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
@keyframes meshFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: auto; }
.hero-content { position: relative; z-index: 2; color: white; max-width: 820px; pointer-events: auto; }
.hero > .container { position: relative; z-index: 2; pointer-events: none; }
.hero > .container * { pointer-events: auto; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(255,255,255,.7);
  padding: 8px 16px; border-radius: var(--r-full);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  margin-bottom: var(--s-6);
}
.hero-eyebrow::before { content: '◆'; color: var(--brand-2); }
.hero h1 {
  color: white;
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.0;
  margin-bottom: var(--s-6);
}
.hero h1 .accent {
  background: linear-gradient(135deg, #A5B4FC 0%, #C4B5FD 50%, #F0ABFC 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content p {
  color: rgba(255,255,255,.78); font-size: 1.1875rem;
  margin-bottom: var(--s-10); line-height: 1.6; max-width: 600px;
}
.hero-actions { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.hero-shape { display: none; }

/* ── STATS ── */
.stats-section { background: var(--bg-elevated); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); padding: var(--s-16) 0; }
.stat-card {
  text-align: left; padding: var(--s-6) var(--s-4);
  position: relative;
  transition: transform var(--t-base);
}
.stat-card:hover { transform: translateY(-2px); }
.stat-number {
  font-family: var(--font-mono); font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1; margin-bottom: var(--s-2);
  letter-spacing: -0.04em;
}
.stat-label { font-size: 0.9375rem; color: var(--text-mid); font-weight: 500; }

/* ── DIRECTIONS (subject cards) ── */
.direction-card {
  text-align: left; padding: var(--s-8);
  position: relative; isolation: isolate;
  --sub-color: var(--brand-1);
}
.direction-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--sub-color), transparent);
  opacity: 0.6; transition: opacity var(--t-base);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.direction-card:hover::before { opacity: 1; }
.direction-card:hover { border-color: var(--sub-color); }
.direction-icon {
  width: 60px; height: 60px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--sub-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--sub-color) 24%, transparent);
  border-radius: var(--r-md);
  font-size: 1.75rem;
  color: var(--sub-color);
  margin-bottom: var(--s-4);
  transition: transform var(--t-base) var(--ease-spring);
}
.direction-icon svg { width: 32px; height: 32px; }
.direction-card:hover .direction-icon { transform: scale(1.08) rotate(-5deg); }
.direction-card h3 { margin-bottom: var(--s-2); }
.direction-card p { font-size: 0.9375rem; color: var(--text-mid); }
/* Subject color modifiers */
.direction-card[data-subject="math"] { --sub-color: var(--sub-math); }
.direction-card[data-subject="physics"] { --sub-color: var(--sub-physics); }
.direction-card[data-subject="informatics"] { --sub-color: var(--sub-informatics); }
.direction-card[data-subject="chemistry"] { --sub-color: var(--sub-chemistry); }
.direction-card[data-subject="biology"] { --sub-color: var(--sub-biology); }
.direction-card[data-subject="languages"] { --sub-color: var(--sub-languages); }

/* ── NEWS CARDS ── */
.news-card { padding: 0; overflow: hidden; }
.news-card .card-img { aspect-ratio: 16/10; margin-bottom: 0; border-radius: 0; }
.news-card .news-card-body { padding: var(--s-6); }
.news-card .card-meta { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.news-card .card-date { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-lo); }
.news-card .card-category {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brand-1); background: var(--brand-gradient-soft);
  padding: 4px 10px; border-radius: var(--r-full);
}
.news-card h3 { margin-bottom: var(--s-2); font-size: 1.1875rem; line-height: 1.3; }
.news-card h3 a { color: var(--text-hi); transition: color var(--t-fast); }
.news-card h3 a:hover { color: var(--brand-1); }
.news-card p { font-size: 0.9375rem; color: var(--text-mid); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--s-4);
  font-size: 0.875rem; font-weight: 600; color: var(--brand-1);
  font-family: var(--font-body);
}
.read-more::after { content: '→'; transition: transform var(--t-fast); }
.read-more:hover::after { transform: translateX(4px); }

/* ── CAROUSEL ── */
.carousel-wrapper { position: relative; overflow: hidden; }
.carousel-track {
  display: flex; gap: var(--s-6); overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none; padding: var(--s-2) 0;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .card { min-width: 320px; scroll-snap-align: start; flex-shrink: 0; }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: var(--s-12); }
.timeline::before {
  content: ''; position: absolute; left: 14px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(to bottom, var(--brand-1), var(--brand-2), transparent);
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: var(--s-10); padding-left: var(--s-2); }
.timeline-item::before {
  content: ''; position: absolute; left: -41px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 4px var(--bg-base), 0 0 16px rgba(99,102,241,.4);
}
.timeline-year { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600; color: var(--brand-1); margin-bottom: 4px; letter-spacing: 0.05em; }
.timeline-item h3 { margin-bottom: var(--s-2); font-size: 1.25rem; }

/* ── FOOTER ── */
.footer {
  background: #0A0A12; color: rgba(255,255,255,.65);
  padding: var(--s-20) 0 var(--s-6);
  position: relative; overflow: hidden;
}
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.5), rgba(139,92,246,.5), transparent);
}
.footer h4 { color: white; margin-bottom: var(--s-4); font-size: 0.9375rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.footer a { color: rgba(255,255,255,.6); transition: color var(--t-fast); }
.footer a:hover { color: white; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.2fr 1fr; gap: var(--s-12); margin-bottom: var(--s-12); }
.footer-about p { font-size: 0.9375rem; line-height: 1.65; margin-bottom: var(--s-4); max-width: 360px; }
.footer-links li { margin-bottom: var(--s-2); }
.footer-links a { font-size: 0.9375rem; }
.footer-contact li { display: flex; align-items: flex-start; gap: var(--s-2); margin-bottom: var(--s-3); font-size: 0.9375rem; }
.footer-social { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.footer-social a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-md);
  transition: all var(--t-base); font-size: 1.05rem;
}
.footer-social a:hover {
  background: var(--brand-gradient); color: white; transform: translateY(-3px);
  border-color: transparent; box-shadow: 0 8px 20px rgba(99,102,241,.4);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: var(--s-6);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8125rem; color: rgba(255,255,255,.5);
  font-family: var(--font-mono);
}

/* ── BREADCRUMB ── */
.breadcrumb-section { background: var(--bg-elevated); padding: var(--s-4) 0; margin-top: var(--navbar-h); border-bottom: 1px solid var(--border-subtle); }
.breadcrumb { display: flex; align-items: center; gap: var(--s-2); font-size: 0.875rem; }
.breadcrumb a { color: var(--text-mid); }
.breadcrumb a:hover { color: var(--brand-1); }
.breadcrumb .separator { color: var(--text-lo); }
.breadcrumb .current { color: var(--text-hi); font-weight: 500; }

/* ── PAGE HEADER ── */
.page-header {
  position: relative;
  padding: var(--s-24) 0 var(--s-16);
  margin-top: var(--navbar-h);
  text-align: center; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse at top, rgba(139,92,246,.18) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(99,102,241,.15) 0%, transparent 50%),
    #0A0A12;
}
.page-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.page-header h1 {
  color: white; position: relative; z-index: 1;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.page-header .breadcrumb { justify-content: center; margin-top: var(--s-3); position: relative; z-index: 1; }
.page-header .breadcrumb a, .page-header .breadcrumb .separator { color: rgba(255,255,255,.6); }
.page-header .breadcrumb .current { color: white; }

/* ── FORMS ── */
.form-group { margin-bottom: var(--s-5); }
.form-group label { display: block; margin-bottom: var(--s-2); font-weight: 500; font-size: 0.875rem; color: var(--text-hi); }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  font-size: 0.9375rem; background: var(--bg-surface);
  color: var(--text-hi); transition: all var(--t-fast); outline: none;
  font-family: var(--font-body);
}
.form-control:focus { border-color: var(--brand-1); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.form-control::placeholder { color: var(--text-lo); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 48px; height: 48px;
  background: var(--brand-gradient); color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(99,102,241,.4);
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(.8);
  transition: all var(--t-base); z-index: 999; cursor: pointer;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 12px 32px rgba(99,102,241,.55); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10, 10, 18, .8); backdrop-filter: blur(8px);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all var(--t-base);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-surface); border-radius: var(--r-lg); padding: var(--s-8);
  max-width: 720px; width: 90%; max-height: 90vh; overflow-y: auto;
  transform: scale(0.96) translateY(20px); transition: transform var(--t-base);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xl);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-6); }
.modal-close { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); color: var(--text-mid); cursor: pointer; transition: all var(--t-fast); background: var(--bg-elevated); }
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

/* ── TOAST ── */
.toast-container { position: fixed; top: 90px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 20px; border-radius: var(--r-md); font-size: 0.9375rem; font-weight: 500;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: slideInRight 0.3s var(--ease-out); min-width: 280px;
}
.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-info { background: var(--info); color: white; }

/* ── ACCORDION ── */
.accordion-item { border: 1px solid var(--border-subtle); border-radius: var(--r-md); margin-bottom: var(--s-3); overflow: hidden; background: var(--bg-surface); transition: border-color var(--t-fast); }
.accordion-item:hover { border-color: var(--brand-1); }
.accordion-item.active { border-color: var(--brand-1); }
.accordion-header { padding: var(--s-5) var(--s-6); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); transition: background var(--t-fast); font-family: var(--font-display); font-weight: 600; }
.accordion-header:hover { background: var(--bg-elevated); }
.accordion-icon { transition: transform var(--t-base); font-size: 1rem; color: var(--brand-1); flex-shrink: 0; }
.accordion-item.active .accordion-icon { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height var(--t-slow); }
.accordion-body-content { padding: 0 var(--s-6) var(--s-5); color: var(--text-mid); line-height: 1.7; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pageEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.4); } 50% { box-shadow: 0 0 0 12px rgba(99,102,241,0); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }

/* Page enter — har bir sahifa ochilganda silliq fade */
body { animation: pageEnter 0.5s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { body { animation: none; } }

.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.animate-delay-1 { transition-delay: 0.08s; }
.animate-delay-2 { transition-delay: 0.16s; }
.animate-delay-3 { transition-delay: 0.24s; }
.animate-delay-4 { transition-delay: 0.32s; }

/* Scale-on-scroll — kartalar uchun yanada nozik */
.animate-scale { opacity: 0; transform: scale(0.95) translateY(20px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-spring); }
.animate-scale.visible { opacity: 1; transform: scale(1) translateY(0); }

/* Slide-in — yon tomondan */
.animate-slide-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.animate-slide-left.visible { opacity: 1; transform: translateX(0); }
.animate-slide-right { opacity: 0; transform: translateX(30px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.animate-slide-right.visible { opacity: 1; transform: translateX(0); }

/* Hover micro-interactions */
.btn-primary:hover { animation: glowPulse 1.5s ease-out 1; }
.direction-icon { transition: transform var(--t-base) var(--ease-spring); }
.card-hover:hover .read-more::after { animation: wiggle 0.5s ease-in-out; }

/* Link underline animation (subtle) */
.section a:not(.btn):not(.card):not(.read-more):not(.share-btn):not([class*="nav"]) {
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--t-base) var(--ease-out), color var(--t-fast);
}
.section a:not(.btn):not(.card):not(.read-more):not(.share-btn):not([class*="nav"]):hover {
  background-size: 100% 1px;
  color: var(--brand-1);
}

/* Image hover — gentle zoom + brightness */
.card-img img, .gallery-item img {
  transition: transform 0.6s var(--ease-out), filter var(--t-base);
}
.card-hover:hover .card-img img { transform: scale(1.06); filter: brightness(1.05); }
.gallery-item:hover img { filter: brightness(1.05); }

/* Button press effect */
.btn:active { transform: translateY(0) scale(0.98); }

/* ── LOADING ── */
.skeleton { background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-inset) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r-md); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--brand-1); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: var(--s-6); }
.skeleton-line { height: 12px; border-radius: 4px; margin-bottom: 8px; background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-inset) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-img { aspect-ratio: 4/3; border-radius: var(--r-md); background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-inset) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; margin-bottom: var(--s-4); }
.skeleton-circle { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-inset) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; margin: 0 auto var(--s-4); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: var(--s-16) var(--s-4); color: var(--text-lo); }
.empty-state-icon { font-size: 3.5rem; margin-bottom: var(--s-4); opacity: 0.5; }
.empty-state h3 { color: var(--text-mid); margin-bottom: var(--s-2); }
.empty-state p { font-size: 0.9375rem; }

/* ── CONTACT INFO ── */
.contact-card { display: flex; align-items: flex-start; gap: var(--s-4); padding: var(--s-6); }
.contact-icon {
  width: 48px; height: 48px; min-width: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-gradient-soft);
  border: 1px solid rgba(99,102,241,.18);
  border-radius: var(--r-md);
  color: var(--brand-1); font-size: 1.25rem;
}
.contact-card h4 { margin-bottom: var(--s-1); font-size: 0.9375rem; }
.contact-card p { font-size: 0.9375rem; color: var(--text-mid); }

/* ── MAP ── */
.map-container { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); height: 400px; }
.map-container iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.2); }

/* ── STEPPER (admission timeline) ── */
.stepper { display: flex; align-items: center; justify-content: center; margin: var(--s-12) 0; gap: 0; }
.step { display: flex; flex-direction: column; align-items: center; position: relative; flex: 1; }
.step-number {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700; font-size: 1rem;
  background: var(--bg-elevated); color: var(--text-mid); border: 2px solid var(--border);
  font-family: var(--font-mono);
  position: relative; z-index: 2; transition: all var(--t-base);
}
.step.active .step-number { background: var(--brand-gradient); color: white; border-color: transparent; box-shadow: 0 0 0 4px rgba(99,102,241,.18); }
.step-label { margin-top: var(--s-2); font-size: 0.875rem; font-weight: 500; color: var(--text-mid); text-align: center; }
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 24px; left: calc(50% + 24px); right: calc(-50% + 24px);
  height: 2px; background: var(--border); z-index: 1;
}
.step.active:not(:last-child)::after { background: var(--brand-gradient); }

/* ── TABLE ── */
.table-responsive { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border-subtle); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-elevated); }
th { padding: 16px; text-align: left; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mid); font-family: var(--font-mono); }
td { padding: 16px; border-top: 1px solid var(--border-subtle); font-size: 0.9375rem; }
tbody tr { transition: background var(--t-fast); }
tbody tr:hover { background: var(--brand-gradient-soft); }

/* ── PAGINATION ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: var(--s-12); }
.page-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); font-size: 0.9375rem; font-weight: 500; color: var(--text-mid); background: var(--bg-surface); border: 1px solid var(--border); transition: all var(--t-fast); cursor: pointer; }
.page-btn:hover { border-color: var(--brand-1); color: var(--brand-1); }
.page-btn.active { background: var(--brand-gradient); color: white; border-color: transparent; }

/* ── FILTERS / TAGS ── */
.filter-group { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-8); }
.filter-btn {
  padding: 9px 18px; border-radius: var(--r-full);
  font-size: 0.8125rem; font-weight: 500; font-family: var(--font-body);
  background: var(--bg-surface); color: var(--text-mid);
  border: 1px solid var(--border); cursor: pointer; transition: all var(--t-fast);
}
.filter-btn:hover { border-color: var(--brand-1); color: var(--brand-1); }
.filter-btn.active { background: var(--brand-gradient); color: white; border-color: transparent; box-shadow: 0 4px 14px rgba(99,102,241,.3); }

/* ── GALLERY ── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-4); }
.gallery-item {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  cursor: pointer; aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 50%);
  opacity: 0; transition: opacity var(--t-base);
}
.gallery-item:hover::after { opacity: 1; }
.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: var(--s-4);
  color: white; font-size: 0.9375rem; font-weight: 500; z-index: 1;
  transform: translateY(100%); transition: transform var(--t-base);
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }

/* ── LIGHTBOX ── */
.lightbox { position: fixed; inset: 0; background: rgba(10, 10, 18, .96); backdrop-filter: blur(12px); z-index: 3000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all var(--t-base); }
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: var(--r-md); }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; color: white; font-size: 1.5rem; cursor: pointer; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); transition: all var(--t-fast); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.16); }

/* ── TEAM CARDS ── */
.team-card { text-align: center; padding: var(--s-8); }
.team-card .card-avatar {
  width: 128px; height: 128px; border-radius: 50%;
  margin: 0 auto var(--s-4); overflow: hidden;
  position: relative;
  background: var(--brand-gradient);
  padding: 3px;
  transition: transform var(--t-base);
}
.team-card .card-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.team-card:hover .card-avatar { transform: scale(1.05); }
.team-card h3 { margin-bottom: var(--s-1); font-size: 1.0625rem; }
.team-card .role { color: var(--brand-1); font-size: 0.875rem; font-weight: 600; font-family: var(--font-mono); }

/* ── CHECKLIST ── */
.checklist li { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-2) 0; font-size: 0.9375rem; }
.checklist li::before {
  content: '✓'; display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; border-radius: 50%;
  font-size: 0.75rem; font-weight: 700;
  background: var(--brand-gradient-soft); color: var(--brand-1);
  margin-top: 2px;
}

/* ── SEARCH ── */
.search-box { position: relative; }
.search-box input { padding-left: 44px; }
.search-box .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-lo); }

/* ── UTILITIES ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--s-2); }
.mb-md { margin-bottom: var(--s-4); }
.mb-lg { margin-bottom: var(--s-6); }
.mb-xl { margin-bottom: var(--s-8); }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── SITE SEARCH (Cmd+K) ── */
.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; height: 40px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-mid);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.search-trigger:hover { border-color: var(--brand-1); color: var(--brand-1); }
.search-kbd-mini {
  padding: 2px 6px; font-family: var(--font-mono); font-size: 0.6875rem;
  background: var(--bg-base); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-lo);
}
@media (max-width: 768px) { .search-kbd-mini { display: none; } }

.search-modal {
  position: fixed; inset: 0; z-index: 4000;
  opacity: 0; visibility: hidden; transition: opacity var(--t-base), visibility var(--t-base);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 16px 16px;
}
.search-modal.active { opacity: 1; visibility: visible; }
.search-modal-backdrop {
  position: absolute; inset: 0; background: rgba(10,10,18,0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.search-modal-box {
  position: relative; width: 100%; max-width: 640px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform var(--t-base) var(--ease-spring);
}
.search-modal.active .search-modal-box { transform: translateY(0) scale(1); }
.search-modal-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.search-modal-input-wrap svg { color: var(--text-lo); flex-shrink: 0; }
.search-modal-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 1rem; color: var(--text-hi);
  font-family: var(--font-body);
}
.search-modal-input::placeholder { color: var(--text-lo); }
.search-kbd {
  padding: 3px 8px; font-family: var(--font-mono); font-size: 0.6875rem;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-mid);
}
.search-modal-results {
  max-height: 60vh; overflow-y: auto; padding: 8px;
}
.search-empty {
  padding: 40px 20px; text-align: center;
}
.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
  text-decoration: none; color: inherit; cursor: pointer;
  transition: background var(--t-fast);
}
.search-result:hover, .search-result.active {
  background: var(--brand-gradient-soft);
}
.search-result-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border-radius: var(--r-md);
  font-size: 1.125rem;
}
.search-result-text { flex: 1; min-width: 0; }
.search-result-title {
  font-weight: 600; font-size: 0.9375rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-subtitle {
  font-size: 0.8125rem; color: var(--text-mid);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.search-result-type {
  font-family: var(--font-mono); font-size: 0.6875rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: var(--r-full);
  background: var(--bg-elevated); color: var(--text-mid);
  flex-shrink: 0;
}

/* ── SCROLL PROGRESS BAR ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--brand-gradient);
  width: 0; z-index: 9999;
  transition: width 80ms linear;
  box-shadow: 0 0 12px rgba(99,102,241,.5);
}

/* ── ACCESSIBILITY ── */
/* Visible focus for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--brand-1);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Remove for mouse users */
:focus:not(:focus-visible) { outline: none; }

/* Skip link */
.skip-link {
  position: absolute; top: -40px; left: 12px;
  background: var(--brand-1); color: white;
  padding: 10px 16px; border-radius: var(--r-md);
  z-index: 9999; font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

/* High-contrast support */
@media (prefers-contrast: more) {
  :root { --border: #94A3B8; --text-mid: #1E293B; }
  [data-theme="dark"] { --border: #94A3B8; --text-mid: #E2E8F0; }
}

/* Better contrast for body text */
.section p, .news-card p, .footer-about p { color: var(--text-mid); }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero::before { animation: none; }
}
