/* ============================================================
   KRISH SACHDEV — PORTFOLIO
   Print-precision light theme: paper, ink, one cobalt signal.
   Spec-header system: every section opens with a 2px ink rule,
   the title at left and a mono data caption at right.
   ============================================================ */

:root {
  /* Palette */
  --paper:        oklch(0.982 0.003 264);  /* #f7f8fa cool near-white   */
  --paper-raised: oklch(1 0 0);            /* pure white, used sparingly */
  --ink:          oklch(0.22 0.015 264);   /* #171b22 near-black         */
  --ink-2:        oklch(0.42 0.018 264);   /* #4b5160 secondary          */
  --ink-3:        oklch(0.52 0.018 264);   /* #626977 meta               */
  --line:         oklch(0.895 0.006 264);  /* hairlines                  */
  --line-strong:  oklch(0.80 0.008 264);

  --cobalt:       oklch(0.46 0.23 268);    /* the one signal colour      */
  --cobalt-deep:  oklch(0.40 0.21 268);
  --cobalt-tint:  oklch(0.945 0.025 268);
  --cobalt-soft:  oklch(0.86 0.06 268);    /* secondary text ON cobalt   */

  --night:        oklch(0.185 0.008 264);  /* photography band           */
  --night-ink:    oklch(0.955 0.004 264);
  --night-ink-2:  oklch(0.74 0.01 264);
  --night-line:   oklch(0.32 0.01 264);

  /* Type */
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* Motion */
  --eo:   cubic-bezier(0.19, 1, 0.22, 1);   /* expo-out */
  --fast: 180ms;
  --med:  420ms;
  --slow: 900ms;

  /* Geometry */
  --r-sm: 4px;
  --r-md: 8px;
  --gutter: clamp(20px, 4vw, 48px);
  --container: 1140px;
  --nav-h: 68px;

  /* z scale */
  --z-menu: 105;
  --z-nav: 110;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--cobalt); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-cobalt :focus-visible { outline-color: #fff; }

h1, h2, h3 { text-wrap: balance; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type helpers ---------- */
.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: var(--z-nav);
  color: var(--paper);
  transition: background var(--fast) ease, color var(--fast) ease,
              box-shadow var(--fast) ease;
}

.nav--solid,
.nav.scrolled {
  color: var(--ink);
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 640;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
}

.nav__logo-mark {
  width: 9px;
  height: 9px;
  background: currentColor;
  transform: rotate(45deg);
  flex: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav__links a {
  display: inline-block;
  padding: 8px 13px;
  font-size: 0.9rem;
  font-weight: 480;
  opacity: 0.82;
  transition: opacity var(--fast) ease;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--med) var(--eo);
}

.nav__links a:hover,
.nav__links a[aria-current="page"] { opacity: 1; }

.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

.nav__links a.nav__cta {
  margin-left: 10px;
  border: 1.5px solid currentColor;
  border-radius: var(--r-sm);
  padding: 7px 15px;
  opacity: 1;
}
.nav__links a.nav__cta::after { display: none; }
.nav__links a.nav__cta:hover {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}
.nav:not(.scrolled):not(.nav--solid) .nav__links a.nav__cta:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--cobalt);
}

/* Hamburger */
.nav__menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav__menu-btn span {
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform var(--med) var(--eo), opacity var(--fast) ease;
}
/* While the paper-white menu overlay is open, the nav must read as ink
   even at the top of the cobalt hero. */
