/* ==========================================================================
   Aneena Ajith portfolio
   Palette carried over from the original site: plum #352022, tan #DBAE80, bone #EBEAE8.
   Shape system: media = 20px radius, interactive = full pill, avatar/logos/timeline dots = circles.
   Z-index scale: nav 50, skip-link 60 (the player uses the native <dialog> top layer).
   ========================================================================== */

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-italic.woff2") format("woff2");
  font-weight: 400 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("assets/fonts/Outfit-normal.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  --plum: #352022;
  --tan: #DBAE80;
  --bone: #EBEAE8;

  --bg: var(--bone);
  --bg-2: #E1DFDC;
  --ink: var(--plum);
  --ink-2: #5E4A4B;
  --line: rgb(53 32 34 / .14);
  --line-strong: rgb(53 32 34 / .28);
  --em: var(--plum);
  --marker: var(--tan);
  --disc: #F6F5F3;
  --block-bg: var(--plum);
  --block-ink: var(--bone);
  --block-ink-2: #CFC6C4;
  --shadow: rgb(53 32 34 / .35);

  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --r-media: 20px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --nav-h: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --section-y: clamp(88px, 12vw, 168px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--plum);
    --bg-2: #2B191B;
    --ink: var(--bone);
    --ink-2: #C9BFBD;
    --line: rgb(235 234 232 / .13);
    --line-strong: rgb(235 234 232 / .3);
    --em: var(--tan);
    --marker: transparent;
    --disc: #EFEEEC;
    --block-bg: #221315;
    --block-ink: var(--bone);
    --block-ink-2: #C9BFBD;
    --shadow: rgb(10 4 5 / .55);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, blockquote, dl, dd { margin: 0; }
svg { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }

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

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }

em { font-style: italic; color: var(--em); }

.eyebrow, .label {
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  padding-bottom: .08em;
}

/* Marker-pen highlight for italic emphasis in display type (light mode only; dark mode uses tan ink). */
.h2 em, .contact__title em {
  background: linear-gradient(transparent 64%, var(--marker) 64%, var(--marker) 90%, transparent 90%);
  padding-inline: .04em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: 52px; padding: 0 28px;
  border-radius: 999px;
  font: 500 1rem/1 var(--sans);
  text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--ease), background-color .25s, color .25s, box-shadow .35s var(--ease);
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn--sm { height: 40px; padding: 0 20px; font-size: .9375rem; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }

.iconbtn {
  width: 52px; height: 52px; border-radius: 999px; border: 0;
  display: inline-grid; place-items: center;
  background: transparent; color: var(--plum);
  box-shadow: inset 0 0 0 1.5px var(--plum);
  cursor: pointer; font-size: 1.25rem; text-decoration: none;
  transition: background-color .25s, color .25s, transform .35s var(--ease), opacity .25s;
}
.iconbtn:hover { background: var(--plum); color: var(--tan); }
.iconbtn:active { transform: scale(.94); }
.iconbtn--light { color: var(--bone); box-shadow: inset 0 0 0 1.5px rgb(235 234 232 / .5); }
.iconbtn--light:hover { background: var(--bone); color: var(--plum); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.nav__mark {
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.375rem;
  text-decoration: none; letter-spacing: -.01em; margin-right: auto;
}
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  text-decoration: none; font-size: .9375rem; color: var(--ink-2);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-block: 4px; transition: color .2s, background-size .35s var(--ease);
}
.nav__links a:hover { color: var(--ink); background-size: 100% 1px; }
@media (max-width: 767px) { .nav__links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  min-height: 100dvh;
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}
.hero__copy { display: grid; gap: 28px; justify-items: start; }
.hero__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(4.5rem, 13vw, 12rem);
  line-height: .92;
  letter-spacing: -.035em;
}
.hero__name .line { display: block; overflow: hidden; padding: 0 .1em .16em 0; margin-bottom: -.12em; }
.hero__name .line--indent { padding-left: .9em; line-height: 1.1; }
.hero__name em { font-weight: 500; }
.hero__name .char { display: inline-block; }
.hero__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 8px; }
.hero__role {
  font-size: clamp(1rem, 1.3vw, 1.1875rem); font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
}

.hero__media { position: relative; justify-self: end; width: 100%; max-width: 520px; }
.hero__media::before {
  content: ""; position: absolute; inset: 0;
  background: var(--tan); border-radius: var(--r-media);
  transform: translate(-22px, 22px);
}
.hero__media img {
  position: relative;
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  max-height: calc(100dvh - var(--nav-h) - 120px);
  border-radius: var(--r-media);
}

