:root {
  --bg: #04060b;
  --surface: rgba(8, 11, 19, 0.74);
  --surface-float: #0c101a;
  --text: #e8eaee;
  --text-dim: #9098a6;
  --text-faint: #7d8494;
  --accent-blue: #3b82f6;
  --accent-blue-deep: #2f68c9;
  --accent-blue-light: #5b9dff;
  --accent-green: #00d9a3;
  --accent-gray: #565f6e;
  --accent-gray-text: #838c99;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.16);
  --border-hover: rgba(91, 157, 255, 0.5);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
  --font: 'Geist', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: var(--mono); }

a { color: inherit; }

main, footer { position: relative; z-index: 1; }

/* ---------- BROWSER SURFACES ---------- */
::selection {
  background: rgba(91, 157, 255, 0.35);
  color: #fff;
}

* { scrollbar-width: thin; scrollbar-color: rgba(91, 157, 255, 0.4) transparent; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(91, 157, 255, 0.35);
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(91, 157, 255, 0.55); }

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

/* ---------- SCENE (fixed WebGL layer behind the page) ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#universe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1400ms var(--ease-out);
}

.scene-ready #universe { opacity: 1; }

/* Two soft pools of light, the only gradients on the page. */
.aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 35% at 18% 12%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(38% 34% at 88% 92%, rgba(0, 217, 163, 0.11), transparent 70%);
  animation: aurora-drift 36s var(--ease-in-out) infinite alternate;
}

@keyframes aurora-drift {
  to { transform: translate3d(3%, -4%, 0) scale(1.06); }
}

.scene-labels { position: absolute; inset: 0; }

.scene-label {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
  translate: -50% -50%;
  visibility: hidden;
  will-change: transform, opacity;
}

.scene-label.is-region {
  translate: 10px -50%;
  color: #cfe9ff;
  transition: opacity 140ms var(--ease-out);
}

.scene-label.is-region::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: 6px;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.6;
}

.scene-label.is-home { color: var(--accent-green); }

/* Near the right edge of the screen the name moves to the left of its dot. */
.scene-label.is-region.is-flipped {
  translate: calc(-100% - 10px) -50%;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
}

.scene-label.is-region.is-flipped::before { margin: 0 0 0 6px; }

/* The other 32 regions: same format, a step quieter so the two home regions lead. */
.scene-label.is-region:not(.is-home) {
  font-size: 9.5px;
  color: rgba(207, 233, 255, 0.78);
}

/* The region under the pointer gets a small plate so it reads over the dots. */
.scene-label.is-hovered {
  padding: 3px 8px 3px 6px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: rgba(6, 8, 14, 0.82);
  color: var(--text);
}

.scene-label.is-node { color: var(--text-dim); font-size: 10px; }
.scene-label.is-node.is-planned { color: var(--accent-gray-text); opacity: 0.7; }

.scene-label.is-lane { translate: 0 -50%; font-size: 10px; letter-spacing: 0.1em; }
.scene-label.tone-live { color: var(--accent-green); }
.scene-label.tone-progress { color: var(--accent-blue-light); }
.scene-label.tone-planned { color: var(--accent-gray-text); }

/* Drag-to-spin on the globe */
.globe-hover body { cursor: grab; }
.globe-dragging, .globe-dragging * { cursor: grabbing !important; user-select: none; }

.scene-caption {
  position: fixed;
  right: var(--gutter);
  bottom: 24px;
  z-index: 2;
  max-width: 34ch;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
  line-height: 1.6;
  color: var(--text-faint);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
  pointer-events: none;
}

.scene-caption.is-shown { opacity: 1; transform: none; }

.no-webgl .scene-caption { display: none; }

/* ---------- NAV ---------- */
nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 100;
  width: min(1120px, calc(100% - 2 * var(--gutter)));
  translate: -50% 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 10px 10px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(6, 8, 14, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-brand {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.nav-links a {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent-blue-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--text); }
  .nav-links a:hover::after { transform: scaleX(1); }
}

.nav-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
  touch-action: manipulation;
}

.nav-cta span { color: var(--accent-green); }

@media (hover: hover) and (pointer: fine) {
  .nav-cta:hover { border-color: var(--accent-blue-light); background: rgba(91, 157, 255, 0.08); }
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(0, 217, 163, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(0, 217, 163, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 217, 163, 0); }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 130px var(--gutter) 120px;
}

.hero-content { max-width: 700px; }

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  animation: fade-up 700ms var(--ease-out) both;
}

h1.hero-title {
  font-family: var(--font);
  font-size: clamp(2.5rem, 4.9vw, 4.4rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin-bottom: 28px;
  text-wrap: balance;
}

h1.hero-title .accent { color: var(--accent-blue-light); }

/* Word-by-word entrance. Words are wrapped by script.js; without JS the title just shows. */
.hero-title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.3em);
  filter: blur(6px);
  animation: word-in 900ms var(--ease-expo) forwards;
  animation-delay: calc(120ms + var(--i) * 38ms);
}

@keyframes word-in {
  to { opacity: 1; transform: none; filter: blur(0); }
}

.hero-sub {
  max-width: 52ch;
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.6;
  animation: fade-up 800ms var(--ease-out) 600ms both;
}

.hero-sub .mono { color: var(--text); font-size: 0.92em; }

.hero-foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  animation: fade-up 800ms var(--ease-out) 800ms both;
}

.hero-hint {
  display: none;
  color: var(--accent-blue-light);
}

.hero-scroll-cue {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .hero-hint { display: inline; margin-left: auto; }
  .hero-hint + .hero-scroll-cue { margin-left: 0; }
}

.hero-scroll-cue span {
  position: relative;
  width: 1px;
  height: 22px;
  overflow: hidden;
  background: var(--border-light);
}

.hero-scroll-cue span::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 10px;
  background: var(--accent-blue-light);
  animation: cue-move 1.8s var(--ease-in-out) infinite;
}

@keyframes cue-move {
  from { transform: translateY(-10px); }
  to { transform: translateY(22px); }
}

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

/* ---------- SECTIONS ---------- */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 140px var(--gutter);
  position: relative;
}

/* Content stays in the left column so the scene has the right half. */
@media (min-width: 1024px) {
  .section.split > * { max-width: 620px; }
  .section.split > .metrics { max-width: none; }
}

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-blue-light);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.section-label::after { content: ''; flex: 1; max-width: 120px; height: 1px; background: var(--border-light); }

.section-title {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin-bottom: 56px;
  text-wrap: balance;
}

.section-heading {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 300;
  line-height: 1.38;
  letter-spacing: -0.025em;
  color: var(--text);
}

.section-heading .accent { color: var(--accent-blue-light); }

/* Scroll reveal: a few chosen blocks, once. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(4px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out), filter 600ms var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out), filter 600ms var(--ease-out);
}

/* ---------- METRICS ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 88px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.metric-card {
  padding: 34px 28px 36px;
  border-left: 1px solid var(--border);
  transition: background-color 200ms var(--ease-out);
}

.metric-card:first-child { border-left: none; }

@media (hover: hover) and (pointer: fine) {
  .metric-card:hover { background: rgba(91, 157, 255, 0.04); }
}

.metric-value {
  font-size: clamp(2.4rem, 3.6vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent-green);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
  padding-left: 14px;
  border-left: 1px solid var(--accent-green);
}

.metric-value .before {
  color: var(--text-faint);
  font-size: 0.4em;
  letter-spacing: 0;
  margin-right: 6px;
  vertical-align: middle;
  text-decoration: line-through;
  text-decoration-color: var(--text-faint);
}

.metric-label { padding-left: 15px; font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; padding-left: 32px; display: flex; flex-direction: column; gap: 64px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background-image: linear-gradient(var(--border-light) 60%, transparent 0%);
  background-size: 1px 6px;
  background-repeat: repeat-y;
}

.timeline-entry { position: relative; }

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-blue-light);
  transition: background-color 300ms var(--ease-out);
}

.timeline-entry.in-view::before { background: var(--accent-blue-light); }

.timeline-date { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.timeline-role { font-size: 1.35rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 4px; }
.timeline-company { font-size: 0.88rem; color: var(--accent-blue-light); margin-bottom: 18px; }

.timeline-entry ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.timeline-entry li {
  position: relative;
  max-width: 66ch;
  padding-left: 18px;
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--text-dim);
}

.timeline-entry li::before {
  content: '\203A';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-family: var(--mono);
}

.timeline-entry li strong { color: var(--text); font-weight: 500; }

.highlight-tag {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 12px;
  border: 1px solid rgba(0, 217, 163, 0.3);
  background: rgba(0, 217, 163, 0.06);
  color: var(--accent-green);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  border-radius: 3px;
}

/* ---------- EDUCATION ---------- */
.edu-card {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 30px 28px;
  transition: border-color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .edu-card:hover { border-color: var(--border-hover); }
}

