/*══════════════════════════════════════════════════════════════════════════
  ARNAV RAJPUROHIT — PORTFOLIO
  ──────────────────────────────────────────────────────────────────────────
  EVERYTHING YOU'D EVER WANT TO RECOLOUR LIVES IN SECTION 1 BELOW.
  Change a hex there and it updates across the whole site — text, borders,
  glows, cursor, background particles, gradients, buttons, all of it.
  Nothing below section 1 contains a hard-coded colour.
══════════════════════════════════════════════════════════════════════════*/

/*═══ 1 ─ COLOUR PALETTE — EDIT ONLY THIS SECTION ═══════════════════════*/

:root {
  /*── BRAND COLOURS (shared by both light and dark mode) ──*/
  --brand-1: #17A9F5;
  /* primary — taken from your logo */
  --brand-2: #7C5CFF;
  /* secondary — violet */
  --brand-3: #22E0B8;
  /* tertiary — mint */

  /*── FONTS (swap these two lines to change all typography) ──*/
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /*── SHAPE & RHYTHM ──*/
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-pill: 999px;
  --rail-w: 220px;
  /* width of the desktop side navigation */
  --content-max: 1200px;
  --gutter: clamp(22px, 4.4vw, 70px);
}

/*───────────────────────────────────────────────
  LIGHT MODE PALETTE
───────────────────────────────────────────────*/
:root,
:root[data-theme="light"] {
  --bg: #F3F4F8;
  /* page background            */
  --bg-2: #E9EBF2;
  /* sunken panels              */
  --surface: #FFFFFF;
  /* cards, nav, elevated stuff */
  --surface-glass: rgba(255, 255, 255, .66);

  --text: #0B1018;
  /* headings + primary text    */
  --text-2: #414B5C;
  /* body copy                  */
  --text-3: #737F92;
  /* captions, meta             */

  --border: rgba(11, 16, 24, .14);
  --border-soft: rgba(11, 16, 24, .07);

  --accent: var(--brand-1);
  --accent-2: var(--brand-2);
  --accent-3: var(--brand-3);
  --accent-ink: #FFFFFF;
  /* text that sits ON an accent fill */
  --accent-wash: rgba(23, 169, 245, .12);

  --cursor: var(--brand-1);
  /* custom cursor colour   */
  --cursor-hot: var(--brand-2);
  /* cursor over a link     */
  --particles: 23, 169, 245;
  /* background dots, R,G,B */
  --particles-2: 124, 92, 255;
  /* background dots alt    */

  --orb-1: rgba(23, 169, 245, .30);
  --orb-2: rgba(124, 92, 255, .24);
  --orb-3: rgba(34, 224, 184, .20);

  --shadow: 0 2px 4px rgba(11, 16, 24, .04), 0 24px 60px -26px rgba(11, 16, 24, .30);
  --shadow-lift: 0 2px 6px rgba(11, 16, 24, .06), 0 44px 90px -34px rgba(11, 16, 24, .42);
  --photo-glow: rgba(23, 169, 245, .34);
  --scrim: rgba(243, 244, 248, .80);
}

/*───────────────────────────────────────────────
  DARK MODE PALETTE
───────────────────────────────────────────────*/
:root[data-theme="dark"] {
  --bg: #05070C;
  --bg-2: #0A0E17;
  --surface: #0D131E;
  --surface-glass: rgba(13, 19, 30, .62);

  --text: #EEF3F9;
  --text-2: #A6B4C7;
  --text-3: #6B7A8F;

  --border: rgba(238, 243, 249, .13);
  --border-soft: rgba(238, 243, 249, .06);

  --accent: #35B8FF;
  --accent-2: #9B83FF;
  --accent-3: #3BE8C2;
  --accent-ink: #05070C;
  --accent-wash: rgba(53, 184, 255, .14);

  --cursor: #35B8FF;
  --cursor-hot: #9B83FF;
  --particles: 53, 184, 255;
  --particles-2: 155, 131, 255;

  --orb-1: rgba(53, 184, 255, .26);
  --orb-2: rgba(155, 131, 255, .22);
  --orb-3: rgba(59, 232, 194, .16);

  --shadow: 0 2px 4px rgba(0, 0, 0, .5), 0 30px 70px -30px rgba(0, 0, 0, .9);
  --shadow-lift: 0 2px 8px rgba(0, 0, 0, .6), 0 56px 110px -40px rgba(0, 0, 0, 1);
  --photo-glow: rgba(53, 184, 255, .42);
  --scrim: rgba(5, 7, 12, .80);
}