@media (max-width: 899px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: calc(var(--nav-h) + 40px); gap: 48px; }
  .hero__media { justify-self: stretch; max-width: none; padding-left: 22px; }
  .hero__media img { max-height: 70dvh; }
}

/* ---------- Bio ---------- */
.bio {
  padding-block: var(--section-y);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.bio__media { position: sticky; top: calc(var(--nav-h) + 32px); overflow: hidden; border-radius: var(--r-media); }
.bio__media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-media); }
.bio__copy { display: grid; gap: 28px; }
.bio__copy .h2 { margin-bottom: 12px; }
.bio__body { display: grid; gap: 1.2em; max-width: 62ch; color: var(--ink-2); font-size: 1.125rem; line-height: 1.75; }
.bio__lead { font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.55; color: var(--ink); }
.bio__coda { color: var(--ink); font-weight: 500; }

@media (max-width: 899px) {
  .bio { grid-template-columns: 1fr; }
  .bio__media { position: static; max-width: 420px; }
}

/* ---------- Experience: simple vertical timeline ---------- */
.exp { background: var(--bg-2); padding-block: var(--section-y); }
.exp__title { margin-bottom: clamp(40px, 5vw, 64px); }

.tl { --date-w: 220px; --rail: 48px; position: relative; max-width: 960px; }
.tl::before {
  content: ""; position: absolute; top: 24px; bottom: 24px;
  left: calc(var(--date-w) + var(--rail) / 2 - 1px); width: 2px;
  background: var(--line-strong);
}
.tl__item {
  display: grid;
  grid-template-columns: var(--date-w) var(--rail) minmax(0, 1fr);
  grid-template-areas: "date dot body";
  align-items: center;
  padding-block: 16px;
}
.tl__date {
  grid-area: date; text-align: right;
  font-size: .9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.tl__dot {
  grid-area: dot; justify-self: center; position: relative;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tan);
  box-shadow: 0 0 0 5px var(--bg-2);
}
.tl__item--now .tl__dot { background: var(--ink); box-shadow: 0 0 0 4px var(--bg-2), 0 0 0 6px var(--tan); }
.tl__item--now .tl__date { color: var(--ink); font-weight: 600; }
.tl__body { grid-area: body; display: flex; align-items: center; gap: 16px; min-width: 0; }
.tl__logo {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  background: var(--disc);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
/* Logos are sized by shape so every corner stays inside the circle. */
.tl__logo img { width: auto; height: auto; max-width: 66%; max-height: 66%; object-fit: contain; }
.tl__logo--wide img { max-width: 86%; max-height: 50%; }
.tl__logo--tall img { max-width: 60%; max-height: 76%; }
.tl__text { min-width: 0; }
.tl__role { font-family: var(--serif); font-weight: 500; font-size: clamp(1.1875rem, 1.8vw, 1.5rem); line-height: 1.2; letter-spacing: -.01em; }
.tl__company { font-size: .9375rem; color: var(--ink-2); margin-top: 4px; }

@media (max-width: 699px) {
  .tl { --date-w: 0px; --rail: 28px; }
  .tl::before { left: calc(var(--rail) / 2 - 1px); top: 14px; }
  .tl__item {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    grid-template-areas: "dot date" "dot body";
    align-items: start; row-gap: 8px; column-gap: 12px; padding-block: 14px;
  }
  .tl__date { text-align: left; font-size: .875rem; }
  .tl__dot { grid-row: 1 / span 2; margin-top: 4px; }
  .tl__logo { width: 52px; height: 52px; }
}

/* Education sits inside the Experience block */
.edu__title { margin: clamp(72px, 9vw, 128px) 0 clamp(28px, 3.5vw, 48px); }
.edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(32px, 6vw, 96px); max-width: 960px; }
.edu__item { border-top: 1px solid var(--line-strong); padding-top: 22px; display: grid; gap: 6px; align-content: start; }
.edu__date { font-size: .9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.edu__degree { font-family: var(--serif); font-weight: 500; font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.2; letter-spacing: -.01em; }
.edu__school { font-size: 1rem; color: var(--ink-2); }
@media (max-width: 699px) { .edu { grid-template-columns: 1fr; } }

/* ---------- Work: tan colour block + reel belt ---------- */
.work {
  background: var(--tan);
  color: var(--plum);
  padding-block: clamp(64px, 9vw, 128px) clamp(72px, 10vw, 140px);
  overflow: hidden;
}
.work :focus-visible { outline-color: var(--plum); }
.work__head { display: grid; gap: 24px; margin-bottom: clamp(40px, 5vw, 64px); }
.work__title {
  font-family: var(--serif); font-weight: 800; font-style: italic;
  font-size: clamp(6rem, 19vw, 17rem);
  line-height: .82; letter-spacing: -.05em;
  padding-bottom: .1em;
  margin-left: -.04em;
}
.work__title span { display: inline-block; }
.work__intro { max-width: 58ch; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.6; }

.belt { display: grid; gap: clamp(14px, 1.8vw, 24px); }
.belt__row {
  --inset: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  position: relative; /* offsetLeft of cards is measured against the row */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(210px, 20vw, 280px);
  gap: clamp(14px, 1.8vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--inset);
  padding: 20px var(--inset) 28px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.belt__row::-webkit-scrollbar { display: none; }
/* Auto-sliding mode (set by main.js): rows loop forever, so no snapping or side padding. */
.belt__row.is-auto { scroll-snap-type: none; padding-inline: 0; cursor: grab; }
.belt__row.is-dragging { cursor: grabbing; }
.belt__row.is-dragging .reel__link { pointer-events: none; }

.reel { scroll-snap-align: start; }
.reel--wide { grid-column: span 2; }
.reel--wide .reel__frame { aspect-ratio: auto; height: 100%; min-height: 0; }
.reel--wide .reel__link { height: 100%; }
.reel__link { display: block; text-decoration: none; -webkit-user-drag: none; }
.reel__frame {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-media);
  background: var(--plum);
  box-shadow: 0 24px 40px -24px rgb(53 32 34 / .7);
  transition: transform .6s var(--spring), box-shadow .6s var(--ease);
}
.reel__frame > img,
.reel__preview {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), opacity .5s;
  -webkit-user-drag: none;
}
.reel__preview { opacity: 0; }
.reel__preview.is-playing { opacity: 1; }
.reel__play {
  position: absolute; right: 12px; bottom: 12px;
  width: 42px; height: 42px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgb(235 234 232 / .92); color: var(--plum);
  font-size: 1rem;
  transition: transform .45s var(--spring);
}
.reel__play svg { margin-left: 2px; }
.reel__play::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgb(235 234 232 / .6);
}
.reel__link:hover .reel__frame,
.reel__link:focus-visible .reel__frame {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 40px 56px -26px rgb(53 32 34 / .85);
}
.reel__link:hover .reel__frame > img,
.reel__link:hover .reel__preview { transform: scale(1.06); }
.reel__link:hover .reel__play { transform: scale(1.15); }
.reel__link:hover .reel__play::after { animation: ping 1.6s var(--ease) infinite; }

