/* ============================================================
   Elijah Ong — Personal Site
   Design tokens, layout, components, motion.
   ============================================================ */

:root {
  --bg-0:        #05060a;
  --bg-1:        #0a0c14;
  --bg-2:        #11141d;
  --surface:     rgba(255, 255, 255, 0.025);
  --surface-2:   rgba(255, 255, 255, 0.045);
  --border:      rgba(255, 255, 255, 0.08);
  --border-hi:   rgba(255, 255, 255, 0.18);

  --text:        #f4f5fa;
  --text-2:      #b9bccc;
  --text-3:      #7a7d92;
  --text-mute:   #4f5266;

  --cyan:        #00e5ff;
  --cyan-soft:   rgba(0, 229, 255, 0.18);
  --violet:      #b362ff;
  --violet-soft: rgba(179, 98, 255, 0.18);
  --lime:        #c8ff5f;

  --grad-primary: linear-gradient(135deg, #00e5ff 0%, #b362ff 65%, #ff5fdc 100%);
  --grad-soft:    linear-gradient(135deg, rgba(0,229,255,0.10), rgba(179,98,255,0.10));

  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --container: 1180px;
  --pad: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(0,229,255,0.10), transparent 60%),
    radial-gradient(1000px 600px at 100% 10%, rgba(179,98,255,0.10), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(0,229,255,0.05), transparent 60%),
    var(--bg-0);
  min-height: 100vh;
  position: relative;
}

/* Subtle grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; line-height: 1.3; }
h4 { font-size: 1rem; line-height: 1.4; font-weight: 600; }

p {
  margin: 0 0 1em;
  color: var(--text-2);
  font-size: 1rem;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 200ms var(--ease), opacity 200ms var(--ease);
}

a.inline {
  color: var(--cyan);
  border-bottom: 1px solid rgba(0,229,255,0.3);
  padding-bottom: 1px;
}
a.inline:hover { color: #fff; border-bottom-color: #fff; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.muted { color: var(--text-3); }

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 2;
}

section {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
  z-index: 2;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}
.section-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.section-head {
  margin-bottom: clamp(40px, 6vw, 70px);
  max-width: 720px;
}
.section-head p {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--text-2);
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 300ms var(--ease), backdrop-filter 300ms var(--ease), border-color 300ms var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 6, 10, 0.65);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom-color: var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav-brand .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: 0 0 16px var(--cyan-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-2);
  transition: all 200ms var(--ease);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-hi);
  font-size: 0.88rem;
  background: var(--surface);
  transition: all 200ms var(--ease);
}
.nav-cta:hover {
  background: var(--surface-2);
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-hi);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 999px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    right: var(--pad);
    flex-direction: column;
    background: rgba(10, 12, 20, 0.95);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px;
    gap: 2px;
    min-width: 200px;
  }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
  padding-bottom: 60px;
  overflow: hidden;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.85;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 3;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-2);
  margin-bottom: 28px;
}
.hero-meta .status {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulse 1.8s infinite;
}

.hero h1 {
  margin-bottom: 22px;
}
.hero h1 .last { display: inline-block; }

.hero-roles {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--text-2);
  min-height: 28px;
}
.hero-roles .prompt {
  color: var(--cyan);
}
.hero-roles #role {
  color: var(--text);
  border-right: 2px solid var(--cyan);
  padding-right: 4px;
  white-space: nowrap;
  overflow: hidden;
}

.hero-bio {
  max-width: 540px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-hi);
  background: var(--surface);
  color: var(--text);
  transition: all 220ms var(--ease);
  position: relative;
  overflow: hidden;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: var(--text-3);
}
.btn.primary {
  background: linear-gradient(135deg, rgba(0,229,255,0.18), rgba(179,98,255,0.18));
  border-color: rgba(0,229,255,0.4);
  color: #fff;
}
.btn.primary:hover {
  border-color: var(--cyan);
  box-shadow: 0 8px 32px rgba(0,229,255,0.25);
}
.btn .arrow {
  transition: transform 220ms var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

/* Hero portrait */
.hero-portrait {
  position: relative;
  width: 100%;
  max-width: 360px;
  justify-self: end;
  aspect-ratio: 1;
}
.portrait-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
  background:
    conic-gradient(from 90deg, transparent 0deg, var(--cyan) 90deg, transparent 180deg, var(--violet) 270deg, transparent 360deg);
  -webkit-mask: radial-gradient(circle, transparent 56%, black 57%);
  mask: radial-gradient(circle, transparent 56%, black 57%);
  animation: spin 14s linear infinite;
  opacity: 0.7;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.portrait-img {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: var(--bg-1);
  overflow: hidden;
  border: 1px solid var(--border-hi);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.portrait-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}
