:root {
  --radius: 0.625rem;
  --radius-shell: 1rem;
  --background: #050505;
  --foreground: #fafafa;
  --surface: #0d0d0d;
  --surface-elevated: #181818;
  --primary: #8B0000;
  --primary-foreground: #ffffff;
  --accent: #D4AF37;
  --accent-foreground: #000000;
  --muted: #141414;
  --muted-foreground: #999999;
  --border: rgba(255 255 255 / 0.08);
  --glow-primary: 0 0 80px -20px color-mix(in srgb, var(--primary) 40%, transparent);
  --shadow-card: 0 1px 0 0 rgba(255 255 255 / 0.04) inset, 0 20px 50px -25px #000;
  --shadow-elevated: 0 8px 32px rgba(0 0 0 / 0.5), 0 1px 0 0 rgba(255 255 255 / 0.06) inset;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --z-base: 1;
  --z-sticky: 50;
  --z-overlay: 100;
  --z-modal: 200;
  --z-grain: 999;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-premium: cubic-bezier(0.32, 0.72, 0, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
body::after {
  content: ''; position: fixed; inset: 0; z-index: var(--z-grain);
  pointer-events: none; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 256px 256px;
}
@media (prefers-reduced-transparency: reduce) { body::after { opacity: 0.08; } }
.site-wrapper { min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.main { flex: 1; }

/* ===== FLOATING ISLAND NAV ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-sticky);
  display: flex; justify-content: center;
  padding: 0.75rem 1.5rem 0;
  pointer-events: none;
}
.header-shell {
  pointer-events: auto;
  width: 100%; max-width: 44rem;
  border-radius: 9999px;
  border: 1px solid rgba(255 255 255 / 0.07);
  background: color-mix(in oklch, var(--background) 70%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 0.375rem;
  transition: border-color 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0.375rem 0 0.75rem;
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600;
  letter-spacing: -0.02em;
}
.logo-mark {
  display: grid; width: 1.625rem; height: 1.625rem; place-items: center;
  border-radius: 0.375rem;
  background: var(--primary); color: var(--primary-foreground);
  font-size: 0.75rem; font-weight: 700;
}
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  font-size: 0.8125rem; font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.3s var(--ease-out-expo);
  position: relative;
  letter-spacing: 0.01em;
}
.nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 1.5px;
  background: var(--primary); border-radius: 2px;
  transform: scaleX(0); transition: transform 0.4s var(--ease-out-expo);
  transform-origin: left;
}
.nav a:hover, .nav a.active { color: var(--foreground); }
.nav a.active::after { transform: scaleX(1); }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  width: 2.25rem; height: 2.25rem;
  border: none; border-radius: 50%;
  background: rgba(255 255 255 / 0.05);
  cursor: pointer; position: relative;
  align-items: center; justify-content: center;
  transition: background 0.3s var(--ease-out-expo);
}
.hamburger:hover { background: rgba(255 255 255 / 0.1); }
.hamburger span {
  display: block; width: 1rem; height: 1.5px;
  background: var(--foreground); border-radius: 2px;
  position: absolute;
  transition: all 0.4s var(--ease-premium);
}
.hamburger span:first-child { transform: translateY(-4px); }
.hamburger span:last-child { transform: translateY(4px); }
.hamburger.is-open span:first-child { transform: rotate(45deg); }
.hamburger.is-open span:last-child { transform: rotate(-45deg); }

/* ===== NAV OVERLAY ===== */
.nav-overlay {
  position: fixed; inset: 0; z-index: calc(var(--z-sticky) - 1);
  background: color-mix(in oklch, var(--background) 85%, transparent);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease-out-expo);
}
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }
.nav-overlay-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  text-align: center;
}
.nav-overlay-link {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 600;
  color: var(--foreground); text-decoration: none;
  opacity: 0; transform: translateY(2rem);
  transition: all 0.6s var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 0.1s);
}
.nav-overlay.is-open .nav-overlay-link {
  opacity: 1; transform: translateY(0);
}
.nav-overlay-link:hover { color: var(--primary); }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 6rem;
}
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.5rem; }
.footer-row { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) {
  .footer-row { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-contacts { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }
.footer-contacts a {
  font-size: 0.8125rem; color: var(--muted-foreground);
  display: inline-flex; align-items: center; gap: 0.375rem;
  transition: color 0.3s var(--ease-out-expo);
}
.footer-contacts a:hover { color: var(--foreground); }
.footer-socials { display: flex; gap: 0.75rem; }
.footer-socials a {
  color: var(--muted-foreground); transition: color 0.3s var(--ease-out-expo);
  display: inline-flex; align-items: center;
}
.footer-socials a:hover { color: var(--foreground); }
.footer-bottom { font-size: 0.75rem; color: var(--muted-foreground); font-family: var(--font-mono); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; padding: 0.625rem 1.25rem;
  font-size: 0.875rem; font-weight: 500; line-height: 1;
  transition: all 0.4s var(--ease-out-expo); border: none;
  cursor: pointer; text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--primary); color: var(--primary-foreground);
  box-shadow: var(--glow-primary);
}
.btn-primary:hover { background: color-mix(in oklch, var(--primary) 85%, white); }
.btn-outline {
  border: 1px solid var(--border); background: transparent; color: var(--foreground);
}
.btn-outline:hover { background: rgba(255 255 255 / 0.04); }
.btn-ghost {
  border: 1px solid var(--border); background: var(--surface); color: var(--foreground);
}
.btn-ghost:hover { background: var(--surface-elevated); }
.btn-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: rgba(0 0 0 / 0.2);
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-out-expo);
}
.btn:hover .btn-icon-wrap { transform: translateX(2px) translateY(-1px) scale(1.05); }
.btn-primary .btn-icon-wrap { background: rgba(0 0 0 / 0.2); }
.btn-outline .btn-icon-wrap { background: rgba(255 255 255 / 0.08); }

