/* ==========================================================================
   Certo — Personal Homepage
   Design System 2026
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Backgrounds */
  --color-bg:              #ffffff;
  --color-bg-hero:         #06060e;
  --color-bg-section:      #f7f7fb;
  --color-bg-footer:       #0a0a14;

  /* Accent */
  --color-accent:          #3b82f6;
  --color-accent-hover:    #2563eb;
  --color-accent-soft:     rgba(59, 130, 246, 0.08);
  --color-accent-glow:     rgba(59, 130, 246, 0.25);

  /* Stat highlights */
  --color-cyan:            #22d3ee;
  --color-emerald:         #34d399;
  --color-purple:          #a78bfa;
  --color-orange:          #fb923c;

  /* Neutrals */
  --color-text:            #1a1a2e;
  --color-text-secondary:  #5a5a72;
  --color-text-light:      #8a8a9e;
  --color-text-inverse:    #ffffff;
  --color-text-inverse-m:  rgba(255, 255, 255, 0.7);
  --color-border:          #e8e8f0;
  --color-border-light:    rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;
  --space-3xl:  10rem;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md:  0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 8px 40px rgba(0, 0, 0, 0.12);

  /* Transition */
  --transition: 0.2s ease;

  /* Layout */
  --max-width:  1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }

ul, ol { list-style: none; }

::selection {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); border: 0;
}

/* --------------------------------------------------------------------------
   Header / Navbar
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: padding 0.35s ease, box-shadow 0.35s ease;
}

/*
  Frosted-glass backdrop lives on a pseudo-element so the header
  itself never acquires a containing block (backdrop-filter /
  filter / transform all create one). This keeps position:fixed
  children — especially the mobile menu overlay — referencing the
  viewport correctly at every scroll position.
*/
.header::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.header.scrolled::after {
  opacity: 1;
}

.header.scrolled {
  padding: var(--space-sm) 0;
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo / Identity */
.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-inverse);
  transition: color var(--transition);
}

.header.scrolled .header__logo {
  color: var(--color-text);
}

/* Social icon links (right side) */
.header__social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__social-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-inverse-m);
  transition: color var(--transition);
}

.header__social-link:hover,
.header__social-link:focus-visible {
  color: var(--color-accent);
}

.header.scrolled .header__social-link {
  color: var(--color-text-secondary);
}

.header.scrolled .header__social-link:hover,
.header.scrolled .header__social-link:focus-visible {
  color: var(--color-accent);
}

.header__social-link svg {
  width: 18px;
  height: 18px;
}

/* Desktop nav links (hidden on mobile) */
.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-inverse-m);
  transition: color var(--transition);
  position: relative;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}

.header__nav a:hover,
.header__nav a:focus-visible {
  color: var(--color-text-inverse);
}

.header__nav a:hover::after,
.header__nav a:focus-visible::after {
  width: 100%;
}

.header.scrolled .header__nav a {
  color: var(--color-text-secondary);
}

.header.scrolled .header__nav a:hover,
.header.scrolled .header__nav a:focus-visible {
  color: var(--color-text);
}

/* Social link labels — hidden on desktop */
.header__social-label {
  display: none;
}

/* Mobile hamburger button (hidden on desktop) */
.header__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--color-text-inverse);
  transition: color var(--transition);
}

.header.scrolled .header__menu-btn {
  color: var(--color-text);
}

.header__menu-btn svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2;
}

/* Mobile close button (hidden on desktop) */
.header__close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-inverse);
  cursor: pointer;
  padding: var(--space-xs);
}

.header__close-btn svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2;
}

/* Mobile overlay: nav links become full-screen */
@media (max-width: 768px) {
  .header__menu-btn {
    display: block;
  }

  .header__nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    background: var(--color-bg-hero);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .header__nav.open {
    opacity: 1;
    visibility: visible;
  }

  .header__nav a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    color: var(--color-text-inverse-m) !important;
  }

  .header__nav a:hover,
  .header__nav a:focus-visible {
    color: var(--color-text-inverse) !important;
  }

  .header__nav a::after {
    display: none;
  }

  /* Show text labels in mobile menu */
  .header__social-label {
    display: inline;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .header__social-link svg {
    width: 24px;
    height: 24px;
  }

  .header__close-btn {
    display: block;
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
  }
}

@media (min-width: 769px) {
  .header__close-btn {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-hero);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 10;
  padding: var(--space-2xl) var(--space-lg);
  width: 100%;
  max-width: 800px;
}

/* Neural constellation canvas */
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 3s ease;
}

.hero__canvas.visible {
  opacity: 1;
}

