/*=============== TOKENS ===============*/
:root {
  color-scheme: light;
  --bg: #FBF4F6;
  --bg-alt: #F5E8EC;
  --surface: #FFFFFF;
  --ink: #1F1519;
  --muted: #66565C;
  --subtle: #93808A;
  --line: #EED9E0;
  --accent: #C2185B;
  --accent-hover: #A3104B;
  --accent-ink: #FFFFFF;
  --accent-soft: #FCE1EB;
  --secondary: #6B3F69;
  --shadow: 0 1px 2px rgb(31 21 25 / .04), 0 8px 24px -12px rgb(31 21 25 / .12);
  --shadow-lg: 0 2px 4px rgb(31 21 25 / .04), 0 24px 48px -20px rgb(31 21 25 / .22);
  --header-bg: rgb(251 244 246 / .8);
  --logo-a: #F7B6CF;
  --logo-b: #C2185B;
  --logo-ink: #FFFFFF;
  --sky: #E8729F;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --radius-sm: .5rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --header-h: 4.25rem;
  --container: 72rem;
  --gutter: 1rem;
  --section-space: clamp(4.5rem, 10vw, 8rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151013;
    --bg-alt: #1C1519;
    --surface: #251C21;
    --ink: #F7EEF2;
    --muted: #B9A7AF;
    --subtle: #8C7882;
    --line: #3A2D34;
    --accent: #F48FB6;
    --accent-hover: #F8AACA;
    --accent-ink: #1F1519;
    --accent-soft: #45202F;
    --secondary: #C3A3D9;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -20px rgb(0 0 0 / .6);
    --header-bg: rgb(21 16 19 / .78);
    --logo-a: #FAC3D8;
    --logo-b: #E8729F;
    --logo-ink: #1F1519;
    --sky: #FFF4F8;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151013;
  --bg-alt: #1C1519;
  --surface: #251C21;
  --ink: #F7EEF2;
  --muted: #B9A7AF;
  --subtle: #8C7882;
  --line: #3A2D34;
  --accent: #F48FB6;
  --accent-hover: #F8AACA;
  --accent-ink: #1F1519;
  --accent-soft: #45202F;
  --secondary: #C3A3D9;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -20px rgb(0 0 0 / .6);
  --header-bg: rgb(21 16 19 / .78);
  --logo-a: #FAC3D8;
  --logo-b: #E8729F;
  --logo-ink: #1F1519;
  --sky: #FFF4F8;
}

@media (min-width: 768px) {
  :root { --gutter: 2rem; }
}

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}

[hidden] { display: none !important; }

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

ul, ol { list-style: none; }

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

button, input, textarea { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; }

strong { font-weight: 700; color: var(--ink); }

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

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/*=============== TYPOGRAPHY ===============*/
.eyebrow {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -.012em;
  font-variation-settings: 'opsz' 144;
  text-wrap: balance;
}

.section__title em,
.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.section { padding-block: var(--section-space); }

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section__header {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

/*=============== BUTTONS ===============*/
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .95rem;
  border: 1px solid var(--accent);
  transition: background-color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
  white-space: nowrap;
}
.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px var(--accent);
}
.button i { font-size: 1.2rem; }

.button--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.button--ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: none;
}

.button--small { padding: .55rem 1rem; font-size: .85rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.2rem;
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface); border-color: var(--ink); }
.icon-btn--sm { width: 2.1rem; height: 2.1rem; font-size: 1rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, gap .2s;
}
.link-arrow:hover { border-color: currentColor; gap: .55rem; }
.link-arrow i { font-size: 1.15rem; }

/*=============== HEADER ===============*/
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-color: var(--line);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.nav__logo-mark {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  transition: transform .4s var(--ease);
}
.nav__logo:hover .nav__logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-stop-a { stop-color: var(--logo-a); }
.logo-stop-b { stop-color: var(--logo-b); }
.logo-letter { fill: var(--logo-ink); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav__cv { display: none; }

.nav__menu {
  position: fixed;
  inset: var(--header-h) 0 auto;
  padding: 1.5rem var(--gutter) 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateY(-120%);
  visibility: hidden;
  transition: transform .35s var(--ease), visibility .35s;
}
.nav__menu.show-menu { transform: none; visibility: visible; }

.nav__list { display: grid; gap: .25rem; }
.nav__menu-cv { margin-top: 1rem; }

.nav__link {
  display: block;
  padding: .6rem 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--muted);
  transition: color .2s;
}
.nav__link:hover, .nav__link.active-link { color: var(--ink); }