/* ===== CARDS ===== */
.card {
  border-radius: 0.75rem; border: 1px solid var(--border);
  background: var(--surface); padding: 1.5rem;
}
.card-sm { padding: 1.25rem; }
.card-xs { padding: 1rem; }
.card-hover { transition: box-shadow 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo); }
.card-hover:hover { box-shadow: var(--shadow-card); border-color: color-mix(in oklch, var(--primary) 60%, transparent); }
.card-hover-accent { transition: box-shadow 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo); }
.card-hover-accent:hover { box-shadow: var(--shadow-card); border-color: color-mix(in oklch, var(--accent) 60%, transparent); }

/* ===== STATS BAR ===== */
.stats-bar {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) { .stats-bar { grid-template-columns: repeat(3, 1fr); } }
.stat-item {
  border-radius: 0.75rem;
  background: rgba(255 255 255 / 0.025);
  border: 1px solid rgba(255 255 255 / 0.06);
  padding: 1rem; text-align: center;
}
.stat-value {
  display: block; font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  display: block; margin-top: 0.25rem;
  font-size: 0.6875rem; color: var(--muted-foreground);
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em;
}

/* ===== BENTO SKILLS ===== */
.grid-bento {
  display: grid; gap: 1rem;
}
@media (min-width: 640px) {
  .grid-bento { grid-template-columns: 1fr 1fr; }
  .grid-bento .bento-wide { grid-column: 1 / -1; }
}

/* ===== FEATURED CARD (Education) ===== */
.card-featured {
  position: relative; overflow: hidden;
  border-radius: var(--radius-shell);
  background: linear-gradient(135deg, color-mix(in oklch, var(--primary) 8%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in oklch, var(--primary) 30%, transparent);
  padding: 1.5rem;
}
.card-featured::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 2px 2px 0;
}

