/* ============================================================
   STYLE.CSS — dark theme
   Design tokens live at the top under :root — change colors,
   fonts, or spacing there and it updates every page.
   ============================================================ */

:root {
  color-scheme: dark;

  /* ---- Color ---- */
  --bg: #12182A;          /* page background — deep muted navy */
  --bg-raised: #171C1A;   /* cards, tags, banners */
  --bg-nav: rgba(14, 18, 17, 0.82);
  --ink: #ECEEE9;         /* primary text */
  --ink-soft: #A6ADA7;    /* body copy, secondary text */
  --accent: #8FB0E0;      /* lifted ink-navy — links, highlights */
  --accent-soft: #8A99A6; /* muted labels, metadata */
  --accent-glow: rgba(143, 176, 224, 0.14);
  --rule: #262C29;        /* hairline dividers */
  --live: #6FCF97;        /* "current position" indicator */

  /* ---- Type ---- */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* ---- Spacing scale ---- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
  --space-6: 8rem;

  --max-width: 720px;
}

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

html { scroll-behavior: smooth; background: var(--bg); font-size: 18px; }

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

body {
  background-color: var(--bg);
  /* Very faint dot grid — roughly 18% opacity of --rule, barely visible */
  background-image: radial-gradient(color-mix(in srgb, var(--rule) 18%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -14px -14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  text-align: justify;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: opacity 0.15s ease-out;
}
/* Brief fade before a nav-triggered page navigation (see nav-links click
   handler in render.js). Skipped entirely under reduced motion there. */
body.is-leaving { opacity: 0; }

/* A soft glow behind the top of the page so the dark ground isn't flat. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 60vh;
  background: radial-gradient(70% 100% at 50% 0%, var(--accent-glow), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover, a:focus-visible { border-bottom-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

::selection { background: rgba(143, 176, 224, 0.25); color: var(--ink); }

/* Small inline outline-icon SVGs (e.g. email/LinkedIn) before link text —
   currentColor means they inherit whatever color the surrounding link has. */
.icon-inline {
  height: 14px;
  width: 14px;
  vertical-align: middle;
  margin-right: 0.35em;
  opacity: 0.85;
  display: inline-block;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-nav);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
#nav-name {
  color: var(--ink);
  border-bottom: none;
  white-space: nowrap;
}
#nav-name:hover { color: var(--accent); }

.nav-links { display: flex; gap: var(--space-3); }
.nav-links a {
  color: var(--ink-soft);
  border-bottom: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease-out;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { opacity: 1; transform: scaleX(1); }
.nav-links a.is-current { color: var(--ink); }
.nav-links a.is-current::after { opacity: 1; transform: scaleX(1); }

/* ---------- SECTION LAYOUT ---------- */
main { padding-bottom: var(--space-4); }

section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-5) var(--space-3);
}
section + section { border-top: 1px solid var(--rule); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  margin-bottom: var(--space-3);
  color: var(--ink);
}

/* ---------- PAGE HEAD (sub-pages) ---------- */
.page-head {
  padding-top: var(--space-5);
  padding-bottom: var(--space-3);
}
.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  color: var(--ink);
}
.page-head + section { border-top: none; padding-top: var(--space-2); }

/* Inline "go to the next page" links at the foot of a section */
.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.page-links a { border-bottom: none; }
.page-links a:hover { border-bottom: 1px solid var(--accent); }

/* ---------- HERO ---------- */
.hero {
  padding-top: var(--space-6);
  padding-bottom: var(--space-5);
}
.hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.hero-text {
  flex: 1;
  min-width: 280px;
}
.hero-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
  color: var(--ink);
}
.hero-photo {
  /* Asymmetric rounded-square, not a tight circle — this is a candid
     street photo, so it keeps a little of its own frame/context rather
     than being cropped into a headshot medallion. Echoes the soft
     asymmetric corner language used on cards elsewhere on the site. */
  width: 300px;
  height: 340px;
  border-radius: 28px 8px 28px 8px;
  object-fit: cover;
  object-position: center 20%;
  border: 1px solid var(--rule);
  flex-shrink: 0;
}
.hero-tagline {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: var(--space-2);
}
.hero-skills {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-2);
}
.dot-sep {
  display: inline-block;
  position: relative;
  top: -0.05em;
  margin: 0 0.4em;
  color: var(--accent-soft);
  font-size: 0.85em;
}
.hero-location {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-soft);
}

/* Minimal gradient accent on the hero name and section headings — accent
   blue into the "live" green already used elsewhere. Falls back to the
   solid --ink color set above on browsers without background-clip: text. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  h2, .hero-name {
    background: linear-gradient(135deg, var(--accent), var(--live));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ---- Status pill ---- */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: var(--space-2);
  padding: 0.3rem 0.7rem 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.hero-status-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px rgba(111, 207, 151, 0.15);
  position: relative;
}
.hero-status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--live);
  opacity: 0.4;
  animation: pulse-ring 2.2s ease-out infinite;
}