.theme-icon--light { display: none; }
:root[data-theme="dark"] .theme-icon--dark { display: none; }
:root[data-theme="dark"] .theme-icon--light { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon--dark { display: none; }
  :root:not([data-theme="light"]) .theme-icon--light { display: inline; }
}

@media (min-width: 560px) {
  .nav__cv { display: inline-flex; }
  .nav__menu-cv { display: none; }
}

@media (min-width: 900px) {
  .nav__toggle { display: none; }

  .nav__menu {
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
    visibility: visible;
  }

  .nav__list { display: flex; gap: .25rem; }
  .nav__menu-cv { display: none; }

  .nav__link {
    padding: .45rem .85rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: .92rem;
    font-weight: 600;
  }
  .nav__link:hover { background: var(--surface); }
  .nav__link.active-link { background: var(--ink); color: var(--bg); }
}

/*=============== HERO ===============*/
.hero {
  padding-top: var(--header-h);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  position: relative;
}

/* The first view fills the screen: text and memoji, vertically centred */
.hero__container {
  display: grid;
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(1rem, 4vh, 3rem);
}

.hero__badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  max-width: 100%;
  padding: .45rem .95rem .45rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
}
.hero__status i { flex: none; font-size: 1.05rem; color: var(--accent); }
.hero__status .pulse { flex: none; margin-inline: .25rem; }

.hero__when {
  flex: none;
  padding-right: .55rem;
  border-right: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--ink);
  opacity: .85;
}

.hero__status--next {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}
.hero__status--next .hero__when { color: var(--accent); }

@media (max-width: 559px) {
  .hero__status { font-size: .74rem; padding: .35rem .75rem .35rem .6rem; gap: .4rem; border-radius: 1rem; }
  .hero__when { font-size: .66rem; padding-right: .45rem; }
  .hide-sm { display: none; }
}

.pulse {
  position: relative;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #2E9E5B;
}
.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(2.8); opacity: 0; }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, min(8vw, 9vh), 5.5rem);
  line-height: 1.04;
  letter-spacing: -.022em;
  font-variation-settings: 'opsz' 144;
  margin-bottom: clamp(.75rem, 2.5vh, 1.5rem);
  text-wrap: balance;
}

.hero__lead {
  max-width: 38rem;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--muted);
  margin-bottom: clamp(1.1rem, 3.5vh, 2rem);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: clamp(1.1rem, 3.5vh, 2rem);
}
.hero__socials { margin-left: .25rem; }

.socials {
  display: flex;
  gap: .5rem;
}
.socials a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.25rem;
  transition: color .2s, background-color .2s;
}
.socials a:hover { color: var(--ink); background: var(--surface); }
.socials--sm a { width: 2.2rem; height: 2.2rem; font-size: 1.1rem; }

.hero__visual {
  position: relative;
  justify-self: center;
  width: min(78%, 24rem);
  aspect-ratio: 1;
}

.hero__blob {
  position: absolute;
  inset: 6%;
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background:
    radial-gradient(circle at 30% 25%, var(--accent-soft), transparent 60%),
    linear-gradient(145deg, var(--accent) 0%, #F7B6CF 100%);
  animation: morph 14s ease-in-out infinite;
  box-shadow: var(--shadow-lg);
}
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; }
  50% { border-radius: 58% 42% 45% 55% / 40% 56% 44% 60%; }
}

.hero__img {
  position: absolute;
  inset: 10% 12% 0;
  width: 76%;
  height: 90%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 18px 24px rgb(0 0 0 / .18));
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}
.chip i { font-size: 1.05rem; color: var(--accent); }