/* ===== CREDENTIALS PILLS ===== */
.cred-pills {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1rem;
}
.cred-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; padding: 0.375rem 1rem;
  font-size: 0.8125rem; color: var(--foreground);
  background: rgba(255 255 255 / 0.04);
  border: 1px solid rgba(255 255 255 / 0.06);
  transition: background 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo);
}
.cred-pill:hover { background: rgba(255 255 255 / 0.08); border-color: color-mix(in oklch, var(--primary) 40%, transparent); }
.cred-pill-date {
  font-family: var(--font-mono); font-size: 0.625rem;
  color: var(--muted-foreground);
}

/* ===== FEATURED PROJECT SPOTLIGHT ===== */
.spotlight {
  border-radius: var(--radius-shell);
  background: linear-gradient(135deg, color-mix(in oklch, var(--primary) 6%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in oklch, var(--primary) 25%, transparent);
  padding: 2rem; position: relative; overflow: hidden;
}
.spotlight-tag {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-family: var(--font-mono); font-size: 0.625rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--primary); margin-bottom: 0.75rem;
}
.spotlight-title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  max-width: 32rem;
}
.spotlight-desc {
  margin-top: 0.5rem; color: var(--muted-foreground);
  max-width: 36rem;
}
.spotlight-meta {
  margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.75rem;
  align-items: center;
}
.spotlight-link {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; font-weight: 500; color: var(--primary);
  transition: gap 0.3s var(--ease-out-expo);
}
.spotlight-link:hover { gap: 0.625rem; }

/* ===== APPROACH STEPS ===== */
.approach-grid {
  display: grid; gap: 1rem;
}
@media (min-width: 640px) { .approach-grid { grid-template-columns: repeat(3, 1fr); } }
.approach-step {
  border-radius: 0.75rem; padding: 1.25rem;
  position: relative;
}
.approach-step-num {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 700;
  line-height: 1; color: color-mix(in oklch, var(--primary) 20%, transparent);
}
.approach-step-title {
  margin-top: 0.5rem; font-family: var(--font-display);
  font-size: 1rem; font-weight: 600;
}
.approach-step-desc {
  margin-top: 0.25rem; font-size: 0.8125rem; color: var(--muted-foreground);
}

/* ===== CONTACT AVAILABILITY ===== */
.avail-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem; color: var(--muted-foreground);
}
.avail-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 8px rgba(34 197 94 / 0.4);
}

/* ===== TAG ===== */
.tag {
  font-family: var(--font-mono); font-size: 0.6875rem;
  border-radius: 9999px; border: 1px solid var(--border);
  background: var(--background); padding: 0.2rem 0.625rem;
  color: var(--muted-foreground); display: inline-block;
}

/* ===== GRID ===== */
.grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2-sm { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2-sm { grid-template-columns: 1fr 1fr; } }
.grid-3-sm { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .grid-3-sm { grid-template-columns: repeat(3, 1fr); } }
.section { padding: 4rem 0; }
.section-lg { padding: 5rem 0; }
.page-section { padding: 5rem 0; }