/* Overline label */
.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-inverse-m);
  margin-bottom: var(--space-lg);
}

.hero__label-dot {
  color: var(--color-accent);
}

/* Heading with gradient accent span */
.hero__heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text-inverse);
  margin-bottom: var(--space-md);
}

.hero__heading-accent {
  background: linear-gradient(135deg, var(--color-accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle */
.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
  color: var(--color-text-inverse-m);
  max-width: 600px;
  font-weight: 400;
  margin-bottom: var(--space-xl);
}

/* Expertise tags */
.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}

.hero__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-inverse-m);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-light);
  padding: 6px 14px;
  border-radius: 100px;
  transition: color var(--transition), border-color var(--transition);
}

.hero__tag:hover {
  color: var(--color-accent);
  border-color: rgba(59, 130, 246, 0.3);
}

/* CTA buttons */
.hero__cta-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero__cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-inverse);
  background: var(--color-accent);
  padding: 14px 32px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.hero__cta-primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--color-accent-glow);
}

.hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-inverse-m);
  background: transparent;
  padding: 14px 32px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.hero__cta-secondary:hover {
  color: var(--color-text-inverse);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------------------------------
   Stats Section
   -------------------------------------------------------------------------- */
.stats {
  padding: var(--space-xl) 0;
  background: var(--color-bg);
}

.stats__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-lg) var(--space-2xl);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Thin centered accent line above the bar */
.stats__bar::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  opacity: 0.3;
  border-radius: 1px;
}

/* Stat items */
.stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
  z-index: 1;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  transition: background 0.3s ease;
}

.stats__item:hover {
  background: rgba(59, 130, 246, 0.025);
}

/* Dividers between stat items */
.stats__divider {
  width: 1px;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  margin: 24px 0;
  background: var(--color-border);
}

/* Metric numbers */
.stats__metric {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Stat color variants */
.stats__metric--cyan    { color: var(--color-cyan); }
.stats__metric--emerald { color: var(--color-emerald); }
.stats__metric--purple  { color: var(--color-purple); }
.stats__metric--orange  { color: var(--color-orange); }

/* Per-color metric glow on hover */
.stats__item:hover .stats__metric--cyan {
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.4), 0 0 40px rgba(34, 211, 238, 0.15);
}
.stats__item:hover .stats__metric--emerald {
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.4), 0 0 40px rgba(52, 211, 153, 0.15);
}
.stats__item:hover .stats__metric--purple {
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.4), 0 0 40px rgba(167, 139, 250, 0.15);
}
.stats__item:hover .stats__metric--orange {
  text-shadow: 0 0 20px rgba(251, 146, 60, 0.4), 0 0 40px rgba(251, 146, 60, 0.15);
}

/* Labels */
.stats__label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.stats__desc {
  font-size: 0.75rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Projects Section
   -------------------------------------------------------------------------- */
.projects {
  padding: var(--space-2xl) 0;
  background: var(--color-bg-section);
}

.projects__header {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.projects__header-icon {
  color: var(--color-accent);
  width: 20px;
  height: 20px;
}

.projects__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

/* Featured projects: 2-column grid */
.projects__featured {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Other projects: 4-column grid */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

/* --------------------------------------------------------------------------
   Project Card
   -------------------------------------------------------------------------- */
.project-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  transform: translateY(-4px);
  border-color: transparent;
}

/* Icon area */
.project-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  flex-shrink: 0;
}

.project-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-text-inverse);
}

