/* =========================================================
   Ayush Saini — Portfolio
   Tokens → base → components → sections → responsive
   ========================================================= */

:root {
  /* colour */
  --paper: #f2eee6;
  --paper-2: #e9e3d8;
  --ink: #141210;
  --ink-2: #2a2622;
  --muted: #6d665c;
  --line: rgba(20, 18, 16, 0.14);
  --accent: #e8461e;
  --accent-ink: #fff6f0;
  --on-dark: #efe9df;
  --on-dark-muted: #9b9386;
  --line-dark: rgba(239, 233, 223, 0.16);

  /* type */
  --f-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.25rem, 1rem + 0.8vw, 1.6rem);
  --t-xl: clamp(2.2rem, 1.4rem + 3.4vw, 4.6rem);
  --t-hero: clamp(4.2rem, 1rem + 15vw, 17rem);

  /* space */
  --gutter: clamp(16px, 3.2vw, 48px);
  --section: clamp(96px, 12vw, 180px);
  --radius: 6px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--t-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

::selection { background: var(--accent); color: var(--accent-ink); }

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

.mono {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ---------- preloader ---------- */
.loader { display: none; }
.js-anim .loader {
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--gutter);
  background: var(--ink); color: var(--on-dark);
}
.loader__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.loader__name { font-family: var(--f-serif); font-style: italic; font-size: clamp(2rem, 6vw, 5rem); line-height: 1; }
.loader__count { font-family: var(--f-sans); font-weight: 500; font-size: clamp(3rem, 12vw, 10rem); line-height: 0.8; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.loader__bar { margin-top: 24px; height: 1px; background: var(--line-dark); }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    position: fixed; left: 0; top: 0; z-index: 120;
    display: grid; place-items: center;
    width: 12px; height: 12px; margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--ink);
    pointer-events: none;
    mix-blend-mode: normal;
    transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), margin 0.4s var(--ease-out), background-color 0.3s;
  }
  .cursor__label { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-ink); opacity: 0; transition: opacity 0.2s; }
  .cursor.is-big { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--accent); }
  .cursor.is-big .cursor__label { opacity: 1; }
  .cursor.is-hidden { width: 0; height: 0; margin: 0; }
  .on-dark .cursor:not(.is-big) { background: var(--on-dark); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 500; font-size: var(--t-sm);
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--accent); color: var(--accent-ink); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--ink); color: var(--paper); }
.btn--line { border: 1px solid var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: #3fb950; position: relative; }
.dot--live::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
  animation: ping 1.8s var(--ease-out) infinite;
}
@keyframes ping { to { transform: scale(2.8); opacity: 0; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gutter) 16px;
  transition: transform 0.5s var(--ease-out), background-color 0.3s, backdrop-filter 0.3s;
}
.nav.is-scrolled { background: rgba(242, 238, 230, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { display: flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 600; letter-spacing: -0.01em; }
.nav__mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--ink); color: var(--paper);
  font-family: var(--f-serif); font-style: italic; font-size: 20px; line-height: 1;
}
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  position: relative; padding: 8px 14px; font-size: var(--t-sm); font-weight: 500; border-radius: 999px;
  transition: background-color 0.25s;
}
.nav__links a:hover, .nav__links a.is-active { background: var(--paper-2); }
.nav__toggle { display: none; }

.mmenu {
  position: fixed; inset: 0; z-index: 99;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 96px var(--gutter) 32px;
  background: var(--ink); color: var(--on-dark);
}
.mmenu[hidden] { display: none; }
.mmenu nav { display: flex; flex-direction: column; }
.mmenu nav a { font-size: clamp(2.6rem, 12vw, 4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; border-bottom: 1px solid var(--line-dark); padding: 6px 0; }
.mmenu__foot { color: var(--on-dark-muted); text-transform: none; }

/* ---------- shared section ---------- */
.section { padding: var(--section) var(--gutter); }
.section--dark { background: var(--ink); color: var(--on-dark); }

.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--muted); margin-bottom: 28px; }
.section--dark .eyebrow { color: var(--on-dark-muted); }
.eyebrow__n { color: var(--accent); }
.eyebrow::after { content: ""; flex: 0 0 48px; height: 1px; background: currentColor; opacity: 0.5; }

