/* ============================================================
   BASE RESET & TOKENS
   ============================================================ */
/* Prevent horizontal scroll on all viewports */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Skip-to-content link — hidden off-screen until keyboard focus */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--yellow, #d4f534);
  color: var(--black, #060606);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

:root {
  --black: #060606;
  --white: #ffffff;
  --yellow: #d4f534;
  --green: #2fbf5f;
  --grey: #d3d3d3;
  --light-grey: #9a9a9a;
  --border: #e0e0e0;

  --font-geist: 'Geist', sans-serif;
  --font-instrument: 'Instrument Sans', sans-serif;
  --font-roboto: 'Roboto', sans-serif;

  --radius-card: 8px;
  --radius-bubble: 50px;

  --swap-ease: linear(0, 0.0163, 0.0593, 0.1209, 0.1947, 0.2753, 0.3586, 0.4412,
      0.5208, 0.5957, 0.6646, 0.7269, 0.7823, 0.8308, 0.8726, 0.908,
      0.9375, 0.9617, 0.981, 0.9962, 1.0077, 1.0162, 1.022, 1.0257,
      1.0277, 1.0284, 1.028, 1.0268, 1.0251, 1.023, 1.0207, 1.0184,
      1.016, 1.0137, 1.0116, 1.0096, 1.0079, 1.0063, 1.0049, 1.0037,
      1.0027);

  /* clamp hits 20px @ ≤480px, 40px @ 960px, 80px @ ≥1920px */
  --side-pad: clamp(20px, 4.16vw, 80px);

  /* Theme tokens — light by default. Flipped globally by `body.theme-dark`,
     which the Experience section's scroll trigger toggles (see script.js). */
  --surface: var(--white);
  --on-surface: var(--black);
  --surface-muted: var(--light-grey);
  --surface-border: rgba(0, 0, 0, 0.15);
  --surface-border-soft: rgba(0, 0, 0, 0.05);
  --track-bg: rgba(0, 0, 0, 0.08);

  /* Floating nav bar tokens — the nav keeps its own translucent "chip"
     look, but that chip follows the same global light/dark theme once
     it's in its scrolled state (see .nav-header.scrolled below). */
  --nav-bg-scrolled: rgba(255, 255, 255, 0.92);
  --nav-fg: var(--black);
  --nav-fg-muted-90: rgba(6, 6, 6, 0.9);
  --nav-fg-muted-65: rgba(6, 6, 6, 0.65);
  --nav-fg-muted-30: rgba(6, 6, 6, 0.3);
}

body.theme-dark {
  --surface: var(--black);
  --on-surface: var(--white);
  --surface-muted: #a8a8a8;
  --surface-border: rgba(255, 255, 255, 0.18);
  --surface-border-soft: rgba(255, 255, 255, 0.08);
  --track-bg: rgba(255, 255, 255, 0.1);

  --nav-bg-scrolled: rgba(6, 6, 6, 0.92);
  --nav-fg: var(--white);
  --nav-fg-muted-90: rgba(255, 255, 255, 0.9);
  --nav-fg-muted-65: rgba(255, 255, 255, 0.65);
  --nav-fg-muted-30: rgba(255, 255, 255, 0.3);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-geist);
  background: #ffffff;
  color: var(--black);
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.section-inner {
  width: 100%;
  padding: 0 var(--side-pad);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

/* ── Default nav — sits at top of page, scrolls away ── */
.nav-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0 var(--side-pad);
  background: transparent;
}

.nav-inner {
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   PREMIUM MENU — floating trigger + expanding full panel
   ============================================================ */

/* ── Backdrop — sits between page and panel, captures outside clicks ── */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  /* above page, below panel (9999) and button (10000) */
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Floating trigger button ── */
.menu-btn {
  position: fixed;
  top: 24px;
  right: var(--side-pad);
  z-index: 10000;
  width: 60px;
  height: 60px;
  border-radius: 21px;
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;

  /* Hidden until user scrolls */
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.35s ease,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease;
}

.menu-btn.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.menu-btn:hover {
  transform: scale(1.1) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Hamburger bars — GSAP animates these into an X */
.hb__bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--nav-fg);
  border-radius: 2px;
  transform-origin: center center;
  will-change: transform, opacity;
  transition: background 0.3s ease;
}

/* ── Full panel ── */
.menu-panel {
  position: fixed;
  top: 20px;
  right: var(--side-pad);
  width: min(96vw, 1140px);
  height: calc(100dvh - 40px);
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--surface-border-soft);
  border-radius: 28px;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  /* Initial state — scaled to nothing at the trigger's corner */
  transform-origin: top right;
  transform: scale(0.04);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.menu-panel.is-open {
  pointer-events: auto;
}

.menu-btn.is-open {
  border-color: transparent;
  background: transparent;
}

/* Panel body — two-column layout */
.menu-panel__body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: clamp(32px, 5vw, 72px) clamp(28px, 5vw, 64px) clamp(24px, 3vw, 48px);
  min-height: 0;
}

.menu-col {
  display: flex;
  flex-direction: column;
}

.menu-col--nav {
  justify-content: flex-start;
  padding-right: clamp(24px, 4vw, 64px);
  border-right: 1px solid var(--surface-border-soft);
}

.menu-col--aside {
  padding-left: clamp(24px, 4vw, 64px);
  justify-content: space-between;
}

/* Eyebrow label */
.menu-eyebrow {
  font-family: var(--font-geist);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nav-fg-muted-65);
  margin-bottom: clamp(24px, 3vw, 40px);
}

/* ── Nav links ── */
.menu-nav {
  display: flex;
  flex-direction: column;
}

.menu-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: clamp(18px, 2.5vw, 28px) 0;
  border-bottom: 1px solid var(--surface-border-soft);
  text-decoration: none;
  color: var(--nav-fg);
  overflow: hidden;
  transition: color 0.25s ease;
}

.menu-link:first-child {
  border-top: 1px solid var(--surface-border-soft);
}

.menu-link:hover {
  color: var(--yellow);
}

.menu-link:hover .swap-track {
  transform: translateY(-1em);
}

.menu-link:hover .swap-line--primary {
  transform: skewY(14deg);
}

.menu-link:hover .swap-line--secondary {
  transform: skewY(0deg);
}

.menu-link__num {
  font-family: var(--font-geist);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 400;
  color: var(--nav-fg-muted-65);
  min-width: 24px;
  transition: color 0.25s ease;
}