/* Follow the operating system when the visitor hasn't picked a mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #05070C;
    --bg-2: #0A0E17;
    --surface: #0D131E;
    --surface-glass: rgba(13, 19, 30, .62);
    --text: #EEF3F9;
    --text-2: #A6B4C7;
    --text-3: #6B7A8F;
    --border: rgba(238, 243, 249, .13);
    --border-soft: rgba(238, 243, 249, .06);
    --accent: #35B8FF;
    --accent-2: #9B83FF;
    --accent-3: #3BE8C2;
    --accent-ink: #05070C;
    --accent-wash: rgba(53, 184, 255, .14);
    --cursor: #35B8FF;
    --cursor-hot: #9B83FF;
    --particles: 53, 184, 255;
    --particles-2: 155, 131, 255;
    --orb-1: rgba(53, 184, 255, .26);
    --orb-2: rgba(155, 131, 255, .22);
    --orb-3: rgba(59, 232, 194, .16);
    --shadow: 0 2px 4px rgba(0, 0, 0, .5), 0 30px 70px -30px rgba(0, 0, 0, .9);
    --shadow-lift: 0 2px 8px rgba(0, 0, 0, .6), 0 56px 110px -40px rgba(0, 0, 0, 1);
    --photo-glow: rgba(53, 184, 255, .42);
    --scrim: rgba(5, 7, 12, .80);
  }
}

/*═══ 2 ─ BASE ══════════════════════════════════════════════════════════*/

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(96px + env(safe-area-inset-top, 0px));
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: background .55s ease, color .55s ease;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer
}

ul {
  list-style: none
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0em
}

p {
  max-width: 64ch
}

/* Custom cursor: hide the native arrow only on true pointer devices */
@media (hover:hover) and (pointer:fine) {

  html.has-cursor,
  html.has-cursor * {
    cursor: none !important
  }
}

/*═══ 3 ─ BACKGROUND LAYERS ═════════════════════════════════════════════*/

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .85
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  transition: background .6s ease;
}

.orb.o1 {
  width: min(52vw, 620px);
  aspect-ratio: 1;
  top: -14vh;
  right: -10vw;
  background: radial-gradient(circle, var(--orb-1), transparent 68%);
  animation: orbA 22s ease-in-out infinite
}

.orb.o2 {
  width: min(46vw, 540px);
  aspect-ratio: 1;
  bottom: -16vh;
  left: -8vw;
  background: radial-gradient(circle, var(--orb-2), transparent 68%);
  animation: orbB 27s ease-in-out infinite
}

.orb.o3 {
  width: min(38vw, 430px);
  aspect-ratio: 1;
  top: 44%;
  left: 38%;
  background: radial-gradient(circle, var(--orb-3), transparent 70%);
  animation: orbC 31s ease-in-out infinite
}

@keyframes orbA {

  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1)
  }

  50% {
    transform: translate3d(-7vw, 7vh, 0) scale(1.14)
  }
}

@keyframes orbB {

  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1)
  }

  50% {
    transform: translate3d(6vw, -6vh, 0) scale(1.18)
  }
}

@keyframes orbC {

  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1)
  }

  50% {
    transform: translate3d(-9vw, -5vh, 0) scale(.86)
  }
}

.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 10%, transparent 78%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .34;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

/*═══ 4 ─ CURSOR & PROGRESS ═════════════════════════════════════════════*/

#cur-dot,
#cur-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s ease, background-color .3s ease, border-color .3s ease
}

#cur-dot {
  width: 5px;
  height: 5px;
  background: var(--cursor);
  margin: -2.5px 0 0 -2.5px
}

#cur-ring {
  width: 25px;
  height: 25px;
  border: 1.5px solid var(--cursor);
  margin: -12.5px 0 0 -12.5px
}

html.cursor-hot #cur-dot {
  background: var(--cursor-hot)
}

html.cursor-hot #cur-ring {
  border-color: var(--cursor-hot);
  border-width: 1.5px
}

#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 16px var(--accent)
}

/*═══ 5 ─ SIDE RAIL NAVIGATION (desktop ≥1100px) ════════════════════════*/

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 34px 20px calc(30px + env(safe-area-inset-bottom, 0px));
  background: var(--surface-glass);
  backdrop-filter: blur(26px) saturate(1.5);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  border-right: 1px solid var(--border);
  transition: background .55s ease, border-color .55s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  perspective: 600px
}

.brand .glyph {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  transition: transform .75s cubic-bezier(.2, .9, .25, 1), box-shadow .4s;
}

.brand:hover .glyph {
  transform: rotateY(180deg) rotateZ(-8deg);
  box-shadow: 0 12px 30px -12px var(--photo-glow)
}

