/* =============================================================
   styles.css — Utsab Raj Bhattarai · personal portfolio
   -------------------------------------------------------------
   All presentation for the site. Mobile-first: the base rules are
   the phone layout, and media queries add the wider ones.

   Order of contents:
     1.  Tokens (the 5-colour palette) + reset
     2.  Typography primitives (.label, .tags, buttons)
     3.  The distance — fixed parallax ridges behind everything
     4.  The range — the fixed foreground mountain we walk on
     5.  The climber + his flags
     6.  Top bar
     7.  Hero / About / Milestones / Skills / Footer
     8.  Scroll-reveal + prefers-reduced-motion fallbacks
   ============================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* the palette — these five and nothing else */
  --deep:  #0d1321;
  --navy:  #1d2d44;
  --steel: #3e5c76;
  --mist:  #748cab;
  --sky:   #f0ebd8;

  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 62ch;                        /* comfortable reading width */
  --gutter: 1.5rem;
  --shell: 1080px;                        /* content column max width */
  /* Height of the walkable range. Deliberately restrained — the journey is
     a strip along the bottom of the page, not the page itself. */
  --band: clamp(104px, 17vh, 150px);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 720px) {
  :root { --gutter: 2.5rem; }
}
@media (min-width: 760px) {
  :root { --band: clamp(150px, 22vh, 215px); }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--deep);
  color: var(--sky);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

::selection { background: var(--steel); color: var(--sky); }

:focus-visible {
  outline: 2px solid var(--mist);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--sky);
  padding: .7rem 1rem;
  font-family: var(--font-mono);
  font-size: .8rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- 2. Typography primitives ---------- */

/* small monospace accent label — section numbers, meta, eyebrows */
.label {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: lowercase;
  color: var(--mist);
  margin: 0 0 .9rem;
}

/* monospace chips: tech tags and skills */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.tags li {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--mist);
  border: 1px solid rgba(116, 140, 171, .3);
  border-radius: 999px;
  padding: .22rem .6rem;
  white-space: nowrap;
}
.tags li em { font-style: normal; opacity: .65; }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--sky);
  border: 1px solid rgba(116, 140, 171, .45);
  border-radius: 999px;
  padding: .55rem 1.15rem;
  background: rgba(13, 19, 33, .35);
  backdrop-filter: blur(6px);
  transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover {
  border-color: var(--mist);
  background: rgba(62, 92, 118, .35);
  transform: translateY(-2px);
}
.btn--solid {
  background: var(--sky);
  color: var(--deep);
  border-color: var(--sky);
  font-weight: 500;
}
.btn--solid:hover { background: #fff; border-color: #fff; }

/* ---------- 3. The distance ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Night sky over a lit horizon. It stays dark across the top two thirds —
   that's where all the reading happens — and only warms up down at the
   skyline, which the ranges and the strip mostly cover anyway. */
.scene__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #060a12    0%,
    var(--deep)  30%,
    #16233c   55%,
    var(--navy)  72%,
    var(--steel) 86%,
    var(--mist) 100%
  );
}

/* low sun sitting just above the furthest ridge */
.scene__sun {
  position: absolute;
  left: 64%;
  bottom: 20%;
  width: 90vmax;
  height: 90vmax;
  transform: translate(-50%, 50%);
  background: radial-gradient(circle, rgba(240, 235, 216, .32) 0%, rgba(240, 235, 216, .09) 28%, transparent 58%);
}

/* The scene deepens toward night as the climb goes on (opacity from main.js).
   Graded on purpose: solid over the top of the screen, where body text sits,
   easing off toward the horizon so the peaks keep their silhouette instead of
   dissolving into the same flat navy. */
.scene__dusk {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--deep)             0%,
    var(--deep)            62%,
    rgba(13, 19, 33, .85)  76%,
    rgba(13, 19, 33, .55)  90%,
    rgba(13, 19, 33, .45) 100%
  );
  opacity: 0;
}

.ridge {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0;
  will-change: transform;
}
.ridge svg { display: block; width: 100%; height: 100%; }
.ridge polygon { fill: currentColor; }
.ridge .snow { fill: var(--sky); opacity: .78; }

/* each layer needs a solid apron below it, because parallax slides the
   layers downward and would otherwise open a gap at the bottom */
.ridge::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 90vh;
  background: currentColor;
}

.ridge--far  { height: 40vh; color: var(--mist);  opacity: .45; }
.ridge--mid  { height: 33vh; color: var(--steel); }
.ridge--near { height: 27vh; color: var(--navy); }