.portrait-ping {
  position: absolute;
  bottom: 6%;
  right: 8%;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(5,6,10,0.85);
  border: 1px solid var(--border-hi);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .hero-portrait { justify-self: start; max-width: 260px; }
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-cue .bar {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: drop 2.4s ease-in-out infinite;
}
@keyframes drop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   About
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.about-text p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.2em;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fact {
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 250ms var(--ease);
}
.fact:hover {
  background: var(--surface-2);
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.fact .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.fact .v {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.fact .sub {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-top: 6px;
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Now / Devol callout
   ============================================================ */

.now-card {
  position: relative;
  padding: clamp(32px, 5vw, 60px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(900px 300px at 0% 0%, rgba(0,229,255,0.10), transparent 60%),
    radial-gradient(700px 300px at 100% 100%, rgba(179,98,255,0.12), transparent 60%),
    rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  overflow: hidden;
}
.now-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,229,255,0.4), rgba(179,98,255,0.4), transparent 70%);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}
.now-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.now-card h2 { margin-bottom: 14px; }
.now-card .role-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.now-card p { font-size: 1.02rem; }

.now-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.now-bullets li {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-2);
}
.now-bullets li .ico {
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  padding-top: 2px;
}

@media (max-width: 820px) {
  .now-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Research / Projects grid
   ============================================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 320ms var(--ease);
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hi);
  background: var(--surface-2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.project-card .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
.project-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease);
  filter: saturate(0.9) brightness(0.92);
}
.project-card:hover .thumb img {
  transform: scale(1.06);
  filter: saturate(1.1) brightness(1);
}
.project-card .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5,6,10,0.6) 100%);
  pointer-events: none;
}
.project-card .body {
  padding: 22px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-card .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.project-card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
  line-height: 1.3;
}
.project-card p {
  font-size: 0.92rem;
  color: var(--text-3);
  margin-bottom: 16px;
  line-height: 1.55;
}
.project-card .links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}
.project-card .links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
}
.project-card .links a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.section-foot {
  margin-top: 32px;
  text-align: center;
}

/* ============================================================
   Experience timeline
   ============================================================ */

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 250ms var(--ease);
}
.timeline-row:hover {
  background: var(--surface-2);
  border-color: var(--border-hi);
}
.timeline-row .when {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-top: 4px;
}
.timeline-row h3 {
  font-size: 1.08rem;
  margin-bottom: 4px;
}
.timeline-row .where {
  font-size: 0.92rem;
  color: var(--text-2);
  margin-bottom: 10px;
}
.timeline-row p {
  font-size: 0.92rem;
  color: var(--text-3);
  margin: 0;
}

@media (max-width: 820px) {
  .timeline-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ============================================================
   Blog
   ============================================================ */

.blog-empty {
  padding: 60px;
  text-align: center;
  border: 1px dashed var(--border-hi);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.blog-empty .icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--grad-soft);
  border: 1px solid var(--border-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.6rem;
}

.posts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.post-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 26px;
  align-items: center;
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 250ms var(--ease);
}
.post-row:hover {
  background: var(--surface-2);
  border-color: var(--cyan);
  transform: translateX(4px);
}
.post-row .date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-3);
}
.post-row h3 { font-size: 1.1rem; }
.post-row .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--cyan);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--cyan-soft);
}
@media (max-width: 720px) {
  .post-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ============================================================
   Contact / Footer
   ============================================================ */

.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}
.footer h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  max-width: 540px;
  margin-bottom: 18px;
}
.footer .lead {
  color: var(--text-2);
  max-width: 480px;
  margin-bottom: 24px;
}
.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  color: var(--text-2);
  padding: 5px 0;
  font-size: 0.95rem;
  transition: color 200ms var(--ease), transform 200ms var(--ease);
}
.footer-col a:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-3);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ============================================================
   Page header (for non-home pages)
   ============================================================ */

.page-hero {
  padding-top: 140px;
  padding-bottom: 40px;
  position: relative;
  z-index: 2;
}
.page-hero .container {
  max-width: 900px;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 1.1rem;
  color: var(--text-2);
  max-width: 640px;
}

/* ============================================================
   Reveal animations
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ============================================================
   Utility
   ============================================================ */

.spacer-sm { height: 24px; }
.spacer-md { height: 48px; }
.spacer-lg { height: 80px; }

::selection {
  background: rgba(0, 229, 255, 0.35);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }
