/* ==========================================================================
   Sagar Mali — portfolio
   Dark "space" theme: starfield canvas, wide display type, flip cards,
   alternating project panels. No frameworks.
   ========================================================================== */

/* Fonts are served from this site (files from Google Fonts, SIL Open Font
   License 1.1, see fonts/), so no third-party request blocks the first paint.
   Each family is one variable file per script range. "latin-ext" is only
   downloaded if a page uses one of its characters. Unbounded keeps the two
   separate weights Google Fonts served (500 and 700). */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/unbounded-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/unbounded-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #05050b;
  --bg-raised: #0b0b16;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.3);
  --text: #f4f3fa;
  --muted: #a8a6bb;
  --accent: #9d8cff;
  --accent-2: #5eead4;
  --radius: 18px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background:
    radial-gradient(1100px 760px at 88% -8%, rgba(157, 140, 255, 0.14), transparent 62%),
    radial-gradient(900px 700px at -12% 38%, rgba(94, 234, 212, 0.06), transparent 60%),
    radial-gradient(1000px 800px at 50% 110%, rgba(157, 140, 255, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.no-scroll {
  overflow: hidden;
}

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

a {
  color: inherit;
}

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

p {
  margin: 0;
}

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

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

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

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

/* Starfield canvas sits behind everything */
.starfield,
.starfield-3d {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* The 2D canvas fades out when the desktop 3D starfield takes over */
.starfield {
  transition: opacity 1.2s var(--ease);
}

.starfield.is-faded {
  opacity: 0;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  padding: 0.95em 1.5em;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font: 600 0.95rem/1 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  box-shadow: 0 0 40px rgba(157, 140, 255, 0.35);
}

.btn .arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

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

/* "Opens in a new tab" arrow points up and to the right */
.btn .arrow-out {
  width: 16px;
  height: 16px;
}

.btn:hover .arrow-out {
  transform: translate(2px, -2px);
}

.btn-small {
  padding: 0.7em 1.15em;
  font-size: 0.88rem;
}

.btn-solid {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.btn-solid:hover {
  background: #ffffff;
}

.link-underline {
  display: inline-block;
  padding-bottom: 3px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.35s var(--ease), color 0.3s;
}

.link-underline:hover {
  color: var(--accent);
  background-size: 40% 1px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, height 0.35s;
}

.site-header.is-scrolled {
  --header-h: 64px;
  background: rgba(5, 5, 11, 0.72);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(157, 140, 255, 0.35));
  transition: transform 0.4s var(--ease);
}

.brand:hover .brand-mark {
  transform: scale(1.06) rotate(-4deg);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav ul {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.menu-toggle span {
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 96px var(--gutter) 48px;
  background: rgba(5, 5, 11, 0.97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu ul {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.mobile-menu nav a {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 8vw, 2.4rem);
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
}

.menu-close {
  position: absolute;
  top: 16px;
  right: var(--gutter);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.menu-close svg,
.dialog-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.header-resume {
  margin-left: 8px;
}

@media (max-width: 860px) {
  .site-header {
    gap: 10px;
  }

  .nav,
  .header-cta {
    display: none;
  }

  .header-resume {
    margin-left: 0;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 360px) {
  .brand-name {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) var(--gutter) 96px;
  text-align: center;
}

.hero > * {
  animation: rise 0.9s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 110ms + 120ms);
}

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

/* Illustrated portrait that "pops out" of a glowing disc: the top of the
   picture is free, the bottom half is clipped to the disc's curve. */
.hero-avatar {
  --w: clamp(170px, 16vw, 220px);
  position: relative;
  width: var(--w);
  height: calc(var(--w) * 1.32);
  margin-bottom: 30px;
}

.avatar-stage {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  aspect-ratio: 1;
}

.avatar-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, #322a6e 0%, #1a1738 55%, #0e0d20 100%);
  box-shadow: 0 0 0 4px var(--bg), 0 0 80px rgba(157, 140, 255, 0.35);
}

.avatar-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* bottom corners = the disc's radius (50% of the width, 50/1.32 of the height) */
  border-radius: 0 0 50% 50% / 0 0 37.88% 37.88%;
}

.avatar-clip img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 120%;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  transition: transform 0.6s var(--ease);
}

.hero-avatar:hover .avatar-clip img {
  transform: translateX(-50%) translateY(-6px) scale(1.02);
}

.orbit {
  position: absolute;
  inset: -18px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: spin 36s linear infinite;
}

.orbit i {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

/* The H1 holds both the greeting and the title (better for search engines);
   each part keeps its own look and entrance animation. */
.hero-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero > .hero-heading {
  animation: none;
}

.hero-heading > .eyebrow,
.hero-heading > .hero-title {
  display: block;
  animation: rise 0.9s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 110ms + 120ms);
}

.hero-heading .eyebrow {
  font-family: var(--font-body);
  line-height: 1.6;
}

.hero-title {
  max-width: 21ch;
  font-size: clamp(1.9rem, 7.2vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero-title span {
  display: inline-block;
}

.hero-lede {
  max-width: 36rem;
  margin: 26px auto 38px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 32px;
}

.scroll-cue {
  position: absolute;
  left: var(--gutter);
  bottom: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-decoration: none;
  text-transform: uppercase;
  animation-delay: 900ms;
}

.scroll-cue span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.scroll-cue i {
  position: relative;
  width: 1px;
  height: 64px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  animation: drip 2.4s var(--ease) infinite;
}

@keyframes drip {
  0% {
    transform: translateY(-100%);
  }
  60%,
  100% {
    transform: translateY(100%);
  }
}

@media (max-width: 860px) {
  .scroll-cue {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Intro statement
   -------------------------------------------------------------------------- */
.intro {
  padding: clamp(80px, 13vw, 180px) var(--gutter);
}

.intro-text {
  max-width: 1000px;
  margin: 0 auto;
  font-size: clamp(1.45rem, 3.4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: pretty;
}

.intro-text u {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.intro-text.is-scrubbed .w {
  opacity: 0.18;
  transition: opacity 0.4s var(--ease);
}

.intro-text.is-scrubbed .w.on {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(72px, 10vw, 140px) var(--gutter);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4.6vw, 3.3rem);
}

.section-head--split {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
}

.section-head--split > div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   Flip cards
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.flip-card {
  min-height: 430px;
  border-radius: var(--radius);
  perspective: 1400px;
}

.flip-card:focus-visible {
  outline-offset: 6px;
}

.flip-inner {
  position: relative;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--ease);
}

.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 55%, rgba(255, 255, 255, 0)),
    rgba(11, 11, 22, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.front {
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.back {
  justify-content: center;
  transform: rotateY(180deg);
}

.card-icon {
  width: 118px;
  height: 118px;
  margin-bottom: 18px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 18px rgba(157, 140, 255, 0.45));
}

.card-icon .fill-soft {
  fill: rgba(157, 140, 255, 0.12);
}

.card-icon .ring {
  stroke-dasharray: 3 7;
  stroke-opacity: 0.7;
}

.card-icon .dot {
  fill: var(--accent-2);
  stroke: none;
}

.flip-card h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
}

.card-teaser {
  color: var(--muted);
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
}

.back-title {
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 700;
  line-height: 1.2;
}

.check-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: #dcdaea;
  font-weight: 500;
  line-height: 1.45;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 9px;
  height: 9px;
  background: var(--accent);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(157, 140, 255, 0.8);
}

@media (hover: hover) {
  .flip-card:hover .flip-inner,
  .flip-card:focus-within .flip-inner {
    transform: rotateY(180deg);
  }
}

/* Touch screens: no flip, show everything */
@media (hover: none) {
  .flip-card {
    min-height: 0;
    perspective: none;
  }

  .flip-inner {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 55%, rgba(255, 255, 255, 0)),
      rgba(11, 11, 22, 0.55);
  }

  .face {
    position: static;
    border: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
  }

  .front {
    padding-bottom: 8px;
  }

  .back {
    padding-top: 12px;
    transform: none;
  }

  .hint,
  .back-title,
  .card-teaser {
    display: none;
  }
}

@media (max-width: 960px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin-inline: auto;
  }

  .flip-card {
    min-height: 400px;
  }
}

/* --------------------------------------------------------------------------
   Work
   -------------------------------------------------------------------------- */
.project {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  align-items: end;
}

.project + .project {
  margin-top: clamp(80px, 11vw, 150px);
}

.project-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 22px;
}

.project-no {
  flex: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
}

.project-head h3 {
  flex: none;
  max-width: 100%;
  font-size: clamp(1.4rem, 3.4vw, 2.7rem);
}

.project-line {
  flex: 1;
  min-width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.project--right .project-head {
  flex-direction: row-reverse;
  text-align: right;
}

.project--right .project-line {
  background: linear-gradient(270deg, var(--line-strong), transparent);
}

.project-media {
  grid-column: 1 / span 8;
  grid-row: 2;
  margin: 0;
}

.project-info {
  grid-column: 9 / -1;
  grid-row: 2;
  display: grid;
  gap: 16px;
  justify-items: start;
}

.project--right .project-media {
  grid-column: 5 / -1;
}

.project--right .project-info {
  grid-column: 1 / span 4;
}

.project-label {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.project-info p:not(.project-label) {
  color: var(--muted);
}

.window {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0d0d18;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.6s var(--ease);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.window-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.window-url {
  margin-left: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.72rem;
}

.window img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.project:hover .window {
  border-color: var(--line-strong);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(157, 140, 255, 0.45);
}

.project:hover .window img {
  transform: scale(1.03);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  font-weight: 500;
}

@media (max-width: 900px) {
  .project {
    gap: 22px;
  }

  .project-media,
  .project-info,
  .project--right .project-media,
  .project--right .project-info {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .project--right .project-head {
    flex-direction: row;
    text-align: left;
  }

  .project--right .project-line {
    background: linear-gradient(90deg, var(--line-strong), transparent);
  }

  .project-head h3 {
    flex: 1 1 auto;
  }

  .project-line {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Experience
   -------------------------------------------------------------------------- */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.job {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  padding: 0 0 64px 36px;
}

.job:last-child {
  padding-bottom: 8px;
}

.job::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(157, 140, 255, 0.14), 0 0 18px rgba(157, 140, 255, 0.7);
}

.job-meta {
  display: grid;
  align-content: start;
  gap: 4px;
}

.job-date {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
}

.job-place {
  color: var(--muted);
  font-size: 0.88rem;
}

.job-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.job-title img {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: #ffffff;
  object-fit: contain;
}

.job-title h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.company {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}

.job h4 {
  margin: 26px 0 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.job h4 .note {
  color: var(--muted);
  font-weight: 500;
}

.job ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
}

.job-title + ul {
  margin-top: 22px;
}

.job li::marker {
  color: var(--accent);
}

.education {
  margin-top: clamp(56px, 8vw, 96px);
}

.education-title {
  margin-bottom: 22px;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

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

.edu-card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.edu-year {
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
}

.edu-card h4 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.edu-card p:last-child {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .job {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-left: 26px;
  }

  .edu-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Skills marquee
   -------------------------------------------------------------------------- */
.skills {
  padding: clamp(24px, 4vw, 48px) 0;
}

.marquee {
  overflow: hidden;
  padding: 26px 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marquee li {
  display: flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.1vw, 1.6rem);
  font-weight: 500;
  white-space: nowrap;
}

.marquee li::after {
  content: "✦";
  color: var(--accent);
  font-size: 0.6em;
}

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

/* --------------------------------------------------------------------------
   Footer / contact
   -------------------------------------------------------------------------- */
.site-footer {
  padding: clamp(100px, 14vw, 190px) var(--gutter) 36px;
  text-align: center;
}

.kicker-center {
  justify-content: center;
  margin-bottom: 22px;
}

.kicker-center::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

.footer-title {
  max-width: 13ch;
  margin: 0 auto;
  font-size: clamp(2.1rem, 6.4vw, 4.8rem);
  line-height: 1.02;
  text-wrap: balance;
}

.footer-lede {
  max-width: 34rem;
  margin: 24px auto 36px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Contact links: icon pills, plus round icon buttons for social profiles */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 780px;
  margin: 56px auto 0;
  padding: 0;
  list-style: none;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 20px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}

.contact-pill:hover {
  border-color: rgba(157, 140, 255, 0.6);
  background: rgba(157, 140, 255, 0.09);
  box-shadow: 0 12px 30px -14px rgba(157, 140, 255, 0.7);
  transform: translateY(-2px);
}

.ci {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(157, 140, 255, 0.4), rgba(94, 234, 212, 0.28));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ci svg,
.social-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-list {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.social-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}

.social-btn svg {
  width: 19px;
  height: 19px;
}

.social-btn:hover {
  color: var(--text);
  border-color: rgba(157, 140, 255, 0.7);
  background: rgba(157, 140, 255, 0.14);
  transform: translateY(-3px);
}

@media (max-width: 560px) {
  .contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .contact-list .wide {
    grid-column: 1 / -1;
  }

  .contact-pill {
    width: 100%;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    font-size: 0.85rem;
    text-align: left;
    white-space: nowrap;
  }

  .ci {
    width: 32px;
    height: 32px;
  }
}

/* Very narrow phones: let a long label wrap neatly instead of overflowing */
@media (max-width: 370px) {
  .contact-pill {
    white-space: normal;
    line-height: 1.25;
  }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(72px, 10vw, 120px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-bottom a {
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--text);
}

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

/* --------------------------------------------------------------------------
   Contact dialog
   -------------------------------------------------------------------------- */
.contact-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #121124, #0b0b16 60%);
  color: var(--text);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9), 0 0 80px -30px rgba(157, 140, 255, 0.5);
}

.contact-dialog::backdrop {
  background: rgba(3, 3, 8, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.contact-dialog[open] {
  animation: pop 0.4s var(--ease);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

.dialog-body {
  position: relative;
  padding: 40px 36px 30px;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.dialog-close:hover {
  border-color: var(--line-strong);
}

.contact-dialog h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.dialog-lede {
  margin: 10px 0 26px;
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.86rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 500 1rem/1.5 var(--font-body);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7d7b91;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(157, 140, 255, 0.22);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #ff8a8a;
}

.contact-form .btn {
  justify-self: start;
  margin-top: 4px;
}

.form-status:empty {
  display: none;
}

.form-status {
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.08);
  font-size: 0.92rem;
}

.form-status.is-error {
  border-color: rgba(255, 138, 138, 0.4);
  background: rgba(255, 138, 138, 0.08);
}

.form-note {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 520px) {
  .dialog-body {
    padding: 34px 20px 24px;
  }
}

/* --------------------------------------------------------------------------
   Scroll reveal (only when JS runs; content is visible without it)
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

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

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

  .marquee-track {
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }

  .marquee ul {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
  }

  .marquee ul[aria-hidden="true"] {
    display: none;
  }
}

/* ==========================================================================
   Extra polish: aurora, gradient text, glowing borders, spotlights, tilt
   ========================================================================== */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes border-spin {
  to {
    --angle: 360deg;
  }
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

.btn {
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.35s var(--ease);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #f0abfc);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Soft light that follows the mouse (desktop only, set up in site.js) */
.cursor-glow {
  position: fixed;
  left: -340px;
  top: -340px;
  z-index: 0;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 140, 255, 0.13), rgba(94, 234, 212, 0.05) 38%, transparent 68%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-2000px, -2000px, 0);
  transition: opacity 0.6s;
}

.cursor-glow.is-on {
  opacity: 1;
}

/* Hero: aurora glow behind the content */
.aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.hero > .aurora {
  animation: none;
}

.aurora i {
  position: absolute;
  width: min(62vw, 780px);
  aspect-ratio: 1;
  border-radius: 50%;
  animation: drift 20s ease-in-out infinite alternate;
}

.aurora i:nth-child(1) {
  top: -24%;
  left: 2%;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.34), transparent 62%);
}

.aurora i:nth-child(2) {
  top: 4%;
  right: -8%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.2), transparent 62%);
  animation-duration: 24s;
  animation-delay: -8s;
}

.aurora i:nth-child(3) {
  bottom: -32%;
  left: 24%;
  background: radial-gradient(circle, rgba(240, 171, 252, 0.16), transparent 62%);
  animation-duration: 28s;
  animation-delay: -14s;
}

@keyframes drift {
  from {
    transform: translate3d(-4%, -3%, 0) scale(0.95);
  }
  to {
    transform: translate3d(6%, 5%, 0) scale(1.08);
  }
}

/* Hero: spinning gradient ring around the photo */
.portrait-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from var(--angle), #9d8cff, #5eead4, #f0abfc, #9d8cff);
  animation: border-spin 6s linear infinite;
}

.portrait-ring::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from var(--angle), #9d8cff, #5eead4, #f0abfc, #9d8cff);
  filter: blur(20px);
  opacity: 0.5;
  animation: border-spin 6s linear infinite;
}

.orbit {
  inset: -22px;
}

/* Hero: gradient word, typing line, status pill */
.hero-title .grad {
  background: linear-gradient(90deg, #ffffff 0%, #cfc6ff 25%, #7ff0dc 50%, #cfc6ff 75%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}

.hero-typed {
  min-height: 1.7em;
  margin: 24px auto 34px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

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

.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 3px;
  vertical-align: -0.2em;
  background: var(--accent-2);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding: 8px 16px 8px 13px;
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.07);
  color: #c8f4ea;
  font-size: 0.82rem;
  font-weight: 600;
}

.pulse {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-2);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* Primary buttons with a spinning gradient border */
.btn-glow {
  border: 1px solid transparent;
  background:
    linear-gradient(#0d0c1c, #0d0c1c) padding-box,
    conic-gradient(from var(--angle), #9d8cff, #5eead4, #f0abfc, #9d8cff) border-box;
  box-shadow: 0 0 34px -8px rgba(157, 140, 255, 0.6);
  animation: border-spin 5s linear infinite;
}

/* Highlights band */
.highlights {
  position: relative;
  z-index: 1;
  padding: 0 var(--gutter) clamp(24px, 4vw, 48px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.stat-card {
  position: relative;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    rgba(11, 11, 22, 0.5);
  text-align: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 20%, #b9afff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* Glowing border + spotlight on cards (spotlight position set in site.js) */
.face > *,
.stat-card > *,
.edu-card > * {
  position: relative;
  z-index: 1;
}

.edu-card {
  position: relative;
}

.face::before,
.stat-card::before,
.edu-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle), rgba(157, 140, 255, 0.95), rgba(94, 234, 212, 0.75), rgba(240, 171, 252, 0.7), rgba(157, 140, 255, 0.95));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  animation: border-spin 6s linear infinite;
  pointer-events: none;
}

.face::after,
.stat-card::after,
.edu-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(157, 140, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}

.back::after {
  background: radial-gradient(380px circle at var(--mxb, 50%) var(--my, 50%), rgba(157, 140, 255, 0.16), transparent 60%);
}

.flip-card:hover .face::before,
.flip-card:hover .face::after,
.flip-card:focus-within .face::before,
.stat-card:hover::before,
.stat-card:hover::after,
.edu-card:hover::before,
.edu-card:hover::after {
  opacity: 1;
}

/* Project screenshots tilt toward the mouse (site.js) */
.window {
  position: relative;
}

.window.is-tilting {
  transition: transform 0.12s linear, border-color 0.4s, box-shadow 0.4s;
}

.window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.13), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.window.is-tilting::after {
  opacity: 1;
}

/* Gradient section headings */
.section-head h2,
.footer-title {
  background: linear-gradient(180deg, #ffffff 35%, #c3b9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Experience: the timeline line fills as you scroll */
.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  height: calc(var(--line-progress, 0) * 100%);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(157, 140, 255, 0.7);
}

.job::before {
  transition: background 0.4s, box-shadow 0.4s;
}

.job.is-reached::before {
  background: var(--accent-2);
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.16), 0 0 18px rgba(94, 234, 212, 0.8);
}

/* Second marquee row, outlined and moving the other way */
.marquee + .marquee {
  border-top: 0;
}

.marquee--reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 75s;
}

.marquee--reverse li {
  color: rgba(255, 255, 255, 0.28);
}

.marquee--reverse li::after {
  color: var(--accent-2);
}

/* Footer: big outlined name with a light sweeping through it */
.footer-wordmark {
  margin: clamp(56px, 8vw, 96px) 0 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9.4vw, 8.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.06) 35%, rgba(157, 140, 255, 0.6) 50%, rgba(255, 255, 255, 0.06) 65%) 0 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: sweep 7s ease-in-out infinite;
  user-select: none;
}

@keyframes sweep {
  from {
    background-position: 130% 0;
  }
  to {
    background-position: -30% 0;
  }
}

.footer-wordmark + .footer-bottom {
  margin-top: 28px;
}

@media (max-width: 640px) {
  .stats {
    gap: 10px;
  }

  .stat-card {
    padding: 20px 6px;
  }

  .stat-num {
    font-size: clamp(1.3rem, 6.6vw, 2rem);
  }

  .stat-label {
    font-size: 0.74rem;
  }

  .status-pill {
    border-radius: 16px;
    font-size: 0.76rem;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none;
  }

  .marquee--reverse ul + ul {
    display: none;
  }

  .marquee--reverse .marquee-track {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}