.section__head { max-width: 1100px; margin-bottom: clamp(48px, 6vw, 88px); }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.section__title { font-size: var(--t-xl); font-weight: 500; line-height: 1; letter-spacing: -0.04em; }
.section__title .serif { font-size: 1.08em; }
.section__sub { margin-top: 24px; max-width: 520px; color: var(--muted); font-size: var(--t-md); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags li { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }

/* split text helpers */
.line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.char, .word { display: inline-block; will-change: transform; }
.wwrap { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
/* keep intro elements hidden until GSAP plays them in (prevents a flash) */
.js-anim .hero .reveal-up, .js-anim .hero__title .char { visibility: hidden; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 40px;
  overflow-x: clip; /* tilted portrait must not widen the page */
}
.hero__meta {
  position: absolute; top: 96px; left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between; gap: 16px; color: var(--muted);
}
.hero__title {
  font-size: var(--t-hero); font-weight: 600; line-height: 0.86; letter-spacing: -0.065em;
  margin-left: -0.04em;
}
.hero__title .serif { font-weight: 400; letter-spacing: -0.04em; }
/* name + portrait share one em-scale so the photo sizes with the type */
.hero__name { position: relative; font-size: var(--t-hero); }
.hero__portrait {
  position: absolute; right: 0.35em; bottom: 0.02em;
  width: 1.38em; z-index: 2;
  font-size: inherit;
  transform: rotate(4deg);
  perspective: 800px;
}
.hero__portrait::before {
  /* offset accent outline behind the photo */
  content: ""; position: absolute; inset: 0;
  border: 1.5px solid var(--accent); border-radius: 0.09em;
  transform: translate(-0.07em, 0.07em) rotate(-6deg);
}
.hero__portrait-frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: 0.09em;
  background: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(20, 18, 16, 0.5);
  will-change: transform;
}
.hero__portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 22%; transform-origin: center 30%; }
.hero__portrait-tag {
  position: absolute; left: -0.12em; bottom: 0.14em;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-size: 11px; white-space: nowrap;
  transform: rotate(-4deg);
  box-shadow: 0 6px 18px -8px rgba(20, 18, 16, 0.35);
}
.js-anim .hero__portrait { visibility: hidden; }

.line--indent { padding-left: 14vw; display: flex; align-items: center; gap: 0.12em; }
.hero__badge {
  display: inline-grid; place-items: center;
  width: 0.48em; height: 0.48em; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-size: 1em; flex: none;
}
.hero__badge span { font-size: 0.22em; letter-spacing: 0; }

.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: clamp(28px, 4vw, 56px); flex-wrap: wrap; }
.hero__lede { max-width: 560px; font-size: var(--t-lg); line-height: 1.35; letter-spacing: -0.015em; }
.rotator { display: inline-block; position: relative; vertical-align: bottom; overflow: hidden; color: var(--accent); font-family: var(--f-serif); font-style: italic; font-size: 1.12em; line-height: 1.15; }
.rotator__word { display: inline-block; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__scroll { position: absolute; right: var(--gutter); top: 50%; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); writing-mode: vertical-rl; }
.hero__scroll-line { width: 1px; height: 64px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--ink); animation: drip 2s var(--ease-out) infinite; }
@keyframes drip { to { top: 100%; } }