.edu-degree { font-size: 1.25rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 6px; }
.edu-school { color: var(--accent-blue-light); font-size: 0.9rem; margin-bottom: 6px; }
.edu-meta { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-bottom: 24px; }
.edu-meta .gpa { color: var(--accent-green); }

.edu-row { display: flex; gap: 40px; flex-wrap: wrap; }
.edu-block-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.edu-block ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.edu-block li { font-size: 0.9rem; color: var(--text-dim); position: relative; padding-left: 16px; }
.edu-block li::before { content: '\2022'; position: absolute; left: 0; color: var(--accent-blue-light); }

/* ---------- PROJECTS ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 26px 26px 24px;
  transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
  }
}

.project-card::before,
.project-card::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent-blue-light);
  opacity: 0.6;
  transition: opacity 200ms var(--ease-out);
}

.project-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.project-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

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

.project-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.status-indicator { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.status-indicator.live { background: var(--accent-green); }
.status-indicator.progress {
  background: var(--accent-blue-light);
  box-shadow: 0 0 0 0 rgba(91, 157, 255, 0.6);
  animation: pulse-dot 2.4s var(--ease-in-out) infinite;
}
.status-indicator.planned { background: var(--accent-gray); }

.project-status.live-text { color: var(--accent-green); }
.project-status.progress-text { color: var(--accent-blue-light); }
.project-status.planned-text { color: var(--accent-gray-text); }

.project-title { font-size: 1.25rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 10px; }

.project-desc { font-size: 0.93rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 18px; }

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ----- Featured project: this site ----- */
.project-card.is-featured {
  padding: 30px 28px 28px;
  border-color: rgba(0, 217, 163, 0.28);
}

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.project-head .project-status { margin-bottom: 0; }

.project-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-blue-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .project-link:hover { border-bottom-color: currentColor; }
}

.is-featured .project-title { font-size: 1.5rem; }

/* The live counter: the number is the proof, so it gets the room. */
.visitor-live {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  margin: 22px 0 26px;
  padding: 18px 22px;
  border: 1px solid rgba(0, 217, 163, 0.22);
  border-radius: 10px;
  background: rgba(0, 217, 163, 0.05);
}

.visitor-num {
  min-width: 2ch;
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--accent-green);
  font-variant-numeric: tabular-nums;
}

.visitor-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.visitor-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
}

.visitor-live[data-state="live"] .visitor-dot { animation: pulse-dot 2.4s var(--ease-in-out) infinite; }

.visitor-live[data-state="offline"] { border-color: var(--border); background: transparent; }
.visitor-live[data-state="offline"] .visitor-num,
.visitor-live[data-state="offline"] .visitor-label { color: var(--text-faint); }
.visitor-live[data-state="offline"] .visitor-dot { background: var(--accent-gray); }

.visitor-cap { font-size: 13px; line-height: 1.55; color: var(--text-dim); }

.project-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin-bottom: 26px;
}

.project-block.is-wide { grid-column: 1 / -1; }

.project-block-label {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue-light);
}

.project-block p,
.project-bug p { font-size: 13.5px; line-height: 1.58; color: var(--text-dim); }

.project-bugs {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.project-bug-title { margin-bottom: 4px; font-size: 14.5px; color: var(--text); letter-spacing: -0.01em; }

@media (max-width: 600px) {
  .project-card.is-featured { padding: 24px 20px; }
  .project-blocks { grid-template-columns: 1fr; }
  .visitor-live { grid-template-columns: 1fr; gap: 12px; }
}

.project-tags span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  padding: 4px 8px;
  border-radius: 6px;
}

/* ---------- SKILLS ---------- */
/* Bento grid of cards: the cloud card leads and spans two columns. */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.skills-group {
  position: relative;
  padding: 22px 22px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 200ms var(--ease-out), opacity 200ms var(--ease-out);
}

.skills-group:first-child { grid-column: span 2; }
/* Six cards on a three-column grid: the last one closes the grid at full width. */
.skills-group:last-child { grid-column: 1 / -1; }

@media (hover: hover) and (pointer: fine) {
  .skills-group:hover { border-color: rgba(91, 157, 255, 0.35); }
  .skills-grid:hover .skills-group:not(:hover) { opacity: 0.6; }
}