.brand .glyph img {
  width: 26px;
  height: 26px;
  object-fit: contain
}

.brand b {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -.02em;
  display: block;
  line-height: 1.2
}

.brand span {
  font-size: 12.5px;
  color: var(--text-3);
  display: block
}

.rail .brand {
  gap: 10px
}

.rail .brand .glyph {
  width: 40px;
  height: 40px
}

.rail .brand b {
  font-size: 15px
}

.rail .brand b+span {
  font-size: 11.5px
}

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  background: var(--bg-2)
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  animation: pulse 2.6s infinite
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent)
  }

  70% {
    box-shadow: 0 0 0 10px transparent
  }

  100% {
    box-shadow: 0 0 0 0 transparent
  }
}

.rail nav {
  position: relative;
  flex: 1 1 auto;
  min-height: 0
}

.rail nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative
}

.rail nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 14.8px;
  font-weight: 600;
  color: var(--text-3);
  position: relative;
  z-index: 2;
  transition: color .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}

.rail nav a .num {
  font-size: 11px;
  font-weight: 700;
  opacity: .6;
  font-variant-numeric: tabular-nums;
  width: 16px
}

.rail nav a:hover {
  color: var(--text);
  transform: translateX(4px)
}

.rail nav a.active {
  color: var(--accent)
}

#rail-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 44px;
  z-index: 1;
  opacity: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  border-left: 2px solid var(--accent);
  transition: transform .55s cubic-bezier(.3, 1.2, .35, 1), opacity .35s ease;
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.rail-social {
  display: flex;
  gap: 7px;
  flex-wrap: wrap
}

.rail-social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  transition: .35s cubic-bezier(.2, .8, .2, 1);
}

.rail-social svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round
}

.rail-social a:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px)
}

.rail-meta {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 9px 9px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: border-color .35s, color .35s;
}

.theme-btn:hover {
  border-color: var(--accent);
  color: var(--text)
}

.theme-btn .knob {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .6s cubic-bezier(.3, 1.2, .35, 1);
}

.theme-btn:hover .knob {
  transform: rotate(180deg)
}

.theme-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.7;
  stroke-linecap: round
}

.ic-moon {
  display: none
}

:root[data-theme="light"] .ic-sun {
  display: none
}

:root[data-theme="light"] .ic-moon {
  display: block
}

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

  :root:not([data-theme="dark"]) .ic-moon {
    display: block
  }
}

/*═══ 6 ─ TOP BAR (tablet & phone) ══════════════════════════════════════*/

.topbar {
  display: none;
  position: fixed;
  z-index: 100;
  left: 50%;
  transform: translateX(-50%);
  top: calc(12px + env(safe-area-inset-top, 0px));
  width: calc(100% - 24px);
  max-width: 560px;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  transition: transform .5s cubic-bezier(.2, .85, .25, 1), opacity .35s, background .55s;
}

.topbar.tucked {
  transform: translateX(-50%) translateY(-190%);
  opacity: 0
}

.topbar .brand {
  flex: 1;
  min-width: 0
}

.topbar .brand .glyph {
  width: 36px;
  height: 36px;
  border-radius: 11px
}

.topbar .brand .glyph img {
  width: 21px;
  height: 21px
}

.topbar .brand b {
  font-size: 15px
}

.topbar .brand b+span {
  display: none
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-2);
  transition: border-color .3s, background .3s;
}

.icon-btn:active {
  background: var(--accent-wash)
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.7;
  stroke-linecap: round
}

.burger i {
  display: block;
  width: 16px;
  height: 1.8px;
  background: var(--text);
  border-radius: 2px;
  transition: .35s cubic-bezier(.3, 1.2, .35, 1)
}

.burger i+i {
  margin-top: 4.5px;
  width: 11px;
  margin-left: 5px
}

.menu-open .burger i:first-child {
  transform: translateY(3.2px) rotate(45deg)
}

.menu-open .burger i:last-child {
  width: 16px;
  margin-left: 0;
  transform: translateY(-3.1px) rotate(-45deg)
}

#sheet {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: calc(90px + env(safe-area-inset-top, 0px)) var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px));
  background: var(--scrim);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s;
}

#sheet.show {
  opacity: 1;
  visibility: visible
}

#sheet a.big {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 8.6vw, 42px);
  letter-spacing: -.03em;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .9, .25, 1), color .3s;
}

#sheet.show a.big {
  opacity: 1;
  transform: none
}

#sheet a.big:active {
  color: var(--accent)
}

#sheet a.big u {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700
}

.sheet-social {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 30px
}

