:root {
  color-scheme: dark;
  --bg: #0e1218;
  --bg-elevated: #151b24;
  --text: #e8ecf1;
  --muted: #7a8494;
  --line: rgba(232, 236, 241, 0.1);
  --accent: #4e8ad4;
  --accent-strong: #3a6cab;
  --accent-surface: rgba(78, 138, 212, 0.14);
  --glow: rgba(78, 138, 212, 0.22);
  --topbar-bg: rgba(14, 18, 24, 0.9);
  --input-bg: rgba(255, 255, 255, 0.05);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg-elevated: #ffffff;
  --text: #12151c;
  --muted: #5a6270;
  --line: rgba(18, 21, 28, 0.1);
  --accent: #2563b8;
  --accent-strong: #1e4f96;
  --accent-surface: rgba(37, 99, 184, 0.12);
  --glow: rgba(37, 99, 184, 0.18);
  --topbar-bg: rgba(244, 245, 247, 0.92);
  --input-bg: #fafbfc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.dim {
  color: var(--muted);
}

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

/* ── Atmospheric layers ── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.04;
  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");
}

.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, black 15%, transparent 72%);
  /* parallax via JS */
  will-change: transform;
}

/* Scroll-driven background (SVG layers + dash offset; no video) */
.scroll-bg-parallax {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.scroll-bg-drift {
  position: absolute;
  inset: -20vh -15vw;
  will-change: transform;
}

.scroll-bg-drift svg {
  width: 100%;
  height: 100%;
  display: block;
  color: var(--accent);
  opacity: 0.16;
}

html[data-theme="light"] .scroll-bg-drift svg {
  opacity: 0.11;
}

.scroll-bg-drift--mid svg {
  opacity: 0.13;
}

html[data-theme="light"] .scroll-bg-drift--mid svg {
  opacity: 0.09;
}

.scroll-bg-drift--rails {
  inset: -10vh -5vw;
  opacity: 0.42;
}

.scroll-bg-drift--rails svg {
  opacity: 0.22;
}

html[data-theme="light"] .scroll-bg-drift--rails svg {
  opacity: 0.15;
}

.scroll-bg-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(14, 18, 24, 0.62) 0%, transparent 34%),
    linear-gradient(0deg, rgba(14, 18, 24, 0.68) 0%, transparent 42%),
    radial-gradient(ellipse 95% 75% at 50% 48%, transparent 32%, rgba(14, 18, 24, 0.42) 100%);
  pointer-events: none;
}

html[data-theme="light"] .scroll-bg-scrim {
  background:
    linear-gradient(180deg, rgba(244, 245, 247, 0.78) 0%, transparent 34%),
    linear-gradient(0deg, rgba(244, 245, 247, 0.82) 0%, transparent 42%),
    radial-gradient(ellipse 95% 75% at 50% 48%, transparent 32%, rgba(244, 245, 247, 0.48) 100%);
}

.scroll-bg-line--draw {
  stroke: currentColor;
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-width: 1.05;
}

.orb {
  display: none;
}

.container {
  width: min(840px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Top bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px) saturate(1.05);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.theme-toggle {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-surface);
}

.logo {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: flex-end;
}

.nav a {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
  transform-origin: left;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.nav a.active::after {
  transform: scaleX(1);
}

/* ── Hero ── */
.hero {
  padding: clamp(48px, 10vh, 96px) 0 44px;
}

.who-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin: 0 0 12px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-weight: 500;
}

.hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 36px);
  margin-top: 4px;
}

.hero-head-text {
  flex: 1 1 16rem;
  min-width: min(100%, 14rem);
}

.hero-photo-wrap {
  flex: 0 0 auto;
  line-height: 0;
}