/* ---------- intro ---------- */
.intro { border-top: 1px solid var(--line); }
.intro__statement {
  font-size: clamp(1.8rem, 1rem + 3.2vw, 4rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.035em;
  max-width: 1300px;
}
.intro__statement .word { opacity: 1; }
.intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: clamp(48px, 7vw, 110px); align-items: end; }
.intro__body { max-width: 520px; color: var(--muted); font-size: var(--t-md); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.stat { padding-top: 16px; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat dt { color: var(--muted); }
.stat dd { font-size: clamp(3rem, 2rem + 4vw, 6rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; margin-top: 12px; font-variant-numeric: tabular-nums; }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(48px, 6vw, 96px) clamp(20px, 3vw, 40px); }
.project--lg { grid-column: 1 / -1; }
.project__link { display: block; }
.project__media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--paper-2);
  aspect-ratio: 16 / 10;
}
.project__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform-origin: center top; }
.project__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.project__link:hover .project__media { outline: 1px solid var(--ink); outline-offset: 6px; }
.project__media { outline: 1px solid transparent; outline-offset: 0; transition: outline-offset 0.5s var(--ease-out), outline-color 0.3s; overflow: hidden; }
/* screenshot with a cookie banner along the bottom: let the frame crop it */
.project__media--crop img { height: 113%; }

/* typographic panel for a project without a usable screenshot */
.project__media--type {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(20px, 3vw, 44px);
  background: var(--ink); color: var(--on-dark);
}
.ptype__eyebrow { color: var(--accent); }
.ptype__name { font-size: clamp(3rem, 1rem + 7vw, 8.5rem); font-weight: 600; line-height: 0.9; letter-spacing: -0.055em; }
.ptype__name .serif { font-weight: 400; color: var(--paper-2); }
.ptype__foot { display: flex; gap: 10px; flex-wrap: wrap; color: var(--on-dark-muted); }
.ptype__foot span { padding: 5px 10px; border: 1px solid var(--line-dark); border-radius: 999px; }