/* the sunrise at the top of the climb — see the note in index.html */
.scene__dawn {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(110% 62% at 60% 54%,
      rgba(240, 235, 216, .42) 0%,
      rgba(240, 235, 216, .16) 28%,
      rgba(116, 140, 171, .12) 50%,
      transparent 70%),
    linear-gradient(180deg,
      transparent 8%,
      rgba(62, 92, 118, .28) 34%,
      rgba(116, 140, 171, .34) 50%,
      rgba(240, 235, 216, .22) 64%,
      rgba(116, 140, 171, .16) 78%,
      transparent 92%);
}

/* Starfield. Two rules keep this from looking cheap: it is masked out well
   before the skyline, so stars never sit on a mountain; and only a handful of
   them drift, slowly, at staggered offsets — a sky where everything blinks at
   once reads as a Christmas tree. */
.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;                    /* main.js fades it with the night */
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 62%);
          mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 62%);
}
.stars circle {
  fill: var(--sky);
  opacity: var(--o, .6);
}
.stars .star--bright { filter: drop-shadow(0 0 2px rgba(240, 235, 216, .65)); }

@keyframes twinkle {
  0%, 100% { opacity: var(--o, .6); }
  50%      { opacity: calc(var(--o, .6) * .3); }
}
.stars .star--live {
  animation: twinkle var(--t, 6s) ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

/* ---------- 4. The range we're walking ---------- */

/* Sits between the content and the range. Without it the ridgeline draws
   straight across whatever paragraph happens to be passing underneath. */
.scrim {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--band) + 4.5rem);
  z-index: 2;
  pointer-events: none;
  /* Weighted late on purpose: barely there through the middle, where dimming
     text for no reason just looks like a bug, then falling hard over the last
     stretch so anything level with the ridgeline is properly out of the way. */
  background: linear-gradient(
    180deg,
    rgba(6, 10, 18, 0)    0%,
    rgba(6, 10, 18, .10) 30%,
    rgba(6, 10, 18, .38) 52%,
    rgba(6, 10, 18, .80) 72%,
    rgba(6, 10, 18, .97) 88%,
    rgba(6, 10, 18, .99) 100%
  );
  opacity: 0;                    /* main.js fades it in past the hero */
}

.range {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--band);
  z-index: 3;
  pointer-events: none;
  overflow: visible;             /* let flag labels sit above the skyline */
}

