@font-face {
  font-family: Inter;
  src: url('./fonts/inter.woff2') format('woff2');
  font-weight: 300 600;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('./fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Newsreader;
  src: url('./fonts/newsreader-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'LXGW WenKai';
  src: url('./fonts/wenkai-bio.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #fff;
  --surface: #f8f9fa;
  --text: #1a1a2e;
  --secondary: #495057;
  --muted: #666e76;
  --border: #dee2e6;
  --accent: #2d6a7a;
  --solid-nav: rgb(255 255 255 / .94);
  --texture-opacity: .07;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: Inter, system-ui, sans-serif;
  --out: cubic-bezier(.22, 1, .36, 1);
}

[data-theme='dark'] {
  color-scheme: dark;
  --background: #141414;
  --surface: #1e1e1e;
  --text: #f0f0f0;
  --secondary: #a0a0a0;
  --muted: #898989;
  --border: #2a2a2a;
  --accent: #8198ff;
  --solid-nav: rgb(20 20 20 / .92);
  --texture-opacity: .08;
}

:root[lang='en'] [data-localized][lang='zh-CN'],
:root[lang='zh-CN'] [data-localized][lang='en'] { display: none; }

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background: var(--background);
  color: var(--text);
  font: .8125rem/1.5 var(--sans);
  transition: background-color .4s, color .4s;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('./images/ocean.webp') center / cover;
  opacity: var(--texture-opacity);
  pointer-events: none;
  transition: opacity .5s;
}
[data-scene='mountain'] body::before { opacity: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { color: var(--text); background: color-mix(in srgb, var(--accent) 35%, var(--background)); }
button { color: inherit; font: inherit; cursor: pointer; }
button svg, .contact svg, .avatar svg { display: block; width: 1em; height: 1em; }

.shell { width: 100%; max-width: 720px; margin-inline: auto; padding-inline: 24px; }
.main { flex: 1; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 20;
  padding: .75rem;
  background: var(--background);
  color: var(--text);
}

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  background: var(--solid-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: background .3s var(--out), border-color .3s var(--out), color .3s;
}
.home:not(.scrolled) .header {
  color: #fff;
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
  text-shadow: 0 1px 4px #000a;
}
.nav {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-family: var(--mono);
}
.brand {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.nav-links { flex: none; display: flex; align-items: center; gap: 1.25rem; }
.nav-links a {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: .77rem;
  font-weight: 600;
}
.nav-links a::after {
  content: '';
  position: absolute;
  inset: auto 0 -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform .25s var(--out);
}
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); }
.home:not(.scrolled) .nav-links a { color: inherit; }
.nav-controls { display: flex; align-items: center; gap: .375rem; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 36px;
  border: 0;
  padding: 0;
  background: none;
  font-size: 18px;
  overflow: hidden;
}
.theme-toggle svg {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(1em) scale(.5);
}
.theme-toggle:hover, .language-toggle:hover { opacity: .8; }
[data-theme='dark'] .theme-toggle [data-icon='moon'],
[data-theme='light'] .theme-toggle [data-icon='sun'] {
  opacity: 1;
  transform: none;
}
.language-toggle {
  min-width: 30px;
  height: 36px;
  padding: 0 2px;
  border: 0;
  background: none;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
}
.language-labels {
  display: grid;
  place-items: center;
  line-height: 1.4;
  overflow: hidden;
}
.language-labels > span { grid-area: 1 / 1; }
.language-labels > span > span { display: inline-block; opacity: 0; }
:root[lang='en'] .language-labels [lang='zh-CN'] > span,
:root[lang='zh-CN'] .language-labels [lang='en'] > span { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .theme-toggle, .language-toggle { transition: opacity .2s; }
  .theme-toggle[data-animate] svg {
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .22s ease-out;
  }
  .language-toggle[data-animate] .language-labels > span > span {
    animation: language-glyph-out .19s ease-in var(--glyph-delay, 0ms) both;
  }
  .language-labels > span > span + span { --glyph-delay: 42ms; }
  :root[lang='en'] .language-toggle[data-animate] [lang='zh-CN'] > span,
  :root[lang='zh-CN'] .language-toggle[data-animate] [lang='en'] > span {
    animation: language-glyph-in .3s var(--out) calc(65ms + var(--glyph-delay, 0ms)) both;
  }
  @keyframes language-glyph-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(.85em) rotateX(-60deg); }
  }
  @keyframes language-glyph-in {
    from { opacity: 0; transform: translateY(-.85em) rotateX(60deg); }
    to { opacity: 1; transform: none; }
  }
}