.chip--float { position: absolute; animation: float 6s ease-in-out infinite; }
.chip--1 { top: 8%; left: -4%; }
.chip--2 { top: 22%; right: -6%; animation-delay: -1.5s; }
.chip--3 { bottom: 20%; left: -8%; animation-delay: -3s; }
.chip--4 { bottom: 6%; right: 0; animation-delay: -4.5s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.stats__item {
  display: flex;
  flex-direction: column-reverse;
  gap: .25rem;
  padding: 1.25rem 1.25rem 1.4rem;
  border-color: var(--line);
  border-style: solid;
  border-width: 0;
}
.stats__item:nth-child(odd) { border-right-width: 1px; }
.stats__item:nth-child(-n+2) { border-bottom-width: 1px; }
.stats dt { font-size: .85rem; color: var(--muted); line-height: 1.35; }
.stats dd {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1;
  letter-spacing: -.03em;
}

@media (max-width: 899px) {
  .hero__container { gap: clamp(.75rem, 2.5vh, 1.5rem); align-content: center; }
  .hero__visual { order: -1; width: min(58%, 17rem, 30vh); }
  .hero__socials { margin-left: 0; }
}

@media (min-width: 900px) {
  .hero__container { grid-template-columns: 1.1fr .9fr; gap: 3rem; }
  .hero__visual { width: 100%; max-width: min(34rem, 70vh); }

  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats__item { border-width: 0 1px 0 0 !important; padding: 1.75rem 2rem; }
  .stats__item:last-child { border-right-width: 0 !important; }
}

@media (max-width: 559px) {
  /* Fit the whole first view on a phone screen */
  .hero__container { padding-block: .5rem 1rem; }
  .hero__visual { width: min(56%, 14rem, 27vh); }
  .hero__title { font-size: clamp(2.2rem, min(10vw, 6.5vh), 2.6rem); }
  .hero__lead { margin-bottom: .9rem; line-height: 1.55; }
  .hero__ctas { gap: .5rem; margin-bottom: .9rem; }
  .hero__socials { margin-left: -.5rem; }
  .hero__socials a { width: 2.2rem; height: 2.2rem; font-size: 1.15rem; }
  .hero__badges { gap: .35rem; }
  .hero .chip { padding: .22rem .5rem; font-size: .62rem; gap: .25rem; }
  .hero .chip i { font-size: .8rem; }
  .hero .chip--1 { left: -12%; }
  .hero .chip--2 { right: -14%; }
  .hero .chip--3 { left: -16%; }
  .hero .chip--4 { right: -10%; }
  .hero__lead { font-size: .92rem; }
  .hero__ctas .button { padding: .75rem 1.2rem; }
}

/*=============== ABOUT ===============*/
.about {
  display: grid;
  gap: 3rem;
}

.about__figure {
  width: 100%;
  max-width: 24rem;
  justify-self: center;
}

/* Bento "at a glance" grid */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1.35fr 1fr .8fr;
  gap: .6rem;
  aspect-ratio: 4 / 5;
}
.bento__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.bento small {
  display: block;
  font-family: var(--font-mono);
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--subtle);
}
.bento__hero {
  grid-column: span 2;
  border: 0;
  background: linear-gradient(145deg, var(--logo-a), var(--logo-b));
  color: var(--logo-ink);
  box-shadow: var(--shadow-lg);
}
.bento__hero small { color: inherit; opacity: .8; }
.bento__hero strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 3.1rem);
  font-weight: 500;
  line-height: 1;
  color: inherit;
}
.bento__hero p { font-size: .85rem; opacity: .9; margin-top: .25rem; }
.bento__hero img {
  position: absolute;
  right: -.5rem;
  bottom: -1rem;
  width: 44%;
  filter: drop-shadow(0 10px 16px rgb(0 0 0 / .18));
  transition: transform .5s var(--ease);
}
@media (hover: hover) {
  .bento__hero:hover img { transform: rotate(-4deg) translateY(-4px); }
}
.bento__icon { font-size: 1.5rem; color: var(--accent); }
.bento__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.15;
}

.bento__music {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: .85rem;
}
.bento__disc {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: .65rem;
  background: var(--ink);
  color: var(--accent);
  font-size: 1.4rem;
}
:root[data-theme="dark"] .bento__disc { background: var(--bg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bento__disc { background: var(--bg); }
}
.bento__track { flex: 1; min-width: 0; }
.bento__track > span:not(.bento__progress) { display: block; font-weight: 700; font-size: .92rem; }
.bento__progress {
  display: block;
  height: 4px;
  margin-top: .45rem;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.bento__progress i {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--accent);
  animation: bento-play 14s linear infinite;
}
@keyframes bento-play { from { width: 5%; } to { width: 100%; } }
.bento__eq { display: flex; align-items: flex-end; gap: 2px; height: 1.1rem; flex: none; }
.bento__eq i {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: bento-eq 1s ease-in-out infinite;
}
.bento__eq i:nth-child(2) { animation-delay: -.3s; }
.bento__eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes bento-eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

.about__text {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38rem;
}
.about__personal {
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
}

.about__cards {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.mini-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .25s var(--ease), box-shadow .25s;
}
@media (hover: hover) { .mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); } }
.mini-card i {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: .9rem;
  border-radius: .7rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.3rem;
}
.mini-card h3 { font-size: 1rem; margin-bottom: .3rem; }
.mini-card p { font-size: .88rem; color: var(--muted); line-height: 1.5; }