@keyframes ping { 70%, 100% { box-shadow: 0 0 0 16px rgb(235 234 232 / 0); } }

/* ---------- Player: a sideways-scrolling strip with one reel per screen ---------- */
.player {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: transparent; color: var(--bone);
}
.player::backdrop { background: rgb(22 11 12 / .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body:has(.player[open]) { overflow: hidden; }
.player__track {
  height: 100%;
  display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.player__track::-webkit-scrollbar { display: none; }
.player__slide {
  flex: 0 0 100%;
  scroll-snap-align: center; scroll-snap-stop: always;
  display: grid; place-items: center;
  padding: 76px clamp(16px, 7vw, 104px) 28px;
}
/* Portrait reels fill the height; landscape reels can grow up to 1280px wide. */
.player__video {
  width: auto; height: auto;
  max-width: min(100%, 1280px);
  max-height: calc(100dvh - 104px);
  border-radius: var(--r-media);
  background: #140B0C;
}
.player__nav { position: absolute; top: 50%; margin-top: -26px; }
.player__nav--prev { left: clamp(12px, 2vw, 32px); }
.player__nav--next { right: clamp(12px, 2vw, 32px); }
.player__nav:disabled { opacity: .25; pointer-events: none; }
.player__bar { position: absolute; top: 16px; right: 16px; display: flex; gap: 10px; }
.player[open] .player__track { animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@media (max-width: 699px) {
  .player__nav { display: none; }
  .player__slide { padding-inline: 12px; }
}

/* ---------- Skills ---------- */
.skills { padding-block: var(--section-y); }
.skills .h2 { margin-bottom: clamp(32px, 4vw, 56px); }
.skills__platforms { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.01em; margin-bottom: 8px; }

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line-strong);
  padding-block: clamp(12px, 2vw, 24px);
  margin-bottom: clamp(56px, 7vw, 96px);
}
.marquee__track {
  display: flex; width: max-content; gap: clamp(32px, 5vw, 72px);
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(3rem, 8vw, 7rem); line-height: 1.15; letter-spacing: -.03em;
  animation: marquee 32s linear infinite;
  padding-right: clamp(32px, 5vw, 72px);
}
.marquee__track span:nth-child(even) {
  font-style: italic; color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.kit {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 96px); row-gap: clamp(40px, 5vw, 64px);
}
.kit__group { display: grid; gap: 18px; border-top: 1px solid var(--line-strong); padding-top: 24px; }
.kit dt { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.01em; }
.kit dd ul { display: flex; flex-wrap: wrap; gap: 10px; }
.kit dd li {
  padding: 8px 18px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: .9688rem; color: var(--ink);
  transition: background-color .25s, color .25s;
}
.kit dd li:hover { background: var(--tan); color: var(--plum); box-shadow: none; }
@media (max-width: 767px) { .kit { grid-template-columns: 1fr; } }

/* ---------- Future ahead: plum block ---------- */
.future { background: var(--block-bg); color: var(--block-ink); padding-block: var(--section-y); }
.future .eyebrow { color: var(--tan); }
.future em { color: var(--tan); }
.future__inner {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 7vw, 112px); align-items: center;
}
.future__copy { display: grid; gap: 28px; }
.future__lead {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.75rem, 3.1vw, 2.875rem); line-height: 1.22; letter-spacing: -.015em;
}
.future__body { max-width: 54ch; font-size: 1.125rem; line-height: 1.75; color: var(--block-ink-2); }
.seeking { display: grid; gap: 14px; margin-top: 8px; padding-top: 28px; border-top: 1px solid rgb(235 234 232 / .18); }
.seeking__label { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--tan); }
.seeking__roles { display: flex; flex-wrap: wrap; gap: 10px; }
.seeking__roles li {
  padding: 9px 18px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgb(219 174 128 / .65);
  font-size: .9688rem; color: var(--block-ink);
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.seeking__roles li:hover { background: var(--tan); color: var(--plum); box-shadow: none; }
.seeking__where { max-width: 54ch; font-size: 1rem; line-height: 1.7; color: var(--block-ink-2); }
.future__media { overflow: hidden; border-radius: var(--r-media); }
.future__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-media); }
@media (max-width: 899px) {
  .future__inner { grid-template-columns: 1fr; }
  .future__media { max-width: 440px; }
}