.menu-link:hover .menu-link__num {
  color: var(--yellow);
}

.menu-link__label {
  font-family: var(--font-instrument);
  font-size: clamp(36px, 5vw, 80px);
  font-weight: 600;
  line-height: 1;
  flex: 1;
  letter-spacing: -0.02em;
}

.menu-link__arrow {
  font-size: clamp(20px, 2.5vw, 36px);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.menu-link:hover .menu-link__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Featured card ── */
.menu-card {
  position: relative;
  background: var(--track-bg);
  border: 1px solid var(--surface-border-soft);
  border-radius: 20px;
  padding: clamp(20px, 2.5vw, 32px);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
}

.menu-card__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-geist);
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-fg-muted-90);
}

.menu-card__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  flex-shrink: 0;
}

.menu-card__headline {
  font-family: var(--font-instrument);
  font-size: clamp(22px, 2.8vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--nav-fg);
  position: relative;
  z-index: 1;
}

/* Decorative dot grid */
.menu-card__grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 20px;
  pointer-events: none;
  z-index: 0;
}

.menu-card__grid-inner {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 160px;
  height: 160px;
  background-image: radial-gradient(circle, var(--nav-fg-muted-30) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: radial-gradient(ellipse 100% 100% at 100% 100%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 100% 100%, black 20%, transparent 80%);
}

/* Meta / location */
.menu-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--font-geist);
  font-size: 13px;
  font-weight: 400;
  color: var(--nav-fg-muted-65);
}

.menu-meta__sep {
  color: var(--nav-fg-muted-30);
}

/* ── Panel footer ── */
.menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2vw, 24px) clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--surface-border-soft);
  gap: 24px;
}

.menu-footer__sig {
  font-family: var(--font-geist);
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-fg-muted-65);
  white-space: nowrap;
}

.menu-footer__links {
  display: flex;
  gap: 28px;
}

.menu-footer__link {
  font-family: var(--font-geist);
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-fg-muted-65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.menu-footer__link:hover {
  color: var(--nav-fg);
}

.menu-footer__link:hover .swap-track {
  transform: translateY(-1em);
}

.menu-footer__link:hover .swap-line--primary {
  transform: skewY(14deg);
}

.menu-footer__link:hover .swap-line--secondary {
  transform: skewY(0deg);
}

/* ── Swap-text animation (menu nav + footer links) ── */
.swap-mask {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  vertical-align: top;
}

.swap-track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.6s var(--swap-ease);
}

.swap-row {
  height: 1em;
  overflow: hidden;
}

.swap-line {
  display: inline-block;
  height: 1em;
  line-height: 1;
  transform-origin: left center;
  transition: transform 0.6s var(--swap-ease);
}

.swap-line--primary {
  transform: skewY(0deg);
}

.swap-line--secondary {
  transform: skewY(14deg);
}

/* ── Responsive: single column on mobile ── */
@media (max-width: 700px) {
  .menu-panel {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    border-radius: 20px;
  }

  .menu-panel__body {
    grid-template-columns: 1fr;
    padding: 32px 24px 20px;
    gap: 32px;
  }

  .menu-col--nav {
    border-right: none;
    border-bottom: 1px solid var(--surface-border-soft);
    padding-right: 0;
    padding-bottom: 32px;
  }

  .menu-col--aside {
    padding-left: 0;
  }

  .menu-card {
    max-height: none;
  }

  .menu-footer {
    flex-wrap: wrap;
    padding: 16px 24px;
    gap: 12px;
  }

  .menu-btn {
    top: 16px;
    right: 16px;
  }
}

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {

  .menu-btn,
  .menu-panel,
  .hb__bar {
    transition: none !important;
  }
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo-mark {
  display: inline-grid;
  grid-template-columns: max-content;
  grid-template-rows: max-content;
  place-items: start;
  position: relative;
}

.nav-logo-initials {
  grid-area: 1 / 1;
  font-family: var(--font-instrument);
  font-weight: 700;
  font-size: 22px;
  color: var(--white);
  letter-spacing: 0;
  transition: color 0.6s ease;
}

.nav-logo-dot {
  grid-area: 1 / 1;
  align-self: start;
  justify-self: end;
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yellow);
  margin-top: 4px;
}

.nav-role {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: 16px;
  color: var(--white);
  white-space: nowrap;
  transition: color 0.6s ease;
}

.visitor-swap {
  height: 24px;
  --dtx-line-height: 24px;
  --dtx-duration: 1.6s;
  --dtx-ease: linear(0, 0.0163, 0.0593, 0.1209, 0.1947, 0.2753, 0.3586, 0.4412,
      0.5208, 0.5957, 0.6646, 0.7269, 0.7823, 0.8308, 0.8726, 0.908,
      0.9375, 0.9617, 0.981, 0.9962, 1.0077, 1.0162, 1.022, 1.0257,
      1.0277, 1.0284, 1.028, 1.0268, 1.0251, 1.023, 1.0207, 1.0184,
      1.016, 1.0137, 1.0116, 1.0096, 1.0079, 1.0063, 1.0049, 1.0037,
      1.0027);
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: 16px;
  color: var(--white);
  display: inline-flex;
  align-items: flex-start;
  overflow: hidden;
  vertical-align: middle;
}

.visitor-swap::before {
  content: "·";
  margin-right: 12px;
  opacity: 0.5;
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  flex-shrink: 0;
  height: 24px;
  line-height: 24px;
}

.visitor-swap__track {
  display: flex;
  flex-direction: column;
  transition: transform var(--dtx-duration) var(--dtx-ease);
  flex-grow: 1;
  flex-shrink: 0;
  will-change: transform;
}

.visitor-swap__track.visitor-no-transition,
.visitor-swap__track.visitor-no-transition .visitor-swap__line {
  transition: none;
}

.visitor-swap__row {
  height: 24px;
  overflow: hidden;
  flex-shrink: 0;
}

.visitor-swap__row:empty,
.visitor-swap__row:has(p:empty) {
  display: none !important;
}

.visitor-swap__line {
  display: inline-block;
  height: 24px;
  line-height: 24px;
  white-space: nowrap;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: inherit;
  transform-origin: left center;
  transform: skewY(14deg);
  transition: transform var(--dtx-duration) var(--dtx-ease);
  flex-shrink: 0;
}

.visitor-swap__line.dtx-active {
  transform: skewY(0deg);
}