@media (min-width: 640px) {
  .about__cards { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .about { grid-template-columns: .8fr 1.4fr; gap: 5rem; align-items: start; }
  .about__figure { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/*=============== EXPERIENCE ===============*/
.timeline { position: relative; display: grid; gap: 1rem; }

.timeline__item {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: box-shadow .25s, border-color .25s;
}
@media (hover: hover) { .timeline__item:hover { box-shadow: var(--shadow); } }

.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}
.timeline__date {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--subtle);
}

.badge {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
}
.badge--accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.timeline__role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.timeline__role span { color: var(--subtle); font-style: italic; font-size: .8em; }

.timeline__org { color: var(--muted); font-weight: 600; margin-top: .25rem; }

.timeline__points {
  display: grid;
  gap: .45rem;
  margin: 1.1rem 0 1.25rem;
  color: var(--muted);
}
.timeline__points li {
  position: relative;
  padding-left: 1.25rem;
}
.timeline__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .68em;
  width: .45rem;
  height: 2px;
  background: var(--accent);
}

@media (min-width: 900px) {
  .timeline { gap: 0; }
  .timeline::before {
    content: '';
    position: absolute;
    left: 13.5rem;
    top: 2.25rem;
    bottom: 2.25rem;
    width: 1px;
    background: var(--line);
  }
  .timeline__item {
    grid-template-columns: 12rem 1fr;
    gap: 3rem;
    padding: 2rem 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .timeline__item:hover { box-shadow: none; }
  .timeline__meta {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding-top: .35rem;
  }
  .timeline__meta::after {
    content: '';
    position: absolute;
    right: -1.85rem;
    top: .65rem;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 2px solid var(--subtle);
  }
  .timeline__item:first-child .timeline__meta::after {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft);
  }
}

/*=============== TAGS ===============*/
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.tags li {
  padding: .25rem .65rem;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}
.section--alt .tags li { background: var(--bg); }

.tags--lg { gap: .5rem; }
.tags--lg li {
  padding: .45rem .9rem;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg) !important;
  transition: border-color .2s, transform .2s var(--ease);
}
@media (hover: hover) { .tags--lg li:hover { border-color: var(--accent); transform: translateY(-2px); } }

/*=============== WORK ===============*/
.feature {
  display: grid;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background: #1F1519;
  color: #F7EEF2;
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
}
.feature::before {
  content: '';
  position: absolute;
  width: 30rem;
  height: 30rem;
  right: -10rem;
  top: -14rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
  opacity: .35;
  pointer-events: none;
}
.feature > * { position: relative; }

.feature__kicker,
.project__kicker {
  font-family: var(--font-mono);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: .75rem;
}
.feature .feature__kicker { color: #F48FB6; }
.feature__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.feature__desc { opacity: .78; margin-bottom: 1.5rem; max-width: 34rem; }
.feature .tags li {
  background: rgb(255 255 255 / .06);
  border-color: rgb(255 255 255 / .14);
  color: inherit;
  opacity: .9;
}

.feature__note {
  display: flex;
  gap: .5rem;
  margin-top: 1.5rem;
  font-size: .85rem;
  opacity: .65;
}
.feature__note i { font-size: 1.1rem; margin-top: .15rem; }

/* EMI calculator demo */
.emi {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  align-self: center;
}
.emi__head { display: flex; justify-content: space-between; align-items: center; }
.emi__title { font-weight: 800; }
.emi__demo {
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.emi__field { display: grid; gap: .5rem; }
.emi__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.emi__row label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.emi__row output { font-weight: 800; font-variant-numeric: tabular-nums; }

.emi input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--fill), var(--line) var(--fill));
  cursor: pointer;
}
.emi input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.emi input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}
.emi input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }

.emi__result {
  display: grid;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
}
.emi__label { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
.emi__value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.emi__bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--secondary);
}
.emi__bar span { background: var(--accent); width: 50%; transition: width .3s var(--ease); }
.emi__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1rem;
  margin-top: .6rem;
  font-size: .8rem;
  color: var(--muted);
}
.emi__legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .35rem; }
.dot--principal { background: var(--accent); }
.dot--interest { background: var(--secondary); }

@media (min-width: 900px) {
  .feature { grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
}

/* Project cards */
.projects {
  display: grid;
  gap: 1.5rem;
}

.project {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s;
}
@media (hover: hover) { .project:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); } }

.project__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .6s var(--ease);
}
@media (hover: hover) { .project:hover .project__media img { transform: scale(1.04); } }
.project__media--plain { background: #fff; }
.project__media--plain img { object-fit: contain; object-position: center; }

.project__body {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.5rem;
  flex: 1;
}
.project__kicker { margin-bottom: 0; }
.project__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.project__desc { color: var(--muted); font-size: .95rem; }
.project .tags { margin-top: auto; padding-top: .25rem; }
.project .link-arrow { margin-top: .25rem; align-self: flex-start; }

@media (min-width: 700px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}
/* Live websites (first two) are large; the design projects after them sit three to a row */
@media (min-width: 1024px) {
  .projects { grid-template-columns: repeat(6, 1fr); }
  .project:nth-child(1), .project:nth-child(2) { grid-column: span 3; }
  .project:nth-child(n+3) { grid-column: span 2; }
}

/*=============== PROCESS ===============*/
.process {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
.process__step {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.process__num {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--line);
  font-weight: 500;
}
.process__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: .8rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.35rem;
}
.process__step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  margin-bottom: .4rem;
}
.process__step p { color: var(--muted); font-size: .93rem; }