.project__info {
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px;
  padding-top: 20px;
}
.project__n { grid-row: span 4; color: var(--accent); padding-top: 0.6em; }
.project__name { font-size: clamp(1.6rem, 1rem + 1.8vw, 2.6rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; display: inline-flex; align-items: center; gap: 12px; }
.project__name::after { content: "↗"; font-size: 0.6em; opacity: 0; transform: translate(-8px, 8px); transition: 0.4s var(--ease-out); color: var(--accent); }
.project__link:hover .project__name::after, .project__link:focus-visible .project__name::after { opacity: 1; transform: none; }
.project__role { color: var(--muted); margin-top: 8px; }
.project__desc { margin-top: 12px; max-width: 560px; color: var(--ink-2); }

.project--lg .project__link { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.project--lg .project__info { padding-top: 0; }
.project--lg .project__name { font-size: clamp(2rem, 1rem + 3vw, 4rem); }
.project--flip .project__link { grid-template-columns: 1fr 1.6fr; }
.project--flip .project__media { order: 2; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; background: var(--accent); color: var(--accent-ink); padding: 22px 0; transform: rotate(-1.5deg) scale(1.02); margin: 40px 0; }
.marquee__track { display: flex; align-items: center; gap: 32px; width: max-content; font-size: clamp(1.6rem, 1rem + 2.4vw, 3.2rem); font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; }
.marquee__track i { font-style: normal; font-size: 0.6em; }

/* ---------- design gallery ---------- */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  font-size: var(--t-sm); font-weight: 500; transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.gallery { columns: 4 240px; column-gap: clamp(12px, 1.6vw, 24px); }
.tile { break-inside: avoid; margin-bottom: clamp(12px, 1.6vw, 24px); }
.tile[hidden] { display: none; }
.tile__btn { display: block; width: 100%; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.tile__btn img { width: 100%; transition: transform 0.9s var(--ease-out); }
.tile__btn:hover img { transform: scale(1.05); }
.tile figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: var(--t-sm); font-weight: 500; }
.tile figcaption .mono { color: var(--muted); }

/* ---------- reels ---------- */
.reels { padding-right: 0; }
.reels .section__head { padding-right: var(--gutter); }
.reels__hint { margin-top: 0; }
.reels__track {
  display: flex; gap: clamp(12px, 1.4vw, 20px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 12px; padding-right: var(--gutter);
  cursor: grab;
  scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.reels__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.reels__track.is-dragging .reel { pointer-events: none; }
.reel { position: relative; flex: 0 0 clamp(180px, 20vw, 260px); aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; scroll-snap-align: start; background: var(--ink); }
.reel img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out), opacity 0.4s; user-select: none; -webkit-user-drag: none; }
.reel:hover img { transform: scale(1.06); opacity: 0.75; }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.75)); pointer-events: none; }
.reel__t { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; color: #fff; font-weight: 500; font-size: var(--t-sm); line-height: 1.25; }

/* ---------- experience ---------- */
.exp__layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(40px, 8vw, 140px); }
.exp__aside { align-self: start; position: sticky; top: 120px; }
.edu { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line-dark); }
.edu__label, .edu__date { color: var(--on-dark-muted); }
.edu__deg { margin-top: 12px; font-size: var(--t-lg); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.edu__school { margin-top: 6px; color: var(--on-dark-muted); }
.edu__date { margin-top: 12px; }

.timeline { position: relative; padding-left: 36px; }
.timeline__line { position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line-dark); }
.timeline__line span { position: absolute; inset: 0; background: var(--accent); transform-origin: top; }
.job { position: relative; padding-bottom: clamp(48px, 6vw, 80px); }
.job:last-child { padding-bottom: 0; }
.job::before { content: ""; position: absolute; left: -40px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 1px solid var(--accent); }
.job__date { color: var(--accent); }
.job__title { margin-top: 12px; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.job__co { margin-top: 6px; font-family: var(--f-serif); font-style: italic; font-size: var(--t-lg); color: var(--on-dark-muted); }
.job__desc { margin-top: 16px; color: var(--on-dark-muted); max-width: 580px; }

/* ---------- skills ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.skillcol { padding: 24px 24px 32px 0; }
.skillcol + .skillcol { padding-left: 24px; border-left: 1px solid var(--line); }
.skillcol header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.skillcol header .mono { color: var(--accent); }
.skillcol h3 { font-size: clamp(1.6rem, 1rem + 1.4vw, 2.4rem); font-weight: 500; letter-spacing: -0.03em; }
.skillcol li { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; display: flex; justify-content: space-between; transition: padding-left 0.35s var(--ease-out), color 0.25s; }
.skillcol li:hover { padding-left: 10px; color: var(--accent); }

.profiles { margin-top: clamp(80px, 10vw, 140px); display: grid; grid-template-columns: 1fr 2fr; gap: clamp(32px, 6vw, 96px); }
.profiles__title { font-size: var(--t-lg); font-weight: 500; letter-spacing: -0.02em; }
.profiles__head .section__sub { margin-top: 12px; }
.profiles__list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
.profiles__list a { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.profiles__list b { display: block; font-weight: 500; font-size: var(--t-sm); }
.profiles__list i { display: block; font-style: normal; color: var(--muted); font-size: 11px; margin-top: 2px; }
.av { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper-2); font-family: var(--f-serif); font-style: italic; font-size: 18px; transition: background-color 0.25s, color 0.25s; }
.profiles__list .arrow { margin-left: auto; opacity: 0.4; transition: transform 0.35s var(--ease-out), opacity 0.25s; }
.profiles__list a:hover .av { background: var(--accent); color: var(--accent-ink); }
.profiles__list a:hover .arrow { opacity: 1; transform: translate(3px, -3px); }

/* ---------- contact ---------- */
.contact { padding: var(--section) var(--gutter) 28px; min-height: 100svh; display: flex; flex-direction: column; }
.contact__title { font-size: clamp(3.4rem, 1rem + 10vw, 12rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.06em; }
.contact__title .serif { color: var(--accent); }
.contact__row { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-top: clamp(48px, 7vw, 96px); flex-wrap: wrap; }
.contact__mail { display: inline-block; }
.contact__circle {
  display: grid; place-items: center; text-align: center;
  width: clamp(140px, 16vw, 210px); aspect-ratio: 1; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 500; font-size: var(--t-lg); line-height: 1.1; letter-spacing: -0.02em;
  transition: background-color 0.3s, color 0.3s;
}
.contact__mail:hover .contact__circle { background: var(--on-dark); color: var(--ink); }
.contact__details { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; text-align: right; }
.copy { display: inline-flex; align-items: baseline; gap: 14px; font-size: clamp(1.2rem, 0.8rem + 1.6vw, 2.2rem); font-weight: 500; letter-spacing: -0.03em; border-bottom: 1px solid var(--line-dark); padding-bottom: 6px; transition: border-color 0.3s; }
.copy:hover { border-color: var(--accent); }
.copy__hint { color: var(--accent); }
.contact__phone { font-size: var(--t-lg); color: var(--on-dark-muted); transition: color 0.25s; }
.contact__phone:hover { color: var(--on-dark); }
.socials { display: flex; gap: 20px; }
.socials a { font-weight: 500; position: relative; }
.socials a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease-out); }
.socials a:hover::after { transform: scaleX(1); transform-origin: left; }