@media (prefers-reduced-motion: reduce) {
  .visitor-swap__track,
  .visitor-swap__line {
    transition: none;
  }
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-links a {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  color: var(--white);
  transition: opacity 0.2s, color 0.6s ease;
  overflow: hidden;
}

.nav-links a:hover .swap-track {
  transform: translateY(-1em);
}

.nav-links a:hover .swap-line--primary {
  transform: skewY(14deg);
}

.nav-links a:hover .swap-line--secondary {
  transform: skewY(0deg);
}

.nav-circle {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d9d9d9;
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* padding: 120px var(--side-pad) 120px; */
  overflow: hidden;
  z-index: 1;
}

/* Elements inside the hero that animate on scroll (scale/fade/blur).
   The hero container itself stays put — GSAP pins it in place. */
.hero-content,
.hero-bottom {
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}


.hero-content {
  /* max-width: 1000px; */
  position: relative;
  z-index: 1;
}

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  width: 100%;
  padding: 0 var(--side-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.hero-name {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-geist);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 110px);
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-name-white {
  color: var(--white);
}

.hero-name-yellow {
  color: var(--yellow);
}

.hero-tagline {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: clamp(36px, 6vw, 86px);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 32px;
}

.hero-sub {
  font-family: var(--font-geist);
  font-weight: 300;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--white);
  max-width: 700px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

/* Scroll indicator */
/* .hero-scroll {
  position: absolute;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-scroll-line {
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, var(--yellow) 37.5%, rgba(255,255,255,0.12) 100%);
  border-radius: 1px;
} */
/* .hero-scroll-label {
  display: block;
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: 14px;
  color: #a6a6a6;
} */



/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-scroll-line {
  position: relative;
  width: 2px;
  height: 32px;
  /* background: rgba(255, 255, 255, 0.12); */
  border-radius: 1px;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, var(--yellow) 37.5%, rgba(255, 255, 255, 0) 100%);
  animation: hero-scroll-flow 1.8s ease-in-out infinite;
}

@keyframes hero-scroll-flow {
  0% {
    transform: translateY(0%);
  }

  100% {
    transform: translateY(200%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line::after {
    animation: none;
    top: 0;
  }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background: var(--surface);
  border-radius: 80px 80px 0 0;
  padding: clamp(64px, 8vw, 128px) 0;
  position: relative;
  z-index: 2;
  transition: background-color 0.8s ease;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  opacity: 1;
  /* margin-top: -40px; */
}

.section-heading {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  color: var(--on-surface);
  letter-spacing: -0.01em;
  margin-bottom: 48px;
  transition: color 0.8s ease;
}

.section-heading--center {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 72px;
}


.about-body {
  /* max-width: 900px; */
}

.about-intro {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 32px);
  color: var(--on-surface);
  line-height: 1.65;
  margin-bottom: 32px;
  transition: color 0.8s ease;
}

.about-details {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: clamp(16px, 1.8vw, 28px);
  color: var(--on-surface);
  line-height: 1.7;
  transition: color 0.8s ease;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.experience {
  background: var(--surface);
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 10vw, 160px) 0 0;
  transition: background-color 0.8s ease;
}

/* ── Experience heading word-reveal ── */
.exp-word {
  display: inline;
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  .exp-word {
    opacity: 1 !important;
    color: inherit !important;
  }
}

/* Global theme-switch transitions are purely cosmetic — skip them for
   users who prefer reduced motion; the class flip still applies instantly. */
@media (prefers-reduced-motion: reduce) {

  body,
  .experience,
  .about,
  .skills,
  .timeline-track,
  .timeline-dot--outline,
  .timeline-dot--fill,
  .timeline-company,
  .timeline-role,
  .timeline-desc,
  .timeline-date,
  .section-heading,
  .about-intro,
  .about-details,
  .skill-bubble,
  .bubble-handle,
  .stat-number,
  .stat-label,
  .stat-desc {
    transition: none !important;
  }
}

/* Parallax background blob */
.exp-parallax-bg {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 245, 52, 0.07) 0%, transparent 60%);
  top: -20%;
  right: -18%;
  pointer-events: none;
  z-index: 0;
}

/* section-inner sits above parallax blob */
.experience .section-inner {
  position: relative;
  z-index: 1;
}

/* Each entry gets ~90vh of natural scroll space for storytelling */
.experience .timeline-entry {
  min-height: auto;
  margin-bottom: 80vh;
  align-items: center;
}

.experience .timeline-entry:last-child {
  margin-bottom: 0;
}

.section-spacer {
  height: 30vh;
  background: var(--surface);
  transition: background-color 0.8s ease;
}

/* Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

/* Animated timeline track */
.timeline-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: var(--track-bg);
  pointer-events: none;
  z-index: 1;
  transition: background-color 0.8s ease;
}

.timeline-track__fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  /* animated to 100% by GSAP */
  background: var(--yellow);
}

/* Arrow at the leading edge of the fill */
.arrow {
  border: solid #d4f534;
  border-width: 0 3px 3px 0;
  display: inline-block;
  padding: 5px;
}

.down {
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
}

/* Position the arrow below the fill's bottom edge */
.timeline-track__fill .arrow.down {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  -webkit-transform: translateX(-50%) rotate(45deg);
  filter: drop-shadow(0 0 6px rgba(212, 245, 52, 0.75));
}