.paths {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.path {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.path--accent { background: var(--accent-soft); border-color: transparent; }
.path__kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
}
.path__kicker i { font-size: 1rem; }
.path__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  line-height: 1.2;
}
.path__list { display: grid; gap: .4rem; color: var(--muted); }
.path__list li { position: relative; padding-left: 1.5rem; }
.path__list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}
.path .link-arrow { margin-top: auto; padding-top: .5rem; align-self: flex-start; }

@media (min-width: 640px) {
  .process { grid-template-columns: repeat(2, 1fr); }
  .paths { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .process { grid-template-columns: repeat(4, 1fr); }
}

/*=============== FAQ ===============*/
.faq { display: grid; gap: 2rem; }
.faq__lead { color: var(--muted); margin-top: 1.25rem; max-width: 26rem; }
.faq__lead a { color: var(--accent); font-weight: 700; border-bottom: 1px solid currentColor; }

.faq__list { display: grid; gap: .6rem; }
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .2s, background-color .2s;
}
.faq__item[open] { background: var(--surface); border-color: var(--accent); }
.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform .3s var(--ease);
}
.faq__item[open] summary i { transform: rotate(45deg); }
.faq__item p { padding: 0 1.25rem 1.25rem; color: var(--muted); }

@media (min-width: 900px) {
  .faq { grid-template-columns: .8fr 1.4fr; gap: 4rem; align-items: start; }
  .faq__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/*=============== SKILLS ===============*/
.skills {
  display: grid;
  gap: 1rem;
}
.skill-group {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.skill-group h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.skill-group h3 i { color: var(--accent); font-size: 1.25rem; }

@media (min-width: 768px) {
  .skills { grid-template-columns: repeat(2, 1fr); }
}

.learning {
  display: grid;
  gap: 2rem;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  padding-top: clamp(2.5rem, 6vw, 3.5rem);
  border-top: 1px solid var(--line);
}
.learning__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.learning__title i { color: var(--accent); }
.learning__list { display: grid; gap: 1.25rem; }
.learning__list li {
  display: grid;
  gap: .2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}
.learning__list span { font-size: .88rem; color: var(--subtle); }
.learning__list .badge { margin-left: .35rem; vertical-align: 2px; font-size: .68rem; color: var(--accent); }
.learning__upcoming { border-left-color: var(--accent) !important; }

@media (min-width: 768px) {
  .learning { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/*=============== CONTACT ===============*/
.contact {
  display: grid;
  gap: 3rem;
}
.contact__lead { color: var(--muted); font-size: 1.05rem; margin: 1.5rem 0 2rem; max-width: 32rem; }

.contact__list { display: grid; gap: .75rem; }
.contact__list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.contact__list li > i {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .7rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
}
.contact__list li > div { flex: 1; min-width: 0; }
.contact__list span { display: block; font-size: .78rem; color: var(--subtle); font-weight: 600; }
.contact__list a, .contact__list p { font-weight: 700; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--accent); }

.contact__form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  align-self: start;
}
.field-row { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 700; }
.field input, .field textarea {
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input::placeholder { color: var(--subtle); }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.contact__submit { justify-self: start; }

@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .contact { grid-template-columns: 1fr 1.1fr; gap: 5rem; }
}

/* Pageclip states (injected by pageclip.js) */
.pageclip-form { position: relative; }
.pageclip-form__submit--loading { opacity: .7; pointer-events: none; }
.pageclip-form__submit--loading span::after { content: '…'; }
.pageclip-form__success {
  position: absolute;
  inset: -1px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}
.pageclip-form__success__message {
  font-family: var(--font-display);
  font-size: 1.6rem;
}

/*=============== FOOTER ===============*/
.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer__top { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--ink); }
.footer__top:hover { color: var(--accent); }

/*=============== TOAST ===============*/
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 300;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .9rem;
  font-weight: 600;
  transform: translate(-50%, 150%);
  opacity: 0;
  transition: transform .3s var(--ease), opacity .3s;
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/*=============== MOBILE REFINEMENTS ===============*/
.projects-head, .projects-dots, .points-toggle { display: none; }

@media (max-width: 699px) {
  :root { --section-space: 3.75rem; }

  .section__header { margin-bottom: 2rem; }

  /* Stats: tighter */
  .stats__item { padding: 1rem 1.1rem 1.1rem; }

  /* About: icon beside text */
  .about { gap: 2.25rem; }
  .about__cards { gap: .6rem; margin-top: 2rem; }
  .mini-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .9rem;
    align-items: start;
    padding: 1rem;
  }
  .mini-card i { grid-row: span 2; margin-bottom: 0; }

  /* Experience: collapsible bullet lists */
  .timeline__item { padding: 1.25rem; gap: .6rem; }
  .timeline__points { margin: .9rem 0 1rem; }
  .timeline__points.is-collapsed li:nth-child(n+4) { display: none; }
  .points-toggle {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin: -.25rem 0 1rem;
    font-size: .88rem;
    font-weight: 700;
    color: var(--accent);
  }
  .points-toggle i { font-size: 1.15rem; transition: transform .25s; }
  .points-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

  /* Projects: swipe carousel */
  .projects-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2.25rem 0 .9rem;
    font-weight: 800;
  }
  .projects-head__hint {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--subtle);
  }
  .projects-head__hint i { font-size: 1.1rem; animation: nudge 1.6s ease-in-out infinite; }
  @keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateX(4px); } }

  .projects {
    display: flex;
    gap: .9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) .5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .projects::-webkit-scrollbar { display: none; }
  .project { flex: 0 0 86%; scroll-snap-align: start; }
  .js .projects .reveal { opacity: 1; transform: none; }
  .project__body { padding: 1.25rem; }
  .project__title { font-size: 1.3rem; }

  .projects-dots { display: flex; justify-content: center; gap: .4rem; margin-top: 1rem; }
  .projects-dots span {
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: var(--line);
    transition: width .3s var(--ease), background-color .3s;
  }
  .projects-dots span.is-active { width: 1.4rem; background: var(--accent); }

  /* Process: compact steps */
  .process { gap: .6rem; }
  .process__step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .9rem;
    padding: 1rem 1rem 1.1rem;
  }
  .process__icon { grid-row: span 2; width: 2.4rem; height: 2.4rem; margin-bottom: 0; font-size: 1.2rem; }
  .process__step h3 { font-size: 1.15rem; margin-bottom: .2rem; }
  .process__step p { font-size: .88rem; }
  .process__num { top: .9rem; right: 1rem; font-size: 1.5rem; }
  .faq__item summary { padding: 1rem 1.1rem; font-size: .95rem; }

  /* Skills: lighter chips */
  .skill-group { padding: 1.15rem; }
  .skill-group h3 { margin-bottom: .75rem; }
  .tags--lg { gap: .4rem; }
  .tags--lg li { padding: .35rem .75rem; font-size: .84rem; }
  .learning { margin-top: 2.5rem; padding-top: 2.25rem; }

  /* Contact */
  .contact { gap: 2.25rem; }
  .contact__lead { margin: 1.25rem 0 1.5rem; }
}