/* Icon gradient variants */
.project-card__icon--cyan    { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.project-card__icon--purple  { background: linear-gradient(135deg, #8b5cf6, #db2777); }
.project-card__icon--yellow  { background: linear-gradient(135deg, #eab308, #ea580c); }
.project-card__icon--emerald { background: linear-gradient(135deg, #10b981, #0d9488); }
.project-card__icon--orange  { background: linear-gradient(135deg, #f97316, #dc2626); }
.project-card__icon--indigo  { background: linear-gradient(135deg, #6366f1, #8b5cf6); }

/* Card header row */
.project-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

/* Status badge */
.project-card__status {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  flex-shrink: 0;
}

/* Status badge color variants */
.project-card__status--live {
  color: #059669;
  background: rgba(52, 211, 153, 0.12);
}

.project-card__status--building {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.project-card__status--published {
  color: #0d9488;
  background: rgba(20, 184, 166, 0.10);
}

.project-card__status--beta {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.10);
}

.project-card__status--ongoing {
  color: var(--color-text-secondary);
  background: rgba(90, 90, 114, 0.10);
}

/* External-link arrow icon */
.project-card__arrow {
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
  flex-shrink: 0;
  transition: color var(--transition);
}

.project-card:hover .project-card__arrow {
  color: var(--color-accent);
}

/* Card name */
.project-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  transition: color var(--transition);
}

.project-card:hover .project-card__name {
  color: var(--color-accent);
}

/* Card description */
.project-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  flex: 1;
}

/* Tech tag pills */
.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-md);
}

.project-card__tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-light);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Featured card gets slightly larger sizing */
.project-card--featured {
  padding: var(--space-lg) var(--space-lg);
}

.project-card--featured .project-card__name {
  font-size: 1.3rem;
}

.project-card--featured .project-card__desc {
  font-size: 0.95rem;
}

/* Glow overlay base */
.project-card__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.project-card:hover .project-card__glow {
  opacity: 1;
}

/* Card content z-index above glow */
.project-card__head,
.project-card__name,
.project-card__desc,
.project-card__tech {
  position: relative;
  z-index: 1;
}

/* Top accent line */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

/* ── Per-project color themes ── */

/* Anyone — brand blue */
.project-card--anyone::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.project-card--anyone .project-card__glow {
  background:
    radial-gradient(ellipse 80% 70% at 20% 80%, rgba(59, 130, 246, 0.06), transparent),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(96, 165, 250, 0.04), transparent);
}

.project-card--anyone:hover {
  border-color: rgba(59, 130, 246, 0.2);
}

/* Hefty Bot — warm amber/orange */
.project-card--hefty::before {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.project-card--hefty .project-card__glow {
  background:
    radial-gradient(ellipse 80% 70% at 20% 80%, rgba(245, 158, 11, 0.06), transparent),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(239, 68, 68, 0.04), transparent);
}

.project-card--hefty:hover {
  border-color: rgba(245, 158, 11, 0.2);
}

/* Y Experiment — purple */
.project-card--yexperiment::before {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.project-card--yexperiment .project-card__glow {
  background:
    radial-gradient(ellipse 80% 70% at 20% 80%, rgba(139, 92, 246, 0.06), transparent),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(167, 139, 250, 0.04), transparent);
}

.project-card--yexperiment:hover {
  border-color: rgba(139, 92, 246, 0.2);
}

/* The New Rules — teal/green */
.project-card--newrules::before {
  background: linear-gradient(90deg, #14b8a6, #10b981);
}

.project-card--newrules .project-card__glow {
  background:
    radial-gradient(ellipse 80% 70% at 20% 80%, rgba(20, 184, 166, 0.06), transparent),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(16, 185, 129, 0.04), transparent);
}

.project-card--newrules:hover {
  border-color: rgba(20, 184, 166, 0.2);
}

/* FitMech — cyan */
.project-card--fitmech::before {
  background: linear-gradient(90deg, #06b6d4, #0ea5e9);
}

.project-card--fitmech .project-card__glow {
  background:
    radial-gradient(ellipse 80% 70% at 20% 80%, rgba(6, 182, 212, 0.06), transparent),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(14, 165, 233, 0.04), transparent);
}

.project-card--fitmech:hover {
  border-color: rgba(6, 182, 212, 0.2);
}

/* Astronation — indigo/purple */
.project-card--astronation::before {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.project-card--astronation .project-card__glow {
  background:
    radial-gradient(ellipse 80% 70% at 20% 80%, rgba(99, 102, 241, 0.06), transparent),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(139, 92, 246, 0.04), transparent);
}

.project-card--astronation:hover {
  border-color: rgba(99, 102, 241, 0.2);
}

/* --------------------------------------------------------------------------
   Career Highlights Section
   -------------------------------------------------------------------------- */
.career {
  padding: var(--space-2xl) 0;
  background: var(--color-bg);
}

.career__header {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.career__header-icon {
  color: var(--color-purple);
  width: 20px;
  height: 20px;
}

.career__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

/* Career grid: 4 columns on desktop */
.career__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

/* Career card */
.career-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.3s ease;
}

.career-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.15);
}

/* Tag badge */
.career-card__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: var(--space-sm);
}

/* Tag color variants */
.career-card__tag--yellow {
  color: #a16207;
  background: rgba(234, 179, 8, 0.15);
}

.career-card__tag--blue {
  color: #2563eb;
  background: rgba(59, 130, 246, 0.12);
}

.career-card__tag--cyan {
  color: #0891b2;
  background: rgba(34, 211, 238, 0.12);
}

.career-card__tag--purple {
  color: #7c3aed;
  background: rgba(167, 139, 250, 0.12);
}

/* Card name */
.career-card__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 4px;
}

/* Card description */
.career-card__desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Credentials & Publications Section
   -------------------------------------------------------------------------- */
.credentials {
  padding: var(--space-2xl) 0;
  background: var(--color-bg-section);
}

.credentials__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

/* Prevent grid blowout on narrow viewports */
.credentials__col {
  min-width: 0;
  overflow: hidden;
}

/* Section sub-headers */
.credentials__heading {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.credentials__heading-icon {
  width: 20px;
  height: 20px;
}

.credentials__heading-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Credential card */
.credential-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.3s ease;
}

.credential-card:hover {
  box-shadow: var(--shadow-sm);
}

.credential-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.credential-card__desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* Publications list */
.publication-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.publication-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: var(--space-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.publication-item:hover {
  border-color: rgba(59, 130, 246, 0.2);
}

.publication-item__info {
  flex: 1;
  min-width: 0;
}

.publication-item__title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.5;
  transition: color var(--transition);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.publication-item:hover .publication-item__title {
  color: var(--color-accent);
}

.publication-item__venue {
  font-size: 0.65rem;
  color: var(--color-text-light);
}

.publication-item__link {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-light);
  flex-shrink: 0;
  transition: color var(--transition);
  margin-top: 2px;
}

.publication-item:hover .publication-item__link {
  color: var(--color-accent);
}

.publication-item__link svg {
  width: 14px;
  height: 14px;
}

/* Footer ambient particle canvas */
.footer__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease;
}