.timeline-entry {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.timeline-entry--right {
  justify-content: flex-end;
  padding-right: calc(50% + 48px);
}

.timeline-entry--left {
  justify-content: flex-start;
  padding-left: calc(50% + 48px);
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  z-index: 2;
  transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.35s ease;
}

.timeline-dot--outline {
  background: var(--surface);
  border: 4px solid var(--yellow);
  transition: background-color 0.8s ease;
}

.timeline-dot--fill {
  background: var(--surface);
  border: 2.5px solid var(--yellow);
  transition: background-color 0.8s ease;
}

.timeline-dot--active {
  background: var(--yellow) !important;
  transform: translate(-50%, -50%) scale(1.35);
}

.timeline-content {
  max-width: 640px;
  text-align: right;
  position: relative;
  border-radius: 20px;
  padding: 24px;
  margin: -24px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-entry--left .timeline-content {
  text-align: left;
}

.timeline-entry:hover .timeline-content {
  transform: translateY(-8px);
}

@media (prefers-reduced-motion: reduce) {
  .timeline-content {
    transition: none;
  }
}

.timeline-company {
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 44px);
  color: var(--on-surface);
  letter-spacing: -0.01em;
  line-height: 1.6;
  transition: color 0.8s ease;
}

.timeline-role {
  font-family: var(--font-geist);
  font-weight: 300;
  font-size: clamp(22px, 2.5vw, 36px);
  color: var(--on-surface);
  letter-spacing: -0.01em;
  line-height: 1.6;
  margin-bottom: 16px;
  transition: color 0.8s ease;
}

.timeline-desc {
  font-family: var(--font-geist);
  font-weight: 300;
  font-size: clamp(14px, 1.5vw, 20px);
  color: var(--on-surface);
  line-height: 1.65;
  margin-bottom: 12px;
  transition: color 0.8s ease;
}

.timeline-date {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: 16px;
  color: var(--on-surface);
  line-height: 2.2;
  transition: color 0.8s ease;
}

/* Responsive timeline — stack on small screens */
@media (max-width: 700px) {
  .experience {
    padding: clamp(64px, 8vw, 120px) 0;
  }

  .experience .timeline-entry {
    min-height: auto;
    align-items: flex-start;
  }

  .timeline-track {
    display: none;
  }

  .timeline-entry--right,
  .timeline-entry--left {
    padding: 0;
    justify-content: flex-start;
  }

  .timeline-dot {
    display: none;
  }

  .timeline-content {
    text-align: left;
    max-width: 100%;
    padding: 16px;
    margin: -16px;
  }

  .exp-parallax-bg {
    display: none;
  }
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
  background: var(--surface);
  /* border-top: 1px solid var(--surface-border-soft); */
  transition: background-color 0.8s ease, border-color 0.8s ease;
}

.skills .section-inner {
  width: 100%;
}

/* 3-column layout: left bubbles | stats | right bubbles */
.skills-layout {
  display: grid;
  grid-template-columns: 1fr 300px 1fr;
  align-items: center;
  gap: 32px;
  position: relative;
  /* anchor for SVG overlay */
}

/* Each bubble column stacks vertically with gaps, centred in its track so it
   sits close to the stats column instead of hugging the outer page edge */
.skills-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 70px;
  position: relative;
}

/* Left: bubbles jitter around the column's centre using --bx */
.skills-col--left .skill-bubble {
  margin-right: var(--bx, 0px);
}

/* Right: bubbles jitter around the column's centre using --bx */
.skills-col--right .skill-bubble {
  margin-left: var(--bx, 0px);
}

/* Bubble pill */
.skill-bubble {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 18px 35px;
  background: var(--surface);
  border: 1.5px solid var(--surface-border);
  border-radius: 999px;
  font-family: var(--font-roboto);
  font-weight: 400;
  font-size: 18px;
  color: var(--on-surface);
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.8s, background-color 0.8s, color 0.8s;
}

.skill-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Figma-style connection handles — left & right only, appear on bubble hover */
.bubble-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d4f534;
  border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 1.5px #d4f534;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s, border-color 0.8s;
  cursor: crosshair;
  pointer-events: none;
  z-index: 20;
}

.bubble-handle--right {
  right: -8px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
}

.bubble-handle--left {
  left: -8px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
}

.skill-bubble:hover .bubble-handle,
.skill-bubble.proto-targeted .bubble-handle {
  opacity: 1;
  pointer-events: auto;
}

.skill-bubble:hover .bubble-handle--right,
.skill-bubble.proto-targeted .bubble-handle--right {
  transform: translateY(-50%) scale(1);
}

.skill-bubble:hover .bubble-handle--left,
.skill-bubble.proto-targeted .bubble-handle--left {
  transform: translateY(-50%) scale(1);
}

.bubble-handle--right:hover,
.bubble-handle--left:hover {
  transform: translateY(-50%) scale(1.25);
  box-shadow: 0 0 0 3px rgba(212, 245, 52, 0.25);
}

/* Drop-target highlight */
.skill-bubble.proto-targeted {
  border-color: #D4F534;
  box-shadow: 0 0 0 3px rgba(212, 245, 52, 0.18);
}

/* SVG overlay for connections */
.skills-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 10;
}

/* Draggable endpoint dots on a selected connection — grab & redirect to fix a wrong link */
.skills-endpoint-handle {
  cursor: grab;
}

.skills-endpoint-handle:active {
  cursor: grabbing;
}