.sheet-social a {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-2)
}

/*═══ 7 ─ PAGE SHELL ════════════════════════════════════════════════════*/

.page {
  position: relative;
  z-index: 2;
  margin-left: var(--rail-w)
}

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

section {
  position: relative;
  padding-block: clamp(80px, 11vw, 140px)
}

/*═══ 8 ─ HERO ══════════════════════════════════════════════════════════*/

.hero {
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  overflow: clip;
  padding-top: clamp(96px, 12vh, 130px);
  padding-bottom: 0
}

.poster {
  container-type: inline-size;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, min(38vw, 66vh, 600px)) minmax(0, .5fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(16px, 2.5vw, 40px)
}

.chipline {
  grid-column: 1/-1;
  grid-row: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 15px 7px 11px;
  border-radius: var(--radius-pill);
  margin-bottom: clamp(12px, 2vh, 24px)
}

/* the name is the poster: set to the full width, the portrait stands in front of it */
h1.name {
  grid-column: 1/-1;
  grid-row: 2;
  container-type: inline-size;
  position: relative;
  z-index: 1;
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.035em;
  font-size: 0
}

h1.name .row {
  display: block;
  overflow: hidden;
  font-size: 19cqi;
  padding-bottom: .2em;
  margin-bottom: -.2em
}

h1.name .row i {
  display: block;
  font-style: normal;
  white-space: nowrap;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1)
}

.boot h1.name .row i {
  transform: none
}

h1.name .row:nth-child(2) i {
  transition-delay: .12s
}

.tint {
  background: linear-gradient(104deg, var(--accent) 0%, var(--accent-2) 52%, var(--accent-3) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shift 9s ease-in-out infinite;
}

@keyframes shift {

  0%,
  100% {
    background-position: 0% 50%
  }

  50% {
    background-position: 100% 50%
  }
}

.role {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 20px;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 600;
  color: var(--text-2)
}

.role .slot {
  position: relative;
  height: 1.5em;
  overflow: hidden;
  display: inline-block;
  min-width: 14ch
}

.role .slot b {
  display: block;
  color: var(--accent);
  font-weight: 700;
  animation: roll 12s cubic-bezier(.7, 0, .3, 1) infinite
}

@keyframes roll {

  0%,
  18% {
    transform: translateY(0)
  }

  25%,
  43% {
    transform: translateY(-100%)
  }

  50%,
  68% {
    transform: translateY(-200%)
  }

  75%,
  93% {
    transform: translateY(-300%)
  }

  100% {
    transform: translateY(-400%)
  }
}

.lede {
  margin-top: 18px;
  font-size: clamp(15.5px, 1.8vw, 17.5px);
  color: var(--text-2);
  max-width: 50ch
}

.lede strong {
  color: var(--text);
  font-weight: 700
}

.fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease .5s, transform 1s cubic-bezier(.16, 1, .3, 1) .5s
}

.boot .fade {
  opacity: 1;
  transform: none
}

.fade.f2 {
  transition-delay: .62s
}

.fade.f3 {
  transition-delay: .76s
}

.fade.f4 {
  transition-delay: .9s
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 32px;
  align-items: center
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: box-shadow .35s ease, color .35s ease, border-color .35s ease, background .35s ease
}

.btn .arrow {
  transition: transform .4s cubic-bezier(.2, .8, .2, 1)
}

.btn:hover .arrow {
  transform: translateX(5px)
}

.btn-solid {
  background: var(--accent);
  color: var(--accent-ink)
}

.btn-solid:hover {
  box-shadow: 0 16px 36px -14px var(--photo-glow)
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text)
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent)
}

/* — the portrait: cut-out standing in front of the name — */
.stage {
  grid-column: 2;
  grid-row: 2/4;
  align-self: end;
  position: relative;
  z-index: 2;
  margin-top: 15cqi;
  margin-inline: -10%
}

.stage::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 170%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--photo-glow) 0%, transparent 60%);
  filter: blur(30px);
  opacity: .9;
  z-index: -1;
  pointer-events: none
}

.stage-inner {
  transition: transform .5s cubic-bezier(.2, .8, .2, 1)
}

.portrait {
  opacity: 0;
  transform: translateY(6%)
}

.boot .portrait {
  animation: portraitIn 1.4s cubic-bezier(.16, 1, .3, 1) .3s forwards
}

@keyframes portraitIn {
  to {
    opacity: 1;
    transform: none
  }
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 50% 100% at 50% 64%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 100% at 50% 64%, #000 58%, transparent 100%)
}

