/* =========================================================
   Sri Lasya S â€” portfolio styles

   1.  Tokens
   2.  Base
   3.  Buttons
   4.  Nav
   5.  Hero
   6.  Role rotator
   7.  Logo marquee
   8.  Photos + social proof
   9.  Selected works
   10. Design journey
   11. Footer
   12. Animations (load + scroll)
   13. Hover effects (mouse / trackpad only)
   14. Responsive: tablet landscape â‰¤1180px
   15. Responsive: tablet portrait â‰¤900px
   16. Responsive: phone â‰¤640px
   17. Reduced motion
   ========================================================= */


/* =========================================================
   1. TOKENS â€” change colours, fonts and spacing here
   ========================================================= */
:root {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --ink: #0d0d0d;
  --ink-muted: #5c5c5c;
  --text: #4a4a4a;
  --text-soft: #8c8c8c;
  --line: #e2e2e2;
  --logo: #9a9a9a;

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1600px;
  --gutter: clamp(16px, 4.5vw, 88px);
  --section-y: clamp(72px, 9vw, 120px);
  --radius-lg: 28px;
  --radius-md: 22px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);   /* smooth, Framer-like */
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
}


/* =========================================================
   2. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* anchor links stop below the floating nav */
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
button { font: inherit; color: inherit; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* shared section wrapper */
.works, .journey {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

/* shared large heading */
.section-title,
.footer__title {
  font-size: clamp(2.3rem, 4.4vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.section-title { margin-bottom: clamp(32px, 4vw, 56px); }


/* =========================================================
   3. BUTTONS â€” text rolls up on hover (see section 13)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 58px;
  padding: 0 22px;
  overflow: hidden;
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.btn:active { transform: scale(.97); }

.btn--dark  { background: var(--ink); color: #fff; }
.btn--lg    { box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .55); }
.btn--sm    { height: 56px; font-size: 1.2rem; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .6); }
.btn--light { background: var(--surface); color: var(--ink); font-size: 1.2rem; }

.btn__label {
  position: relative;
  display: block;
  line-height: 1.3;
  transition: transform .55s var(--ease-in-out);
}
/* copy of the label waiting below; slides up on hover */
.btn__label::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: .9em;
}
.btn__icon { width: 22px; height: 22px; flex: none; transition: transform .5s var(--ease-out); }


/* =========================================================
   4. NAV â€” floating white pill, top right
   ========================================================= */
.nav-wrap {
  position: fixed;
  top: max(28px, env(safe-area-inset-top));
  right: var(--gutter);
  z-index: 50;
  animation: navIn 1s .1s var(--ease-out) both;
}
@keyframes navIn { from { opacity: 0; transform: translateY(-24px); } }

.nav {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 20px;
  padding: 10px 10px 10px 30px;
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .12);
}

.nav__brand  { display: none; font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav__toggle { display: none; }

.nav__menu { display: flex; align-items: center; gap: 28px; }

.nav__link { position: relative; font-size: 1.2rem; font-weight: 500; }
/* underline that grows on hover */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-out);
}


/* =========================================================
   5. HERO
   ========================================================= */
.hero {
  max-width: var(--max);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 150px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  align-items: center;
  gap: clamp(32px, 4vw, 72px);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0; /* lets the logo marquee shrink inside the grid */
}

.hero__title {
  font-size: clamp(2.6rem, 6.1vw, 6.2rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.055em;
  margin-bottom: 36px;
}
.hero__line { display: block; white-space: nowrap; }
.hero__line--muted { color: var(--ink-muted); font-weight: 500; }

.hero__text {
  max-width: 40ch;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 40px;
}

.hero__media {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  align-items: end;
  max-width: 460px;
  justify-self: end;
}
.hero__side { display: flex; flex-direction: column; gap: 34px; }


/* =========================================================
   6. ROLE ROTATOR â€” main.js swaps .is-active between words
   ========================================================= */
.rotator {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  padding-bottom: .14em;   /* room for g, y */
  margin-bottom: -.14em;
  transition: width .7s var(--ease-out);
}
.rotator__word {
  grid-area: 1 / 1;
  justify-self: start;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(115%);
  filter: blur(10px);
  transition: transform .8s var(--ease-out), opacity .8s var(--ease-out), filter .8s var(--ease-out);
}
.rotator__word.is-active  { opacity: 1; transform: none; filter: none; }
.rotator__word.is-leaving { opacity: 0; transform: translateY(-115%); filter: blur(10px); }


/* =========================================================
   7. LOGO MARQUEE
   ========================================================= */
.logos {
  width: 100%;
  max-width: 640px;
  margin-top: clamp(56px, 8vh, 110px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.logos__track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
/* main.js pauses it while off screen, to save battery */
.logos.is-paused .logos__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 48px;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--logo);
  white-space: nowrap;
}
.logo svg { width: 28px; height: 28px; fill: currentColor; }


/* =========================================================
   8. PHOTOS + SOCIAL PROOF
   ========================================================= */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #e2e2e2;
  transition: translate .9s var(--ease-out); /* mouse parallax, set in main.js */
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.photo--main  { aspect-ratio: 4 / 5; }
.photo--small { aspect-ratio: 3 / 4; border-radius: var(--radius-md); }

.proof__avatars { display: flex; margin-bottom: 14px; }
.proof__avatars li {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: -12px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--c);
  font-size: .85rem;
  font-weight: 600;
  color: rgba(0, 0, 0, .65);
  transition: transform .4s var(--ease-out);
}
.proof__avatars li:first-child { margin-left: 0; }

.proof__stars { display: flex; gap: 4px; margin-bottom: 6px; }
.proof__stars svg { width: 20px; height: 20px; fill: var(--ink); }
.proof__text { font-size: 1.15rem; color: var(--text); letter-spacing: -0.01em; }


/* =========================================================
   9. SELECTED WORKS
   ========================================================= */
.works__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 3vw, 48px) clamp(14px, 1.6vw, 22px);
}