.theme-leaves {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  mix-blend-mode: multiply;
  transition: opacity .35s var(--out);
}
[data-theme='dark'] .theme-leaves {
  --leaf-filter: grayscale(1) invert(1);
  opacity: .48;
  mix-blend-mode: screen;
}
.theme-leaves::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('./images/sunlight.webp') center top / cover;
}
.theme-leaves::before, .theme-leaves video { filter: var(--leaf-filter, none); }
.theme-leaves video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  visibility: hidden;
}
.theme-leaves video.is-ready { visibility: visible; }

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 85vh;
  min-height: 480px;
  overflow: hidden;
  background: #252525;
}
.hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  object-position: center 43%;
  transform: translateY(var(--parallax, 0px)) scale(1.05);
  transition: opacity 1.2s var(--out);
}
.hero-scene.mountain { object-position: center 30%; }
[data-scene='ocean'] .hero-scene.ocean, [data-scene='mountain'] .hero-scene.mountain { opacity: 1; }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, #0009 0%, transparent 25%),
    linear-gradient(to top, #000b 0%, #0005 35%, transparent 80%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding-bottom: 3.5rem;
  color: #f0f0f0;
}
.hero-title { position: relative; margin-bottom: .5rem; }
.hero-title h1 {
  font: 700 3.25rem/1.08 var(--mono);
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.hero-title canvas { display: none; position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-title.is-animated canvas { display: block; }
.hero-title.is-animated h1 { opacity: 0; }
.tagline {
  max-width: 500px;
  color: #ddd;
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 300;
}
.scene-toggle {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: 20px;
  background: #0007;
  color: #fff;
  font-size: 16px;
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s;
}
.scene-toggle:hover { background: #000b; border-color: #fff7; }
.scene-toggle [data-icon='ocean'], [data-scene='mountain'] .scene-toggle [data-icon='mountain'] { opacity: .45; }
[data-scene='mountain'] .scene-toggle [data-icon='ocean'] { opacity: 1; }
.home:not(.scrolled) .header :focus-visible, .scene-toggle:focus-visible { outline-color: #fff; }

.bio {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .875rem;
  margin-top: -40px;
  padding-bottom: 4rem;
}
.avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: .75rem;
  border: 4px solid var(--background);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 6px 24px rgb(0 0 0 / .3);
  object-fit: cover;
}
.avatar-placeholder svg { width: 40%; height: 40%; }
.bio p { max-width: 600px; color: var(--secondary); font-size: .9375rem; line-height: 1.75; }
.bio :is(.bio-lead, .bio-detail, .bio-closing) { font-size: 1.25rem; line-height: 1.55; letter-spacing: -.01em; }
.bio .bio-lead { color: var(--text); font-weight: 500; }
.bio :is(.bio-detail, .bio-closing) { color: color-mix(in srgb, var(--text) 70%, var(--secondary)); font-weight: 400; }
.bio-closing [lang='en'] { font-family: Newsreader, Georgia, serif; font-style: italic; }
.bio-closing [lang='zh-CN'] { font-family: 'LXGW WenKai', 'Kaiti SC', KaiTi, serif; }
.bio p a { color: var(--accent); }
.bio p a:hover, .bio p a:focus-visible { text-decoration: underline; text-underline-offset: .17em; }
.contact-list { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: .75rem; }
.contact {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--border);
  color: var(--secondary);
  font: 500 .75rem/1.5 var(--mono);
  transition: color .2s, border-color .2s;
}
.contact { padding: .5rem .875rem; border-radius: 999px; }
.github-contact, .linkedin-contact { display: inline-flex; align-items: center; }
.linkedin-logo { width: 1em; height: auto; }
.linkedin-logo-white,
[data-theme='dark'] .linkedin-logo-black { display: none; }
[data-theme='dark'] .linkedin-logo-white { display: block; }
a.contact:hover, .email-trigger.contact:hover,
.email-trigger.contact[aria-expanded="true"] { color: var(--text); border-color: var(--muted); }
.email-contact { position: relative; display: inline-flex; }
.email-trigger { background: transparent; }
.email-bubble {
  position: absolute;
  z-index: 2;
  inset-inline-start: calc(100% + .625rem);
  top: 50%;
  translate: 0 -50%;
  width: max-content;
  max-width: min(13rem, calc(100vw - 2rem));
  padding: .625rem .75rem;
  border: 1px solid var(--border);
  border-radius: .625rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 16px rgb(0 0 0 / .16);
  font: 500 .75rem/1.5 var(--mono);
  overflow-wrap: anywhere;
}
.email-bubble::before {
  content: '';
  position: absolute;
  inset-inline-start: -.3125rem;
  top: calc(50% - .25rem);
  width: .5rem;
  height: .5rem;
  border: solid var(--border);
  border-width: 0 0 1px 1px;
  background: var(--surface);
  rotate: 45deg;
  pointer-events: none;
}
.email-bubble a:hover, .email-bubble a:focus-visible { text-decoration: underline; }

.page-content { padding-top: 64px; padding-bottom: 3rem; }
.page-title { font: 700 1.75rem/1.15 var(--mono); letter-spacing: -.03em; overflow-wrap: anywhere; }
.about-page > .page-content {
  max-width: 1120px;
  padding-top: clamp(5.25rem, 9vw, 8rem);
}
.about-page .page-title { font-size: clamp(1.75rem, 3.3vw, 2.625rem); }
.about-name { margin-top: .75rem; color: var(--secondary); font: 400 1.0625rem/1.5 var(--mono); }
.about-work,
.about-interests {
  margin-top: clamp(2.25rem, 4.5vw, 3.75rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.about-interests .section-title { margin-bottom: .75rem; }
.work-entry { max-width: 72ch; margin-top: 1.5rem; }
.work-entry + .work-entry { margin-top: 2rem; }
.work-entry h3 { display: flex; align-items: center; gap: .625rem; margin: 0; font-size: 1.125rem; }
.work-entry h3 img { box-sizing: border-box; padding: 3px; border-radius: 5px; background: white; }
.work-meta { margin: .5rem 0; color: var(--secondary); font: 400 .8125rem/1.6 var(--mono); }
.work-entry ul { margin: 0; padding-inline-start: 1.25rem; color: var(--secondary); font-size: .9375rem; line-height: 1.65; }
.work-entry li + li { margin-top: .35rem; }
.about-collage {
  position: relative;
  aspect-ratio: 2.75;
  margin: 0;
  padding: 0;
  list-style: none;
}
.about-collage li {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  transform: translate(-50%, -50%) rotate(var(--tilt));
}
.about-collage img {
  display: block;
  width: 100%;
  height: auto;
}
.interest-guitar { --x: 7%; --y: 50%; --size: 12%; --tilt: -13deg; }
.interest-book { --x: 24%; --y: 82%; --size: 21%; --tilt: -6deg; }
.interest-camera { --x: 30%; --y: 46%; --size: 14%; --tilt: -10deg; }
.interest-fitness { --x: 47%; --y: 62%; --size: 19%; --tilt: 3deg; }
.interest-walkman { --x: 61%; --y: 37%; --size: 14%; --tilt: 11deg; }
.interest-hash-brown { --x: 69%; --y: 76%; --size: 11%; --tilt: 11deg; }
.interest-wings { --x: 83%; --y: 49%; --size: 14%; --tilt: -11deg; }
.interest-coffee { --x: 94%; --y: 74%; --size: 11%; --tilt: 7deg; }

@media (max-width: 640px) {
  .about-collage {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem .375rem;
    aspect-ratio: auto;
    padding-top: .5rem;
  }
  .about-collage li {
    position: relative;
    inset: auto;
    aspect-ratio: 3 / 4;
    min-width: 0;
    width: auto;
    transform: none;
  }
  .about-collage img {
    position: absolute;
    inset: 5%;
    width: 90%;
    height: 90%;
    object-fit: contain;
    transform: rotate(var(--tilt));
  }
  .about-collage .interest-book img,
  .about-collage .interest-hash-brown img { object-position: center 83%; }
  .about-collage .interest-camera img,
  .about-collage .interest-wings img { object-position: center 34%; }
}

.section { margin-bottom: 2.5rem; }
.section-title {
  margin-bottom: .625rem;
  color: var(--muted);
  font: 600 .7rem/1.5 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.grid { display: grid; gap: 1.75rem 1rem; }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.25rem; }
.card { display: block; min-width: 0; }
.card-art {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-bottom: .875rem;
  perspective: 900px;
}
.art-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: transform .35s var(--out);
}
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-title { color: var(--text); font: 600 .9375rem/1.45 var(--mono); letter-spacing: -.01em; overflow-wrap: anywhere; }
a.card:hover .card-title { color: var(--accent); }
.card-meta {
  margin: .125rem 0 .375rem;
  color: var(--muted);
  font: .625rem/1.5 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.card-description { color: var(--secondary); font-size: .8125rem; line-height: 1.55; overflow-wrap: anywhere; }
.card-feature .card-art { aspect-ratio: 3 / 2; margin-bottom: 1rem; perspective: 1600px; }
.card-feature .card-title { font-size: 1.375rem; letter-spacing: -.03em; }
.card-feature .card-description { font-size: .9375rem; }
.card-compact .card-art { margin-bottom: .625rem; }
.card-compact .card-title { font-size: .8125rem; }
.card-compact .card-description { font-size: .75rem; }
.grid-rows .card { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 1rem; }
.grid-rows .card-art { aspect-ratio: 1; margin: 0; }
.grid-rows .card-title { font-size: .875rem; }

body:has(> .projects-page) {
  --projects-footer-inset: calc(clamp(1.5rem, 4dvh, 3rem) + env(safe-area-inset-bottom));
  min-height: 100dvh;
}
.projects-page {
  --projects-header-height: 49px;
  --projects-footer-space: calc(3.5rem + var(--projects-footer-inset));
  padding-top: var(--projects-header-height);
  padding-bottom: var(--projects-footer-space);
}
html:has(.projects-track:not([hidden])) { overscroll-behavior-y: none; }
.projects-fallback { padding-top: 15px; padding-bottom: 1rem; }
.projects-track {
  --project-step: clamp(10rem, 30svh, 17rem);
  --project-stage-height: calc(100dvh - var(--projects-header-height) - var(--projects-footer-space));
  height: calc(var(--project-stage-height) + var(--project-steps) * var(--project-step));
}
.projects-stage {
  --project-rotation: 0deg;
  --orbit-radius: clamp(21rem, 38vw, 51rem);
  --cover-width: clamp(9rem, 18vw, 20rem);
  position: sticky;
  top: var(--projects-header-height);
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 3.5vw, 5rem);
  height: var(--project-stage-height);
  padding-inline: clamp(2rem, 8vw, 13rem);
  overflow: clip;
}
.projects-title {
  font-size: clamp(3.25rem, 7vw, 10rem);
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.075em;
}
.projects-title:lang(zh-CN) { letter-spacing: -.035em; }
.projects-dial {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 28%;
  width: max(64rem, 142vw);
  max-width: none;
  overflow: visible;
  color: var(--muted);
  opacity: .55;
  pointer-events: none;
  transform: translateY(-50%) rotate(var(--project-rotation));
}
.projects-dial line { stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; }
.projects-dial .major { stroke: var(--text); stroke-width: 1.7; }
.projects-index {
  --rail-space: 1.85rem;
  position: relative;
  z-index: 2;
  min-width: 0;
  margin-inline-start: calc(-1 * var(--rail-space));
}
.projects-names { margin: 0; padding: 0; list-style: none; }
.projects-names button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: clamp(1.65rem, 5.3svh, 3.6rem);
  padding: .2rem .4rem;
  padding-inline-start: calc(.4rem + var(--rail-space));
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: clamp(.875rem, 1.45vw, 1.65rem);
  line-height: 1.15;
  text-align: left;
  overflow-wrap: anywhere;
  user-select: none;
  transition: color .24s;
}
.projects-names button:hover, .projects-names button[aria-current] { color: var(--text); }
.projects-names button[aria-current] { font-weight: 500; }
.projects-name { min-width: 0; transition: transform .28s var(--out); }
.projects-names button[aria-current] .projects-name { transform: translateX(.5rem); }
.projects-tick {
  --tick-strength: 0;
  position: absolute;
  inset-inline-start: .2rem;
  width: calc(var(--rail-space) - .35rem);
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  opacity: calc(.56 + var(--tick-strength) * .44);
  transform: scaleX(calc(.36 + var(--tick-strength) * .64));
  transform-origin: left;
  transition: transform .3s cubic-bezier(.22, 1.28, .44, 1), opacity .18s ease-out;
}
.projects-names button[aria-current] .projects-tick {
  opacity: 1;
  transform: scaleX(calc(.63 + var(--tick-strength) * .37));
}
.projects-scrub-preview {
  position: absolute;
  inset-inline-start: 100%;
  width: min(14rem, 27vw);
  padding: .75rem .875rem;
  border: 1px solid var(--border);
  border-radius: .625rem;
  background: var(--background);
  box-shadow: 0 .5rem 1.25rem rgb(0 0 0 / .14);
  color: var(--secondary);
  font-size: .75rem;
  overflow-wrap: anywhere;
}
.projects-scrub-title {
  margin-bottom: .25rem;
  color: var(--text);
  font-size: .825rem;
  font-weight: 600;
}
.projects-visual {
  position: relative;
  justify-self: center;
  width: min(100%, var(--cover-width));
  min-width: 0;
}
.projects-preview { aspect-ratio: 4 / 3; pointer-events: none; }
.projects-cover {
  --angle: calc(var(--project-rotation) - var(--cover-angle));
  position: absolute;
  inset: 0;
  opacity: .38;
  filter: grayscale(.85) blur(5px);
  transform: rotate(var(--angle)) translateX(calc(-1 * var(--orbit-radius))) rotate(calc(-1 * var(--angle))) translateX(var(--orbit-radius));
  transition: filter .24s, opacity .24s;
}
.projects-cover.is-current { z-index: 1; opacity: 1; filter: none; }
.projects-cover-art {
  height: 100%;
  background: var(--surface);
  clip-path: polygon(0 0, calc(100% - .875rem) 0, 100% .875rem, 100% 100%, 0 100%);
}
.projects-cover-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.projects-details { position: absolute; z-index: 2; top: calc(100% + .875rem); width: 100%; }
.projects-details .card-meta { margin-top: 0; }
.projects-link {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  min-height: 2rem;
  margin-top: .25rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.projects-link:hover { color: var(--accent); }

@media (max-width: 700px) {
  .projects-track { --project-step: clamp(7rem, 23svh, 11rem); }
  .projects-stage {
    --orbit-radius: clamp(16rem, 65vw, 25rem);
    --cover-width: 14rem;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0 .75rem;
    padding: clamp(1.125rem, 5svh, 3rem) clamp(1rem, 5vw, 2rem) 1rem;
  }
  .projects-title { grid-column: 1 / -1; font-size: clamp(2.85rem, 11vw, 4.75rem); }
  .projects-dial { left: 35%; width: 58rem; top: 55%; opacity: .38; }
  .projects-index { --rail-space: 1rem; margin-inline-start: -.3rem; }
  .projects-names button {
    min-height: clamp(1.55rem, 5svh, 2.6rem);
    padding-inline: calc(.15rem + var(--rail-space)) .15rem;
    font-size: clamp(.73rem, 2.9vw, 1.12rem);
  }
  .projects-names button[aria-current] .projects-name { transform: translateX(.25rem); }
  .projects-scrub-preview { display: none; }
  .projects-visual { transform: translateY(-1.75rem); }
  .projects-details { top: calc(100% + .625rem); }
  .projects-details .card-description { font-size: .75rem; }
}

@media (max-height: 500px) {
  .projects-index { display: flex; flex-direction: column; max-height: 100%; }
  .projects-names { min-height: 0; overflow-y: auto; }
}

.footer {
  display: grid;
  gap: .375rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  text-align: center;
}
.projects-page + .footer {
  position: fixed;
  z-index: 4;
  inset: auto 0 var(--projects-footer-inset);
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin-inline: auto;
  padding: .5rem .75rem;
  border: 0;
}
.footer-name { font-size: .7rem; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; color: var(--muted); font-size: .65rem; }
.footer-links :is(.github-contact, .linkedin-contact) { gap: .25rem; }
.footer-links .github-contact svg { width: 1em; height: 1em; }
.footer-links a:hover, .footer-links .email-trigger:hover,
.footer-links .email-trigger[aria-expanded="true"] { color: var(--text); }
.footer-links .email-trigger { padding: 0; border: 0; }
.footer-location { color: var(--muted); font-size: .625rem; letter-spacing: .05em; }
.scramble-effect { display: none; }
[data-scramble] { position: relative; }
[data-scramble].scrambling > :first-child { color: transparent; }
.scrambling .scramble-effect { display: inline; position: absolute; inset: 0; }

@media (max-width: 768px) {
  .hero { height: 70vh; min-height: 380px; }
  .hero-copy { padding-bottom: 2.5rem; }
  .hero-title h1 { font-size: 2.25rem; }
  .tagline { font-size: 1rem; }
  .scene-toggle { right: 16px; bottom: 12px; }
  .bio { margin-top: -28px; }
  .avatar { width: 80px; height: 80px; }
  .bio :is(.bio-lead, .bio-detail, .bio-closing) { font-size: 1.125rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: .7rem; }
  .page-title { font-size: 1.5rem; }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .card-feature .card-art { aspect-ratio: 4 / 3; }
  .card-compact, .grid-rows .card { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 1rem; }
  .card-compact .card-art { aspect-ratio: 1; margin: 0; }
  .card-compact .card-title { font-size: .875rem; }
  .card-compact .card-description { font-size: .8125rem; }
}

@media (max-width: 700px) {
  .email-bubble {
    inset: auto auto calc(100% + .625rem) 50%;
    translate: -50% 0;
  }
  .email-bubble::before {
    inset: auto auto -.3125rem calc(50% - .25rem);
    rotate: -45deg;
  }
}

@media (501px <= width <= 700px) {
  .contact-list .email-bubble { inset-inline: auto 0; translate: none; }
  .contact-list .email-bubble::before { inset-inline: auto 2.5rem; }
}

@media (max-width: 500px) {
  .contact-list { display: grid; grid-template-columns: repeat(2, max-content); justify-items: start; }
}

@media (max-width: 480px) {
  .nav { padding-inline: .75rem; gap: .5rem; }
  .brand { font-size: .8rem; }
  .nav-links { gap: .5rem; }
  .nav-controls { gap: 0; }
}

@media (max-width: 420px) {
  .contact-list { gap: .375rem; }
  .contact-list .contact { gap: .25rem; padding-inline: .4375rem; font-size: .6875rem; }
  .footer-links .email-bubble { inset-inline: auto 0; translate: none; }
  .footer-links .email-bubble::before { inset-inline: auto .75rem; }
}

@media (max-width: 360px) {
  .nav { padding-inline: .625rem; gap: .375rem; }
  .nav-links { gap: .375rem; }
  .nav-links a { font-size: .65rem; }
  .tagline { padding-right: 3rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .email-bubble:not([hidden]) { animation: email-bubble-in .18s ease-out both; }
  .page-content { animation: page-enter .35s var(--out) both; }
  .reveal.is-visible { animation: page-enter .5s var(--out) both; }
  @keyframes email-bubble-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes page-enter {
    from { opacity: .65; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
  .theme-leaves video.is-ready { visibility: hidden; }
  .hero-scene { transform: none; }
  .hero-title.is-animated canvas { display: none; }
  .hero-title.is-animated h1 { opacity: 1; }
  .scrambling > :first-child { color: inherit !important; }
  .scrambling .scramble-effect { display: none; }
}
