:root {
  --bg: #191b1a;
  --panel: #232624;
  --text: #f1efe9;
  --muted: #b4b5ae;
  --line: #424641;
  --accent: #deae89;
  --ink: #191b1a;
  --max: 1440px;
  --pad: clamp(1.25rem, 4.4vw, 4rem);
  --header-size: 5rem;
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-size) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}
body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Helvetica Neue", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
h1, h2, h3, p, figure, dl { margin-top: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1, h2 { letter-spacing: -0.045em; line-height: 1.08; }
h1 { font-weight: 600; }
h2 { font-weight: 500; }
h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.25; }
p { overflow-wrap: break-word; }
figure { margin-left: 0; margin-right: 0; }
::selection { background: var(--accent); color: var(--ink); }
.visually-hidden, .current-section {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--accent);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* The header follows the same baseline as the page content. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  min-height: 5rem;
  padding: 0.65rem max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  padding-top: max(0.65rem, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}
.brand-name { font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; }
.section-menu { display: flex; justify-content: flex-end; align-items: center; gap: 0.3rem; min-width: 0; }
.section-tab {
  min-height: 2.75rem;
  padding: 0.7rem 0.7rem;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 0.875rem;
  line-height: 1.35;
}
.section-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.language-switch { display: flex; flex-wrap: wrap; padding: 0.2rem; border: 1px solid var(--line); }
.language-switch button {
  min-width: 2.4rem;
  min-height: 2.5rem;
  padding: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.2;
}
.language-switch button[aria-pressed="true"] { background: var(--accent); color: var(--ink); font-weight: 700; }
.header-contact, .home-button, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 0;
  color: var(--text);
  background: transparent;
  line-height: 1;
}
.header-contact-label { display: none; }
.contact-symbol { font-size: 1.3rem; }
.menu-lines { display: grid; gap: 5px; width: 21px; }
.menu-lines span { height: 1px; background: currentColor; }
.menu-lines span:last-child { width: 14px; justify-self: end; }