/* ---------- Contact ---------- */
.contact { padding-top: var(--section-y); overflow: hidden; }
.contact__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(3.75rem, 12vw, 11.5rem); line-height: .95; letter-spacing: -.04em;
  padding-bottom: .1em;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.contact__title em { font-weight: 500; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 40px; align-items: end; }
.contact__lines { display: grid; justify-items: start; gap: 10px; padding-bottom: clamp(56px, 8vw, 120px); }
.contact__lines .label:not(:first-child) { margin-top: 24px; }
.contact__big, .contact__mid {
  font-family: var(--serif); text-decoration: none; letter-spacing: -.01em;
  background: linear-gradient(var(--tan), var(--tan)) 0 92% / 0 .14em no-repeat;
  transition: background-size .45s var(--ease);
  overflow-wrap: anywhere;
}
.contact__big { font-size: clamp(1.5rem, 3.4vw, 3rem); line-height: 1.2; }
.contact__mid { font-size: clamp(1.25rem, 2.2vw, 1.875rem); }
.contact__big:hover, .contact__mid:hover { background-size: 100% .14em; }
.contact__cv { margin-top: 36px; }
.contact__media { justify-self: center; width: 100%; max-width: 320px; }
.contact__media img { width: 100%; height: auto; }
@media (max-width: 767px) {
  .contact__grid { grid-template-columns: 1fr; gap: 24px; }
  .contact__lines { padding-bottom: 0; }
  .contact__media { max-width: 220px; }
}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink-2); }
.foot__inner { display: flex; align-items: center; height: 72px; }