.range__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* the mountain mass — the nearest, darkest layer. Content scrolls behind it. */
.range__fill { fill: url(#rangeFill); }

/* the ridgeline itself: this exact path is what the climber walks */
.range__walk {
  fill: none;
  stroke: rgba(116, 140, 171, .7);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* the stretch already behind him, lit up */
.range__walk--done {
  stroke: var(--sky);
  stroke-width: 2.8;
  opacity: .9;                   /* dash length + offset come from main.js */
  filter: drop-shadow(0 0 5px rgba(240, 235, 216, .45));
}

/* past the last flag, the trail carries on out of frame */
.range__ahead {
  fill: none;
  stroke: rgba(116, 140, 171, .55);
  stroke-width: 2.4;
  stroke-dasharray: 7 8;
}

/* small HUD in the corner. On the right, where the mountain mass is
   deepest — on the left it sat right on top of the trail. */
.range__hud {
  position: absolute;
  right: var(--gutter);
  bottom: 1.1rem;
  text-align: right;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .12em;
  color: var(--mist);
  opacity: .85;
}
.range__elev { color: var(--sky); }
.range__sep { opacity: .5; margin: 0 .35rem; }

/* ---------- 5. The climber + his flags ---------- */

/* Both the climber and the flags are zero-size anchors: main.js translates
   them to a point on the ridgeline, and the artwork hangs off that point so
   the feet (or the flag base) land exactly on the trail. */

.hiker {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  will-change: transform;
}
.hiker__fig {
  position: absolute;
  overflow: visible;
  fill: none;
  stroke: var(--sky);
  stroke-width: 1.9;
  stroke-linecap: round;
  filter: drop-shadow(0 0 7px rgba(240, 235, 216, .5));
}
/* only the figure named by <body data-figure> is drawn */
.figure { display: none; }
body[data-figure="hiker"] .figure--hiker { display: block; }
body[data-figure="skier"] .figure--skier { display: block; }

.figure--hiker { left: -15px; top: -37px; width: 30px; height: 41px; }
.figure--skier { left: -19px; top: -30px; width: 38px; height: 36px; }

.hiker__head { fill: var(--sky); stroke: none; }
.ski { stroke: var(--sky); stroke-width: 2.2; stroke-linecap: round; }
.hiker__pack { fill: var(--mist); stroke: none; }
.hiker__pole { stroke-width: 1.3; opacity: .7; }

/* walk cycle — arms and legs swing in opposition around their joints */
.hiker__limb { transform-box: view-box; }
.hiker__arm--a, .hiker__arm--b { transform-origin: 12px 12.6px; }
.hiker__leg--a, .hiker__leg--b { transform-origin: 12px 21px; }

@keyframes stride-a { 0%, 100% { transform: rotate(17deg); }  50% { transform: rotate(-17deg); } }
@keyframes stride-b { 0%, 100% { transform: rotate(-17deg); } 50% { transform: rotate(17deg); } }
@keyframes bob      { 0%, 100% { transform: translateY(0); }  50% { transform: translateY(-1.5px); } }

.hiker.is-walking .hiker__leg--a,
.hiker.is-walking .hiker__arm--b { animation: stride-a .5s linear infinite; }
.hiker.is-walking .hiker__leg--b,
.hiker.is-walking .hiker__arm--a { animation: stride-b .5s linear infinite; }
.hiker.is-walking .hiker__fig    { animation: bob .5s linear infinite; }

/* a flag per peak — planted the moment he tops out */
.flag {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transition: filter .5s var(--ease);
}
.flag__fig {
  position: absolute;
  left: -2px;
  top: -30px;
  width: 22px;
  height: 30px;
  overflow: visible;
  fill: none;
}
.flag__pole {
  stroke: var(--mist);
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: .55;
  transition: stroke .5s var(--ease), opacity .5s var(--ease);
}
.flag__cloth {
  stroke: var(--mist);
  stroke-width: 1.4;
  stroke-linejoin: round;
  opacity: .5;
  transform-box: view-box;
  transform-origin: 3px 8px;
  transform: scale(.55);
  transition: transform .55s var(--ease), fill .55s var(--ease),
              stroke .55s var(--ease), opacity .55s var(--ease);
}
.flag.is-lit { filter: drop-shadow(0 0 8px rgba(240, 235, 216, .45)); }
.flag.is-lit .flag__pole  { stroke: var(--sky); opacity: 1; }
.flag.is-lit .flag__cloth { fill: var(--sky); stroke: var(--sky); opacity: 1; transform: scale(1); }

/* the peak he hasn't reached: the flag never fills in */
.flag--open .flag__pole { stroke-dasharray: 3 4; }
.flag--open.is-lit .flag__cloth { fill: none; }

.flag__label {
  position: absolute;
  left: 4px;
  bottom: 34px;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  color: var(--mist);
  opacity: 0;
  transition: opacity .6s var(--ease), transform .6s var(--ease), color .6s var(--ease);
}
.flag.is-lit .flag__label { opacity: .95; color: var(--sky); transform: translateX(-50%) translateY(0); }

.flag__trophy {
  position: absolute;
  left: 4px;
  bottom: 52px;
  font-size: .95rem;
  line-height: 1;
  opacity: 0;
  transform: translateX(-50%) scale(.5);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.flag.is-lit .flag__trophy { opacity: 1; transform: translateX(-50%) scale(1); }

/* labels crowd each other on small screens — the cards say the same thing */
@media (max-width: 820px) {
  .flag__label { display: none; }
  .flag__fig { left: -1.5px; top: -22px; width: 16px; height: 22px; }
  .flag__trophy { bottom: 40px; font-size: .8rem; }
  .figure--hiker { left: -11px; top: -27px; width: 22px; height: 30px; }
  .figure--skier { left: -14px; top: -22px; width: 28px; height: 26px; }
  .hiker__fig { stroke-width: 2.2; }
}

/* a slim position marker on the right edge — one dot per milestone.
   Clicking a dot jumps to that card. */
.progress-rail {
  position: fixed;
  right: .95rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
}
@media (min-width: 1024px) { .progress-rail { display: flex; } }

.progress-rail__dot {
  position: relative;
  appearance: none;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(116, 140, 171, .55);
  background: transparent;
  cursor: pointer;
  transition: background-color .4s var(--ease), border-color .4s var(--ease),
              box-shadow .4s var(--ease), transform .4s var(--ease);
}
.progress-rail__dot:hover { border-color: var(--sky); transform: scale(1.25); }
.progress-rail__dot.is-lit {
  background: var(--sky);
  border-color: var(--sky);
  box-shadow: 0 0 9px rgba(240, 235, 216, .5);
}
.progress-rail__dot span {
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  color: var(--mist);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.progress-rail__dot:hover span,
.progress-rail__dot:focus-visible span { opacity: 1; }

/* ---------- 6. Top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .12em;
  background: linear-gradient(180deg, rgba(6, 10, 18, .8), transparent);
  backdrop-filter: blur(2px);
}
.topbar__mark {
  text-decoration: none;
  color: var(--sky);
  border: 1px solid rgba(116, 140, 171, .4);
  border-radius: 4px;
  padding: .25rem .5rem;
  letter-spacing: .18em;
}
.topbar__nav { display: none; gap: 1.6rem; }
.topbar__nav a {
  text-decoration: none;
  color: var(--mist);
  transition: color .2s var(--ease);
}
.topbar__nav a:hover { color: var(--sky); }

@media (min-width: 640px) { .topbar__nav { display: flex; } }

/* ---------- 7. Layout + sections ---------- */

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

.hero,
.section,
.footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* --- Hero --- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 6rem;
  padding-bottom: calc(var(--band) * .6);
}
.hero__label { color: var(--sky); opacity: .7; }
.hero__name {
  font-size: clamp(2.6rem, 1.6rem + 5.4vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.hero__tagline {
  max-width: 30ch;
  font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem);
  line-height: 1.4;
  color: rgba(240, 235, 216, .88);
  margin-bottom: 2.2rem;
  text-wrap: pretty;
}
.hero__links { display: flex; flex-wrap: wrap; gap: .6rem; }

/* The sky behind this is dark now (and the scrim darkens the foot of every
   screen further), so the cue is light again. */
.hero__scroll {
  margin: 3rem 0 0;
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--mist);
  opacity: .9;
}
.hero__scroll::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--mist);
  animation: reach 2.6s var(--ease) infinite;
  transform-origin: left center;
}
/* the sentence carrying the climb/ski picker */
.hero__scroll-text {
  display: inline;
  line-height: 1.9;
}
.figure-pick {
  appearance: none;
  background: none;
  border: 0;
  padding: 0 .1em;
  font: inherit;
  letter-spacing: inherit;
  color: var(--mist);
  cursor: pointer;
  border-bottom: 1px dotted rgba(116, 140, 171, .6);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.figure-pick:hover { color: var(--sky); border-bottom-color: var(--sky); }
.figure-pick[aria-pressed="true"] {
  color: var(--sky);
  border-bottom: 1px solid var(--sky);
}

@keyframes reach {
  0%, 100% { transform: scaleX(.4); opacity: .4; }
  50%      { transform: scaleX(1);  opacity: 1; }
}

/* --- Generic section --- */
.section {
  padding-top: clamp(5rem, 12vh, 9rem);
  padding-bottom: clamp(2rem, 6vh, 4rem);
}
.section__label { color: var(--mist); }
.section__title {
  font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.6rem);
  margin-bottom: 1rem;
}
.section__lede {
  max-width: 46ch;
  color: rgba(240, 235, 216, .7);
  margin-bottom: 2.6rem;
}

/* --- About --- */
.about {
  max-width: var(--measure);
  font-size: clamp(1.02rem, 1rem + .35vw, 1.18rem);
  color: rgba(240, 235, 216, .84);
}
.about strong { color: var(--sky); font-weight: 600; }

/* --- Milestone cards ---
   One card per peak, in the same order as the peaks run left to right.
   They alternate sides on wide screens, echoing the traverse below. */
.milestones {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 5vh, 3rem);
}

.card {
  position: relative;
  max-width: 680px;
  padding: 1.6rem 1.5rem 1.5rem;
  border: 1px solid rgba(116, 140, 171, .22);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(29, 45, 68, .66), rgba(13, 19, 33, .76));
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: .2rem;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover {
  border-color: rgba(116, 140, 171, .5);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(6, 10, 18, .9);
}

@media (min-width: 940px) {
  .card:nth-child(even) { margin-left: auto; }
  .card--flagship { max-width: 100%; }
}

/* the marker on the card itself, lit in step with that card's flag */
.card__node {
  position: absolute;
  top: 1.85rem;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--mist);
  background: var(--deep);
  transition: background-color .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.card.is-lit .card__node {
  background: var(--sky);
  border-color: var(--sky);
  box-shadow: 0 0 12px 2px rgba(240, 235, 216, .45);
}
.card__node--open { background: transparent; border-style: dashed; }
.card.is-lit .card__node--open { background: transparent; border-color: var(--sky); }

.card__meta { margin-bottom: .5rem; }
.card__meta .elev { color: var(--sky); opacity: .75; }
.card__title { font-size: 1.4rem; margin-bottom: .7rem; }
.card__summary {
  color: rgba(240, 235, 216, .78);
  font-size: .98rem;
  margin-bottom: 1.1rem;
  max-width: 58ch;
}
/* used where a card needs to answer two questions rather than one */
.card__points {
  display: grid;
  gap: .6rem;
  margin: 0 0 1.2rem;
  max-width: 58ch;
}
.card__points li {
  position: relative;
  padding-left: 1.2rem;
  font-size: .94rem;
  color: rgba(240, 235, 216, .72);
}
.card__points li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--mist);
}
.card__points strong { color: var(--sky); font-weight: 500; }
.card__points em { font-style: normal; color: var(--sky); opacity: .8; }