/* Bigger slider handles for fingers */
@media (pointer: coarse) {
  .emi input[type="range"] { height: 8px; }
  .emi input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; }
  .emi input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; }
}

/*=============== MOTION EXTRAS ===============*/
/* Header reading-progress bar; --scroll (0–1) is set from main.js */
.scroll-progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll, 0));
  pointer-events: none;
}

/* Hand-drawn underline under the pink <em> words, injected by main.js */
.scribble-host { position: relative; white-space: nowrap; }
.scribble {
  position: absolute;
  left: -3%;
  bottom: -.14em;
  width: 106%;
  height: .3em;
  overflow: visible;
  pointer-events: none;
}
.scribble path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: .5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .9s var(--ease);
}
.is-visible .scribble path {
  stroke-dashoffset: 0;
  transition-delay: calc(.35s + var(--i, 0) * .3s);
}

/* Theme switch: the new theme grows out of the toggle as a circle (main.js) */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-switching, .theme-switching * { transition: none !important; }

/* Experience: accent line fills down the timeline as you scroll; --progress from main.js */
@media (min-width: 900px) {
  .timeline::after {
    content: '';
    position: absolute;
    z-index: 0;
    left: 13.5rem;
    top: 2.25rem;
    bottom: 2.25rem;
    width: 2px;
    margin-left: -.5px;
    border-radius: 2px;
    background: linear-gradient(var(--accent), var(--secondary));
    transform-origin: top;
    transform: scaleY(var(--progress, 0));
  }
  .timeline__meta::after {
    z-index: 1;
    transition: background-color .4s, border-color .4s;
  }
  .timeline__item.is-reached .timeline__meta::after {
    background: var(--accent);
    border-color: var(--accent);
  }
}