/* Home: the name is a masthead, the portrait and introduction share a row. */
.hero, .section {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 4.5rem var(--pad);
}
.hero { padding-top: 2.5rem; padding-bottom: 4rem; }
.hero-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: clamp(4.5rem, 10vw, 9rem);
  line-height: 1;
  letter-spacing: -0.06em;
}
.eyebrow { color: var(--accent); font-size: 0.875rem; line-height: 1.6; letter-spacing: 0.065em; }
.hero-heading .eyebrow { grid-column: 2; grid-row: 1; margin: 0 0 0.35rem; text-align: right; }
.eyebrow-separator { padding: 0 0.3rem; color: var(--muted); }
.hero-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: center; margin-top: 2rem; }
.hero-visual { min-width: 0; margin-bottom: 0; }
.hero-visual picture { aspect-ratio: 4 / 3; background: var(--panel); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 90%; }
.hero-visual figcaption { margin-top: 0.8rem; color: var(--muted); font-size: 0.875rem; }
.hero-copy { min-width: 0; padding-bottom: 1.5rem; }
.hero-lead { max-width: 30rem; margin-bottom: 1.5rem; font-size: clamp(1.35rem, 2.1vw, 1.85rem); line-height: 1.45; letter-spacing: -0.025em; }
.hero-index { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin: 0; padding: 0; list-style: none; color: var(--accent); font-size: 0.875rem; letter-spacing: 0.06em; }
.hero-index li + li { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.hero-contacts { margin: 2.2rem 0 1.7rem; }
.hero-contacts a { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; padding: 0.55rem 0; }
.hero-contacts a > span { color: var(--muted); font-size: 0.875rem; }
.hero-contacts strong { font-size: 1rem; font-weight: 400; overflow-wrap: anywhere; }
.text-link { display: inline-block; padding: 0.35rem 0; border-bottom: 1px solid var(--accent); color: var(--accent); font-size: 0.875rem; line-height: 1.5; }
.home-overview { padding-top: 1.5rem; }
.home-overview > h2 { margin-bottom: 1.5rem; font-size: 1.75rem; color: var(--muted); }
.home-summary-grid { border-top: 1px solid var(--line); }
.home-summary-card { display: grid; grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr); gap: 0.7rem 3rem; padding: 2.1rem 0; border-bottom: 1px solid var(--line); }
.home-summary-card h3 { grid-row: 1 / 3; margin: 0; font-size: clamp(1.7rem, 2.5vw, 2.4rem); }
.home-summary-card p { margin: 0; max-width: 42rem; color: var(--muted); font-size: 1.05rem; }
.home-summary-card .text-link { grid-column: 2; justify-self: start; }
.home-extras { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr); gap: 4rem; align-items: start; margin-top: 4rem; }
.home-preview-card { min-width: 0; }
.home-preview-card h3 { margin-bottom: 0.8rem; font-size: 1.75rem; }
.home-preview-card p { color: var(--muted); margin-bottom: 1.5rem; max-width: 35rem; }
.home-photo-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 0.6rem; margin-bottom: 1.3rem; }
.home-photo-preview picture { min-width: 0; aspect-ratio: 3 / 4; }
.home-photo-preview picture:nth-child(2) { margin-top: 1.4rem; }
.home-photo-preview picture:nth-child(3) { margin-top: 2.8rem; }
.home-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.home-map-preview { display: block; border: 1px solid var(--line); margin: 2.5rem 0 1.4rem; background: #0a110d; }
.home-map-preview img { width: 100%; }

/* Detailed biography and personal interests. */
.section-kicker { display: flex; align-items: baseline; gap: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; line-height: 1.5; letter-spacing: 0.09em; text-transform: uppercase; }
.section-kicker > span:first-child:not(:only-child) { color: var(--accent); }
.about-grid { display: grid; grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.15fr); gap: 2.5rem 5rem; padding-top: 2rem; align-items: start; }
.about-heading { grid-column: 1 / -1; }
.about-heading h1, .page-intro h1 { margin: 0; font-size: clamp(3rem, 6.5vw, 6rem); }
.about-copy { grid-column: 2; grid-row: 2; min-width: 0; }
.about-copy p { max-width: 43rem; color: var(--muted); font-size: 1.1rem; margin-bottom: 1.6rem; }
.about-copy .about-intro { color: var(--text); font-size: clamp(1.3rem, 2.1vw, 1.75rem); line-height: 1.5; letter-spacing: -0.02em; }
.portrait-card { grid-column: 1; grid-row: 2; width: 100%; max-width: 24rem; margin: 0; }
.portrait-card picture { aspect-ratio: 4 / 5; }
.portrait-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; }
.portrait-card figcaption { margin-top: 0.9rem; color: var(--muted); font-size: 0.875rem; letter-spacing: 0.07em; }
.about-music { margin-top: 4.5rem; }
.music-body { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 5rem; align-items: start; margin-top: 2rem; }
.music-preferences { min-width: 0; }
.music-body h2 { max-width: 20rem; margin-bottom: 2rem; font-size: 2.3rem; }
.music-genres { margin-bottom: 2rem; }
.music-genres > div { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.music-genres dt { color: var(--muted); }
.music-genres dd { margin: 0; font-size: 1.45rem; }
.favorite-track { min-width: 0; }
.favorite-track h3 { color: var(--muted); font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; }
.favorite-track-name { margin: 0.9rem 0 1.25rem; font-size: 1.7rem; letter-spacing: -0.025em; line-height: 1.3; }
.track-player { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; margin-bottom: 0.75rem; background: #121212; }
.games-section { padding-top: 0; }
.games-section h2 { margin: 1.5rem 0; font-size: 2.3rem; }
.game-profiles { border-top: 1px solid var(--line); }
.game-profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 0.7fr); align-items: center; gap: 1rem; min-width: 0; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.game-service-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; min-width: 0; }
.game-service-logo { flex-shrink: 0; width: 2.25rem; height: 2.25rem; object-fit: contain; }
.game-service { overflow-wrap: anywhere; font-size: 1.4rem; letter-spacing: -0.02em; }
.game-profile .text-link { grid-column: 3; justify-self: end; }
.game-handle, .discord-handle { color: var(--muted); overflow-wrap: anywhere; }