.hero-photo {
  display: block;
  width: min(110px, 18vw);
  height: min(110px, 18vw);
  max-width: 130px;
  max-height: 130px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .hero-photo {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.hero-title {
  margin: 0;
}

.hero-name {
  display: block;
  font-size: clamp(1.85rem, 4.8vw, 2.65rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-copy {
  margin: 22px 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
}

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 11px 18px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  background: transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.btn-glow {
  background: var(--accent-surface);
  border-color: rgba(78, 138, 212, 0.45);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.btn-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  border-color: var(--accent);
}

html[data-theme="light"] .btn-glow {
  border-color: rgba(37, 99, 184, 0.35);
}

html[data-theme="light"] .btn-glow:hover {
  box-shadow: 0 4px 20px rgba(37, 99, 184, 0.12);
}

.btn-outline:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.btn-linkedin {
  gap: 8px;
}

.btn-linkedin .linkedin-icon {
  flex-shrink: 0;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-alert {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  min-height: 1.2em;
}

.form-alert--success {
  color: var(--accent-strong);
}

.form-alert--error {
  color: #f87171;
}

.btn.full {
  width: 100%;
}

/* ── Sections ── */
.section {
  padding: 48px 0 56px;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 24px;
}

.section-head span {
  display: block;
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.split-title {
  line-height: 1.15;
}

.gradient-text {
  color: var(--accent);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.section-copy {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 40rem;
}

/* ── Now building (stack story) ── */
.building-card {
  width: 100%;
  max-width: none;
  padding: 24px 26px;
}

.building-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.building-card p:last-child {
  margin-bottom: 0;
}

.building-lead {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 500;
}

.building-card strong {
  color: var(--text);
  font-weight: 600;
}

.contact-lead {
  font-size: 1.05rem;
}

.glass {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(6px) saturate(1.02);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .glass {
  backdrop-filter: blur(11px) saturate(1.02);
}

html[data-theme="light"] .glass {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ── Cards (generic; timeline entries use .glass.edu-card) ── */
.card {
  padding: 22px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  border-color: rgba(78, 138, 212, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

html[data-theme="dark"] .card:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 4px;
}

.card-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.card-brand > div {
  min-width: 0;
}

.card-brand .card-meta {
  margin-bottom: 4px;
}

.card-brand .card-period {
  display: block;
}

.brand-logo {
  display: block;
  height: auto;
  width: auto;
  object-fit: contain;
}

.logo-disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.logo-disc--card {
  width: 54px;
  height: 54px;
}

.logo-disc--card .brand-logo {
  max-height: 42px;
  max-width: 48px;
}

.logo-disc--tl {
  width: 38px;
  height: 38px;
}

.logo-disc--tl .tl-logo {
  max-height: 30px;
  max-width: 34px;
  height: auto;
  width: auto;
}

.logo-disc--tl .tl-logo-mark {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0d1018;
  line-height: 1;
  font-family: var(--font-sans);
}

.card-meta {
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.card-period {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.card h3,
.timeline h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
}

.timeline p:not(.tl-where) {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Timeline ── */
.timeline {
  display: grid;
  gap: 14px;
  overflow: visible;
}

.timeline article {
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.timeline article.edu-card {
  overflow: visible;
  display: grid;
  grid-template-rows: auto 0fr;
  gap: 0;
  transition:
    grid-template-rows 0.42s cubic-bezier(0.33, 1, 0.68, 1),
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}

.timeline article.edu-card.edu-card-is-open {
  grid-template-rows: auto 1fr;
  z-index: 5;
  border-color: rgba(78, 138, 212, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateX(2px);
}

html[data-theme="dark"] .timeline article.edu-card.edu-card-is-open {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4);
}

.edu-card-hit {
  position: relative;
  cursor: pointer;
  margin: -4px -4px 0;
  padding: 4px 36px 4px 4px;
  border-radius: 10px;
  outline: none;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  transition: background 0.2s ease;
}

.edu-card-hit:hover {
  background: rgba(255, 255, 255, 0.04);
}

.edu-card-hit:focus-visible {
  box-shadow: 0 0 0 2px rgba(78, 138, 212, 0.55);
}

html[data-theme="light"] .edu-card-hit:focus-visible {
  box-shadow: 0 0 0 2px rgba(37, 99, 184, 0.45);
}

.edu-card-hit h3 {
  margin-bottom: 0;
  padding-right: 8px;
}

.edu-card-chevron {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.28s ease;
  pointer-events: none;
  opacity: 0.8;
}

.timeline article.edu-card.edu-card-is-open .edu-card-chevron {
  transform: translateY(-30%) rotate(-135deg);
}

.edu-card-panel {
  min-height: 0;
  overflow: hidden;
}

.edu-card-panel-inner {
  padding-top: 4px;
}

.edu-detail-bullets {
  margin: 0 0 18px;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.edu-detail-bullets li {
  margin: 0 0 10px;
}

.edu-detail-bullets li:last-child {
  margin-bottom: 0;
}

.edu-uni-about {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.edu-uni-about .edu-map-label {
  margin-bottom: 12px;
}

.edu-uni-about p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.edu-uni-about p:last-child {
  margin-bottom: 0;
}

.edu-uni-about strong {
  color: var(--text);
  font-weight: 600;
}

.edu-card-panel-inner > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.timeline article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  opacity: 0.85;
  border-radius: 0 2px 2px 0;
}

.tl-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.tl-badge-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.tl-where {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  flex: 1 1 12rem;
  min-width: 0;
}

.tl-logo {
  display: block;
  object-fit: contain;
}

.tl-year {
  flex-shrink: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ── Education map (hover expand) ── */
#education,
#experience,
#volunteer {
  overflow: visible;
}

.edu-map-expand {
  min-height: 0;
  overflow: hidden;
}

.edu-map-inner {
  padding-top: 14px;
  min-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.32s ease 0.06s,
    transform 0.42s cubic-bezier(0.33, 1, 0.68, 1) 0.04s;
}

.timeline article.edu-card.edu-card-is-open .edu-map-inner {
  opacity: 1;
  transform: translateY(0);
}

.edu-map-label {
  margin: 0 0 10px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.edu-map-frame {
  position: relative;
  /* 2:1 equirectangular; narrower than full panel, centred, proportions unchanged. */
  width: min(100%, 360px);
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(
    120% 100% at 50% 0%,
    rgba(20, 24, 36, 0.55) 0%,
    var(--bg-elevated) 62%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 0 48px rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .edu-map-frame {
  background: radial-gradient(
    120% 100% at 50% 0%,
    rgba(250, 251, 252, 0.95) 0%,
    var(--bg-elevated) 70%
  );
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    inset 0 0 32px rgba(0, 0, 0, 0.04);
}

/* Map only: JS applies uniform scale + translate. Pins sit in .edu-pin-layer (sibling) so they stay crisp. */
.edu-map-zoom {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.edu-map-base {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background-image: url("./assets/edu-world.svg");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  filter: saturate(0.88) brightness(0.93) contrast(1.04);
  pointer-events: none;
}

.edu-pin-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.edu-map-frame--world .edu-pin {
  opacity: 0;
}

.edu-map-frame--world.edu-map-pins-ready .edu-pin {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.edu-pin {
  position: absolute;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #f4fdff 0%,
    var(--accent) 55%,
    rgba(70, 130, 200, 0.2) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 8px rgba(70, 130, 200, 0.35);
  pointer-events: auto;
  cursor: default;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.skill-category {
  padding: 20px 22px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.skill-category:hover {
  border-color: rgba(70, 130, 200, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.skill-cat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}

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

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  color: var(--text);
}

#skills .skill-tag {
  /* Staggered entrance: --skill-stagger set in JS; spans are not tabbable (no focus trap). */
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.48s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.48s cubic-bezier(0.33, 1, 0.68, 1),
    border-color 0.2s ease,
    background 0.2s ease;
  transition-delay:
    calc(var(--skill-stagger, 0) * 52ms),
    calc(var(--skill-stagger, 0) * 52ms),
    0s,
    0s;
}

#skills.is-visible .skill-tag {
  opacity: 1;
  transform: translateY(0);
}

.skill-tag:hover {
  border-color: rgba(70, 130, 200, 0.45);
  background: var(--accent-surface);
}

/* Match .edu-card-hit:focus-visible when tags become buttons/links later */
.skill-tag:focus {
  outline: none;
}

.skill-tag:focus-visible {
  box-shadow: 0 0 0 2px rgba(70, 130, 200, 0.5);
}

.skill-level {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Volunteer ── */
/* ── Proof of work (memo-style) ── */
#proof .pow-card {
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  padding-left: 20px;
}

.pow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.pow-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

.pow-card h3 {
  margin: 0;
}

.pow-card p {
  flex-grow: 1;
}

.pow-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.pow-card .btn {
  margin-top: 4px;
  align-self: flex-start;
}

.req-star {
  color: var(--accent);
}

/* ── Newsletter ── */
.newsletter-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  max-width: 480px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.newsletter-card:hover {
  border-color: rgba(70, 130, 200, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.newsletter-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.newsletter-inner strong {
  font-size: 1.2rem;
  font-weight: 700;
}

.tag {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
}

.read-link {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.pill {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.7rem;
  color: var(--muted);
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.contact-link:hover {
  border-color: rgba(70, 130, 200, 0.35);
  transform: translateX(2px);
}

.phone-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 8px 12px;
  padding: 18px 20px;
  align-items: center;
}

.phone-row .mono.dim {
  grid-column: 1 / -1;
}

.phone-num {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.btn-copy {
  grid-column: 2;
  grid-row: 2;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.2s, border-color 0.2s;
}

.btn-copy:hover {
  border-color: var(--accent);
  background: var(--accent-surface);
}

.terminal {
  margin-top: 8px;
  padding: 18px 20px;
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--muted);
}

.terminal .prompt {
  color: var(--accent);
  margin-right: 8px;
}

.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--accent-surface);
  border: 1px solid rgba(70, 130, 200, 0.45);
  color: var(--accent-strong);
  z-index: 200;
  transition: opacity 0.3s, transform 0.3s;
}

.copy-toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

/* ── Footer ── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 36px 0 52px;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: min(480px, 100%);
  padding: 28px;
  position: relative;
}

.modal-content h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.modal-sub {
  margin: 0 0 20px;
  font-size: 0.8rem;
}

.close {
  position: absolute;
  right: 14px;
  top: 12px;
  font-size: 1.5rem;
  line-height: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: var(--text);
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 6px;
}

.form input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.form input:focus {
  outline: none;
  border-color: rgba(70, 130, 200, 0.55);
  box-shadow: 0 0 0 3px var(--accent-surface);
}

.form input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

/* ── Scroll reveal ── */
.reveal,
.reveal-slow {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-slow {
  transition-duration: 0.9s;
}

.reveal.is-visible,
.reveal-slow.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 720px) {
  html {
    scroll-padding-top: 100px;
  }

  /* Row 1: logo + theme · row 2: nav full width (wraps ~2 lines) */
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    padding: 10px 0;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .topbar-actions {
    display: contents;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 12px;
    row-gap: 8px;
    max-width: 100%;
  }

  .nav a {
    font-size: 0.62rem;
    letter-spacing: 0.09em;
    padding: 4px 0;
  }

  .nav a::after {
    bottom: -2px;
  }

  .phone-row {
    grid-template-columns: 1fr;
  }

  .btn-copy {
    grid-column: 1;
    justify-self: start;
  }

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

  .hero {
    padding: 20px 0 32px;
  }

  .who-label {
    margin-bottom: 8px;
  }

  .eyebrow {
    margin-bottom: 12px;
  }

  .hero-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .hero-head-text {
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
  }

  .hero-photo-wrap {
    order: -1;
  }

  .hero-photo {
    width: min(100px, 26vw);
    height: min(100px, 26vw);
    max-width: 120px;
    max-height: 120px;
  }

  .hero-copy {
    margin-top: 6px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ctas {
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  #skills .skill-tag {
    opacity: 1;
    transform: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    transition-delay: 0s;
  }

  .reveal,
  .reveal-slow {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .newsletter-card,
  .card,
  .timeline article,
  .contact-link {
    transition: none;
  }

  .timeline article.edu-card,
  .timeline article.edu-card.edu-card-is-open {
    grid-template-rows: auto 1fr;
  }

  .edu-map-expand {
    display: none !important;
  }

  .edu-map-zoom {
    transform: none !important;
    will-change: auto;
  }

  .edu-card-chevron {
    transition: none;
  }

  .scroll-bg-drift {
    transform: none !important;
  }

  .scroll-bg-line--draw {
    stroke-dashoffset: 0 !important;
  }

  .orb,
  .grid-bg,
  .scroll-bg-drift {
    will-change: auto;
  }
}

@media print {
  .noise,
  .grid-bg,
  .scroll-bg-parallax,
  .orb,
  .topbar,
  .copy-toast {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
    overflow: visible;
  }

  .glass,
  .card,
  .pow-card,
  .newsletter-card,
  .modal-content,
  .terminal,
  .contact-link,
  .phone-row,
  .skill-category {
    background: #f6f6f8;
    border-color: #ddd;
    box-shadow: none;
    backdrop-filter: none;
  }

  .hero-name,
  .logo,
  .gradient-text {
    -webkit-text-fill-color: currentColor;
    color: #111;
    background: none;
    filter: none;
  }

  a {
    color: #0b57d0;
    text-decoration: underline;
  }

  .btn {
    border-color: #ccc;
    color: #111;
  }

  .modal {
    display: none !important;
  }

  .edu-map-expand {
    display: none !important;
  }

  .timeline article.edu-card {
    grid-template-rows: auto 1fr !important;
  }

  .edu-card-hit {
    pointer-events: none;
  }

  .edu-card-chevron {
    visibility: hidden;
  }

  #skills .skill-tag {
    opacity: 1 !important;
    transform: none !important;
  }
}