/* Stats centre */
.skills-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.skills-stats-row {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-number {
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: clamp(52px, 5.5vw, 80px);
  color: var(--on-surface);
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.8s ease;
}

.stat-label {
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: clamp(52px, 5.5vw, 80px);
  color: var(--on-surface);
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.8s ease;
}

.stat-number sup,
.stat-pct {
  font-size: 0.38em;
  vertical-align: super;
}

.stat-pct {
  font-size: 0.26em;
}

.stat-number--med {
  font-size: clamp(36px, 3.8vw, 56px);
}

.stat-desc {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: clamp(12px, 1.1vw, 15px);
  color: var(--surface-muted);
  letter-spacing: 0;
  transition: color 0.8s ease;
}

/* Responsive: two-row layout on small screens */
@media (max-width: 960px) {
  .skills-layout {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  /* Stats row first */
  .skills-stats {
    grid-column: 1 / -1;
    order: -1;
  }

  /* Both bubble columns side by side in the second row */
  .skills-col {
    gap: 28px;
  }

  .skills-col--left .skill-bubble,
  .skills-col--right .skill-bubble {
    margin-left: 0;
    margin-right: 0;
  }

  .skills-col--right {
    align-items: flex-start;
  }
}

/* Transparent scroll-hold between Skills and Projects — see
   .skills-pin-hold usage in script.js's Skills → Projects pin. */
.skills-pin-hold {
  height: 30vh;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
  /* Permanently dark by design (not theme-bound) — same as Hero and
     Footer. Explicitly reverted from a theme-bound light treatment
     per user decision. */
  background: var(--black);
  border-radius: 80px 80px 0 0;
  padding: clamp(64px, 8vw, 120px) 0;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.projects-header {
  text-align: center;
  margin-bottom: 64px;
}

.projects-heading {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.projects-sub {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 20px);
  color: var(--light-grey);
  letter-spacing: -0.01em;
}

/* ── Editorial gallery carousel ──────────────────────────────────
   Three large cards horizontal, center focal, side cards rotated
   and partial edge cards hinting at more projects. Position/rotation/
   scale/opacity are all set inline by gallery.js per active index;
   this stylesheet only owns sizing, static look, and transitions. */
.gallery {
  position: relative;
  margin: 0 auto;
  max-width: 1400px;
  opacity: 0;
  transform: translateY(40px);
  filter: blur(8px);
  transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
  --card-w: clamp(380px, 62vw, 920px);
  /* active × 1.12 ≈ 70vw */
  --gap-step: 560px;
  --rotate-step: 6deg;
  --scale-side: 0.52;
  --scale-edge: 0.52;
}

.gallery.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

.gallery-viewport {
  overflow: hidden;
  padding: 44px 0 12px;
  touch-action: pan-y;
}

.gallery-track {
  position: relative;
  height: calc(var(--card-w) * 0.58);
}

.gallery-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-w);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--grey);
  cursor: pointer;
  user-select: none;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.gallery-card--active {
  cursor: default;
}

/* ── Per-card image slider ─────────────────────────────────────── */
.card-slider {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.card-slider-strip {
  display: flex;
  height: 100%;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.card-slide {
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  height: 100%;
}

.card-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Inner arrow buttons — shown only on the active card */
.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, background 0.22s ease,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-arrow--prev {
  left: 12px;
}

.card-arrow--next {
  right: 12px;
}

/* Reveal + enable only when this card is the active gallery card */
.gallery-card--active .card-arrow {
  opacity: 1;
  pointer-events: auto;
}

.gallery-card--active .card-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.1);
}

.gallery-card--active .card-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

/* Dot indicators */
.card-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.gallery-card--active .card-dots {
  opacity: 1;
}

.card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.card-dot--active {
  background: #fff;
  transform: scale(1.35);
}

.gallery.is-dragging .gallery-card {
  transition: opacity 0.45s ease;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gallery-arrow--prev {
  left: 0;
}

.gallery-arrow--next {
  right: 0;
}

.gallery-arrow:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
  transform: translateY(-50%) scale(1.08);
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.gallery-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: clamp(28px, 4vw, 40px);
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  transition: opacity 0.9s ease 0.1s, transform 0.9s ease 0.1s, filter 0.9s ease 0.1s;
}

.gallery-caption.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

.gallery-caption-title,
.gallery-caption-number {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.gallery-caption.is-changing .gallery-caption-title,
.gallery-caption.is-changing .gallery-caption-number {
  opacity: 0;
  transform: translateY(4px);
}

.gallery-caption-title {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 30px);
  color: var(--black);
  letter-spacing: -0.01em;
}

.gallery-caption-number {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--yellow);
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {

  .gallery,
  .gallery-caption {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .gallery-card {
    transition: opacity 0.2s ease !important;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 700px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.project-img {
  background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  position: relative;
}

.project-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.04);
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.project-title {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: clamp(16px, 1.8vw, 22px);
  color: var(--white);
  letter-spacing: -0.01em;
}

.project-type {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 18px);
  color: #8f8f8f;
  letter-spacing: -0.01em;
}

/* "View All Projects" button — homepage + listing page */
.projects-cta {
  text-align: center;
  margin-top: clamp(36px, 5vw, 56px);
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--black);
  background: var(--yellow);
  border-radius: 100px;
  padding: 14px 34px;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-view-all:hover {
  transform: scale(1.06);
}

.btn-view-all:active {
  transform: scale(0.98);
}

.projects-heading,
.projects-sub,
.project-card {
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--black);
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.contact-inner {
  width: 100%;
  max-width: max-content;
  /* text-align: center; */
  margin: 0 auto;
  /* Lets clicks pass through to the section beneath, so the comment
     pin can be placed even where the heading/note sit. */
  pointer-events: none;
}

.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: self-start;
}

.contact-heading {
  display: flex;
  flex-direction: column;
  font-family: var(--font-geist);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.contact-heading-dark {
  color: var(--white);
}

.contact-heading-yellow {
  color: var(--yellow);
}

.contact-note {
  font-family: var(--font-geist);
  font-weight: 300;
  font-size: clamp(15px, 1.8vw, 26px);
  color: rgba(255, 255, 255, 0.5);
}

.contact-socials {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.contact-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
  color: var(--white);
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
  position: relative;
}

.contact-social-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--yellow);
  z-index: 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 100px;
}

.contact-social-btn:hover {
  transform: translateY(-4px);
  color: var(--black);
  border-color: var(--yellow);
  box-shadow: 0 10px 20px rgba(212, 245, 52, 0.2);
}

.contact-social-btn:hover::before {
  transform: translateY(0);
}

.contact-social-icon,
.contact-social-text {
  position: relative;
  z-index: 1;
}

.contact-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.contact-social-btn:hover .contact-social-icon svg {
  transform: scale(1.15) rotate(-5deg);
}

@media (max-width: 480px) {
  .contact-socials {
    margin-bottom: 32px;
  }
}

/* Static contact panel — shown only on mobile */
.contact-static-panel {
  display: none;
}

/* ── Figma-style "leave a comment" interaction ──
   A custom cursor invites visitors to click anywhere in the section;
   the click drops a pin (like a Figma comment) and opens a mini
   contact form instead of a comment thread. */

.contact.comment-mode {
  cursor: none;
}

.comment-cursor {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s ease;
  will-change: transform;
}

.comment-cursor.active {
  opacity: 1;
}

.comment-cursor-bubble {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--black);
  font-size: 15px;
  font-weight: 700;
  border-radius: 50% 50% 50% 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.comment-pin {
  position: absolute;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  border-radius: 50% 50% 50% 4px;
  color: var(--black);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translate(-6px, -32px) scale(0);
  animation: comment-pin-pop 0.28s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
  transition: background 0.3s ease, color 0.25s ease;
}

@keyframes comment-pin-pop {
  to {
    opacity: 1;
    transform: translate(-6px, -32px) scale(1);
  }
}

/* Resolved state — green ✓, no entrance motion */
.comment-pin.resolved {
  background: var(--green);
  color: var(--white);
  animation: none;
  opacity: 1;
  transform: translate(-6px, -32px) scale(1);
}

/* Ambient pre-placed pins fade in gently (no pop, no scale) —
   placed after .resolved so it wins for .resolved.pin-ambient elements */
.comment-pin.pin-ambient {
  opacity: 0;
  transform: translate(-6px, -32px) scale(1);
  animation: comment-pin-ambient-in 0.5s ease forwards;
}

@keyframes comment-pin-ambient-in {
  to {
    opacity: 1;
    transform: translate(-6px, -32px) scale(1);
  }
}