.nav.menu-open {
  color: var(--ink);
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.nav__menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu overlay */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--paper);
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--med) var(--eo), visibility 0s linear var(--med);
}
.menu.open {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}
.menu__list {
  list-style: none;
  padding-inline: var(--gutter);
  width: 100%;
}
.menu__list li { border-bottom: 1px solid var(--line); }
.menu__list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 4px;
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  color: var(--ink);
  transform: translateY(14px);
  opacity: 0;
  transition: transform var(--slow) var(--eo), opacity var(--slow) var(--eo), color var(--fast) ease;
}
.menu__list a:hover { color: var(--cobalt); }
.menu__list a .mono { font-size: 0.75rem; }
.menu.open .menu__list a { transform: translateY(0); opacity: 1; }
.menu.open .menu__list li:nth-child(1) a { transition-delay: 60ms; }
.menu.open .menu__list li:nth-child(2) a { transition-delay: 110ms; }
.menu.open .menu__list li:nth-child(3) a { transition-delay: 160ms; }
.menu.open .menu__list li:nth-child(4) a { transition-delay: 210ms; }
.menu.open .menu__list li:nth-child(5) a { transition-delay: 260ms; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 560;
  padding: 13px 24px;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--fast) ease, color var(--fast) ease,
              border-color var(--fast) ease, transform var(--med) var(--eo);
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform var(--med) var(--eo); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--ink   { background: var(--cobalt); color: #fff; }
.btn--ink:hover { background: var(--cobalt-deep); }

.btn--paper { background: var(--paper); color: var(--cobalt); }
.btn--paper:hover { background: #fff; }

.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: color-mix(in oklab, currentColor 10%, transparent); }

/* ============================================================
   HERO — cobalt drench
   ============================================================ */
.hero {
  position: relative;
  background: var(--cobalt);
  color: #fff;
  padding-top: calc(var(--nav-h) + clamp(48px, 9vh, 96px));
  padding-bottom: clamp(56px, 10vh, 110px);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero__kicker {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--cobalt-soft);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero__kicker::before {
  content: '';
  width: 26px;
  height: 1.5px;
  background: var(--cobalt-soft);
  flex: none;
}

.hero__title {
  font-size: clamp(2.9rem, 8.5vw, 5.5rem);
  font-weight: 700;
  font-stretch: 118%;
  line-height: 0.99;
  letter-spacing: -0.028em;
  margin-bottom: 26px;
}
.hero__title .line {
  display: block;
  overflow: hidden;
}
.hero__title .line > span {
  display: block;
}

.hero__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  max-width: 34em;
  color: oklch(0.93 0.03 268);
  margin-bottom: 38px;
}
.hero__lede strong { font-weight: 620; color: #fff; }

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__meta {
  margin-top: 46px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--cobalt-soft);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.hero__meta .sep { opacity: 0.55; }

/* Portrait — printed & pinned */
.hero__visual {
  position: relative;
  justify-self: end;
  width: min(100%, 360px);
}
.hero__photo {
  position: relative;
  background: var(--paper);
  padding: 10px 10px 44px;
  border-radius: 2px;
  box-shadow: 0 24px 60px -24px oklch(0.2 0.1 268 / 0.55);
  transform: rotate(2deg);
  transition: transform var(--slow) var(--eo);
}
.hero__photo:hover { transform: rotate(0.4deg) translateY(-4px); }
.hero__photo img {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  filter: saturate(0.96);
}
.hero__photo figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

/* Plotted line behind the hero — the data-science signature */
.hero__plot {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: min(46vh, 380px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}
.hero__plot .grid line { stroke: #fff; stroke-opacity: 0.09; stroke-width: 1; }
.hero__plot .curve {
  fill: none;
  stroke: #fff;
  stroke-opacity: 0.5;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero__plot .pt { fill: #fff; opacity: 0; }

html.js .hero__plot .curve {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
}
html.js .hero--in .hero__plot .curve {
  animation: plot-draw 2s var(--eo) 500ms forwards;
}
html.js .hero--in .hero__plot .pt {
  animation: pt-in var(--med) var(--eo) forwards;
}
html.js .hero--in .hero__plot .pt:nth-child(1) { animation-delay: 900ms; }
html.js .hero--in .hero__plot .pt:nth-child(2) { animation-delay: 1150ms; }
html.js .hero--in .hero__plot .pt:nth-child(3) { animation-delay: 1400ms; }
html.js .hero--in .hero__plot .pt:nth-child(4) { animation-delay: 1650ms; }
html.js .hero--in .hero__plot .pt:nth-child(5) { animation-delay: 1900ms; }

@keyframes plot-draw { to { stroke-dashoffset: 0; } }
@keyframes pt-in { to { opacity: 0.85; } }

/* Hero entrance choreography */
html.js .hero__kicker,
html.js .hero__lede,
html.js .hero__actions,
html.js .hero__meta,
html.js .hero__visual {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--slow) var(--eo), transform var(--slow) var(--eo);
}
html.js .hero__title .line > span {
  transform: translateY(110%);
  transition: transform 1s var(--eo);
}
html.js .hero--in .hero__kicker,
html.js .hero--in .hero__lede,
html.js .hero--in .hero__actions,
html.js .hero--in .hero__meta,
html.js .hero--in .hero__visual {
  opacity: 1;
  transform: translateY(0);
}
html.js .hero--in .hero__title .line > span { transform: translateY(0); }
html.js .hero--in .hero__kicker  { transition-delay: 80ms; }
html.js .hero--in .hero__title .line:nth-child(1) > span { transition-delay: 160ms; }
html.js .hero--in .hero__title .line:nth-child(2) > span { transition-delay: 260ms; }
html.js .hero--in .hero__lede    { transition-delay: 420ms; }
html.js .hero--in .hero__actions { transition-delay: 540ms; }
html.js .hero--in .hero__meta    { transition-delay: 660ms; }
html.js .hero--in .hero__visual  { transition-delay: 300ms; }

/* ============================================================
   SECTIONS — spec-header system
   ============================================================ */
.section { padding-block: clamp(64px, 11vh, 128px) 0; }
.section:last-of-type { padding-bottom: clamp(64px, 11vh, 128px); }

.spec-header {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
  margin-bottom: clamp(36px, 6vh, 64px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.spec-header h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: -0.024em;
  line-height: 1.05;
}
.spec-header .spec-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.spec-lede {
  max-width: 52em;
  color: var(--ink-2);
  font-size: 1.0625rem;
  margin-top: -18px;
  margin-bottom: clamp(36px, 6vh, 56px);
}

/* ============================================================
   WORK — project ledger rows
   ============================================================ */
.work__list { list-style: none; }

.work-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(20px, 3.5vw, 48px);
  padding-block: clamp(28px, 4.5vh, 44px);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background var(--fast) ease;
}
.work__list .work-row:first-child { border-top: 1px solid var(--line); }

.work-row__meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink-3);
  padding-top: 6px;
}
.work-row__meta .flag {
  display: block;
  color: var(--cobalt);
  font-weight: 500;
}

.work-row__title {
  font-size: clamp(1.3rem, 2.3vw, 1.7rem);
  font-weight: 620;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin-bottom: 12px;
}
/* Only the title text is a link — the rest of the row stays selectable */
.work-row__title a {
  color: inherit;
  transition: color var(--fast) ease;
}
.work-row__title a:hover { color: var(--cobalt); }

.work-row__desc {
  color: var(--ink-2);
  font-size: 0.975rem;
  max-width: 62ch;
  text-wrap: pretty;
  margin-bottom: 16px;
}

.work-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.work-row__tags li {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 3px 9px;
}

.work-row__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
}
.work-row__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--cobalt);
  border-bottom: 1px solid color-mix(in oklab, var(--cobalt) 30%, transparent);
  padding-bottom: 3px;
  transition: color var(--fast) ease, border-color var(--fast) ease, gap var(--med) var(--eo);
}
.work-row__links a:hover {
  color: var(--cobalt-deep);
  border-color: var(--cobalt);
  gap: 11px;
}
.work-row__links svg { width: 12px; height: 12px; flex: none; }