/* ---- CTA row ---- */
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
}
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.btn:hover, .btn:focus-visible { border-color: var(--accent-soft); color: var(--ink); }
.btn-primary { border-color: var(--accent); color: var(--accent); }
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}
.hero-cta-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  border-bottom: none;
}
.hero-cta-link:hover, .hero-cta-link:focus-visible { border-bottom: none; }
.hero-cta-link .arrow { opacity: 0.7; }
.hero-cta-link:hover .arrow { opacity: 1; }

/* Signature element: pareto-frontier line, drawn once at load. With the
   photo now the hero's visual anchor, this steps back into a compact
   accent strip underneath the text+photo row rather than a centerpiece —
   still the same trade-off-curve nod to Nik's optimization research. */
.hero-curve-wrap {
  position: relative;
  margin-top: var(--space-2);
  width: 100%;
  max-width: 380px;
}
.hero-curve { display: block; width: 100%; }
.hero-curve path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  filter: drop-shadow(0 0 6px rgba(143, 176, 224, 0.35));
  animation: draw-curve 1.4s ease-out 0.3s forwards;
}
.hero-curve circle {
  fill: var(--accent);
  opacity: 0;
  animation: fade-in 0.4s ease-out 1.5s forwards;
}
@keyframes draw-curve { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes pulse-ring {
  0% { opacity: 0.4; transform: scale(0.7); }
  70% { opacity: 0; transform: scale(1.9); }
  100% { opacity: 0; transform: scale(1.9); }
}

/* ---- Hotspots + tooltips on the curve's trade-off points ---- */
.hero-hotspot {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  cursor: default;
  border-radius: 50%;
}
.hero-hotspot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero-tip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  margin-bottom: 0.4rem;
  padding: 0.25rem 0.55rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.hero-hotspot:hover .hero-tip,
.hero-hotspot:focus-visible .hero-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Scroll-down indicator ---- */
.hero-scroll {
  display: flex;
  justify-content: center;
  margin-top: var(--space-5);
  color: var(--accent-soft);
  border-bottom: none;
  animation: bob 2s ease-in-out infinite;
}
.hero-scroll:hover, .hero-scroll:focus-visible { color: var(--accent); border-bottom: none; }
.hero-scroll svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- CURRENT POSITION LINE ---------- */
/* De-emphasized on purpose — the hero status pill is the primary
   "currently" indicator; this just adds the org/date it has no room for. */
.current-line {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-soft);
}

.about-eyebrow { margin-top: var(--space-3); }

/* ---------- ABOUT ---------- */
.about-text { color: var(--ink-soft); font-size: 1.05rem; max-width: 38rem; text-align: justify; }

/* ---------- TIMELINE (Journey infographic) ---------- */
/* A grid of shape-marked cards — hollow circle (Past), glowing filled
   circle (Now), dashed diamond (Future) — over soft blurred color blobs. */
#timeline { position: relative; overflow: hidden; }

.journey-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.journey-blob {
  position: absolute;
  filter: blur(48px);
  opacity: 0.16;
}
.journey-blob-a {
  top: -40px;
  left: -60px;
  width: 260px;
  height: 220px;
  background: var(--accent);
  border-radius: 62% 38% 55% 45% / 45% 55% 42% 58%;
}
.journey-blob-b {
  bottom: -60px;
  right: -50px;
  width: 240px;
  height: 200px;
  background: var(--live);
  border-radius: 45% 55% 40% 60% / 55% 42% 58% 45%;
}

.journey-road {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.journey-stop {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

.journey-rail {
  position: relative;
  width: 40px;
  flex-shrink: 0;
}
.journey-road-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.journey-road-path {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 6 7;
  opacity: 0.5;
}
.journey-stop[data-tag="Future"] .journey-road-path { stroke-dasharray: 2 6; }
.journey-stop:last-child .journey-road-svg { opacity: 0; }

.journey-marker {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}
.journey-marker-past {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-soft);
}
.journey-marker-future {
  width: 13px;
  height: 13px;
  background: var(--bg);
  border: 2px dashed var(--accent-soft);
  transform: translateX(-50%) rotate(45deg);
}
.journey-marker-now {
  width: 16px;
  height: 16px;
  top: 3px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px rgba(111, 207, 151, 0.25);
}
.journey-marker-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--live);
  opacity: 0.35;
  animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { opacity: 0.35; transform: scale(0.7); }
  70% { opacity: 0; transform: scale(1.9); }
  100% { opacity: 0; transform: scale(1.9); }
}