.footer__canvas.visible {
  opacity: 1;
}

/* Footer content layered above canvas */
.footer .container {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--color-bg-footer);
  padding: 0 0 var(--space-xl) 0;
  color: var(--color-text-inverse);
  position: relative;
}

/* Subtle top separator — gradient line that fades at edges */
.footer::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 15%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(255, 255, 255, 0.06) 85%,
    transparent 100%
  );
}

.footer__inner {
  text-align: center;
  padding-top: var(--space-xl);
}

/* Status indicator */
.footer__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-lg);
}

.footer__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-emerald);
  animation: status-pulse 2s infinite;
}

.footer__status-text {
  font-size: 0.9rem;
  color: var(--color-text-inverse-m);
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Social links */
.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-inverse-m);
  transition: color var(--transition);
}

.footer__social-link:hover,
.footer__social-link:focus-visible {
  color: var(--color-accent);
}

.footer__social-link svg {
  width: 16px;
  height: 16px;
}

/* Copyright */
.footer__copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Animations — fade in on scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

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

  .footer__status-dot {
    animation: none;
  }

  /* Canvas: show static first frame immediately, skip fade-in */
  .hero__canvas,
  .footer__canvas {
    opacity: 1;
    transition: none;
  }

  /* Project cards: no animated accent line, glow, or lift */
  .project-card::before {
    opacity: 0;
  }

  .project-card__glow {
    opacity: 0;
  }

  .project-card:hover {
    transform: none;
  }

  /* Stats metrics: no text-shadow glow */
  .stats__metric {
    text-shadow: none;
    transition: none;
  }

  .stats__item:hover .stats__metric--cyan,
  .stats__item:hover .stats__metric--emerald,
  .stats__item:hover .stats__metric--purple,
  .stats__item:hover .stats__metric--orange {
    text-shadow: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Tablet / medium screens */
@media (max-width: 1024px) {
  .projects__featured {
    grid-template-columns: 1fr;
  }

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

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

  .credentials__grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --space-3xl: 5rem;
    --space-2xl: 3.5rem;
  }

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

  .hero__content {
    padding: var(--space-xl) var(--space-md);
  }

  /* Stats: 2×2 grid on mobile, hide dividers */
  .stats__bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md);
  }

  .stats__divider {
    display: none;
  }

  .stats__item {
    padding: var(--space-sm);
  }

  /* Projects: single column */
  .projects__grid {
    grid-template-columns: 1fr;
  }

  /* Career: 2 columns on tablet */
  .career__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer: wrap social links */
  .footer__social {
    flex-wrap: wrap;
    gap: var(--space-md);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --space-3xl: 4rem;
    --space-2xl: 2.5rem;
  }

  /* Stats: single column */
  .stats__bar {
    grid-template-columns: 1fr;
  }

  .stats__item {
    padding: var(--space-xs);
  }

  /* Career: single column */
  .career__grid {
    grid-template-columns: 1fr;
  }

  /* Hero CTA buttons stack */
  .hero__cta-group {
    flex-direction: column;
    align-items: flex-start;
  }
}