.card .tags { margin-bottom: 1.2rem; }
.card__link {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .05em;
  text-decoration: none;
  color: var(--sky);
  border-bottom: 1px solid rgba(240, 235, 216, .3);
  padding-bottom: 2px;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.card__link:hover { border-color: var(--sky); }
.card__link--muted { color: var(--mist); border-bottom-style: dashed; }

/* flagship gets more air and a lit top edge */
.card--flagship {
  padding: 2.2rem 2rem 1.9rem;
  border-color: rgba(116, 140, 171, .38);
  background:
    linear-gradient(180deg, rgba(240, 235, 216, .07), transparent 40%),
    linear-gradient(160deg, rgba(29, 45, 68, .78), rgba(13, 19, 33, .82));
}
.card--flagship .card__title { font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem); }
.card--flagship .card__summary { font-size: 1.05rem; max-width: 62ch; }

/* hackathon summit */
.card--summit { border-color: rgba(240, 235, 216, .35); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--deep);
  background: var(--sky);
  border-radius: 999px;
  padding: .25rem .7rem;
  margin: 0 0 1rem;
  font-weight: 500;
}
.badge__icon { font-size: .85rem; line-height: 1; }

/* quieter badge — a placing, not a win */
.badge--ghost {
  background: transparent;
  color: var(--mist);
  border: 1px solid rgba(116, 140, 171, .5);
}