.journey-content {
  flex: 1;
  min-width: 0;
  padding-bottom: var(--space-4);
}
.journey-stop:last-child .journey-content { padding-bottom: 0; }
.journey-stop[data-tag="Now"] .journey-title { color: var(--ink); }

.journey-chip {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-soft);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
}
.journey-chip[data-tag="Now"] {
  color: var(--live);
  border-color: rgba(111, 207, 151, 0.4);
}
.journey-chip[data-tag="Future"] { border-style: dashed; }
.journey-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-soft);
  margin-bottom: 0.2rem;
}
.journey-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.journey-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: justify;
}

/* ---------- EXPERIENCE ---------- */
.exp-item + .exp-item {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: 0.3rem;
}
.exp-top { display: flex; align-items: flex-start; gap: var(--space-2); }
.exp-logo-wrap {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.exp-logo { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.exp-role { font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.exp-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-soft);
  white-space: nowrap;
}
.badge {
  display: inline-block;
  margin-left: 0.6rem;
  vertical-align: 2px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--live);
  border: 1px solid rgba(111, 207, 151, 0.4);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
}
.exp-org { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: var(--space-2); }
.exp-org .hours::before { content: " · "; }
.exp-points { list-style: none; }
.exp-points li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
  text-align: justify;
}
.exp-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-soft);
}

/* ---------- RECOMMENDATION LETTERS ---------- */
.letter-item + .letter-item { margin-top: var(--space-4); }
.research-figure { margin-top: var(--space-2); }
.letter-item a { display: block; border-bottom: none; }
.letter-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg-raised);
  transition: border-color 0.15s ease;
}
.letter-item a:hover .letter-img { border-color: var(--accent); }
.letter-caption {
  margin-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-soft);
}

/* ---------- RESEARCH ---------- */
.research-item + .research-item {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
}
.research-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.research-title a { color: var(--ink); }
.research-title a:hover { color: var(--accent); }
.research-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-soft);
  margin-bottom: var(--space-2);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.research-desc { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: var(--space-2); text-align: justify; }
.tag-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-soft);
  background: var(--bg-raised);
  display: inline-block;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.tag:hover { transform: translateY(-2px); box-shadow: 0 4px 10px -2px var(--rule); }

/* ---------- HOBBY PHOTO ---------- */
.hobby-photo-wrap { max-width: 480px; margin: var(--space-3) 0; }
.hobby-photo-wrap.hobby-photo-pre {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hobby-photo-wrap.hobby-photo-pre.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.hobby-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--rule);
}
.hobby-photo-caption {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-soft);
}

/* ---------- SKILLS ---------- */
.skill-group + .skill-group { margin-top: var(--space-3); }
.skill-group-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  font-size: 0.9rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg-raised);
  color: var(--ink);
  display: inline-block;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.skill-tag:hover { transform: translateY(-2px); box-shadow: 0 4px 10px -2px var(--rule); }

/* ---------- CONTACT ---------- */
.contact-note {
  color: var(--ink-soft);
  max-width: 34rem;
  margin-top: var(--space-2);
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.contact-link {
  font-family: var(--font-mono);
  font-size: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--space-2);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--ink);
}
.contact-link:hover { border-bottom-color: var(--accent); }
.contact-link span:first-child { color: var(--ink-soft); }

.cert-title-group { display: inline-flex; align-items: center; gap: 0.6rem; }
.cert-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.contact-value { color: var(--accent); word-break: break-all; text-align: right; }
.contact-link .arrow { opacity: 0.6; }
.contact-link:hover .arrow { opacity: 1; }

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-5);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-soft);
}

/* ---------- SCROLL REVEAL ---------- */
/* Applied via JS (render.js) to sections and repeated items; skipped
   entirely under reduced motion there, so content is never left hidden. */
.reveal-pre {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal-pre.is-revealed { opacity: 1; transform: translateY(0); }

/* ---------- HOVER LIFT (card-like repeated items) ---------- */
.exp-item,
.research-item,
.letter-item,
.cert-row {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.exp-item:hover,
.research-item:hover,
.letter-item:hover,
.cert-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -4px var(--rule);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  section { padding: var(--space-4) var(--space-2); }
  .hero { padding-top: var(--space-5); }
  .page-head { padding-top: var(--space-4); }
  .nav-inner { padding: var(--space-2); }
  .nav-links { gap: var(--space-2); overflow-x: auto; white-space: nowrap; }
  .page-links { flex-direction: column; gap: var(--space-1); }

  .hero-flex { flex-direction: column; }
  .hero-photo { width: 170px; height: 190px; border-radius: 20px 6px 20px 6px; margin: 0 auto; }
  .hero-curve-wrap { margin-left: auto; margin-right: auto; }

  /* Justified text gets ragged/broken at narrow widths — left-align instead */
  body,
  .about-text,
  .research-desc,
  .exp-points li,
  .journey-desc {
    text-align: left;
  }
}