/* Process: step icons light up in order as the steps scroll past */
.process__icon { transition: background-color .4s var(--ease), color .4s, transform .4s var(--ease); }
.process__num { transition: color .4s; }
.process__step.is-reached .process__icon {
  background: var(--accent);
  color: var(--accent-ink);
  transform: scale(1.06);
}
.process__step.is-reached .process__num { color: var(--accent-soft); }

/* Nav: one pill slides between links instead of each link painting its own (desktop) */
.nav__pill { display: none; }
@media (min-width: 900px) {
  .nav__menu { position: relative; inset: auto; }
  .nav__link { position: relative; z-index: 1; }
  .nav__pill {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 999px;
    background: var(--ink);
    opacity: 0;
    pointer-events: none;
    transition: translate .45s var(--ease), width .45s var(--ease), opacity .3s;
  }
  .nav__pill.is-on { opacity: 1; }
  .has-pill .nav__link.active-link { background: none; }
}

/* Hero: the chips drift with the mouse at different depths (--mx/--my from main.js); the memoji stays still */
.chip--float { transition: translate .7s var(--ease); }

/* Once a .reveal has finished, hover effects get quick transitions again (main.js adds .is-settled) */
.js .reveal.is-settled {
  transition: opacity .7s var(--ease), transform .35s var(--ease), box-shadow .3s, border-color .3s;
}

/* Cards: soft accent spotlight that follows the cursor (--gx/--gy from main.js) */
.glow { position: relative; isolation: isolate; }
.glow::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .glow:hover::after { opacity: 1; }
  .glow:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
  .js .project.is-settled:hover {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px);
  }
  .js .path.is-settled:hover {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
  .js .process__step.is-settled:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
}

/* Magnetic buttons lean toward the cursor (main.js sets `translate`) */
.magnetic {
  transition: background-color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s, translate .3s var(--ease);
}

/* Skill tags pop in one after another when their group appears */
@keyframes tag-pop { from { opacity: 0; transform: translateY(8px) scale(.94); } }
.js .reveal:not(.is-visible) .tags--lg li { opacity: 0; }
.js .is-visible .tags--lg li {
  animation: tag-pop .5s var(--ease) backwards;
  animation-delay: calc(.25s + var(--d, 0) * 45ms);
}

/* FAQ: the plus turns back as soon as an answer starts closing */
.faq__item.is-closing summary i { transform: none; }

/* Copy email: the button flips to a tick */
@keyframes pop { from { transform: scale(.4); } }
.icon-btn.is-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-btn.is-done i { animation: pop .35s var(--ease); }

/* Send: the paper plane lifts off on hover */
.contact__submit i { transition: transform .3s var(--ease); }
@media (hover: hover) { .contact__submit:hover i { transform: translate(3px, -3px) rotate(-15deg); } }

/* Hero: click the memoji for a burst of hearts/sparkles (main.js) */
.hero__img { cursor: pointer; }
/* Shared hearts/stars/sparkles (main.js `particles()`); fixed so they can fly anywhere */
.particle {
  position: fixed;
  z-index: 400;
  left: 0;
  top: 0;
  color: var(--accent);
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / .2));
  pointer-events: none;
}
.particle--dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  filter: none;
  box-shadow: 0 0 8px currentColor;
}

/* Hero sky: twinkling stars in dark mode, soft pink sparkles in light mode (main.js adds .hero__sky) */
.hero { isolation: isolate; }
.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  color: var(--sky);
  opacity: .6;
}
:root[data-theme="dark"] .hero__sky { opacity: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__sky { opacity: 1; }
}
.hero__sky span {
  position: absolute;
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: currentColor;
  opacity: .15;
  animation: twinkle var(--t, 3s) ease-in-out var(--d, 0s) infinite;
}
.hero__sky span.is-star {
  width: calc(var(--s) * 3);
  height: calc(var(--s) * 3);
  border-radius: 0;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
@keyframes twinkle {
  0%, 100% { opacity: .12; scale: .6; }
  50% { opacity: var(--o, .7); scale: 1; }
}

/* Theme button: the sun/moon does a happy spin when switched */
@keyframes spin-pop {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(200deg) scale(.6); }
  100% { transform: rotate(360deg) scale(1); }
}
#theme-button.is-spinning i { animation: spin-pop .6s var(--ease); }