/* ===== HERO ===== */
.hero { position: relative; overflow: hidden; min-height: 100dvh; display: flex; align-items: center; }
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 30% 20%, color-mix(in oklch, var(--primary) 12%, transparent) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, color-mix(in oklch, var(--accent) 6%, transparent) 0%, transparent 50%),
    linear-gradient(to right, rgba(255 255 255 / 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255 255 255 / 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
}
.hero-glow {
  position: absolute; left: 55%; top: 10%; z-index: -1;
  width: 600px; height: 600px; border-radius: 50%;
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  filter: blur(80px);
}
.hero-title {
  margin-top: 1.5rem; max-width: 56rem;
  font-family: var(--font-display); font-size: 2.75rem; font-weight: 600; line-height: 1.05;
}
@media (min-width: 640px) { .hero-title { font-size: 3.5rem; } }
@media (min-width: 768px) { .hero-title { font-size: 4.25rem; } }
.hero-sub {
  margin-top: 1.25rem; max-width: 38rem;
  font-size: 1.0625rem; color: var(--muted-foreground); line-height: 1.6;
}
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-links { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; font-size: 0.8125rem; color: var(--muted-foreground); }
.hero-links a { display: inline-flex; align-items: center; gap: 0.5rem; transition: color 0.3s var(--ease-out-expo); }
.hero-links a:hover { color: var(--foreground); }

/* ===== HERO SPLIT ===== */
.hero-split .container { position: relative; }
.hero-split-inner {
  display: grid; gap: 3rem; align-items: center;
  padding: 6rem 0 4rem; position: relative;
}
@media (min-width: 768px) {
  .hero-split-inner { grid-template-columns: 1.2fr 0.8fr; padding: 6rem 0 5rem; }
}
.hero-split-text .hero-title { text-align: left; }
.hero-split-text .hero-sub { text-align: left; margin-left: 0; }
.hero-split-text .hero-actions { justify-content: flex-start; }
.hero-split-text .hero-links { justify-content: flex-start; }
.hero-split-visual { display: none; position: relative; }
@media (min-width: 768px) { .hero-split-visual { display: block; } }
.hero-split .hero-glow { left: 50%; top: 5%; }
.hero-photo {
  position: relative;
  width: 18rem; height: 18rem;
  border-radius: 50%;
  margin: 0 auto;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
  box-shadow: 0 0 20px color-mix(in oklch, var(--primary) 20%, transparent);
}
.hero-photo::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--accent), var(--primary));
  z-index: 0;
  animation: spinBorder 4s linear infinite;
}
.hero-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px color-mix(in oklch, var(--primary) 40%, transparent);
}
.hero-photo img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
  position: relative; z-index: 1;
}

/* ===== PAGE ===== */
.page-label {
  font-family: var(--font-mono); font-size: 0.6875rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.page-title { margin-top: 0.75rem; font-size: 2.25rem; font-weight: 600; }
@media (min-width: 640px) { .page-title { font-size: 3rem; } }
.page-desc { margin-top: 1.25rem; max-width: 40rem; font-size: 1.0625rem; color: var(--muted-foreground); }

/* ===== ABOUT ===== */
.about-intro { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 640px) { .about-intro { grid-template-columns: 1fr 1fr; } }
.about-photo {
  border-radius: 50%; position: relative;
  aspect-ratio: 1; max-width: 280px; justify-self: center;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
  box-shadow: 0 0 20px color-mix(in oklch, var(--primary) 20%, transparent);
}
.about-photo::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--accent), var(--primary));
  z-index: 0;
  animation: spinBorder 4s linear infinite;
}
.about-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px color-mix(in oklch, var(--primary) 40%, transparent);
}
.about-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; position: relative; z-index: 1; }

/* ===== BULLET LIST ===== */
.bullet-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.bullet-item { display: flex; gap: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }
.bullet-dot { margin-top: 0.5rem; width: 0.25rem; height: 0.25rem; border-radius: 50%; flex-shrink: 0; }
.bullet-primary { background: var(--primary); }
.bullet-accent { background: var(--accent); }

/* ===== PROJECT ===== */
.project-article {
  border-radius: 1rem; padding: 2rem; position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.project-article:hover { border-color: color-mix(in oklch, var(--primary) 50%, transparent); box-shadow: var(--shadow-elevated); }
.project-number { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted-foreground); }
.project-deco {
  position: absolute; top: 0; right: 0; width: 12rem; height: 100%;
  pointer-events: none; opacity: 0.05;
  background:
    linear-gradient(180deg, transparent 0%, var(--primary) 50%, transparent 100%),
    repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255 255 255 / 0.05) 1px, rgba(255 255 255 / 0.05) 2px);
  mask-image: linear-gradient(90deg, transparent 0%, black 40%, black 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 40%, black 100%);
}
.project-deco-accent {
  background:
    linear-gradient(180deg, transparent 0%, var(--accent) 50%, transparent 100%),
    repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255 255 255 / 0.05) 1px, rgba(255 255 255 / 0.05) 2px);
}