/* Confirmation pulse played once when the user's own message is sent */
.comment-pin.resolved.pin-confirm {
  animation: comment-pin-confirm 0.38s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}

@keyframes comment-pin-confirm {
  0% {
    transform: translate(-6px, -32px) scale(1);
  }

  50% {
    transform: translate(-6px, -32px) scale(1.16);
  }

  100% {
    transform: translate(-6px, -32px) scale(1);
  }
}

/* Fade out — clean dissolve, no upward drift */
.comment-pin.pin-fade-out {
  animation: comment-pin-fade-out 0.5s ease-out forwards;
}

/* Explicit 3-class override so resolved pins' animation:none doesn't block fade-out */
.comment-pin.resolved.pin-fade-out {
  animation: comment-pin-fade-out 0.5s ease-out forwards;
}

@keyframes comment-pin-fade-out {
  to {
    opacity: 0;
    transform: translate(-6px, -32px) scale(0.85);
  }
}

.comment-panel {
  position: absolute;
  width: min(320px, calc(100vw - 48px));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  z-index: 6;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  animation: comment-panel-in 0.28s ease forwards;
  animation-delay: 0.05s;
}

@keyframes comment-panel-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.comment-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.comment-panel-title {
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
}

.comment-panel-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 2px 6px;
}

.comment-panel-close:hover {
  color: var(--black);
}

/* Minimalist Figma-style "resolved thread" popup */
.comment-thread-popup {
  position: absolute;
  width: min(340px, calc(100vw - 48px));
  background: var(--white);
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 18px 20px;
  z-index: 6;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.10), 0 2px 8px rgba(16, 24, 40, 0.06);
  opacity: 0;
  transform: scale(0.95);
  transform-origin: 0 0;
  animation: comment-thread-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes comment-thread-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.comment-thread-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-thread-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  line-height: 1;
}

.comment-thread-check svg {
  display: block;
}

.comment-thread-title {
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: 14px;
  color: var(--black);
  letter-spacing: -0.01em;
}

.comment-thread-divider {
  height: 1px;
  background: #E5E7EB;
  margin: 14px 0;
}

.comment-thread-body p {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.6;
  color: #6B7280;
  margin: 0;
}

.comment-thread-body p+p {
  margin-top: 8px;
}

.comment-thread-hint {
  color: #9CA3AF !important;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: 11px;
  color: #999;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  font-family: var(--font-geist);
  font-weight: 400;
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(212, 245, 52, 0.25);
}

.form-submit {
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: 14px;
  color: var(--black);
  background: var(--yellow);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: opacity 0.2s, transform 0.2s;
}

.form-submit:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.form-submit:active {
  transform: translateY(0);
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.form-status {
  font-family: var(--font-geist);
  font-size: 12px;
  min-height: 16px;
  color: #e0554d;
}

.comment-success {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--black);
  color: var(--yellow);
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  animation: comment-toast-in 0.3s ease forwards;
}

@keyframes comment-toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-success.fade-out {
  animation: comment-toast-out 0.4s ease forwards;
}

@keyframes comment-toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--surface-border-soft);
  padding: clamp(60px, 10vw, 120px) var(--side-pad) 40px;
  /* Slides up over the pinned Contact section — same "card" aesthetic
     as .about and .projects (rounded top corners, sits above). */
  border-radius: 80px 80px 0 0;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.8s ease, border-color 0.8s ease;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  width: 100%;
}

.footer-eyebrow {
  font-family: var(--font-geist);
  font-size: clamp(16px, 2vw, 20px);
  color: var(--on-surface);
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-headline {
  font-family: var(--font-instrument);
  font-size: clamp(50px, 9vw, 110px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--on-surface);
  margin-bottom: 24px;
}

.footer-headline .text-yellow {
  color: var(--yellow);
}

.footer-sub {
  font-family: var(--font-geist);
  font-size: clamp(16px, 2vw, 22px);
  color: var(--surface-muted);
  max-width: 650px;
  margin-bottom: 40px;
  line-height: 1.4;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--on-surface);
  color: var(--surface);
  padding: 16px 36px;
  border-radius: 100px;
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, color 0.3s;
  margin-bottom: 32px;
}

.footer-cta-btn:hover {
  transform: scale(1.05);
  background: var(--yellow);
  color: var(--black);
}

.footer-cta-btn svg {
  stroke: currentColor;
}

.footer-connect-text {
  font-family: var(--font-geist);
  font-size: 14px;
  color: var(--surface-muted);
  margin-bottom: 20px;
}

.footer-social-icons {
  display: flex;
  gap: 16px;
  margin-bottom: clamp(60px, 8vw, 100px);
}

.footer-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--surface-border-soft);
  color: var(--on-surface);
  transition: all 0.3s ease;
}

.footer-social-icon:hover {
  background: var(--on-surface);
  color: var(--surface);
  border-color: var(--on-surface);
  transform: translateY(-4px);
}

.footer-social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--surface-border-soft);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright,
.footer-credits {
  font-family: var(--font-geist);
  font-size: 13px;
  color: var(--surface-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
   CUSTOM FIGMA-STYLE CURSOR
   ============================================================ */

/* Hide native cursor on pointer devices */
.custom-cursor-active *:not(input):not(textarea):not(select) {
  cursor: none !important;
}

.custom-cursor-active input,
.custom-cursor-active textarea,
.custom-cursor-active select {
  cursor: text;
}

/* Shell — position only, JS drives transform: translate() */
.figma-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  will-change: transform;
  transform: translate(-400px, -400px);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.figma-cursor.is-visible {
  opacity: 1;
}

.figma-cursor.is-suppressed {
  opacity: 0 !important;
}

/* Inner — arrow shape container */
.figma-cursor__inner {
  position: relative;
  width: 22px;
  height: 24px;
  transform-origin: 5px 4px;
}


/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* About section word-by-word reading reveal */
.about-intro .word,
.about-details .word {
  opacity: 0.2;
}


/* ==========================================
   Swap Hover Button Component
   ========================================== */

.swap-btn {
  /* Component Variables */
  /* Inherit the nav link's color (white over hero, var(--nav-fg) once
       scrolled) instead of a hardcoded white, so the "About" link stays
       readable when the nav flips to its light theme. */
  --swap-hover-text-color: currentColor;
  --swap-hover-line-height: 23px;
  --swap-hover-duration: 0.6s;
  --swap-hover-ease: linear(0,
      0.0163,
      0.0593,
      0.1209,
      0.1947,
      0.2753,
      0.3586,
      0.4412,
      0.5208,
      0.5957,
      0.6646,
      0.7269,
      0.7823,
      0.8308,
      0.8726,
      0.908,
      0.9375,
      0.9617,
      0.981,
      0.9962,
      1.0077,
      1.0162,
      1.022,
      1.0257,
      1.0277,
      1.0284,
      1.028,
      1.0268,
      1.0251,
      1.023,
      1.0207,
      1.0184,
      1.016,
      1.0137,
      1.0116,
      1.0096,
      1.0079,
      1.0063,
      1.0049,
      1.0037,
      1.0027);

  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  padding: 4px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.swap-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .6);
  outline-offset: 4px;
}

.swap-btn__mask {
  display: inline-block;
  height: var(--swap-hover-line-height);
  overflow: hidden;
}

.swap-btn__track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform var(--swap-hover-duration) var(--swap-hover-ease);
  will-change: transform;
}