.work-card__link {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 22px);
  height: 100%;
}

.work-card__media {
  overflow: hidden;
  isolation: isolate; /* keeps rounded corners during the zoom in Safari */
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: #e2e2e2;
}
.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}

.work-card__info {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: clamp(20px, 2vw, 28px) clamp(20px, 2vw, 28px) clamp(22px, 2.2vw, 30px);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.work-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: clamp(10px, 1.4vw, 18px);
}
.work-card__title {
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}
.work-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: clamp(.95rem, 1.2vw, 1.15rem);
  white-space: nowrap;
}
.work-card__meta span + span::before {   /* dot between type and year */
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 10px;
  border-radius: 50%;
  background: #c4c4c4;
  vertical-align: middle;
}
.work-card__desc {
  max-width: 48ch;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}


/* =========================================================
   10. DESIGN JOURNEY â€” timeline left, sticky intro right
   ========================================================= */
.journey {
  --gap: clamp(56px, 8vw, 150px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--gap);
}

/* ---------- Timeline ---------- */
.journey__timeline {
  position: relative;
  --line-x: calc(var(--gap) / -2);  /* line sits in the middle of the gap */
}

.journey__line {
  position: absolute;
  top: -40px;
  bottom: -40px;
  right: var(--line-x);
  width: 2px;
  translate: 50% 0;
  background: var(--line);
  border-radius: 2px;
}
.journey__line-fill {               /* main.js sets --progress 0 â†’ 1 */
  position: absolute;
  inset: 0;
  background: var(--ink);
  border-radius: 2px;
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
}

.jobs { display: grid; gap: 48px; }

.job {
  position: relative;
  background: var(--surface);
  border-radius: 24px;
  padding: 30px 32px 32px;
}
.job > * { transition: opacity .6s var(--ease-out); }

/* cards not in focus fade back (only once main.js is running) */
.journey.is-ready .job {
  transition: opacity 1s var(--ease-out), background-color .6s var(--ease-out),
              transform 1s var(--ease-out), filter 1s var(--ease-out);
}
.journey.is-ready .job:not(.is-active) { background-color: rgba(255, 255, 255, .45); }
.journey.is-ready .job:not(.is-active) > * { opacity: .55; }