.hero-copy {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  margin-top: clamp(28px, 6vh, 70px);
  position: relative;
  z-index: 3;
  padding-bottom: clamp(24px, 6vh, 64px)
}

.hero-copy .role {
  margin-top: 0;
  white-space: nowrap
}

.hero .wrap {
  max-width: 1400px
}

.hero-copy .btn {
  padding: 12px 20px;
  font-size: 14.5px
}

.hero-copy .actions {
  gap: 10px
}

.hero-copy .lede {
  max-width: 40ch
}

.hero-tags {
  grid-column: 3;
  grid-row: 3;
  align-self: start;
  justify-self: end;
  width: min(100%, 250px);
  margin: clamp(28px, 6vh, 70px) 0 0;
  position: relative;
  z-index: 3;
  list-style: none;
  padding: 0;
  display: grid;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 1.3vw, 19px);
  color: var(--text)
}

.hero-tags li {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  padding: 15px 0;
  border-top: 1px solid var(--border)
}

.hero-tags li:last-child {
  border-bottom: 1px solid var(--border);
  color: var(--text-3)
}

.hero-tags li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent)
}

.hero-tags li:nth-child(2)::before {
  background: var(--accent-2)
}

.hero-tags li:nth-child(3)::before {
  background: var(--accent-3)
}

.hero-tags li:nth-child(4)::before {
  background: var(--text-3)
}

.scrollcue {
  position: absolute;
  left: var(--gutter);
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .04em
}

.scrollcue .track {
  width: 1px;
  height: 46px;
  background: var(--border);
  position: relative;
  overflow: hidden
}

.scrollcue .track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: fall 2.4s ease-in-out infinite
}

@keyframes fall {
  0% {
    transform: translateY(-100%)
  }

  60%,
  100% {
    transform: translateY(100%)
  }
}

/* Desktop poster: name + copy on the left, a tall portrait on the right that fits the screen */
@media (min-width:981px) {
  .hero {
    min-height: max(100svh, 660px)
  }

  .poster {
    --pw: min(36vw, calc((100svh - 130px) * .65), 600px);
    grid-template-columns: minmax(0, 1fr) var(--pw);
    grid-template-rows: 1fr auto auto auto auto 1fr;
    column-gap: 0
  }

  .chipline {
    grid-row: 2;
    margin-bottom: 18px
  }

  h1.name {
    grid-row: 3
  }

  h1.name .row {
    font-size: min(19cqi, calc((100cqi - var(--pw) - 10px) / 5.3))
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 4;
    align-self: start;
    margin-top: clamp(22px, 4vh, 40px);
    padding-bottom: 0
  }

  .hero-copy .lede {
    max-width: 46ch
  }

  .hero-tags {
    grid-column: 1;
    grid-row: 5;
    justify-self: start;
    width: min(100%, 500px);
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
    margin-top: clamp(24px, 4.5vh, 44px);
    border-bottom: 1px solid var(--border)
  }

  .hero-tags li:last-child {
    border-bottom: 0;
    color: var(--text)
  }

  .hero-tags li:nth-child(4)::before {
    background: var(--accent)
  }

  .stage {
    grid-column: 2;
    grid-row: 1/-1;
    align-self: end;
    margin: 0 0 0 -22%
  }
}

@media (min-width:981px) {
  .scrollcue {
    left: max(14px, calc(var(--gutter) / 2 - 7px));
    bottom: 30px;
    flex-direction: column-reverse;
    gap: 14px;
    z-index: 4
  }

  .scrollcue .txt {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: .12em
  }
}

@media (min-width:981px) and (max-height:820px) {
  .hero {
    padding-top: 92px
  }

  .hero-copy {
    margin-top: 16px
  }

  .hero-copy .lede {
    margin-top: 12px;
    font-size: 15.5px
  }

  .hero-copy .actions {
    margin-top: 20px
  }

  .hero-tags {
    margin-top: 18px
  }

  .hero-tags li {
    padding: 10px 0
  }
}

/*═══ 9 ─ TICKER ════════════════════════════════════════════════════════*/

.ticker {
  border-block: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  padding: 15px 0;
  position: relative;
  z-index: 2
}

.ticker-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marquee 32s linear infinite
}

.ticker:hover .ticker-track {
  animation-play-state: paused
}

@keyframes marquee {
  to {
    transform: translateX(-50%)
  }
}

.ticker span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 2vw, 22px);
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap
}

.ticker span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  flex: none
}

/*═══ 10 ─ SECTION HEADS & REVEALS ══════════════════════════════════════*/

.head {
  margin-bottom: clamp(32px, 4.6vw, 56px)
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent)
}