/* ===== CTA BOX ===== */
.cta-box {
  margin-top: 4rem;
  border-radius: var(--radius-shell);
  background: linear-gradient(180deg, color-mix(in oklch, var(--primary) 6%, var(--surface)), var(--background));
  border: 1px solid color-mix(in oklch, var(--primary) 30%, transparent);
  padding: 2.5rem; box-shadow: var(--glow-primary);
}
.cta-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.cta-text { margin-top: 0.5rem; max-width: 36rem; color: var(--muted-foreground); }
.cta-btn { margin-top: 1.5rem; }

/* ===== OVERLAY (email picker) ===== */
.overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklch, var(--background) 70%, transparent);
  backdrop-filter: blur(16px);
}

/* ===== GROUP ===== */
.group { transition: all 0.3s var(--ease-out-expo); }
.group-icon { transition: transform 0.3s var(--ease-out-expo); }
.group:hover .group-icon { transform: translateX(0.25rem) scale(1.05); }
.group-up-icon { transition: transform 0.3s var(--ease-out-expo); }
.group:hover .group-up-icon { transform: translate(0.125rem, -0.125rem); }
.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--muted-foreground);
  transition: color 0.3s var(--ease-out-expo);
}
.back-link:hover { color: var(--foreground); }
.back-link:active { transform: scale(0.97); }

/* ===== CONTAINER ===== */
.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }
.container-xs { max-width: 56rem; margin: 0 auto; padding: 0 1.5rem; }
.page-content { padding-top: 6.5rem; padding-bottom: 5rem; }

/* ===== UTILITIES ===== */
.text-muted { color: var(--muted-foreground); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.shrink-0 { flex-shrink: 0; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-foreground { color: var(--foreground); }
.rounded-full { border-radius: 9999px; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.divide-y > * + * { border-top: 1px solid var(--border); }
.transition-colors { transition: color 0.3s var(--ease-out-expo), background-color 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo); }
.transition-all { transition: all 0.3s var(--ease-out-expo); }
.transition-opacity { transition: opacity 0.3s var(--ease-out-expo); }
.glow { box-shadow: var(--glow-primary); }
.glow-ember { box-shadow: var(--glow-primary); }

/* ===== ICON SIZES ===== */
.icon-sm { font-size: 1rem; }
.icon-md { font-size: 1.25rem; }
.icon-lg { font-size: 2rem; }

/* ===== SCROLL REVEAL ===== */
[data-reveal] {
  opacity: 0; transform: translateY(2rem) scale(0.98);
  filter: blur(4px);
  transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium), filter 0.7s var(--ease-premium);
}
[data-reveal].revealed {
  opacity: 1; transform: translateY(0) scale(1);
  filter: blur(0);
}
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.4s; }
[data-reveal-delay="6"] { transition-delay: 0.48s; }

/* ===== KEYFRAMES ===== */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.5rem); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-0.4rem) rotate(1deg); }
  66% { transform: translateY(0.2rem) rotate(-0.5deg); }
}
@keyframes spinBorder {
  to { filter: hue-rotate(360deg); }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1s !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .header { padding: 0.5rem 1rem 0; }
  .header-shell { max-width: 100%; border-radius: 9999px; }
  .header-inner { padding: 0 0.25rem 0 0.75rem; }
  .nav { display: none; }
  .hamburger { display: flex; }
  .hero-title { font-size: 2.25rem; }
  .hero-sub { font-size: 0.9375rem; }
  .hero-split-inner { padding: 5rem 0 3rem; }
  .nav-overlay-link { font-size: 1.75rem; }
  .footer { margin-top: 4rem; }
  .page-content { padding-top: 5rem; padding-bottom: 3rem; }
}