/* dot on the line, level with each card */
.job::after {
  content: "";
  position: absolute;
  top: 128px;
  right: var(--line-x);
  width: 24px;
  height: 24px;
  translate: 50% -50%;
  border-radius: 50%;
  background: #4a4a4a;
  border: 4px solid var(--bg);
  transition: background-color .5s var(--ease-out), scale .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.job.is-active::after {
  background: var(--ink);
  scale: 1.15;
  box-shadow: 0 0 0 8px rgba(0, 0, 0, .06);
}

.job__role {
  margin-bottom: 6px;
  font-size: clamp(1.4rem, 2vw, 1.95rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.job__company {
  margin-bottom: 28px;
  font-size: 1.15rem;
  font-weight: 500;
  color: #6b6b6b;
  text-transform: uppercase;
}
.job__desc {
  max-width: 50ch;
  margin-bottom: 28px;
  font-size: 1.12rem;
  color: var(--text);
}
.job__years {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ---------- Intro ---------- */
.journey__sticky { position: sticky; top: 150px; padding-top: 8px; }

.journey__title {
  max-width: 10ch;
  margin-bottom: 40px;
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.04;
}
.journey__text {
  max-width: 52ch;
  margin-bottom: 64px;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tools__title {
  margin: 80px 0 22px;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.tools { display: flex; flex-wrap: wrap; gap: 16px; }

.tool {
  position: relative;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .25);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out),
              opacity .6s var(--ease-out), scale .8s var(--ease-out);
}
.tool svg { width: 30px; height: 30px; fill: currentColor; }
/* name label above the icon (shown on hover) */
.tool::before {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  translate: -50% 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out), translate .4s var(--ease-out);
}


/* =========================================================
   11. FOOTER
   ========================================================= */
.footer {
  position: relative;
  overflow: hidden;
  padding: var(--section-y) var(--gutter) 0;
}
.footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
}

.footer__title { margin-bottom: 18px; }
.footer__text {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  letter-spacing: -0.01em;
  color: var(--text);
}

.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(40px, 6vw, 80px); }
.social {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: transform .5s var(--ease-out), background-color .4s var(--ease-out), color .4s var(--ease-out);
}
.social svg { width: 26px; height: 26px; transition: transform .6s var(--ease-out); }

.footer__email {
  position: relative;
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  color: #6b6b6b;
  overflow-wrap: anywhere;
  transition: color .4s var(--ease-out);
}
.footer__email::after {               /* underline that grows on hover */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s var(--ease-out);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: clamp(72px, 10vw, 128px);
}
.footer__nav { display: flex; gap: clamp(64px, 12vw, 180px); }
.footer__label { margin-bottom: 18px; font-size: 1.1rem; color: var(--text-soft); }
.footer__col li + li { margin-top: 8px; }
.footer__link {
  display: inline-block;
  font-size: clamp(1.4rem, 2.1vw, 1.95rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  transition: transform .5s var(--ease-out), color .4s var(--ease-out);
}

.footer__meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  color: var(--text-soft);
  font-size: 1rem;
}
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 500;
}
.footer__top svg { width: 18px; height: 18px; transition: transform .5s var(--ease-out); }

/* Giant name. main.js sizes it to fill the width and splits it into letters. */
.footer__name {
  position: relative;
  z-index: 0;
  margin: clamp(-70px, -4vw, -20px) calc(var(--gutter) * -1) 0;
  padding: 0 clamp(8px, 2vw, 32px);
  font-size: 19vw;             /* fallback; main.js fine-tunes it */
  font-weight: 600;
  line-height: .78;
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: #e6e6e6;
  /* the bottom of the letters is cut off by the page edge */
  margin-bottom: -0.1em;
  user-select: none;
  pointer-events: none;
}
.footer__name-text { display: inline-block; }
.footer__name .char {
  display: inline-block;
  white-space: pre;
}


/* =========================================================
   12. ANIMATIONS
   ========================================================= */

/* ---- On page load (pure CSS). --d sets the order. ---- */
.reveal {
  animation: rise 1.1s var(--ease-out) both;
  animation-delay: calc(var(--d, 0) * 110ms + 200ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); filter: blur(12px); } }

.reveal-img {
  animation: wipe 1.4s var(--ease-out) both;
  animation-delay: calc(var(--d, 0) * 140ms + 250ms);
}
.reveal-img img { animation: zoomOut 1.8s var(--ease-out) both; animation-delay: inherit; }
@keyframes wipe {
  from { clip-path: inset(100% 0 0 0 round var(--radius-lg)); }
  to   { clip-path: inset(0 0 0 0 round var(--radius-lg)); }
}
@keyframes zoomOut { from { transform: scale(1.25); } }