/* ============================================================
   SKILLS — spec table
   ============================================================ */
.skills__table { border-top: 1px solid var(--line); }

.skills-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}
.skills-row__label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-3);
  padding-top: 5px;
}
.skills-row__items {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  list-style: none;
}
.skills-row__items li {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  transition: border-color var(--fast) ease, background var(--fast) ease, color var(--fast) ease;
}
.skills-row__items li:hover {
  border-color: var(--cobalt);
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
}
.skills-row__items li.certified {
  border-style: dashed;
}

/* ============================================================
   EXPERIENCE — drawn timeline
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 40px;
  max-width: 760px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-strong);
  transform-origin: top;
}
html.js .timeline::before { transform: scaleY(0); transition: transform 1.4s var(--eo); }
html.js .timeline.on::before { transform: scaleY(1); }

.timeline__item {
  position: relative;
  padding-bottom: clamp(36px, 5.5vh, 52px);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--cobalt);
  transform: rotate(45deg);
}

.timeline__date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--cobalt);
  margin-bottom: 6px;
  display: block;
}
.timeline__title {
  font-size: 1.2rem;
  font-weight: 620;
  letter-spacing: -0.012em;
  margin-bottom: 2px;
}
.timeline__org {
  font-size: 0.95rem;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 10px;
}
.timeline__desc {
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 60ch;
  text-wrap: pretty;
}

/* Beyond-the-desk strip */
.beyond {
  margin-top: clamp(48px, 8vh, 72px);
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
}
.beyond__label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.beyond__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.beyond__items p { color: var(--ink-2); font-size: 0.95rem; }
.beyond__items strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   PHOTOGRAPHY BAND — night interlude
   ============================================================ */
.photo-band {
  margin-top: clamp(64px, 11vh, 128px);
  background: var(--night);
  color: var(--night-ink);
  padding-block: clamp(64px, 10vh, 110px);
}

.photo-band__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vh, 52px);
}
.photo-band__head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: -0.024em;
  line-height: 1.08;
  max-width: 15em;
}
.photo-band__head p {
  color: var(--night-ink-2);
  max-width: 34em;
  font-size: 0.975rem;
}