.head h2 {
  font-size: clamp(30px, 4.8vw, 52px);
  max-width: 16ch
}

.head p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 15.5px;
  max-width: 52ch
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.16, 1, .3, 1)
}

.reveal.seen {
  opacity: 1;
  transform: none
}

.split .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(80%) rotateX(-55deg);
  transform-origin: bottom;
  transition: opacity .6s ease, transform .75s cubic-bezier(.16, 1, .3, 1)
}

.reveal.seen .split .ch,
.split.seen .ch {
  opacity: 1;
  transform: none
}

/*═══ 11 ─ ABOUT ════════════════════════════════════════════════════════*/

.about {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(26px, 4vw, 54px);
  align-items: start
}

.about .lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 2.5vw, 26px);
  line-height: 1.36;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 18px
}

.about p {
  color: var(--text-2);
  font-size: 16.5px;
  margin-bottom: 14px
}

.stats {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden
}

.stats div {
  background: var(--surface);
  padding: 20px 22px;
  transition: background .35s
}

.stats div:hover {
  background: var(--bg-2)
}

.stats b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums
}

.stats small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-3)
}

/*═══ 12 ─ NOW CARDS ════════════════════════════════════════════════════*/

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 16px
}

.card {
  position: relative;
  padding: 26px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color .45s, box-shadow .45s, transform .18s ease-out;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lift)
}

.card .sheen {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle, var(--accent-wash), transparent 68%);
  transform: translate(-50%, -50%);
  transition: opacity .45s
}

.card:hover .sheen {
  opacity: 1
}

.card .tag {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px
}

.card h3 {
  font-size: 20px;
  margin-bottom: 8px
}

.card p {
  font-size: 14.6px;
  color: var(--text-2);
  margin: 0
}

/*═══ 13 ─ PROJECTS ═════════════════════════════════════════════════════*/

.projects {
  display: grid;
  gap: 20px
}

.project {
  display: grid;
  grid-template-columns: .46fr .54fr;
  gap: clamp(20px, 3.4vw, 46px);
  align-items: center;
  padding: clamp(22px, 3vw, 38px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color .45s, box-shadow .45s, transform .2s ease-out;
}

.project:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lift)
}

.project .sheen {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle, var(--accent-wash), transparent 66%);
  transform: translate(-50%, -50%);
  transition: opacity .45s
}

.project:hover .sheen {
  opacity: 1
}

.project .meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-3)
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-2)
}

.pill.live {
  color: var(--accent);
  border-color: var(--accent)
}

.project h3 {
  font-size: clamp(24px, 3.2vw, 34px);
  margin-bottom: 11px
}

.project p {
  font-size: 15.2px;
  color: var(--text-2)
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 20px
}

.stack i {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 9px;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border-soft)
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  position: relative
}

.open-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1)
}

.project:hover .open-link::after {
  transform: scaleX(1);
  transform-origin: left
}

.window {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
  aspect-ratio: 16/10;
  position: relative;
  transform: translateZ(38px);
  transform-style: preserve-3d;
}

.window .chrome {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border-bottom: 1px solid var(--border);
  background: var(--surface)
}

.window .chrome u {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  text-decoration: none
}

.window .chrome .addr {
  margin-left: 8px;
  font-size: 10.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.window .view {
  position: absolute;
  inset: 32px 0 0;
  display: grid;
  place-items: center;
  overflow: hidden
}

.window .aurora {
  position: absolute;
  inset: 0;
  opacity: .6;
  background: radial-gradient(60% 70% at 20% 22%, var(--accent-wash), transparent 62%),
    radial-gradient(52% 62% at 84% 78%, var(--orb-2), transparent 64%);
  animation: aurora 15s ease-in-out infinite alternate
}

@keyframes aurora {
  to {
    transform: translate3d(-16px, 12px, 0) scale(1.1)
  }
}

.window .lines {
  position: absolute;
  inset: 0;
  opacity: .4;
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px), linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent)
}

.window .label {
  position: relative;
  text-align: center;
  padding: 0 16px;
  transform: translateZ(30px)
}

.window .label b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 4.2vw, 44px);
  letter-spacing: -.03em;
  color: var(--text)
}

.window .label small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-3)
}

/* project previews use the real cover images */
.window.shot {
  display: block;
  aspect-ratio: 1200/630;
  background: #060b16
}

.window.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.16, 1, .3, 1)
}

.project:hover .window.shot img {
  transform: scale(1.04)
}

/*═══ 14 ─ SKILLS ═══════════════════════════════════════════════════════*/

.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden
}

.skill {
  background: var(--surface);
  padding: 32px 34px 26px;
  transition: background .4s
}