/* ---- On scroll. main.js adds .is-in when an element comes into view. ---- */
.js .scroll-reveal {
  opacity: 0;
  transform: translateY(48px);
  filter: blur(10px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js .scroll-reveal.is-in { opacity: 1; transform: none; filter: none; }

/* tool icons pop in one by one */
.js .tools.scroll-reveal .tool { opacity: 0; scale: .6; }
.js .tools.scroll-reveal.is-in .tool { opacity: 1; scale: 1; transition-delay: 0s, 0s, calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 80ms); }

/* giant footer name: letters rise one after another */
.js .footer__name .char {
  transform: translateY(70%);
  opacity: 0;
  transition: transform 1.2s var(--ease-out), opacity 1.2s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.js .footer__name.is-in .char { transform: none; opacity: 1; }


/* =========================================================
   13. HOVER EFFECTS â€” only on devices with a mouse/trackpad,
   so taps on phones and iPads don't leave things "stuck"
   ========================================================= */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover .btn__label { transform: translateY(calc(-100% - .9em)); }
  .btn--light:hover { box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .3); }
  .btn--light:hover .btn__icon { transform: translateY(3px); }

  .nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

  .logos:hover .logos__track { animation-play-state: paused; }
  .photo:hover img { transform: scale(1.04); }
  .proof__avatars li:hover { transform: translateY(-6px); }

  .work-card__link:hover .work-card__media img { transform: scale(1.06); }
  .work-card__link:hover .work-card__info {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .25);
  }

  .tool:hover { transform: translateY(-6px) rotate(-4deg); box-shadow: 0 18px 28px -14px rgba(0, 0, 0, .35); }
  .tool:hover::before { opacity: 1; translate: -50% 0; }

  .social:hover { transform: translateY(-4px); background: var(--surface); color: var(--ink); }
  .social:hover svg { transform: rotate(-12deg) scale(1.08); }
  .footer__email:hover { color: var(--ink); }
  .footer__email:hover::after { transform: scaleX(1); transform-origin: left; }
  .footer__link:hover { transform: translateX(6px); color: var(--ink-muted); }
  .footer__top:hover svg { transform: translateY(-4px); }
}
/* keyboard focus gets the same button roll */
.btn:focus-visible .btn__label { transform: translateY(calc(-100% - .9em)); }


/* =========================================================
   14. TABLET LANDSCAPE / SMALL LAPTOP (â‰¤1180px)
   ========================================================= */
@media (max-width: 1180px) {
  .nav { padding-left: 24px; }
  .nav__menu { gap: 22px; }
  .nav__link { font-size: 1.1rem; }
  .btn--sm { height: 50px; font-size: 1.1rem; }

  .hero { padding-top: 130px; }
  .hero__title { font-size: clamp(2.6rem, 6.6vw, 5rem); }
  .hero__side { gap: 24px; }
  .proof__avatars li { width: 42px; height: 42px; }
  .proof__text { font-size: 1.05rem; }

  .job { padding: 26px 26px 28px; }
  .job::after { top: 110px; }
  .job__company, .job__desc { margin-bottom: 22px; }
  .job__desc { font-size: 1.05rem; }
  .tools__title { margin-top: 56px; }
  .journey__text { margin-bottom: 44px; }
}


/* =========================================================
   15. TABLET PORTRAIT (â‰¤900px) â€” iPad, iPad mini
   ========================================================= */