.footer { margin-top: auto; padding-top: 72px; display: flex; justify-content: space-between; gap: 16px; color: var(--on-dark-muted); flex-wrap: wrap; }
.totop:hover { color: var(--on-dark); }

/* ---------- lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0;
  background: rgba(20, 18, 16, 0.94); color: var(--on-dark);
}
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox__fig { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 0 24px; height: 100%; justify-content: center; }
.lightbox__fig img { max-height: calc(100vh - 140px); width: auto; max-width: 100%; border-radius: var(--radius); }
.lightbox__fig figcaption { color: var(--on-dark-muted); }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-dark); }
.lightbox__nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-dark); justify-self: center; font-size: 18px; }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--on-dark); color: var(--ink); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .project--lg .project__link, .project--flip .project__link { grid-template-columns: 1fr; }
  .project--flip .project__media { order: 0; }
  .project--lg .project__info { padding-top: 20px; }
  .exp__layout { grid-template-columns: 1fr; }
  .exp__aside { position: static; }
  .profiles { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
}

@media (max-width: 820px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; border-radius: 50%; background: var(--ink);
    position: relative; z-index: 101;
  }
  .nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--paper); transition: transform 0.35s var(--ease-out); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .menu-open .nav { background: transparent; border-color: transparent; backdrop-filter: none; }
  .menu-open .nav__logo { color: var(--on-dark); }
  .menu-open .nav__mark { background: var(--on-dark); color: var(--ink); }
  .menu-open .nav__toggle { background: var(--on-dark); }
  .menu-open .nav__toggle span { background: var(--ink); }

  .hero__meta span:nth-child(3) { display: none; }
  /* sit in the space right of "Ayush", above "Saini" */
  .hero__portrait { width: 1.5em; right: 0.04em; bottom: 0.9em; }
  .hero__portrait-tag { font-size: 9px; padding: 5px 8px; gap: 6px; }
  .line--indent { padding-left: 8vw; }
  .intro__grid { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .skills__grid { grid-template-columns: 1fr; }
  .skillcol, .skillcol + .skillcol { padding: 24px 0 8px; border-left: 0; }
  .skillcol + .skillcol { border-top: 1px solid var(--line); }
  .profiles__list { grid-template-columns: 1fr; }
  .contact__details { align-items: flex-start; text-align: left; }
  .gallery { columns: 2; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: 20px; }
  .lightbox__prev { left: calc(50% - 56px); }
  .lightbox__next { right: calc(50% - 56px); }
  .lightbox__fig { padding: 64px 16px 88px; }
  .lightbox__fig img { max-height: calc(100vh - 200px); }
}

@media (max-width: 480px) {
  .hero__actions .btn { flex: 1; justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .stat + .stat { padding-left: 10px; }
  .stat dt { font-size: 10px; }
  .copy { font-size: 1.05rem; }
}

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