.skill:hover {
  background: var(--bg-2)
}

.skill h4 {
  font-size: 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px
}

.skill h4 em {
  font-style: normal;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
  flex: none
}

.skill:nth-child(2) h4 em {
  background: var(--accent-2)
}

.skill:nth-child(3) h4 em {
  background: var(--accent-3)
}

.skill:nth-child(4) h4 em {
  background: var(--text-3)
}

.skill li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14.4px;
  color: var(--text-2);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft)
}

.skill li:last-child {
  border-bottom: 0
}

.skill li s {
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-2)
}

/*═══ 15 ─ TIMELINE ═════════════════════════════════════════════════════*/

.timeline {
  position: relative;
  padding-left: 34px
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border)
}

#tl-fill {
  position: absolute;
  left: 0;
  top: 6px;
  width: 1px;
  height: 0;
  background: linear-gradient(var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 12px var(--accent)
}

.entry {
  position: relative;
  padding-bottom: 40px
}

.entry:last-child {
  padding-bottom: 0
}

.entry::before {
  content: "";
  position: absolute;
  left: -38.5px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.6px solid var(--border);
  transition: .45s
}

.entry.seen::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-wash)
}

.entry .when {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px
}

.entry h3 {
  font-size: clamp(19px, 2.4vw, 24px);
  margin-bottom: 4px
}

.entry .where {
  font-size: 14.8px;
  color: var(--text-2);
  margin-bottom: 7px
}

.entry p {
  font-size: 14.4px;
  color: var(--text-3);
  margin: 0
}

/*═══ 16 ─ CONTACT & FOOTER ═════════════════════════════════════════════*/

.contact {
  text-align: center;
  padding-bottom: clamp(60px, 8vw, 100px)
}

.contact h2 {
  font-size: clamp(34px, 6.4vw, 76px);
  line-height: 1.08;
  letter-spacing: 0em;
  max-width: none
}

.contact .head {
  margin-bottom: 0
}

.contact p {
  margin: 20px auto 0;
  color: var(--text-2);
  font-size: 16.5px
}

.mailto {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  max-width: 100%;
  padding: 12px 12px 12px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: clamp(14px, 2.2vw, 19px);
  font-weight: 700;
  transition: border-color .4s, box-shadow .4s;
}

.mailto:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lift)
}

.mailto span:first-child {
  overflow: hidden;
  text-overflow: ellipsis
}

.mailto .go {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform .45s cubic-bezier(.3, 1.2, .35, 1)
}

.mailto:hover .go {
  transform: rotate(45deg)
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 30px
}

.links a {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  transition: .35s cubic-bezier(.2, .8, .2, 1)
}

.links a:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px)
}

footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 32px;
  font-size: 13px;
  color: var(--text-3);
  position: relative;
  z-index: 2
}

.footrow {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center
}

.footrow a:hover {
  color: var(--accent)
}

/*═══ 17 ─ RESPONSIVE ═══════════════════════════════════════════════════*/

/* Tablet & phone: side rail becomes a floating top bar */
@media (max-width:1099px) {
  .rail {
    display: none
  }

  .topbar {
    display: flex
  }

  #sheet {
    display: flex
  }

  .page {
    margin-left: 0
  }

  html {
    scroll-padding-top: calc(86px + env(safe-area-inset-top, 0px))
  }

  .hero {
    padding-top: calc(104px + env(safe-area-inset-top, 0px))
  }
}

/* Narrow desktop: trim the rail so content keeps breathing room */
@media (min-width:1100px) and (max-width:1320px) {
  :root {
    --rail-w: 200px
  }

  .rail {
    padding: 28px 16px
  }

}