@media (max-width: 900px) {
  html { scroll-padding-top: 96px; }

  /* nav: full-width pill with a menu button */
  .nav-wrap { top: max(16px, env(safe-area-inset-top)); left: 16px; right: 16px; }
  .nav { flex-wrap: wrap; justify-content: space-between; padding: 10px 10px 10px 20px; }
  .nav__brand { display: block; }
  .nav__toggle {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    cursor: pointer;
  }
  .nav__toggle-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .4s var(--ease-out);
  }
  .nav.is-open .nav__toggle-line:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.is-open .nav__toggle-line:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

  .nav__menu {
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height .6s var(--ease-out), opacity .4s, padding .6s var(--ease-out), visibility 0s .6s;
  }
  .nav.is-open .nav__menu {
    max-height: 420px;
    padding: 20px 0 10px;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }
  .nav__link { font-size: 1.5rem; }
  .btn--sm { height: 52px; font-size: 1.15rem; }

  /* hero: text on top, photos below */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 128px;
    gap: 56px;
  }
  .hero__title { font-size: clamp(2.4rem, 9.5vw, 5rem); }
  .logos { max-width: none; margin-top: 48px; }
  .hero__media { gap: 16px; }

  /* journey: intro on top, timeline below with the line on the left */
  .journey { grid-template-columns: 1fr; gap: 56px; }
  .journey__intro { order: -1; }
  .journey__sticky { position: static; padding-top: 0; }
  .journey__title { max-width: none; margin-bottom: 24px; }
  .journey__text { margin-bottom: 32px; }
  .tools__title { margin-top: 44px; }

  .journey__timeline { --line-x: auto; padding-left: 40px; }
  .journey__line { right: auto; left: 12px; translate: -50% 0; top: 0; bottom: 0; }
  .job::after { right: auto; left: -28px; translate: -50% -50%; top: 44px; }
  .jobs { gap: 28px; }

  .footer__name { margin-top: -10px; }
}


/* =========================================================
   16. PHONE (â‰¤640px)
   ========================================================= */
@media (max-width: 640px) {
  .btn { height: 54px; font-size: 1.15rem; }

  .hero { padding-top: 116px; gap: 44px; }
  .hero__title { margin-bottom: 26px; }
  .hero__text { margin-bottom: 30px; }
  .logo { font-size: 1.3rem; padding-right: 36px; }
  .logo svg { width: 24px; height: 24px; }

  /* photos: big portrait, then proof + small photo side by side */
  .hero__media { grid-template-columns: 1fr 1fr; gap: 12px; }
  .photo--main { grid-column: 1 / -1; border-radius: 22px; }
  .hero__side { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 16px; }
  .hero__side .proof { flex: 1; }
  .photo--small { width: 42%; flex: none; border-radius: 18px; }
  .proof__avatars li { width: 38px; height: 38px; margin-left: -10px; font-size: .75rem; }
  .proof__stars svg { width: 17px; height: 17px; }
  .proof__text { font-size: 1rem; }

  /* works: one per row */
  .works__grid { grid-template-columns: 1fr; gap: 36px; }
  .work-card__media { border-radius: 20px; }
  .work-card__info { border-radius: 18px; }

  /* journey */
  .job { padding: 22px 20px 24px; border-radius: 20px; }
  .job__company, .job__desc { margin-bottom: 16px; }
  .job__desc { font-size: 1rem; }
  .job__years { font-size: 1rem; }
  .tools { gap: 10px; }
  .tool { width: 58px; height: 58px; border-radius: 14px; }
  .tool svg { width: 26px; height: 26px; }

  /* footer */
  .social { width: 52px; height: 52px; }
  .social svg { width: 22px; height: 22px; }
  .footer__bottom { flex-direction: column; align-items: stretch; gap: 48px; }
  .footer__nav { gap: 48px; }
  .footer__meta { grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .footer__name { margin-top: 28px; }
}


/* =========================================================
   17. REDUCED MOTION â€” a still page for people who ask for it
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .scroll-reveal,
  .js .tools.scroll-reveal .tool,
  .js .footer__name .char { opacity: 1; transform: none; filter: none; scale: 1; }
}

/* =========================================================
   Experience tabs (Professional / Volunteer / Student Orgs)
   ========================================================= */
.job-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 64px;
  padding: 6px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .2);
}
.job-tab {
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out);
}
.job-tab.is-active { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .job-tab:not(.is-active):hover { background: var(--bg); color: var(--ink); }
}

.journey__body { position: relative; }
.job[hidden] { display: none; }
.job.is-showing { animation: rise .7s var(--ease-out) both; }
.jobs__empty { padding: 32px; border-radius: 24px; background: var(--surface); color: var(--text-soft); font-size: 1.1rem; }

@media (max-width: 900px) {
  .journey__timeline { padding-left: 0; }
  .journey__body { padding-left: 40px; }
  .job-tabs { width: 100%; margin-bottom: 36px; }
  .job-tab { flex: 1; padding: 11px 6px; font-size: .9rem; }
}