.swap-btn:hover .swap-btn__track {
  transform: translateY(calc(-1 * var(--swap-hover-line-height)));
}

.swap-btn__row {
  height: var(--swap-hover-line-height);
  overflow: hidden;
}

.swap-btn__line {
  display: inline-block;
  height: var(--swap-hover-line-height);
  line-height: var(--swap-hover-line-height);
  white-space: nowrap;

  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--swap-hover-text-color);

  transform-origin: left center;
  transition: transform var(--swap-hover-duration) var(--swap-hover-ease);
}

.swap-btn__line--primary {
  transform: skewY(0deg);
}

.swap-btn__line--secondary {
  transform: skewY(14deg);
}

.swap-btn:hover .swap-btn__line--primary {
  transform: skewY(14deg);
}

.swap-btn:hover .swap-btn__line--secondary {
  transform: skewY(0deg);
}

@media (prefers-reduced-motion: reduce) {

  .swap-btn__track,
  .swap-btn__line {
    transition: none;
  }
}


/* ==========================================
     dtx-swap: autoplay skew-swap text slider
     Classes are namespaced with "dtx-" so they
     won't collide with existing project styles.
     ========================================== */

.dtx-swap {
  --dtx-line-height: 1.15em;
  --dtx-duration: 0.9s;
  --dtx-ease: linear(0, 0.0163, 0.0593, 0.1209, 0.1947, 0.2753, 0.3586, 0.4412,
      0.5208, 0.5957, 0.6646, 0.7269, 0.7823, 0.8308, 0.8726, 0.908,
      0.9375, 0.9617, 0.981, 0.9962, 1.0077, 1.0162, 1.022, 1.0257,
      1.0277, 1.0284, 1.028, 1.0268, 1.0251, 1.023, 1.0207, 1.0184,
      1.016, 1.0137, 1.0116, 1.0096, 1.0079, 1.0063, 1.0049, 1.0037,
      1.0027);

  display: inline-block;
  height: var(--dtx-line-height);
  overflow: hidden;
  vertical-align: bottom;

  font-family: 'Inter', sans-serif;
  font-size: clamp(28px, 5vw, 86px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dtx-swap__track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform var(--dtx-duration) var(--dtx-ease);
  will-change: transform;
}

/* freezes both position AND skew during the instant loop-back snap */
.dtx-swap__track.dtx-no-transition,
.dtx-swap__track.dtx-no-transition .dtx-swap__line {
  transition: none;
}

.dtx-swap__row {
  height: var(--dtx-line-height);
  overflow: hidden;
}

.dtx-swap__line {
  display: inline-block;
  height: var(--dtx-line-height);
  line-height: var(--dtx-line-height);
  white-space: nowrap;

  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: #FFF;

  transform-origin: left center;
  transform: skewY(14deg);
  transition: transform var(--dtx-duration) var(--dtx-ease);
}

.dtx-swap__line.dtx-active {
  transform: skewY(0deg);
}

@media (prefers-reduced-motion: reduce) {

  .dtx-swap__track,
  .dtx-swap__line {
    transition: none;
  }
}




/* ==========================================
     status-widget: visitor dynamic status
     Styled with menu-card theme & design tokens
     ========================================== */

.menu-card__top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.menu-card .sw-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--surface-border-soft);
  font-family: var(--font-geist);
}

.sw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.35;

}

#sw-temp {
  font-size: 20px;
}

.sw-location {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw-city {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--nav-fg);
}

.sw-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--nav-fg-muted-65);
}

.sw-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  display: block;
}

.sw-metrics-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sw-value {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 14px;
  color: var(--nav-fg);
  opacity: 0.95;
}

.sw-offset {
  margin-top: 0px;
}

.sw-offset-text {
  font-size: 12px;
  font-weight: 400;
  color: var(--nav-fg-muted-65);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--surface-border-soft);
  letter-spacing: 0.01em;
  display: inline-block;
}

.sw-avail {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(212, 245, 52, 0.25);
  flex-shrink: 0;
  animation: sw-pulse 2.2s infinite ease-in-out;
}

@keyframes sw-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 245, 52, 0.5);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(212, 245, 52, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(212, 245, 52, 0);
  }
}

.sw-dot.sw-dot-offline {
  background: var(--light-grey);
  box-shadow: 0 0 0 3px rgba(154, 154, 154, 0.2);
  animation: none;
}