/* Pink headline words do a jelly wobble on hover (the underline redraws from main.js) */
.scribble-host { display: inline-block; }
@keyframes jelly {
  0%, 100% { transform: none; }
  25% { transform: scale(1.08, .92); }
  50% { transform: scale(.94, 1.06); }
  75% { transform: scale(1.03, .97); }
}
@media (hover: hover) { .scribble-host:hover { animation: jelly .6s var(--ease); } }

/* Icons do a little hop when their card is hovered */
@keyframes hop {
  0%, 100% { transform: none; }
  30% { transform: translateY(-6px) rotate(-10deg); }
  55% { transform: translateY(0) rotate(5deg); }
  75% { transform: translateY(-2px) rotate(-2deg); }
}
@media (hover: hover) {
  .mini-card:hover > i,
  .process__step:hover .process__icon,
  .bento__tile:hover .bento__icon,
  .skill-group:hover h3 i,
  .contact__list li:hover > i,
  .socials a:hover i { animation: hop .6s var(--ease); }
}

/* Logo: jelly squish on hover */
@media (hover: hover) { .nav__logo:hover .nav__logo-mark { animation: jelly .6s var(--ease); } }

/* Hero: tech chips can be dragged and spring back (--dx/--dy from main.js) */
.chip--float { cursor: grab; touch-action: none; user-select: none; }
.chip--float.is-dragging {
  cursor: grabbing;
  z-index: 4;
  transition: none;
  box-shadow: var(--shadow-lg);
}
.chip--float.is-returning { transition: translate .7s cubic-bezier(.34, 1.56, .64, 1); }
.chip--1 { translate: calc(var(--mx, 0) * 26px + var(--dx, 0px)) calc(var(--my, 0) * 18px + var(--dy, 0px)); }
.chip--2 { translate: calc(var(--mx, 0) * -20px + var(--dx, 0px)) calc(var(--my, 0) * 22px + var(--dy, 0px)); }
.chip--3 { translate: calc(var(--mx, 0) * 18px + var(--dx, 0px)) calc(var(--my, 0) * -16px + var(--dy, 0px)); }
.chip--4 { translate: calc(var(--mx, 0) * -28px + var(--dx, 0px)) calc(var(--my, 0) * -20px + var(--dy, 0px)); }

/* Buttons: ripple from where you press (main.js) */
.button { position: relative; overflow: hidden; isolation: isolate; }
.ripple {
  position: absolute;
  z-index: -1;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .25;
  pointer-events: none;
}

/* About: the "Now playing" tile pauses and plays */
.bento__music { cursor: pointer; user-select: none; }
.bento__music:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bento__music.is-paused .bento__eq i,
.bento__music.is-paused .bento__progress i { animation-play-state: paused; }
.bento__music.is-paused .bento__eq { opacity: .45; }
.bento__disc i { transition: transform .3s var(--ease); }
.bento__disc.is-toggled i { animation: pop .35s var(--ease); }
@media (hover: hover) { .bento__music:hover .bento__disc i { transform: scale(1.12); } }

/* Work: project images wipe in from the top as each card appears */
.js .project__media { clip-path: inset(0); transition: clip-path 1s var(--ease) .15s; }
.js .project.reveal:not(.is-visible) .project__media { clip-path: inset(0 0 100% 0); }
.project__media img { transition: transform .6s var(--ease), scale 1.3s var(--ease) .15s; }
.js .project.reveal:not(.is-visible) .project__media img { scale: 1.15; }

/* Floating back-to-top button with a reading-progress ring (main.js) */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  font-size: 1.35rem;
  opacity: 0;
  transform: translateY(12px) scale(.9);
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.to-top circle { fill: none; stroke-width: 2.5; }
.to-top .to-top__track { stroke: var(--line); }
.to-top .to-top__ring {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--scroll, 0));
}
.to-top i { transition: transform .3s var(--ease); }
@media (hover: hover) { .to-top:hover i { transform: translateY(-3px); } }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Contact form: label turns pink while typing, and a tick pops in once the field is valid */
.field label { transition: color .2s; }
.field:focus-within label { color: var(--accent); }
.field label::after {
  content: '\2713';
  display: inline-block;
  margin-left: .4rem;
  color: var(--accent);
  opacity: 0;
  scale: .4;
  transition: opacity .25s, scale .35s cubic-bezier(.34, 1.56, .64, 1);
}
.field:has(:user-valid) label::after { opacity: 1; scale: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .project.reveal:not(.is-visible) .project__media { clip-path: inset(0); }
  .js .project.reveal:not(.is-visible) .project__media img { scale: 1; }
  .js .is-visible .tags--lg li { animation: none; }
  .js .reveal:not(.is-visible) .tags--lg li { opacity: 1; }
}

/*=============== REVEAL ON SCROLL ===============*/
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