/* Geography keeps the existing colours of the countries on the map. */
.travel-map, .frames { padding-top: 1rem; }
.map-head, .frames-head, .path-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: end; gap: 3rem; margin: 2.5rem 0; }
.map-head h2, .frames-head h2, .path-head h2 { margin: 0; font-size: clamp(2.5rem, 4.7vw, 4.4rem); }
.map-head p, .frames-head p, .path-head p { margin: 0; max-width: 30rem; color: var(--muted); font-size: 1.05rem; }
.map-card { border: 1px solid var(--line); background: #0a110d; }
.map-canvas { position: relative; display: block; }
.map-canvas img { width: 100%; }
.homeland-marker { position: absolute; padding: 0.25rem 0.5rem; background: #b1ff58; color: #0a110d; font-size: 0.875rem; font-weight: 600; line-height: 1.25; }
.homeland-marker-russia { top: 12%; left: 75%; }
.homeland-marker-usa { top: 31%; left: 23%; }
.map-meta { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 1rem 2rem; margin: 1.25rem 0 2rem; }
.map-meta p { margin: 0; color: var(--muted); font-size: 0.875rem; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.8rem 1.8rem; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; }
.map-legend li { display: flex; align-items: center; gap: 0.55rem; }
.map-swatch { width: 0.75rem; height: 0.75rem; flex-shrink: 0; }
.map-swatch-visited { background: #6179ff; }
.map-swatch-wanted { background: #ff535e; }
.map-swatch-home { background: #b1ff58; }
.country-accordions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 2.5rem; }
.country-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.country-details summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; padding: 1.25rem 0; font-size: 1.15rem; cursor: pointer; list-style: none; }
.country-details summary::-webkit-details-marker { display: none; }
.country-summary-heading { display: flex; min-width: 0; overflow-wrap: anywhere; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; }
.country-count { color: var(--accent); font-size: 0.875rem; white-space: nowrap; }
.details-symbol { position: relative; flex-shrink: 0; width: 1rem; height: 1rem; color: var(--accent); }
.details-symbol::before, .details-symbol::after { content: ""; position: absolute; background: currentColor; }
.details-symbol::before { width: 1rem; height: 1px; top: 0.5rem; }
.details-symbol::after { width: 1px; height: 1rem; left: 0.5rem; }
.country-details[open] .details-symbol::after { display: none; }
.country-count-note { margin: 0 0 1rem; color: var(--muted); font-size: 0.875rem; }
.country-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; margin: 0; padding: 0 0 1.25rem; list-style: none; }
.country-list li { display: flex; min-width: 0; overflow-wrap: anywhere; flex-wrap: wrap; gap: 0.4rem; justify-content: space-between; align-items: baseline; padding: 0.65rem 0; border-top: 1px solid var(--line); font-size: 1rem; }
.country-home { color: #b1ff58; font-size: 0.875rem; }

/* Photographs form an uneven sequence, with captions outside the images. */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; gap: 3rem 1.5rem; margin-top: 3rem; }
.gallery-item { grid-column: span 4; min-width: 0; margin-bottom: 0; }
.gallery-item picture { height: 28rem; background: var(--panel); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item:first-child { grid-column: 1 / span 5; }
.gallery-item:first-child picture { height: 34rem; }
.gallery-item:nth-child(2) { grid-column: 7 / span 6; margin-top: 4rem; }
.gallery-item:nth-child(2) picture { height: 26rem; }
.gallery-item-night { grid-column: 1 / span 4; }
.gallery-item-city { grid-column: 6 / span 3; margin-top: 2rem; }
.gallery-item-city picture { height: 25rem; }
.gallery-item-video { grid-column: 10 / span 3; margin-top: 4rem; }
.gallery-item-video video { width: 100%; height: auto; aspect-ratio: 9 / 16; background: #080b19; }
.gallery-item:nth-child(6) { grid-column: 2 / span 5; }
.gallery-item:nth-child(6) picture { height: 32rem; }
.gallery-item-panorama { grid-column: 8 / span 5; margin-top: 5rem; }
.gallery-item-panorama picture { height: 25rem; }
.gallery-item-panorama img { object-position: 50% 72%; }
.gallery-item figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 0.9rem; color: var(--muted); font-size: 0.875rem; line-height: 1.4; letter-spacing: 0.055em; }
.gallery-item figcaption > span:first-child { color: var(--accent); }
.gallery-item figcaption > span:last-child { text-align: right; }

/* Chinese study: introduction and level on different rails. */
.page-intro-grid { padding-top: 2rem; }
.chinese-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5rem; align-items: start; margin-top: 3rem; }
.page-intro-copy { max-width: 45rem; color: var(--muted); font-size: 1.2rem; }
.chinese-body > .page-intro-copy p:first-child { color: var(--text); font-size: 1.4rem; line-height: 1.55; }
.chinese-body > .page-intro-copy p { margin-bottom: 1.5rem; }
.chinese-aside { min-width: 0; }
.language-level { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding: 0 0 1.6rem; border-bottom: 1px solid var(--line); }
.level-metric { flex-shrink: 0; color: var(--accent); font-size: clamp(2rem, 3.5vw, 3.5rem); line-height: 1; letter-spacing: -0.05em; }
.language-level p { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.school-reference { margin-top: 2rem; }
.school-heading { display: flex; gap: 1rem; align-items: center; }
.school-logo { flex-shrink: 0; width: 4rem; height: 4rem; object-fit: contain; background: #fff; }
.school-heading h2 { margin: 0 0 0.4rem; font-size: 1.7rem; letter-spacing: -0.025em; }
.school-label { margin: 0; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.school-description { margin: 1.25rem 0 0.8rem; color: var(--muted); font-size: 1rem; }
.path { padding-top: 1rem; }
.timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin: 3rem 0 0; padding: 0; list-style: none; }
.timeline-row { position: relative; min-width: 0; padding: 2rem; background: var(--panel); border-left: 2px solid var(--accent); }
.timeline-row time { display: block; margin-bottom: 1.5rem; color: var(--accent); font-size: 3rem; line-height: 1; letter-spacing: -0.04em; }
.timeline-row h3 { max-width: 24rem; margin-bottom: 0.75rem; font-size: 1.5rem; }
.timeline-row p { margin: 0; color: var(--muted); font-size: 0.875rem; }
.timeline-number { position: absolute; top: 2rem; right: 2rem; color: var(--muted); font-size: 0.875rem; }

/* Plans are a reading list; the interests share one photograph. */
#plans .page-intro-copy { margin: 2rem 0 0; }
.goal-list { margin: 3.5rem 0 0; border-top: 1px solid var(--line); }
.goal-list > div { display: grid; grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr); gap: 2rem; padding: 1.7rem 0; border-bottom: 1px solid var(--line); }
.goal-list dt { color: var(--muted); font-size: 1rem; }
.goal-list dd { margin: 0; max-width: 40rem; font-size: clamp(1.2rem, 2vw, 1.8rem); line-height: 1.45; letter-spacing: -0.025em; }
.focus { padding-top: 1rem; }
.focus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4rem; margin-top: 2rem; }
.focus-card { display: flex; gap: 1.6rem; align-items: flex-start; min-width: 0; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.focus-card:first-child { grid-column: 1; grid-row: 1; }
.focus-card-accent { grid-column: 1; grid-row: 2; }
.focus-icon { flex-shrink: 0; width: 3rem; color: var(--accent); font-size: 2rem; line-height: 1.3; }
.focus-label { margin-bottom: 1rem; color: var(--muted); font-size: 0.875rem; }
.focus-card h3 { margin-bottom: 1rem; font-size: clamp(1.75rem, 2.4vw, 2.5rem); }
.focus-card p:last-child { margin: 0; color: var(--muted); }
.focus-card-photo { position: relative; grid-column: 2; grid-row: 1 / 3; min-height: 30rem; padding: 0; border: 0; background: #101714; }
.focus-card-photo picture { position: absolute; inset: 0; }
.focus-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.focus-card-photo > div { position: relative; align-self: flex-end; width: 100%; padding: 1.75rem; background: #191b1ae8; }
.focus-card-photo h3 { margin-bottom: 0; }

/* Contacts close the page with the one full copper surface. */
.contact { background: var(--accent); color: var(--ink); margin-top: 2rem; }
.contact-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 4rem; width: min(100%, var(--max)); margin: 0 auto; padding: 3.5rem var(--pad) 4rem; }
.contact-inner > .eyebrow { grid-column: 1 / -1; margin: 0; color: var(--ink); }
.contact h2 { margin: 0; font-size: clamp(3rem, 6.5vw, 6rem); }
.contact-links { min-width: 0; }
.contact-links a { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; padding: 0.85rem 0; border-bottom: 1px solid #191b1a70; }
.contact-links a:first-child { padding-top: 0; }
.contact-links a > span { font-size: 0.875rem; }
.contact-links strong { font-weight: 500; font-size: 1.1rem; overflow-wrap: anywhere; }
.contact :focus-visible { outline-color: var(--ink); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; width: min(100%, var(--max)); margin: 0 auto; padding: 1.75rem var(--pad); color: var(--muted); font-size: 0.875rem; }

@media (hover: hover) {
  .section-tab:hover, .header-contact:hover, .home-button:hover, .menu-toggle:hover { color: var(--accent); }
  .language-switch button:not([aria-pressed="true"]):hover { color: var(--text); }
  .hero-contacts a:hover strong { color: var(--accent); }
  .text-link:hover { color: var(--text); border-color: var(--text); }
  .game-profile[href]:hover .game-service { color: var(--accent); }
  .contact-links a:hover strong { text-decoration: underline; text-underline-offset: 0.25em; }
}
@media (max-width: 1160px) {
  .site-header { grid-template-columns: auto minmax(0, 1fr); }
  .header-actions { justify-content: flex-end; }
  .section-menu { position: absolute; top: 100%; right: 0; left: 0; display: grid; gap: 0; padding: 0.75rem var(--pad) 1rem; border-bottom: 1px solid var(--line); background: var(--panel); }
  .section-tab { min-height: 3.25rem; padding: 0.85rem 0; text-align: left; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .section-tab[aria-selected="true"] { border-bottom-color: var(--accent); }
  .hero-body { gap: 2.5rem; }
  .hero-lead { font-size: 1.4rem; }
  .hero-contacts { margin-top: 1.5rem; }
  .about-grid, .music-body, .chinese-body { column-gap: 3rem; }
  .home-extras { gap: 2.5rem; }
  .focus-grid { column-gap: 2.5rem; }
}
@media (max-width: 980px) {
  .brand-name { display: none; }
  .hero-heading { grid-template-columns: 1fr; gap: 0.8rem; }
  .hero h1 { grid-column: 1; grid-row: 2; font-size: clamp(4rem, 12vw, 7rem); }
  .hero-heading .eyebrow { grid-column: 1; grid-row: 1; text-align: left; }
  .hero-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .hero-visual picture { aspect-ratio: 4 / 5; }
  .hero-visual img { object-position: 50% 85%; }
  .hero-contacts a { grid-template-columns: 1fr; gap: 0.05rem; padding: 0.4rem 0; }
  .hero-copy { padding-bottom: 0; }
  .home-summary-card { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr); gap: 1rem 2rem; }
  .country-accordions { grid-template-columns: 1fr; gap: 1rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .gallery-item, .gallery-item:first-child, .gallery-item:nth-child(2), .gallery-item:nth-child(6), .gallery-item-night, .gallery-item-city, .gallery-item-video, .gallery-item-panorama { grid-column: auto; margin-top: 0; }
  .gallery-item picture, .gallery-item:first-child picture, .gallery-item:nth-child(2) picture, .gallery-item:nth-child(6) picture, .gallery-item-city picture, .gallery-item-panorama picture { height: auto; aspect-ratio: 3 / 4; }
  .gallery-item-video video { aspect-ratio: 3 / 4; object-fit: contain; }
  .gallery-item:last-child { grid-column: 1 / -1; }
  .gallery-item-panorama picture { aspect-ratio: 3 / 2; }
  .chinese-body { gap: 2rem; }
  .language-level { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .focus-icon { width: 2rem; font-size: 1.5rem; }
  .focus-card { gap: 1rem; }
}
@media (max-width: 760px) {
  .site-header { gap: 0.75rem; padding-top: max(0.55rem, env(safe-area-inset-top)); padding-bottom: 0.55rem; min-height: 4.25rem; }
  .header-actions { gap: 0.2rem; flex-wrap: wrap; }
  .language-switch { padding: 0; max-width: 100%; }
  .language-switch button { min-width: 2.25rem; min-height: 2.75rem; }
  .home-button, .header-contact, .menu-toggle { min-width: 2.5rem; }
  .hero, .section { padding-top: 2.5rem; padding-bottom: 3rem; }
  .hero { padding-top: 1.75rem; }
  .hero-heading { padding-bottom: 1.4rem; }
  .hero h1 { font-size: clamp(3.5rem, 16vw, 6.5rem); }
  .hero-body { grid-template-columns: 1fr; gap: 1.75rem; margin-top: 1.5rem; }
  .hero-visual { width: 100%; }
  .hero-visual picture { aspect-ratio: 4 / 3; }
  .hero-visual img { object-position: 50% 90%; }
  .hero-lead { max-width: 34rem; font-size: 1.3rem; }
  .hero-contacts { margin: 1.5rem 0 1.25rem; }
  .hero-contacts a { grid-template-columns: 5.2rem minmax(0, 1fr); gap: 0.75rem; padding: 0.5rem 0; }
  .hero-contacts strong { font-size: 1rem; }
  .home-overview { padding-top: 0; }
  .home-overview > h2 { font-size: 1.5rem; }
  .home-summary-card { grid-template-columns: 1fr; gap: 1rem; padding: 1.75rem 0; }
  .home-summary-card h3 { grid-row: auto; font-size: 1.7rem; }
  .home-summary-card .text-link { grid-column: 1; }
  .home-summary-card p { font-size: 1rem; }
  .home-extras { grid-template-columns: 1fr; gap: 2.5rem; margin-top: 2.75rem; }
  .home-map-preview { margin-top: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.75rem; }
  .about-heading, .about-copy, .portrait-card { grid-column: 1; grid-row: auto; }
  .about-heading h1, .page-intro h1 { font-size: clamp(2.5rem, 10vw, 4rem); }
  .portrait-card { max-width: 100%; }
  .portrait-card picture { aspect-ratio: 4 / 3; }
  .portrait-card img { object-position: 50% 90%; }
  .about-copy .about-intro { font-size: 1.25rem; }
  .about-copy p { font-size: 1rem; }
  .about-music { margin-top: 3rem; }
  .music-body { grid-template-columns: 1fr; gap: 2.5rem; margin-top: 1.5rem; }
  .music-body h2 { max-width: 100%; margin-bottom: 1.5rem; font-size: 1.9rem; }
  .music-genres { margin-bottom: 1.5rem; }
  .favorite-track-name { font-size: 1.45rem; }
  .games-section { padding-top: 0; }
  .games-section h2 { font-size: 1.9rem; }
  .game-profile { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem; }
  .game-profile .text-link { grid-column: 2; justify-self: end; }
  .game-service { overflow-wrap: anywhere; font-size: 1.15rem; }
  .game-service-logo { width: 2rem; height: 2rem; }
  .game-handle, .discord-handle { grid-column: 2; justify-self: end; font-size: 0.875rem; }
  .game-profile:has(.game-handle) .text-link { grid-row: 2; }
  .map-head, .frames-head, .path-head { grid-template-columns: 1fr; gap: 1.25rem; margin: 1.75rem 0; }
  .map-head h2, .frames-head h2, .path-head h2 { font-size: clamp(2rem, 8vw, 3rem); }
  .map-head p, .frames-head p, .path-head p { font-size: 1rem; }
  .homeland-marker { display: none; }
  .map-meta { margin-bottom: 1.5rem; }
  .map-legend { gap: 0.6rem 1.25rem; }
  .country-details summary { font-size: 1.05rem; }
  .gallery { margin-top: 2rem; gap: 2rem 1rem; }
  .gallery-item figcaption { font-size: 0.875rem; letter-spacing: 0.025em; }
  .page-intro-grid { padding-top: 1.75rem; }
  .chinese-body { grid-template-columns: 1fr; gap: 2rem; margin-top: 2rem; }
  .page-intro-copy { font-size: 1.05rem; }
  .chinese-body > .page-intro-copy p:first-child { font-size: 1.2rem; }
  .language-level { flex-direction: row; align-items: center; }
  .level-metric { font-size: 2.75rem; }
  .school-reference { margin-top: 1.5rem; }
  .timeline { grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }
  .timeline-row { padding: 1.5rem; }
  .timeline-row time { margin-bottom: 1.25rem; font-size: 2.5rem; }
  .timeline-row h3 { font-size: 1.3rem; }
  .timeline-number { top: 1.5rem; right: 1.5rem; }
  .goal-list { margin-top: 2rem; }
  .goal-list > div { grid-template-columns: 1fr; gap: 0.65rem; padding: 1.3rem 0; }
  .goal-list dt { font-size: 0.875rem; }
  .goal-list dd { font-size: 1.25rem; }
  .focus-grid { grid-template-columns: 1fr; margin-top: 1.5rem; }
  .focus-card:first-child, .focus-card-accent, .focus-card-photo { grid-column: 1; grid-row: auto; }
  .focus-card { padding: 1.5rem 0; }
  .focus-card-photo { margin-top: 2rem; min-height: 25rem; padding: 0; }
  .focus-card h3 { font-size: 1.9rem; }
  .contact { margin-top: 0; }
  .contact-inner { grid-template-columns: 1fr; gap: 1.25rem; padding-top: 2.5rem; padding-bottom: 3rem; }
  .contact h2 { font-size: 3.5rem; }
  .contact-links { margin-top: 0.5rem; }
  .contact-links strong { font-size: 1rem; }
  .site-footer { padding-top: 1.25rem; padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); }
}
@media (max-width: 540px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery-item:last-child { grid-column: 1; }
  .gallery-item picture, .gallery-item:first-child picture, .gallery-item:nth-child(2) picture, .gallery-item:nth-child(6) picture, .gallery-item-city picture, .gallery-item-panorama picture { aspect-ratio: auto; }
  .gallery-item img { height: auto; }
  .gallery-item-video video { aspect-ratio: 9 / 16; }
  .site-footer > span:nth-child(2) { display: none; }
}
@media (max-width: 380px) {
  :root { --pad: 1rem; }
  .header-contact { display: none; }
  .hero-index { gap: 0.5rem 0.8rem; letter-spacing: 0.04em; }
  .hero-index li + li { padding-left: 0.8rem; }
  .country-list { grid-template-columns: 1fr; }
  .language-level { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 300px) {
  .site-header { grid-template-columns: 1fr; gap: 0.5rem; }
  .brand { justify-self: start; }
  .header-actions { justify-content: flex-start; }
  .hero-contacts a, .contact-links a { grid-template-columns: 1fr; gap: 0.15rem; }
  .music-genres > div, .game-profile { grid-template-columns: 1fr; }
  .game-profile .text-link, .game-handle, .discord-handle { grid-column: 1; justify-self: start; }
  .game-profile:has(.game-handle) .text-link { grid-row: auto; }
}
html:lang(zh) h1, html:lang(zh) h2, html:lang(zh) h3 { letter-spacing: 0; line-height: 1.25; }
html:lang(zh) .section-kicker, html:lang(zh) .eyebrow { letter-spacing: 0.04em; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