/* ==========================================================================
   Motion (all gated behind prefers-reduced-motion: no-preference)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: letters of the name rise one by one, the portrait unveils, the tan block slides out. */
  .hero__in { animation: fadeUp .9s var(--ease) both; animation-delay: calc(var(--d) * 90ms + 120ms); }
  .hero__name .char { animation: lineUp 1s var(--ease) both; animation-delay: calc(var(--c) * 45ms + 150ms); }
  .hero__media img { animation: unveil 1.3s var(--ease) .25s both; }
  .hero__media::before { animation: slideIn 1.1s var(--ease) .7s both; }

  /* Scroll reveals (class toggled by IntersectionObserver in main.js). */
  .js .reveal {
    opacity: 0; transform: translateY(32px);
    transition: opacity .8s var(--ease), transform 1s var(--ease), filter .9s var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  /* Headings also come into focus. */
  .js .h2.reveal, .js .contact__title.reveal, .js .future__lead.reveal { filter: blur(10px); }
  .js .h2.reveal.is-in, .js .contact__title.reveal.is-in, .js .future__lead.reveal.is-in { filter: none; }

  /* Marker highlight draws across italic words once their heading is in. */
  .js .h2 em, .js .contact__title em {
    background-size: 0% 100%; background-repeat: no-repeat;
    transition: background-size 1s var(--ease) .45s;
  }
  .js .is-in em { background-size: 100% 100%; }

  /* Timeline: the line draws down, dots pop in sequence. */
  .js .tl.reveal { opacity: 1; transform: none; }
  .js .tl::before { transform: scaleY(0); transform-origin: top; transition: transform 1.6s var(--ease) .2s; }
  .js .tl.is-in::before { transform: scaleY(1); }
  .js .tl__dot { transform: scale(0); transition: transform .6s var(--spring); transition-delay: calc(var(--i, 0) * 110ms + 300ms); }
  .js .tl__item.is-in .tl__dot { transform: scale(1); }
  .tl__item:hover .tl__dot { transform: scale(1.35); transition-delay: 0s; }
  .tl__logo { transition: transform .5s var(--spring); }
  .tl__item:hover .tl__logo { transform: scale(1.1) rotate(-4deg); }

  /* Skills: tool pills pop in one after another. */
  .js .kit__group dd li { opacity: 0; transform: scale(.7) translateY(8px); transition: opacity .5s var(--ease), transform .6s var(--spring), background-color .25s, color .25s; }
  .js .kit__group.is-in dd li { opacity: 1; transform: none; }
  .js .kit__group.is-in dd li:nth-child(1) { transition-delay: .15s; }
  .js .kit__group.is-in dd li:nth-child(2) { transition-delay: .22s; }
  .js .kit__group.is-in dd li:nth-child(3) { transition-delay: .29s; }
  .js .kit__group.is-in dd li:nth-child(4) { transition-delay: .36s; }
  .js .kit__group.is-in dd li:hover { transition-delay: 0s; transform: translateY(-3px) rotate(-2deg); }

  /* Future ahead: role pills pop in one after another. */
  .js .seeking__roles li { opacity: 0; transform: scale(.7) translateY(8px); transition: opacity .5s var(--ease), transform .6s var(--spring), background-color .25s, color .25s; }
  .js .seeking.is-in .seeking__roles li { opacity: 1; transform: none; }
  .js .seeking.is-in .seeking__roles li:nth-child(1) { transition-delay: .2s; }
  .js .seeking.is-in .seeking__roles li:nth-child(2) { transition-delay: .28s; }
  .js .seeking.is-in .seeking__roles li:nth-child(3) { transition-delay: .36s; }
  .js .seeking.is-in .seeking__roles li:nth-child(4) { transition-delay: .44s; }
  .js .seeking.is-in .seeking__roles li:hover { transition-delay: 0s; transform: translateY(-3px) rotate(-2deg); }

  /* Work: the row sweeps in from the right, the way it travels. */
  .js .belt__row { transition: transform 1.5s var(--ease), opacity 1s var(--ease); }
  .js .belt:not(.is-in) .belt__row { transform: translateX(30%); opacity: 0; }

  /* Contact cut-out bounces up into place. */
  .js .contact__media { transform: translateY(40%); opacity: 0; transition: transform 1.1s var(--spring), opacity .6s var(--ease); }
  .js .contact__media.is-in { transform: none; opacity: 1; }

  /* Scroll-driven extras where supported. */
  @supports (animation-timeline: view()) {
    .work__title span {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .bio__media img, .future__media img {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 50%;
    }
    .hero__media {
      animation: floatUp linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
  }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } }
@keyframes lineUp { from { transform: translateY(110%); } }
@keyframes unveil { from { clip-path: inset(100% 0 0 0 round var(--r-media)); transform: scale(1.06); } to { clip-path: inset(0 0 0 0 round var(--r-media)); transform: none; } }
@keyframes slideIn { from { transform: translate(0, 0); opacity: 0; } }
@keyframes drift { from { transform: translateX(12vw); } to { transform: translateX(-10vw); } }
@keyframes settle { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes floatUp { to { transform: translateY(-12%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; padding-inline: var(--gutter); row-gap: 8px; }
  .marquee__track span:nth-child(n+6) { display: none; }
  .reel__frame, .reel__frame > img, .btn { transition: none; }
}

.nowrap { white-space: nowrap; }