.sw-avail-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-fg-muted-65);
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links {
    gap: 28px;
  }

  /* Hide vlt widget to save nav space */
  .vlt-widget,
  .visitor-swap {
    display: none !important;
  }

  /* Timeline entries don't need so much breathing room */
  .experience .timeline-entry {
    margin-bottom: 56vh;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* ── Navigation ── */
  /* Hide inline nav links — hamburger panel handles navigation */
  .nav-links {
    display: none;
  }

  /* Hamburger always visible on mobile (JS also enforces this) */
  .menu-btn {
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
    top: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }

  /* ── Hero ── */
  .hero {
    min-height: 100svh;
  }

  .hero-name {
    gap: 10px;
  }

  .hero-bottom {
    bottom: 40px;
  }

  /* ── About ── */
  .about {
    height: auto;
    min-height: 100svh;
    padding: clamp(72px, 10vw, 120px) 0;
    border-radius: 40px 40px 0 0;
  }

  /* ── Experience timeline ── */
  .experience .timeline-entry {
    margin-bottom: 48px !important;
  }

  /* ── Experience: clean mobile timeline ── */
  .timeline-dot {
    display: none;
  }

  .timeline-entry {
    border: none;
  }

  .timeline-content::after {
    display: none;
  }

  /* ── Projects ── */
  .projects {
    border-radius: 40px 40px 0 0;
  }

  .gallery {
    --card-w: 280px;
    --gap-step: 210px;
    --rotate-step: 6deg;
    --scale-side: 0.60;
    --scale-edge: 0.60;
  }

  .gallery-arrow {
    width: 40px;
    height: 40px;
  }

  /* ── Skills: full mobile redesign ────────────────────────────────
     Switch from the cramped 2-column bubble grid to a clean single-
     column layout: stats centred at top, all bubbles below flowing
     naturally as a centred wrapping row. Jitter offsets (--bx) are
     cleared so nothing clips outside the viewport.
     Desktop & tablet (>768px) are completely unaffected.          ── */
  .skills-layout {
    grid-template-columns: 1fr;
    /* single column */
    gap: 0;
    row-gap: 40px;
  }

  /* Stats: always first, centred */
  .skills-stats {
    order: -1;
    grid-column: 1 / -1;
    gap: 24px;
    padding: 0 var(--side-pad);
  }

  .skills-stats-row {
    gap: 32px;
  }

  /* Both bubble columns collapse into a single centred flex row
     so all 12 bubbles wrap naturally at the viewport width. */
  .skills-col--left,
  .skills-col--right {
    order: 1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 var(--side-pad);
  }

  /* Neutralise all horizontal jitter — they cause overflow on mobile */
  .skills-col--left .skill-bubble,
  .skills-col--right .skill-bubble {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* ── Skills pin hold ── */
  .skills-pin-hold {
    height: 10vh;
  }

  .section-spacer {
    height: 15vh;
  }

  /* ── Contact: static panel replaces pin interaction ── */
  .contact {
    flex-direction: column;
    justify-content: center;
    padding: clamp(64px, 10vw, 120px) 0;
  }

  .contact-inner {
    pointer-events: auto;
  }

  .contact-static-panel {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin: 32px auto 0;
    width: min(360px, calc(100vw - 48px));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    pointer-events: auto;
  }

  /* Hide pins, resolved badge, floating panel, and comment cursor */
  .comment-pin,
  .comment-pin.resolved,
  .comment-cursor,
  .comment-panel:not(.contact-static-panel) {
    display: none !important;
  }

  .contact.comment-mode {
    cursor: auto;
  }

  /* ── Contact heading ── */
  .contact-heading {
    font-size: clamp(36px, 9vw, 80px);
  }

  /* ── Footer ── */
  .footer {
    border-radius: 40px 40px 0 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

  /* ── Nav: hide role label ── */
  .nav-role {
    display: none;
  }

  /* ── Hero ── */
  .hero-name {
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }

  .hero-tagline {
    font-size: clamp(22px, 7vw, 48px);
  }

  .hero-sub {
    font-size: clamp(14px, 4vw, 18px);
  }

  /* ── About ── */
  .about {
    border-radius: 24px 24px 0 0;
  }

  /* ── Skills: small-screen polish (≤480px) ── */
  .skill-bubble {
    padding: 11px 18px;
    font-size: 14px;
  }

  .stat-number {
    font-size: clamp(44px, 13vw, 64px);
  }

  .stat-number--med {
    font-size: clamp(28px, 8.5vw, 44px);
  }

  /* ── Menu panel ── */
  .menu-footer__sig {
    display: none;
  }

  .menu-footer__links {
    gap: 16px;
  }

  /* ── Projects ── */
  .projects {
    border-radius: 24px 24px 0 0;
    padding: clamp(48px, 8vw, 80px) 0;
  }

  .gallery {
    --card-w: 200px;
    --gap-step: 148px;
    --rotate-step: 5deg;
    --scale-side: 0.65;
    --scale-edge: 0.65;
  }

  .gallery-viewport {
    padding: 32px 0 8px;
  }

  .gallery-arrow {
    width: 36px;
    height: 36px;
  }

  .gallery-caption-title,
  .gallery-caption-number {
    text-align: center;
  }

  /* ── Footer ── */
  .footer {
    border-radius: 24px 24px 0 0;
  }

  .footer-email {
    font-size: clamp(18px, 5.5vw, 32px);
  }

  .footer-links {
    gap: 12px;
  }

}

/* ============================================================
   TOUCH DEVICES — disable pointer-only interactions
   ============================================================ */
@media (hover: none) {

  /* Restore default cursor on touch devices */
  .custom-cursor-active *:not(input):not(textarea):not(select) {
    cursor: auto !important;
  }

  .contact.comment-mode {
    cursor: auto;
  }

  /* Hamburger hover scale override */
  .menu-btn:hover {
    transform: scale(1) !important;
  }
}

/* ============================================================
   GO TO TOP BUTTON — shared across Home & Projects pages
   ============================================================ */
.back-to-top-trigger {
  /* Fixed in viewport, bottom-right corner */
  position: fixed;
  bottom: 24px;
  right: var(--side-pad);
  z-index: 9000;

  /* Squircle shape matching the menu button */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 20px;
  border: 1px solid var(--surface-border-soft);
  padding: 0;
  cursor: pointer;

  /* Glassmorphism surface matching the active theme */
  background: var(--nav-bg-scrolled);
  color: var(--nav-fg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

  /* Hidden by default — JS adds .is-visible after scroll threshold */
  opacity: 0;
  transform: scale(0.7) translateY(12px);
  pointer-events: none;

  /* Smooth fade + slide transition */
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;

  will-change: transform, opacity;
}

/* Visible state — toggled by scroll listener in script.js */
.back-to-top-trigger.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Arrow icon inherits colour */
.back-to-top-trigger svg {
  stroke: currentColor;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover: subtle scale up + yellow accent + icon nudges up */
.back-to-top-trigger:hover {
  transform: scale(1.08) !important;
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
  box-shadow: 0 8px 24px rgba(212, 245, 52, 0.3);
}

.back-to-top-trigger:hover svg {
  transform: translateY(-3px);
}

/* Active: slight press feel */
.back-to-top-trigger:active {
  transform: scale(0.95) !important;
}

/* Mobile: shrink size slightly to match mobile menu-btn */
@media (max-width: 768px) {
  .back-to-top-trigger {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }
}