.photo-band__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 560;
  font-size: 0.9375rem;
  border-bottom: 2px solid currentColor;
  padding-bottom: 4px;
  white-space: nowrap;
  transition: color var(--fast) ease, gap var(--med) var(--eo);
}
.photo-band__link:hover { color: #fff; gap: 16px; }
.photo-band__link svg { width: 16px; height: 16px; }

.photo-band__strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.photo-band__strip a {
  display: block;
  overflow: hidden;
  border-radius: var(--r-sm);
  position: relative;
}
.photo-band__strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 1.1s var(--eo), filter var(--med) ease;
}
.photo-band__strip a:hover img {
  transform: scale(1.045);
  filter: brightness(1.08);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact__hello {
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  font-weight: 660;
  font-stretch: 114%;
  letter-spacing: -0.028em;
  line-height: 1.06;
  max-width: 14em;
  margin-bottom: clamp(36px, 6vh, 56px);
}
.contact__hello em {
  font-style: normal;
  color: var(--cobalt);
}

.contact__mail {
  display: inline-block;
  font-size: clamp(1.25rem, 3.4vw, 2.1rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--ink);
  position: relative;
  margin-bottom: 36px;
  word-break: break-all;
}
.contact__mail::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  background: var(--cobalt);
  transform: scaleX(0.22);
  transform-origin: left;
  transition: transform var(--slow) var(--eo);
}
.contact__mail:hover::after { transform: scaleX(1); }

.contact__nets {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  list-style: none;
}
.contact__nets a {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--fast) ease;
}
.contact__nets a:hover { color: var(--cobalt); }
.contact__nets svg { width: 15px; height: 15px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__inner p,
.footer__links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
}
.footer__links {
  display: flex;
  gap: 22px;
  list-style: none;
}
.footer__links a:hover { color: var(--cobalt); }

/* ============================================================
   RESUME PAGE
   ============================================================ */
.resume-page {
  padding-top: calc(var(--nav-h) + clamp(40px, 7vh, 72px));
  padding-bottom: clamp(64px, 10vh, 110px);
  min-height: 100vh;
}

.resume__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
  margin-bottom: 36px;
}
.resume__header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 680;
  font-stretch: 114%;
  letter-spacing: -0.026em;
  line-height: 1.02;
}
.resume__header .mono { display: block; margin-top: 10px; }
.resume__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.resume__viewer {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
}
.resume__viewer iframe {
  width: 100%;
  height: min(85vh, 1100px);
  min-height: 560px;
  border: none;
  display: block;
}

.resume__fallback { display: none; }
.resume__fallback-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: clamp(40px, 8vw, 72px) var(--gutter);
  text-align: center;
  background: #fff;
}
.resume__fallback-card h2 {
  font-size: 1.5rem;
  font-weight: 640;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.resume__fallback-card p {
  color: var(--ink-2);
  max-width: 40ch;
  margin: 0 auto 28px;
}
.resume__fallback-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   SCROLL REVEALS  (default visible; JS opts in)
   ============================================================ */
html.js .fx {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--eo), transform 0.8s var(--eo);
  transition-delay: var(--d, 0ms);
}
html.js .fx.on { opacity: 1; transform: none; }

/* Clip the child image, not the container — a fully clipped element
   never intersects, so the IntersectionObserver would never fire. */
html.js .fx-img img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--eo); transition-delay: var(--d, 0ms); }
html.js .fx-img.on img { clip-path: inset(0 0 0 0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { justify-self: start; width: min(72%, 300px); margin-top: 8px; }
  .work-row { grid-template-columns: 1fr; }
  .work-row__meta {
    grid-column: 1 / -1;
    padding-top: 0;
    display: flex;
    gap: 14px;
    margin-bottom: -12px;
  }
  .work-row__meta .flag { display: inline; }
  .skills-row,
  .beyond { grid-template-columns: 1fr; gap: 10px; }
  .photo-band__strip { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__menu-btn { display: flex; }
  /* Long captions must be allowed to break, or they overflow narrow phones */
  .spec-header .spec-meta { white-space: normal; }
  .photo-band__strip { grid-template-columns: 1fr; }
  .photo-band__strip img { aspect-ratio: 16 / 10; }
  .resume__viewer iframe { height: 70vh; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html.js .fx,
  html.js .fx-img,
  html.js .hero__kicker,
  html.js .hero__lede,
  html.js .hero__actions,
  html.js .hero__meta,
  html.js .hero__visual {
    opacity: 1;
    transform: none;
    clip-path: none;
  }
  html.js .hero__title .line > span { transform: none; }
  html.js .hero__plot .curve { stroke-dashoffset: 0; }
  html.js .hero__plot .pt { opacity: 0.85; }
  html.js .timeline::before { transform: none; }
}