.skills-group-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.skills-group-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue-light);
  flex-shrink: 0;
}

.skills-count {
  margin-left: auto;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.skills-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.skills-tags span {
  position: relative;
  font-family: var(--mono);
  font-size: 13px;
  color: #fff;
  background: var(--accent-blue);
  border: 1px solid rgba(147, 190, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 8px 13px;
  border-radius: 8px;
  cursor: default;
  user-select: none;
  touch-action: manipulation;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.skills-group.reveal .skills-tags span { opacity: 0; transform: translateY(6px); }

.skills-group.in-view .skills-tags span {
  animation: tag-in 420ms var(--ease-out) forwards;
}

.skills-tags span:nth-child(1) { animation-delay: 0ms; }
.skills-tags span:nth-child(2) { animation-delay: 35ms; }
.skills-tags span:nth-child(3) { animation-delay: 70ms; }
.skills-tags span:nth-child(4) { animation-delay: 105ms; }
.skills-tags span:nth-child(5) { animation-delay: 140ms; }
.skills-tags span:nth-child(6) { animation-delay: 175ms; }
.skills-tags span:nth-child(7) { animation-delay: 210ms; }
.skills-tags span:nth-child(8) { animation-delay: 245ms; }

@media (pointer: coarse) {
  .skills-tags span { padding: 12px 14px; }
}

@keyframes tag-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Proof-point tooltip: revealed on hover or keyboard focus. */
.skills-tags span::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 20;
  width: max-content;
  max-width: 220px;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--surface-float);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) scale(0.95);
  transform-origin: bottom center;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.skills-tags span:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

@media (hover: hover) and (pointer: fine) {
  .skills-tags span:hover::after {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  .skills-tags span:hover {
    background: var(--accent-blue-light);
    transform: translateY(-2px);
  }
}

@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills-group:last-child { grid-column: auto; }
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .skills-group:first-child { grid-column: auto; }
}

/* ---------- CERTIFICATIONS ---------- */
.cert-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }

.cert-row {
  background: rgba(8, 11, 19, 0.9);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: background-color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .cert-row:hover { background: rgba(14, 22, 40, 0.92); }
}

.cert-icon { flex-shrink: 0; width: 30px; height: 30px; }

.cert-info { flex: 1; }

.cert-name { font-size: 1.05rem; font-weight: 400; letter-spacing: -0.015em; margin-bottom: 3px; }

.cert-meta { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }

.cert-meta.done { color: var(--accent-green); }
.cert-meta.pending { color: var(--accent-blue-light); }

/* ---------- CONTACT ---------- */
.contact-section {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 217, 163, 0.3);
  background: rgba(0, 217, 163, 0.06);
  border-radius: 9999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--accent-green);
}

.contact-heading {
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  text-wrap: balance;
}

.glow-text { color: var(--accent-blue-light); }

.contact-sub {
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border: 1px solid var(--border-light);
  background: rgba(6, 8, 14, 0.6);
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.btn-arrow {
  display: inline-block;
  transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .contact-btn:hover { border-color: var(--accent-blue-light); background: rgba(91, 157, 255, 0.1); }
  .contact-btn.primary:hover { background: var(--accent-blue-deep); border-color: var(--accent-blue-deep); }
  .contact-btn.primary:hover .btn-arrow { transform: translateX(4px); }
}

.contact-btn:active { transform: scale(0.97); transition-duration: 0ms; }

.contact-btn.primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 40px 24px 48px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11.5px;
  border-top: 1px solid var(--border);
  background: rgba(4, 6, 11, 0.8);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1023px) {
  .scene-caption { display: none; }
}

@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-card:nth-child(3) { border-left: none; }
  .metric-card:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

@media (max-width: 720px) {
  nav { grid-template-columns: 1fr auto; padding-left: 16px; }
  .nav-links { display: none; }
  .section { padding: 96px var(--gutter); }
  .section-title { margin-bottom: 40px; }
  .timeline { padding-left: 24px; gap: 48px; }
  .timeline-entry::before { left: -24px; }
  .edu-row { gap: 24px; }
  .hero-foot span:not(.hero-scroll-cue):nth-child(2) { display: none; }
}

@media (max-width: 480px) {
  .metrics { grid-template-columns: 1fr; }
  .metric-card { border-left: none; }
  .metric-card + .metric-card { border-top: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none; }
  .hero-title .w { opacity: 1; transform: none; filter: none; }
}