/* Tablet layout */
@media (max-width:980px) {
  .poster {
    grid-template-columns: 1fr;
    grid-template-rows: auto
  }

  .poster>* {
    grid-column: 1;
    grid-row: auto
  }

  .stage {
    width: min(84%, 520px);
    margin-inline: 0;
    justify-self: center;
    margin-top: -7cqi;
    margin-bottom: -2px;
    z-index: 2
  }

  .portrait img {
    -webkit-mask-image: radial-gradient(ellipse 52% 80% at 50% 42%, #000 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 52% 80% at 50% 42%, #000 60%, transparent 100%)
  }

  .hero-copy {
    padding-top: 6px;
    padding-bottom: 20px
  }

  .hero-tags {
    justify-self: stretch;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    column-gap: 22px;
    margin-top: 28px;
    padding-bottom: 52px
  }

  .hero-tags li:last-child {
    border-bottom: 0;
    color: var(--text)
  }

  .hero-tags li:nth-last-child(2) {
    border-bottom: 0
  }

  .hero-tags li:nth-child(4)::before {
    background: var(--accent)
  }

  .about {
    grid-template-columns: 1fr;
    gap: 30px
  }

  .stats {
    grid-template-columns: repeat(3, 1fr)
  }

  .project {
    grid-template-columns: 1fr
  }

  .window {
    order: -1;
    transform: none
  }

  .scrollcue {
    display: none
  }
}

/* Phone */
@media (max-width:640px) {
  body {
    font-size: 16px
  }

  section {
    padding-block: clamp(62px, 13vw, 90px)
  }

  .stage {
    width: 106%;
    margin-inline: -3%
  }

  .stats {
    grid-template-columns: 1fr
  }

  .stats div {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 15px 18px
  }

  .stats small {
    margin-top: 0
  }

  .skills {
    grid-template-columns: 1fr
  }

  .timeline {
    padding-left: 26px
  }

  .entry::before {
    left: -30.5px
  }

  .mailto {
    padding-left: 18px;
    gap: 10px;
    font-size: 14px
  }

  .links a {
    flex: 1 1 42%;
    text-align: center
  }

  .card,
  .project {
    padding: 22px 20px
  }
}

@media (max-width:380px) {
  .topbar .brand b {
    font-size: 14px
  }

  .btn {
    padding: 13px 20px;
    font-size: 14px
  }

  .actions {
    gap: 9px
  }
}

/* Touch devices never get the custom cursor */
@media (hover:none),
(pointer:coarse) {

  #cur-dot,
  #cur-ring {
    display: none
  }
}

/* Motion-sensitive visitors get a calm, static page */
@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important
  }

  .portrait {
    opacity: 1 !important
  }

  #field {
    display: none
  }
}

/* Theme-switch circular wipe */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal
}

::view-transition-old(root) {
  z-index: 0
}

::view-transition-new(root) {
  z-index: 1
}

/*═══ 18 ─ MULTI-PAGE ADDITIONS (Projects + Blog icons, listing pages) ═══*/

/* page icons in the desktop rail */
.rail-pages {
  display: flex;
  gap: 8px
}

.rail-pages a {
  position: relative;
  flex: 1;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  transition: .35s cubic-bezier(.2, .8, .2, 1);
}

.rail-pages svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round
}

.rail-pages a:hover,
.rail-pages a:focus-visible,
.rail-pages a.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-wash)
}

.rail-pages a:hover {
  transform: translateY(-3px)
}

.rail-pages a::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
}

.rail-pages a:hover::after,
.rail-pages a:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0)
}

/* page icons in the phone / tablet top bar */
a.icon-btn.active {
  border-color: var(--accent);
  background: var(--accent-wash)
}

a.icon-btn.active svg {
  stroke: var(--accent)
}

.topbar {
  gap: 8px
}

@media (max-width:420px) {
  .topbar .brand>span:last-child {
    display: none
  }
}

/* page chips in the full-screen menu */
.sheet-pages {
  display: flex;
  gap: 10px;
  margin-top: 26px
}

.sheet-pages a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-weight: 700;
  font-size: 15px
}

.sheet-pages a.active {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent)
}

.sheet-pages svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round
}

/* "view all" button under the homepage work section */
.more {
  margin-top: 28px;
  display: flex;
  justify-content: center
}

/* shared by the Projects and Blog pages */
.listing {
  padding-top: clamp(56px, 9vh, 96px);
  padding-bottom: clamp(56px, 9vh, 100px)
}

.head h1 {
  font-size: clamp(34px, 5.6vw, 60px);
  max-width: 18ch
}

.tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  margin-bottom: 18px
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.chip {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: .3s
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink)
}

.search {
  position: relative;
  flex: 0 1 290px;
  min-width: 210px
}

.search svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none
}

.search input {
  width: 100%;
  padding: 11px 16px 11px 41px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color .3s, box-shadow .3s
}

.search input::placeholder {
  color: var(--text-3)
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash)
}

.result-count {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 20px
}

.empty {
  text-align: center;
  padding: 56px 22px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-2)
}

.empty b {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 6px
}

.rise {
  animation: rise .6s cubic-bezier(.16, 1, .3, 1) both
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@media (prefers-reduced-motion:reduce) {
  .rise {
    animation: none
  }
}

@media (max-width:1099px) {
  .listing {
    padding-top: calc(96px + env(safe-area-inset-top, 0px))
  }
}

@media (max-width:640px) {
  .search {
    flex-basis: 100%
  }
}