/* the peak that isn't climbed yet */
.card--next { border-style: dashed; background: rgba(13, 19, 33, .55); }

.ridge-note {
  margin: clamp(2rem, 6vh, 3.5rem) 0 0;
  color: var(--mist);
  opacity: .7;
  text-align: center;
}

/* --- Experience --- */
.role {
  max-width: 680px;
  border-left: 1px solid rgba(116, 140, 171, .3);
  padding-left: 1.4rem;
}
.role__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.role__title { font-size: 1.25rem; }
.role__when { margin: 0; }
.role__org { margin: .4rem 0 .9rem; color: var(--mist); text-transform: none; }
.role__org a {
  text-decoration: none;
  border-bottom: 1px solid rgba(116, 140, 171, .5);
  transition: border-color .25s var(--ease);
}
.role__org a:hover { border-color: var(--sky); }
.role__summary { color: rgba(240, 235, 216, .78); max-width: 58ch; }
.role .tags { margin-top: 1rem; }

/* --- Skills --- */
.skills { display: grid; gap: 1.8rem; }
@media (min-width: 700px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 3rem; } }
.skills__name { color: var(--mist); margin-bottom: .7rem; }

/* --- Footer --- */
.footer {
  margin-top: clamp(4rem, 12vh, 8rem);
  padding: clamp(3.5rem, 9vh, 6rem) 0 0;
  border-top: 1px solid rgba(116, 140, 171, .18);
  background: linear-gradient(180deg, transparent, rgba(6, 10, 18, .9));
}
/* clear the fixed range so the last lines aren't stuck behind the mountain */
.footer__inner { padding-bottom: calc(var(--band) + 2rem); }
.footer__line { max-width: 48ch; color: rgba(240, 235, 216, .78); }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  margin-top: 1.4rem;
}
.footer__links a {
  text-decoration: none;
  border-bottom: 1px solid rgba(116, 140, 171, .45);
  padding-bottom: 2px;
  transition: border-color .25s var(--ease);
}
.footer__links a:hover { border-color: var(--sky); }
.footer__note {
  margin: 3rem 0 0;
  color: var(--mist);
  opacity: .65;
}

/* ---------- 8. Scroll reveal + reduced motion ---------- */

/* Only hide things when JS is present to bring them back. Without JS the
   page is a plain, fully readable document. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Reduced motion: no parallax, no walking, no reveal. The range still
   stands there — every flag planted, the climber resting on the last one
   he reached — but nothing moves. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .ridge { transform: none !important; }
  .progress-rail__dot { transition: none; }
  .card .card__node { background: var(--sky); border-color: var(--sky); }
}
