:root {
  color-scheme: dark;
  --bg: #1c2b39;
  --surface: #283d4b;
  --ink: #f4f5f2;
  --muted: #b5c0c5;
  --accent: #75dfca;
  --line: #536875;
  --subtle: #8d9ba3;
  --error: #ffb1b5;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-height: 88px;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
}
body.album-open {
  overflow: hidden;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 8px 16px;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
button:hover:not(:disabled) {
  background: #1b292f;
  border-color: #5e817e;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
section:focus,
main:focus {
  outline: none;
}
summary {
  cursor: pointer;
}
summary::-webkit-details-marker {
  display: none;
}
summary::marker {
  content: "";
}
p,
h1,
h2,
h3,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.25;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 4.4vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.8rem, 2.7vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.5rem;
  font-weight: 600;
}
p {
  color: var(--muted);
  text-wrap: pretty;
}
img {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 90;
  padding: 12px;
  background: var(--accent);
  color: #09231e;
  transform: translateY(-180%);
}
.skip-link:focus {
  transform: none;
}
.site-header {
  height: var(--header-height);
  padding: 0 clamp(20px, 4.5vw, 80px);
  display: flex;
  align-items: center;
  gap: 28px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(32, 49, 64, 0.94);
  border-bottom: 1px solid #213035;
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: 21px;
  font-weight: 650;
  white-space: nowrap;
}
.wordmark span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.site-nav {
  position: relative;
  display: flex;
  gap: 4px;
  margin-left: auto;
  isolation: isolate;
}
.site-nav a {
  font-size: 14px;
  padding: 11px 18px;
  min-height: 44px;
  color: var(--muted);
  white-space: nowrap;
}
.site-nav a[aria-current] {
  color: var(--ink);
}
.nav-marker {
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  border-radius: 7px;
  background: #1d2b30;
  z-index: -1;
  transition:
    transform 0.35s var(--ease),
    width 0.35s var(--ease);
}
.motion-toggle {
  font-size: 12px;
  white-space: nowrap;
  border: none;
  color: var(--muted);
  padding: 8px;
}
.motion-toggle[aria-pressed="true"] {
  color: var(--accent);
}
.globe-stage {
  position: relative;
  min-height: 760px;
  height: calc(100svh - 88px);
  max-height: 960px;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.globe-viewport {
  position: absolute;
  inset: 0 -2% 48px 30%;
  z-index: -1;
  overflow: hidden;
}
#globeCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: grab;
}
#globeCanvas:active {
  cursor: grabbing;
}
.hero-intro {
  position: relative;
  width: 55%;
  max-width: 770px;
  padding-top: clamp(90px, 12vh, 150px);
  padding-left: clamp(24px, 6vw, 100px);
  pointer-events: none;
}
.hero-intro a {
  pointer-events: auto;
}
.intro-line {
  color: var(--accent);
  font-size: 17px;
  margin-bottom: 26px;
}
.hero-intro h1 span {
  display: block;
  animation: title-in 0.8s var(--ease) both;
}
.hero-intro h1 span:nth-child(2) {
  animation-delay: 0.12s;
}
@keyframes title-in {
  from {
    opacity: 0.4;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero-description {
  font-size: 19px;
  line-height: 1.9;
  margin: 26px 0 30px;
  color: #c7d0d4;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #09251f;
  font-weight: 600;
  font-size: 15px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary-action:hover:not(:disabled) {
  color: #09251f;
  background: #96ecdc;
}
.primary-action:active {
  transform: translateY(1px);
}
.text-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--accent);
  border: none;
  padding: 6px 0;
  font-size: 14px;
  background: transparent;
}
.text-action:hover {
  background: transparent !important;
  color: #b1f3e5;
}
.hero-footnote {
  font-size: 12px;
  margin-top: 42px;
  color: var(--subtle);
}
.chapter-panel {
  position: absolute;
  right: 7%;
  bottom: 140px;
  width: 290px;
  padding: 20px 0 20px 24px;
  border-left: 1px solid #789b9566;
  background: linear-gradient(
    90deg,
    rgba(9, 13, 16, 0.9),
    rgba(9, 13, 16, 0.5)
  );
}
.eyebrow {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.chapter-panel h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.chapter-panel > p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.7;
}
.chapter-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  margin: 16px 0 4px;
  flex-wrap: wrap;
}
.chapter-actions a {
  font-size: 13px;
  color: var(--accent);
  display: inline-block;
  min-height: 44px;
  padding-top: 8px;
}
.place-dock {
  position: absolute;
  bottom: 62px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  background: #101b20;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  isolation: isolate;
  max-width: calc(100% - 32px);
}
.place-dock button {
  position: relative;
  border: none;
  background: transparent;
  white-space: nowrap;
  border-radius: 6px;
  padding: 9px 21px;
  min-height: 44px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.place-dock button[aria-pressed="true"] {
  color: var(--ink);
}
.place-dock button:hover:not(:disabled) {
  background: transparent;
}
.city-slider {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  background: #2b4448;
  border-radius: 6px;
  z-index: -1;
  transition:
    transform 0.4s var(--ease),
    width 0.4s var(--ease);
}
.city-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--city-color);
  flex-shrink: 0;
}
.daily-note {
  position: absolute;
  bottom: 20px;
  left: 24px;
  right: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--subtle);
}
.globe-loader {
  position: absolute;
  top: 22px;
  right: 10%;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.25s;
}
.globe-loader::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid var(--accent);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.globe-loader.done {
  opacity: 0;
  pointer-events: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.section-shell {
  max-width: 1320px;
  margin: auto;
  padding: 104px 60px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 10px;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 52px;
}
.section-heading > p {
  font-size: 14px;
  flex-shrink: 0;
}
.section-heading .eyebrow {
  margin-bottom: 16px;
}
.story-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 76px;
  align-items: start;
}
.memory-scene {
  position: sticky;
  top: 120px;
  min-width: 0;
}
.memory-visual {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 4px;
  width: 100%;
  height: 360px;
  position: relative;
  overflow: hidden;
  background: #121f25;
  cursor: zoom-in;
}
.memory-visual:hover:not(:disabled) {
  background: #121f25;
}
.memory-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s;
}
.memory-visual img.loading {
  opacity: 0.18;
}
.photo-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  background: rgba(9, 13, 16, 0.9);
  border-radius: 4px;
  font-size: 12px;
}
.image-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 13px;
  pointer-events: none;
}
.image-status button {
  pointer-events: auto;
  background: var(--surface);
}
.memory-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.memory-caption .eyebrow {
  margin-bottom: 5px;
}
.memory-caption h3 {
  font-size: 27px;
}
.memory-scene > p {
  font-size: 14px;
  margin-top: 12px;
}
.memory-gallery {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.memory-gallery button {
  width: 88px;
  height: 58px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
}
.memory-gallery img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.memory-gallery button:hover {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
.memory-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12px;
}
.memory-actions button {
  padding: 5px 12px;
  font-size: 12px;
}
.memory-actions a {
  margin-left: auto;
  min-height: 44px;
  padding-top: 10px;
}
.life-item {
  border-top: 1px solid var(--line);
  min-height: 200px;
  display: flex;
  align-items: center;
}
.life-item:last-child {
  border-bottom: 1px solid var(--line);
}
.life-item > button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  padding: 28px 18px;
  border-radius: 0;
  background: transparent;
  min-width: 0;
}
.life-item > button:hover {
  background: #111b20;
}
.life-year {
  font-size: 12px;
  color: var(--subtle);
  display: block;
  margin-bottom: 12px;
}
.life-name {
  display: flex;
  justify-content: space-between;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
}
.life-name span {
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}
.life-description {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
  max-width: 30ch;
}
.life-item.active .life-name,
.life-item.active .life-year {
  color: var(--accent);
}
.life-item.active .life-name span {
  opacity: 1;
}
.life-item.active > button {
  background: #112227;
}
.experience-row {
  border-top: 1px solid var(--line);
}
.experience-row:last-child {
  border-bottom: 1px solid var(--line);
}
.experience-row > summary {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding: 28px 8px;
  list-style: none;
  transition: background 0.2s;
}
.experience-row > summary:hover {
  background: #101b20;
}
.experience-logo {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: contain;
  background: #eef0ed;
  padding: 5px;
  flex-shrink: 0;
  margin-top: 5px;
}
.experience-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.experience-date {
  font-size: 12px;
  color: var(--subtle);
  margin-bottom: 6px;
}
.experience-name {
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 550;
  overflow-wrap: anywhere;
}
.experience-role {
  font-size: 13px;
  color: var(--accent);
  margin-top: 5px;
}
.experience-summary {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  max-width: 68ch;
  line-height: 1.75;
}
.expand-icon {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 27px;
  flex-shrink: 0;
  margin-top: 14px;
  transition: transform 0.3s var(--ease);
}
details[open] > .expand-icon,
details[open] > summary .expand-icon {
  transform: rotate(45deg);
}
.experience-detail {
  padding: 0 70px 30px 86px;
  max-width: 90ch;
}
.experience-detail p {
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.9;
}
.experience-detail p:first-child {
  margin-top: 0;
}
/* Work experience: scoped to #internships so other sections retain their layout. */
#internships .work-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.85fr);
  gap: 64px;
  align-items: start;
}
#internships .work-intro {
  position: sticky;
  top: 140px;
}
#internships .eyebrow {
  margin-bottom: 22px;
}
#internships h2 {
  font-size: clamp(1.75rem, 2.45vw, 2.5rem);
  line-height: 1.5;
  letter-spacing: -0.025em;
}
#internships h2 span {
  display: block;
}
#internships h2 span:last-child {
  color: var(--accent);
}
#internships .work-lead {
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  text-wrap: pretty;
}
#internships .work-filters {
  --filter-index: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  isolation: isolate;
  margin-top: 36px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10181c;
}
#internships .work-filter-slider {
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  border: 1px solid #54746e;
  border-radius: 6px;
  background: #233c37;
  transform: translateX(calc(var(--filter-index) * 100%));
  transition: transform 240ms var(--ease);
}
#internships .work-filters button {
  border: 0;
  background: transparent;
  padding: 8px 6px;
  font-size: 13px;
  color: var(--muted);
}
#internships .work-filters button[aria-pressed="true"] {
  color: #c4f7ed;
}
#internships .work-filters button:hover {
  color: var(--ink);
}
#internships .work-filters button span {
  margin-left: 5px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
#internships .work-reading-note {
  margin-top: 20px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.9;
}
#internships .work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
#internships .work-toolbar p {
  font-size: 12px;
  color: var(--muted);
}
#internships .work-toolbar button {
  font-size: 12px;
  border-color: transparent;
  padding: 6px 10px;
  color: var(--accent);
}
#internships .work-toolbar button span {
  margin-left: 10px;
}
#internships .work-row {
  position: relative;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
#internships .work-row[hidden] {
  display: none;
}
#internships .work-row > summary {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr) 48px;
  gap: 22px;
  padding: 28px 8px 26px 0;
  position: relative;
  isolation: isolate;
  scroll-margin-top: 120px;
}
#internships .work-row > summary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    300px circle at var(--work-spot-x, 50%) var(--work-spot-y, 40%),
    #75dfca12,
    transparent 75%
  );
  opacity: 0;
  transition: opacity 180ms ease-out;
}
#internships .work-row > summary:hover {
  background: transparent;
}
#internships .work-row > summary:hover::before {
  opacity: 1;
}
#internships .work-row > summary:focus-visible {
  outline-offset: 3px;
  background: #142320;
}
#internships .work-chronology {
  align-self: stretch;
  position: relative;
  display: flex;
  flex-direction: column;
}
#internships .work-chronology::after {
  content: "";
  position: absolute;
  width: 1px;
  top: 63px;
  bottom: -27px;
  left: 3px;
  background: #304842;
}
#internships .work-year {
  font-size: 21px;
  line-height: 1.5;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #c9d7d2;
}
#internships .work-type {
  color: var(--subtle);
  font-size: 11px;
  white-space: nowrap;
  margin-top: 4px;
}
#internships .work-entry {
  min-width: 0;
  display: block;
}
#internships .work-identity {
  display: flex;
  align-items: center;
  gap: 15px;
}
#internships .experience-logo {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 5px;
}
#internships .experience-name {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 550;
}
#internships .experience-role {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
#internships .experience-summary {
  display: block;
  color: #d2dcd9;
  margin: 16px 0 10px;
  font-size: 14px;
  line-height: 1.8;
}
#internships .experience-date {
  display: block;
  font-size: 11px;
  margin: 0;
  color: var(--subtle);
}
#internships .work-disclosure {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 7px;
  align-self: start;
  color: var(--subtle);
}
#internships .work-disclosure-label {
  font-size: 10px;
}
#internships .expand-icon {
  width: 32px;
  height: 32px;
  line-height: 29px;
  margin: 4px 0 0;
  font-size: 18px;
}
#internships .work-row[open] > summary {
  background: #101c1b;
}
#internships .work-row[open] .work-year,
#internships .work-row[open] .work-disclosure {
  color: var(--accent);
}
#internships .work-row[open] .expand-icon {
  background: #24433b;
  border-color: #537b6d;
}
#internships .work-row[open] > summary::after {
  content: "";
  position: absolute;
  left: -12px;
  top: 30px;
  width: 3px;
  height: 32px;
  border-radius: 2px;
  background: var(--accent);
}
#internships .experience-detail {
  max-width: none;
  padding: 5px 38px 28px 87px;
  background: #101c1b;
}
#internships .work-detail-heading {
  font-size: 11px;
  color: var(--accent);
  margin: 0 0 20px;
  letter-spacing: 0.04em;
}
#internships .work-detail-list {
  margin: 0;
  padding-left: 23px;
  color: #d2dcd9;
}
#internships .work-detail-list li {
  font-size: 14px;
  line-height: 1.95;
  padding-left: 7px;
  margin-bottom: 18px;
  text-wrap: pretty;
}
#internships .work-detail-list li::marker {
  color: var(--subtle);
  font-size: 11px;
}
#internships .work-unpublished {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}
#internships .work-close {
  color: var(--accent);
  font-size: 12px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #385c52;
  border-radius: 0;
}
#internships .work-close:hover {
  background: transparent;
  border-color: var(--accent);
}
#internships .work-close span {
  margin-left: 16px;
}
#internships .work-end {
  margin-top: 26px;
  color: var(--subtle);
  font-size: 12px;
}
@media (max-width: 1100px) {
  #internships .work-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
  }
  #internships .work-row > summary {
    grid-template-columns: 52px minmax(0, 1fr) 36px;
    gap: 14px;
  }
  #internships .experience-name {
    font-size: 18px;
  }
  #internships .experience-detail {
    padding-left: 66px;
    padding-right: 22px;
  }
}
@media (max-width: 800px) {
  #internships .work-layout {
    display: block;
  }
  #internships .work-intro {
    position: static;
  }
  #internships h2 {
    font-size: 30px;
    line-height: 1.45;
  }
  #internships .eyebrow {
    margin-bottom: 14px;
  }
  #internships .work-lead {
    margin-top: 18px;
  }
  #internships .work-filters {
    margin-top: 24px;
    max-width: 360px;
  }
  #internships .work-reading-note {
    margin: 12px 0 28px;
    font-size: 12px;
  }
  #internships .work-reading-note br {
    display: none;
  }
  #internships .work-toolbar {
    padding-bottom: 8px;
  }
  #internships .work-row > summary {
    grid-template-columns: 48px minmax(0, 1fr) 32px;
    gap: 12px;
    padding: 24px 0;
  }
  #internships .work-year {
    font-size: 18px;
  }
  #internships .work-type {
    font-size: 10px;
  }
  #internships .work-identity {
    gap: 10px;
  }
  #internships .experience-logo {
    width: 36px;
    height: 36px;
    padding: 3px;
  }
  #internships .experience-name {
    font-size: 17px;
  }
  #internships .experience-summary {
    font-size: 13px;
    margin-top: 13px;
  }
  #internships .experience-role {
    font-size: 11px;
  }
  #internships .experience-date {
    font-size: 11px;
  }
  #internships .expand-icon {
    width: 28px;
    height: 28px;
    line-height: 25px;
  }
  #internships .experience-detail {
    padding: 0 14px 24px 20px;
  }
  #internships .work-detail-list li {
    font-size: 14px;
  }
  #internships .work-row[open] > summary::after {
    left: -8px;
  }
}
@media (prefers-reduced-motion: reduce), (hover: none) {
  #internships .work-row > summary::before {
    display: none;
  }
}
.reduce-motion #internships .work-row > summary::before {
  display: none;
}
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  perspective: 1400px;
}
.project-card {
  position: relative;
  border: 1px solid #385051;
  border-radius: 12px;
  background: #102026;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition:
    transform 0.22s var(--ease),
    border-color 0.2s;
  isolation: isolate;
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    280px circle at var(--spot-x, 50%) var(--spot-y, 30%),
    #75dfca1c,
    transparent 80%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  z-index: -1;
}
.project-card:hover::before {
  opacity: 1;
}
.project-card:focus-within {
  border-color: var(--accent);
}
.project-card > summary {
  display: flex;
  flex-wrap: wrap;
  padding: 32px;
  gap: 22px;
  list-style: none;
  position: relative;
}
.project-card .experience-logo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  padding: 0;
  order: 0;
}
.project-card .expand-icon {
  order: 1;
}
.project-card .experience-copy {
  order: 2;
  flex: 0 0 100%;
}
.project-card .experience-name {
  font-size: 24px;
}
.project-card .experience-summary {
  min-height: 50px;
}
.project-card .experience-detail {
  padding: 0 32px 32px;
}
.project-card[open] {
  transform: none;
}
.film {
  position: relative;
  background: #132026;
  min-height: 240px;
  border-radius: 6px;
  overflow: hidden;
}
.film video {
  width: 100%;
  max-height: 620px;
  aspect-ratio: 16/9;
  display: block;
  background: #090d10;
  object-fit: contain;
}
.film > button {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  background: rgba(9, 13, 16, 0.92);
  border-color: #94bcb2;
  min-width: 160px;
  border-radius: 8px;
}
.film > button:active {
  transform: translate(-50%, -49%);
}
.film figcaption {
  padding: 14px 22px;
  font-size: 12px;
  color: var(--muted);
}
.conversation-band,
.contact-band {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 64px;
  align-items: start;
}
.conversation-copy > p:not(.eyebrow),
.contact-copy > p:not(.eyebrow) {
  margin-top: 24px;
  font-size: 14px;
}
.conversation-copy h2,
.contact-copy h2 {
  line-height: 1.45;
}
.suggested-questions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
}
.suggested-questions button {
  border: 0;
  padding: 6px 0;
  color: var(--accent);
  text-align: left;
  font-size: 14px;
}
.suggested-questions button:hover {
  background: transparent;
}
.chat-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #10191e;
}
.chat-header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.chat-header h3 {
  font-size: 15px;
}
.chat-header > span:last-child {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  max-width: 42%;
}
.status-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--accent);
  border-radius: 50%;
}
.chat-window {
  height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 24px;
}
.message {
  margin-bottom: 20px;
  padding-right: 24px;
}
.message p {
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  color: #d1dbdf;
}
.message-role {
  font-size: 11px;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.message.user {
  margin-left: 40px;
  background: #1b2c32;
  padding: 14px 18px;
  border-radius: 8px;
}
.message.user .message-role {
  color: var(--muted);
}
.message.failed p {
  color: var(--error);
}
.waiting-line {
  display: block;
  width: 100px;
  height: 2px;
  margin-top: 12px;
  background: linear-gradient(90deg, #75dfca33, var(--accent), #75dfca33);
  background-size: 200% 100%;
  animation: waiting 1.7s linear infinite;
}
@keyframes waiting {
  to {
    background-position: 200% 0;
  }
}
.chat-form {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  border-top: 1px solid var(--line);
}
.chat-form textarea {
  flex: 1;
  min-width: 0;
  resize: vertical;
  min-height: 68px;
  max-height: 180px;
  font-size: 14px;
}
.chat-form button {
  min-width: 94px;
  padding: 12px 14px;
}
.privacy-note {
  padding: 0 20px 16px;
  font-size: 11px;
  color: var(--muted);
}
.share-options {
  border-top: 1px solid var(--line);
  padding: 0 20px;
  font-size: 12px;
}
.share-options summary {
  min-height: 44px;
  padding: 10px 0;
  color: var(--muted);
}
.share-options p {
  margin-bottom: 12px;
}
.share-options button {
  font-size: 12px;
  margin-bottom: 16px;
}
.share-options span {
  display: block;
  padding-bottom: 12px;
  color: var(--accent);
}
input,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #425159;
  border-radius: 6px;
  background: #101a20;
  color: var(--ink);
  padding: 12px 14px;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: #a0adb4;
  opacity: 1;
}
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
label input,
label textarea {
  margin-top: 8px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.contact-form > label {
  margin-bottom: 22px;
}
.contact-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.contact-actions span {
  font-size: 12px;
  color: var(--accent);
}
.site-footer {
  max-width: 1320px;
  margin: auto;
  padding: 36px 60px 48px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.companion {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #49625e;
  background: #14262a;
  border-radius: 28px;
  padding: 6px 14px 6px 6px;
  font-size: 12px;
  min-height: 48px;
}
.companion img {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  object-fit: cover;
}
.album-modal {
  width: min(1160px, calc(100vw - 64px));
  height: min(900px, calc(100dvh - 48px));
  max-width: none;
  max-height: none;
  position: fixed;
  padding: 24px;
  border: 1px solid #42565c;
  border-radius: 12px;
  background: #0f181d;
  color: var(--ink);
  overflow: hidden;
}
.album-modal[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.album-modal::backdrop {
  background: rgba(0, 0, 0, 0.88);
}
.album-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-shrink: 0;
}
.album-toolbar .eyebrow {
  margin-bottom: 4px;
}
.album-toolbar h2 {
  font-size: 22px;
}
.album-toolbar button {
  font-size: 13px;
}
.album-view {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  background: #080d10;
  border-radius: 4px;
  overflow: hidden;
}
.album-view img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  min-height: 0;
  transition: opacity 0.2s;
}
.album-view img.loading {
  opacity: 0.18;
}
.album-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex-shrink: 0;
}
.album-controls button {
  font-size: 12px;
}
.album-controls span {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 50px;
  text-align: center;
}
.album-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 5px 2px 10px;
  flex-shrink: 0;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.album-thumbnails button {
  width: 76px;
  height: 58px;
  min-height: 0;
  flex-shrink: 0;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
}
.album-thumbnails button[aria-pressed="true"] {
  border-color: var(--accent);
}
.album-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.album-bottom button {
  font-size: 12px;
  min-height: 40px;
}
.login-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse at 75% 20%, #12343a, transparent 60%), var(--bg);
}
.login-card {
  width: min(100%, 420px);
}
.login-card h1 {
  font-size: 42px;
  margin-bottom: 18px;
}
.login-card > p {
  font-size: 15px;
}
.login-card form {
  margin-top: 36px;
}
.login-card label {
  margin-bottom: 18px;
}
.login-card button {
  width: 100%;
}
.login-card #error {
  font-size: 13px;
  color: var(--error);
  min-height: 24px;
  margin: 14px 0;
}
@media (min-width: 1700px) {
  .hero-intro {
    padding-left: calc((100vw - 1440px) / 2);
  }
  .globe-viewport {
    right: 5%;
  }
  .chapter-panel {
    right: 12%;
  }
}
@media (max-width: 1100px) {
  .wordmark span {
    display: none;
  }
  .site-header {
    gap: 18px;
    padding-inline: 28px;
  }
  .site-nav a {
    padding-inline: 13px;
  }
  .globe-stage {
    min-height: 720px;
  }
  .hero-intro {
    width: 60%;
    padding-left: 40px;
  }
  .hero-intro h1 {
    font-size: clamp(40px, 5vw, 58px);
  }
  .chapter-panel {
    right: 5%;
    width: 250px;
  }
  .section-shell {
    padding: 80px 36px;
  }
  .story-layout {
    gap: 40px;
  }
  .memory-visual {
    height: 300px;
  }
  .conversation-band,
  .contact-band {
    gap: 32px;
  }
  .section-heading {
    gap: 24px;
  }
  .section-heading > p {
    font-size: 12px;
  }
  .chat-header {
    padding: 18px;
  }
  .experience-detail {
    padding-right: 24px;
  }
}
@media (max-width: 899px) {
  :root {
    --header-height: 120px;
  }
  .site-header {
    height: 120px;
    padding: 12px 24px;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
    gap: 6px;
  }
  .wordmark {
    font-size: 19px;
  }
  .wordmark span {
    display: inline;
    font-size: 11px;
  }
  .motion-toggle {
    margin-left: auto;
    order: 1;
  }
  .site-nav {
    order: 2;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .site-nav a {
    text-align: center;
    flex: 1;
    padding: 9px 8px;
    font-size: 13px;
  }
  .site-header > .wordmark {
    order: 0;
  }
  .globe-stage {
    height: auto;
    min-height: 900px;
  }
  .hero-intro {
    width: 100%;
    padding: 48px 32px 0;
    max-width: 600px;
    pointer-events: auto;
  }
  .hero-intro h1 {
    font-size: 44px;
  }
  .hero-description {
    font-size: 17px;
    margin: 18px 0 22px;
  }
  .hero-footnote {
    display: none;
  }
  .globe-viewport {
    inset: 310px 0 160px 0;
  }
  .chapter-panel {
    left: 32px;
    right: 32px;
    bottom: 92px;
    width: auto;
    background: #0e1b20;
    border-left: 0;
    border-radius: 8px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 20px;
  }
  .chapter-panel .eyebrow {
    grid-column: 1;
    margin-bottom: 0;
  }
  .chapter-panel h2 {
    grid-column: 1;
    font-size: 23px;
    margin: 0;
  }
  .chapter-panel > p:not(.eyebrow) {
    grid-column: 2;
    grid-row: 1/3;
    font-size: 13px;
    align-self: center;
  }
  .chapter-meta {
    display: none;
  }
  .chapter-actions {
    grid-column: 2;
    grid-row: 3;
    font-size: 12px;
  }
  .chapter-actions a {
    padding: 0;
    min-height: 24px;
  }
  .place-dock {
    bottom: 30px;
  }
  .daily-note {
    display: none;
  }
  .globe-loader {
    top: 16px;
    right: 26px;
  }
  .section-shell {
    padding: 72px 28px;
  }
  .section-heading {
    display: block;
    margin-bottom: 30px;
  }
  .section-heading > p {
    margin-top: 16px;
  }
  .story-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .memory-scene {
    position: static;
    order: 2;
  }
  .memory-visual {
    height: 420px;
  }
  .life-list {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 8px;
    scrollbar-width: thin;
    order: 1;
  }
  .life-item {
    min-height: 0;
    flex: 0 0 170px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }
  .life-item > button {
    padding: 16px;
    height: 100%;
  }
  .life-item:last-child {
    border-bottom: 1px solid var(--line);
  }
  .life-description {
    font-size: 11px;
  }
  .life-year {
    font-size: 10px;
  }
  .life-name {
    font-size: 22px;
  }
  .project-grid {
    gap: 16px;
  }
  .project-card > summary {
    padding: 24px;
  }
  .project-card .experience-name {
    font-size: 21px;
  }
  .project-card .experience-detail {
    padding: 0 24px 24px;
  }
  .conversation-band,
  .contact-band {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .suggested-questions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 20px;
  }
  .site-footer {
    padding-inline: 28px;
  }
  .companion {
    right: 16px;
    bottom: 16px;
  }
}
@media (max-width: 540px) {
  :root {
    --header-height: 110px;
  }
  html {
    scroll-padding-top: 128px;
  }
  .site-header {
    height: 110px;
    padding: 8px 16px;
  }
  .wordmark {
    font-size: 17px;
    gap: 10px;
  }
  .site-nav a {
    font-size: 12px;
    padding: 8px 6px;
  }
  .motion-toggle {
    font-size: 11px;
  }
  .globe-stage {
    min-height: 750px;
  }
  .hero-intro {
    padding: 36px 22px 0;
  }
  .intro-line {
    font-size: 14px;
    margin-bottom: 18px;
  }
  .hero-intro h1 {
    font-size: 38px;
    letter-spacing: -0.03em;
  }
  .hero-description {
    font-size: 15px;
    margin: 18px 0 22px;
  }
  .hero-actions {
    gap: 6px 16px;
  }
  .hero-actions .primary-action {
    font-size: 13px;
    gap: 18px;
    padding: 12px 16px;
  }
  .hero-actions .text-action {
    font-size: 12px;
  }
  .globe-viewport {
    inset: 290px -20px 150px;
  }
  .chapter-panel {
    left: 20px;
    right: 20px;
    bottom: 100px;
    gap: 5px 14px;
    padding: 14px;
  }
  .chapter-panel > p:not(.eyebrow) {
    font-size: 12px;
  }
  .chapter-panel h2 {
    font-size: 22px;
  }
  .chapter-panel .eyebrow {
    font-size: 10px;
  }
  .place-dock {
    left: 16px;
    right: 16px;
    transform: none;
    max-width: none;
    bottom: 30px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .place-dock button {
    padding: 9px 12px;
    font-size: 12px;
    flex: 1;
    gap: 6px;
    justify-content: center;
  }
  .city-dot {
    width: 4px;
    height: 4px;
  }
  .section-shell {
    padding: 60px 20px;
  }
  .section-heading h2 {
    font-size: 27px;
  }
  .section-heading > p br {
    display: none;
  }
  .memory-visual {
    height: 270px;
  }
  .memory-caption h3 {
    font-size: 24px;
  }
  .memory-caption .text-action {
    font-size: 12px;
  }
  .memory-scene > p {
    font-size: 13px;
  }
  .memory-actions {
    gap: 6px;
  }
  .memory-actions button {
    padding: 6px 10px;
  }
  .experience-row > summary {
    gap: 14px;
    padding: 24px 0;
  }
  .experience-logo {
    width: 40px;
    height: 40px;
  }
  .experience-name {
    font-size: 19px;
  }
  .experience-date {
    font-size: 10px;
  }
  .experience-role {
    font-size: 12px;
  }
  .experience-summary {
    font-size: 13px;
  }
  .expand-icon {
    width: 25px;
    height: 25px;
    font-size: 14px;
    line-height: 23px;
  }
  .experience-detail {
    padding: 0 0 24px 54px;
  }
  .experience-detail p {
    font-size: 13px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card .experience-summary {
    min-height: 0;
  }
  .project-card > summary {
    padding: 26px;
  }
  .film video {
    min-height: 200px;
  }
  .film > button {
    min-width: 145px;
    font-size: 13px;
  }
  .film figcaption {
    padding: 10px 14px;
  }
  .chat-header {
    padding: 16px 14px;
    gap: 8px;
  }
  .chat-header h3 {
    font-size: 13px;
  }
  .chat-header > span:last-child {
    font-size: 10px;
  }
  .chat-window {
    height: 320px;
    padding: 18px 14px;
  }
  .message {
    padding-right: 0;
  }
  .message.user {
    margin-left: 22px;
    padding: 12px;
  }
  .chat-form {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .chat-form textarea {
    flex-basis: 100%;
    font-size: 16px;
  }
  .chat-form .primary-action {
    margin-left: auto;
    font-size: 13px;
    min-height: 44px;
    padding: 9px 18px;
  }
  .privacy-note {
    padding-inline: 14px;
    font-size: 10px;
  }
  .share-options {
    padding-inline: 14px;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
  }
  .contact-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .site-footer {
    padding: 28px 20px 90px;
  }
  .companion {
    padding: 5px;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    min-height: 46px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .companion span {
    display: none;
  }
  .companion img {
    width: 34px;
    height: 34px;
  }
  .album-modal {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 16px 12px max(14px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    gap: 10px;
  }
  .album-toolbar {
    padding-inline: 4px;
  }
  .album-toolbar h2 {
    font-size: 20px;
  }
  .album-controls {
    gap: 12px;
  }
  .album-controls button {
    padding: 8px 12px;
  }
  .album-thumbnails button {
    width: 64px;
    height: 48px;
  }
  .album-bottom > span {
    font-size: 10px;
  }
  .album-view img {
    object-fit: contain;
  }
}
@media (max-width: 359px) {
  .wordmark span {
    display: none;
  }
  .hero-intro h1 {
    font-size: 33px;
  }
  .hero-actions {
    gap: 4px;
  }
  .hero-actions .text-action {
    padding-left: 2px;
  }
  .place-dock button {
    padding-inline: 9px;
  }
  .section-heading h2 {
    font-size: 25px;
  }
  .experience-logo {
    width: 32px;
    height: 32px;
  }
  .experience-row > summary {
    gap: 10px;
  }
  .experience-name {
    font-size: 17px;
  }
  .experience-detail {
    padding-left: 42px;
  }
  .memory-visual {
    height: 230px;
  }
  .memory-actions {
    font-size: 11px;
  }
  .memory-actions button {
    font-size: 11px;
  }
  .memory-actions a {
    font-size: 10px;
  }
  .memory-caption .text-action {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .project-card {
    transform: none !important;
  }
  .project-card::before {
    display: none;
  }
}
.reduce-motion {
  scroll-behavior: auto;
}
.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation: none !important;
  transition: none !important;
}
.reduce-motion .project-card {
  transform: none !important;
}
.reduce-motion .project-card::before {
  display: none;
}

/* Independent modules; hidden pages never enter the scroll or focus order. */
body:not(.login-page) {
  padding-top: var(--header-height);
}
.site-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
}
#siteMain > section[hidden] {
  display: none !important;
}
#siteMain {
  min-height: calc(100svh - var(--header-height));
  overflow-anchor: none;
  overflow-x: clip;
}
#siteMain > .section-shell {
  min-height: calc(100svh - var(--header-height));
  padding-top: 48px;
  padding-bottom: 48px;
  border-bottom: 0;
}
.site-footer {
  border-top: 1px solid var(--line);
}
.site-nav {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.site-nav a {
  flex-shrink: 0;
  padding-inline: 13px;
}
#storyFlow .section-heading {
  margin-bottom: 26px;
}
#storyFlow .section-heading h2 {
  font-size: clamp(25px, 2.3vw, 36px);
}
#storyFlow .section-heading > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
#storyFlow .memory-city-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
#storyFlow .memory-city-tabs button {
  flex: 1;
  max-width: 200px;
  min-width: 66px;
  border-color: transparent;
  color: var(--muted);
  text-align: left;
  padding: 12px 18px;
  border-radius: 8px;
  transition:
    background 200ms,
    color 200ms,
    border-color 200ms;
}
#storyFlow .memory-city-tabs button small {
  display: block;
  font-size: 10px;
  color: var(--subtle);
  margin-top: 3px;
  white-space: nowrap;
}
#storyFlow .memory-city-tabs button[aria-pressed="true"] {
  color: var(--accent);
  background: #19312d;
  border-color: #416a5e;
}
#storyFlow .memory-scene {
  position: static;
  top: auto;
  min-width: 0;
}
#storyFlow .memory-ring-stage {
  height: clamp(360px, 48svh, 520px);
  position: relative;
  overflow: hidden;
  perspective: 1200px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
#storyFlow .memory-ring-stage.dragging {
  cursor: grabbing;
}
#storyFlow .memory-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}
#storyFlow .ring-center {
  position: absolute;
  inset: 12px 6%;
  pointer-events: none;
  overflow: hidden;
  mask-image: radial-gradient(
    ellipse at center,
    #000 18%,
    #000b 42%,
    transparent 73%
  );
}
#storyFlow .ring-center img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  opacity: 0;
  filter: saturate(0.8) brightness(0.85);
  transition: opacity 260ms ease-out;
}
#storyFlow .ring-center img.ready {
  opacity: 0.66;
}
#storyFlow .memory-ring-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 118px;
  height: 160px;
  padding: 2px;
  min-height: 0;
  background: #0b1215;
  color: #354840;
  border: 1px solid #c9d1c566;
  border-radius: 5px;
  box-shadow: 0 12px 28px #0008;
  transform-origin: center;
  transition:
    box-shadow 180ms,
    border-color 180ms;
  pointer-events: auto;
  cursor: pointer;
  overflow: hidden;
}
#storyFlow .memory-ring-card[hidden] {
  display: none;
}
#storyFlow .memory-ring-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px #75dfca60,
    0 16px 40px #0009;
}
#storyFlow .memory-ring-card:hover {
  background: #0b1215;
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px #75dfca80,
    0 16px 40px #0009;
}
#storyFlow .memory-ring-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
#storyFlow .ring-image {
  position: relative;
  display: block;
  height: 100%;
  width: 100%;
  background: #18201e;
  overflow: hidden;
}
#storyFlow .ring-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.photo-failed::after {
  content: "照片暂不可用";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #eef3ed;
}
#storyFlow .ring-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
#storyFlow .ring-controls button {
  color: var(--accent);
}
#storyFlow #openAlbum {
  padding-inline: 25px;
  font-size: 13px;
}
#storyFlow .ring-counter {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
#storyFlow .memory-context {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 30px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
#storyFlow #memoryBody {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
#storyFlow #ringHelp {
  color: var(--subtle);
  font-size: 11px;
  white-space: nowrap;
}
#storyFlow .memory-actions {
  margin-top: 20px;
}
.album-thumbnails button {
  position: relative;
}
.album-view .photo-turned,
.album-thumbnails .photo-turned,
#storyFlow .ring-image .photo-turned {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%) rotate(-90deg);
  object-fit: contain;
}
@media (max-width: 1050px) {
  .site-header {
    gap: 14px;
  }
  .wordmark span {
    display: none;
  }
  .site-nav a {
    padding-inline: 11px;
    font-size: 13px;
  }
  #storyFlow .memory-context {
    flex-direction: column;
    gap: 10px;
  }
}
@media (max-width: 800px) {
  #siteMain > .section-shell {
    padding-top: 30px;
    padding-bottom: 32px;
  }
  .site-header {
    height: auto;
    min-height: 106px;
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 8px 16px;
    gap: 4px 10px;
  }
  .site-header .wordmark {
    grid-column: 1;
    grid-row: 1;
  }
  .site-header .motion-toggle {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .site-header .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: 0;
    justify-content: flex-start;
    padding: 0;
    gap: 2px;
  }
  .site-nav a {
    min-height: 42px;
    padding: 8px 13px;
  }
  #storyFlow .section-heading {
    display: block;
    margin-bottom: 18px;
  }
  #storyFlow .section-heading > p {
    margin-top: 14px;
  }
  #storyFlow .section-heading > p br {
    display: none;
  }
  #storyFlow .memory-city-tabs {
    justify-content: flex-start;
    padding-bottom: 12px;
    gap: 4px;
  }
  #storyFlow .memory-city-tabs button {
    padding: 10px 8px;
    font-size: 13px;
    min-width: 58px;
    text-align: center;
  }
  #storyFlow .memory-city-tabs button small {
    display: none;
  }
  #storyFlow .memory-ring-stage {
    height: 345px;
    margin-inline: -16px;
  }
  #storyFlow .memory-ring-card {
    width: 78px;
    height: 113px;
    padding: 2px;
    border-radius: 4px;
  }
  #storyFlow .ring-image {
    height: 100%;
  }
  #storyFlow .ring-center h3 {
    font-size: 42px;
  }
  #storyFlow .ring-center p {
    font-size: 10px;
  }
  #storyFlow .memory-context {
    margin-top: 22px;
    padding-top: 16px;
  }
  #storyFlow #memoryBody {
    font-size: 13px;
  }
  #storyFlow .ring-controls {
    gap: 14px;
  }
  #storyFlow .ring-controls button {
    padding: 8px 14px;
  }
  .album-toolbar #closeAlbum {
    font-size: 11px;
    padding: 8px 10px;
  }
}

.album-view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
#albumFullscreen {
  color: var(--accent);
  border-color: #477b6a;
}
.album-modal.album-fullscreen {
  inset: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: max(12px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: #030607;
  gap: 12px;
}
.album-fullscreen .album-toolbar h2 {
  font-size: 16px;
}
.album-fullscreen .album-toolbar .eyebrow,
.album-fullscreen .album-thumbnails,
.album-fullscreen .album-bottom {
  display: none;
}
.album-fullscreen .album-view {
  background: #030607;
  border-radius: 0;
}
.album-fullscreen .album-controls {
  margin: 0;
}
@media (max-width: 540px) {
  .album-view-actions {
    gap: 6px;
  }
  .album-view-actions button {
    padding: 8px;
    font-size: 11px;
  }
  .album-toolbar {
    gap: 8px;
  }
  .album-toolbar h2 {
    font-size: 17px;
  }
  #storyFlow .ring-center {
    inset: 22px 0;
  }
  .album-modal.album-fullscreen {
    padding-inline: 8px;
  }
  .album-fullscreen .album-toolbar h2 {
    font-size: 14px;
  }
}

/* The complete card orbit is the playback surface. */
#storyFlow .ring-controls {
  flex-wrap: wrap;
}
#ringFullscreen {
  border-color: #66cfbb;
  color: #a5f7e7;
}
body.ring-playing-fullscreen {
  overflow: hidden;
}
#storyFlow #memoryScene.ring-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100dvh;
  background: #080e10;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
#storyFlow .ring-fullscreen .memory-ring-stage {
  flex: 1;
  min-height: 0;
  height: auto;
}
#storyFlow .ring-fullscreen .memory-context,
#storyFlow .ring-fullscreen .memory-actions {
  display: none;
}
#storyFlow .ring-fullscreen .ring-counter {
  margin: 12px 0 0;
}
.album-view-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 600px) {
  .album-toolbar {
    gap: 8px;
    align-items: flex-start;
  }
  .album-view-actions {
    max-width: 72%;
    gap: 5px;
  }
  .album-view-actions button {
    padding: 8px;
    font-size: 11px;
  }
  #storyFlow .ring-controls {
    gap: 8px;
  }
}

/* Brighter blue-grey atmosphere, with a localized project light installation. */
body:not(.login-page) {
  background:
    radial-gradient(ellipse at 85% 12%, #51638766, transparent 52%),
    radial-gradient(ellipse at 8% 75%, #398f9140, transparent 55%), #1c2b39;
  background-attachment: fixed;
}
.site-header {
  backdrop-filter: blur(18px);
  border-bottom-color: #647b8b55;
}
#vibe-coding {
  position: relative;
  isolation: isolate;
}
#vibe-coding .section-heading {
  position: relative;
  z-index: 1;
}
#magicRings {
  position: absolute;
  top: -40px;
  right: 0;
  width: 420px;
  height: 290px;
  z-index: -1;
  pointer-events: none;
}
#magicRings canvas {
  display: block;
}
.rings-fallback {
  background: radial-gradient(ellipse, #7d8aff33, transparent 65%);
}
.project-laptop {
  position: relative;
  padding-bottom: 24px;
  perspective: 1400px;
}
.laptop-screen {
  position: relative;
  padding: 38px 24px 24px;
  border: 8px solid #81949f;
  border-bottom-width: 12px;
  border-radius: 22px 22px 7px 7px;
  background: #233845;
  transform-origin: 50% 100%;
  box-shadow: 0 20px 65px #07131d50;
}
.laptop-camera {
  position: absolute;
  top: 12px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0a171d;
}
.laptop-base {
  height: 15px;
  margin: 0 -12px;
  background: linear-gradient(#c0cbd1, #718794);
  border-radius: 0 0 60% 60% / 0 0 100% 100%;
  position: relative;
}
.laptop-base::after {
  content: "";
  position: absolute;
  top: 0;
  left: 42%;
  width: 16%;
  height: 5px;
  background: #536b7b;
  border-radius: 0 0 8px 8px;
}
.project-card {
  background: #2a4350;
  border-color: #728e9955;
}
/* Waiting indicator inspired by Uiverse.io / xXJollyHAKERXx. */
.waiting-line {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(#ba42ff 35%, #00e1ff);
  box-shadow:
    0 -2px 9px #ba42ff66,
    0 2px 9px #00e1ff66;
  animation: reply-orbit 1.7s linear infinite;
}
.waiting-line::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #263a48;
  border-radius: 50%;
}
@keyframes reply-orbit {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 700px) {
  #magicRings {
    width: 240px;
    height: 200px;
    opacity: 0.6;
  }
  .laptop-screen {
    padding: 26px 12px 16px;
    border-width: 5px;
    border-radius: 16px 16px 5px 5px;
  }
  .laptop-screen .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .laptop-base {
    margin: 0 -5px;
  }
}

/* Focus Cards interaction adapted from the user-supplied Aceternity example. */
#storyFlow .memory-ring-card {
  transition:
    filter 220ms ease-out,
    box-shadow 180ms,
    border-color 180ms;
}
#storyFlow .has-photo-focus .memory-ring-card:not(.photo-focus) {
  filter: blur(2px) brightness(0.62);
}
#storyFlow .has-photo-focus .memory-ring-card.photo-focus {
  filter: none;
  border-color: #acfff0;
  box-shadow:
    0 0 0 2px #75dfca80,
    0 16px 40px #0009;
}

/* Homepage-only galaxy; no input interception over the globe. */
#galaxyCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  background: #101e32;
}
#home .hero-intro {
  text-shadow: 0 2px 18px #07111fb3;
}
#home .chapter-panel {
  background: linear-gradient(120deg, #142539df, #142539a6);
  border-color: #adc6ec44;
  backdrop-filter: blur(12px);
}
#home .daily-note {
  color: #c4d1df;
}

/* Space composition: continuous atmosphere rather than boxed overlays. */
body:has(#home:not([hidden])) .site-header {
  background: linear-gradient(180deg, #0e1c2beb, #111f31bd);
  border-bottom-color: transparent;
}
#home .chapter-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  text-shadow:
    0 2px 12px #060e1b,
    0 0 26px #060e1b;
  isolation: isolate;
}
#home .chapter-panel::before {
  content: "";
  position: absolute;
  inset: -24px -28px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse,
    #112339dc 10%,
    #1123398a 45%,
    transparent 73%
  );
}
#home .globe-viewport {
  mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
}
#home .place-dock {
  background: #12263a77;
  border-color: #b0cbea33;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px #030b1920;
}
:root {
  view-transition-name: none;
}
#siteMain {
  view-transition-name: page-content;
}
::view-transition-group(page-content) {
  animation-duration: 650ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
::view-transition-old(page-content) {
  animation: space-leave 650ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
::view-transition-new(page-content) {
  animation: space-enter 650ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
::view-transition {
  pointer-events: none;
}
@keyframes space-leave {
  from {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 0;
    filter: blur(3px);
  }
}
@keyframes space-enter {
  from {
    opacity: 0;
    filter: blur(3px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(page-content),
  ::view-transition-old(page-content),
  ::view-transition-new(page-content) {
    animation-duration: 0s;
  }
}

.macbook-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
  gap: 48px;
  align-items: center;
  margin: 40px 0 55px;
}
.macbook-device {
  height: 520px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
#macbookMount {
  position: absolute;
  width: 512px;
  left: 50%;
  top: 10px;
  transform: translateX(-50%) scale(0.8);
  transform-origin: top center;
}
.macbook-caption h3 {
  font-size: clamp(25px, 2.6vw, 38px);
  line-height: 1.35;
  margin: 16px 0;
}
.macbook-caption > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 34ch;
}
.macbook-tabs,
.macbook-playback {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.macbook-tabs button[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: #75dfca10;
}
.macbook-playback button {
  border: 0;
  padding-left: 0;
  font-size: 13px;
  color: var(--muted);
}
#vibe-coding > #vibeGrid {
  grid-template-columns: 1fr;
  gap: 0;
}
#vibe-coding > #vibeGrid .project-card {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
#vibe-coding > #vibeGrid .project-card > summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
}
#vibe-coding > #vibeGrid .experience-logo {
  width: 48px;
  height: 48px;
}
#vibe-coding > #vibeGrid .experience-copy {
  flex: 1;
}
#vibe-coding > #vibeGrid .experience-name {
  font-size: 21px;
}
@media (max-width: 850px) {
  .macbook-showcase {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 24px;
  }
  .macbook-device {
    height: 450px;
  }
  #macbookMount {
    transform: translateX(-50%) scale(0.75);
  }
  .macbook-caption {
    padding-bottom: 20px;
  }
}
@media (max-width: 480px) {
  .macbook-device {
    height: 310px;
    margin-inline: -16px;
  }
  #macbookMount {
    transform: translateX(-50%) scale(0.51);
  }
}

body.project-window-open {
  overflow: hidden;
}
.project-desktop-window {
  position: fixed;
  inset: 0;
  width: min(1040px, calc(100vw - 48px));
  height: min(850px, calc(100dvh - 48px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #859eaf77;
  border-radius: 18px;
  background: #182a3a;
  color: var(--ink);
  box-shadow: 0 40px 120px #030916aa;
  transform-origin: top left;
  overflow: hidden;
}
.project-desktop-window[open] {
  display: flex;
  flex-direction: column;
}
.project-desktop-window::backdrop {
  background: #06122199;
  backdrop-filter: blur(8px);
}
.desktop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid #7293aa33;
  background: #263d50;
}
.desktop-toolbar > span {
  color: var(--muted);
  font-size: 13px;
}
.desktop-content {
  overflow: auto;
  padding: 32px 40px 40px;
}
.desktop-content h2 {
  font-size: clamp(25px, 3vw, 38px);
  margin: 8px 0 24px;
}
.desktop-project-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #0b1424;
  border-radius: 8px;
}
.portfolio-context {margin:24px 0 36px;padding:24px 0;border-top:1px solid #34414a;}
.portfolio-context h3 {font-size:22px;margin:0 0 12px;color:#eef5f5;}
.portfolio-context>p {max-width:68ch;color:#c8d5db;line-height:1.8;}
.portfolio-context dl {display:flex;gap:28px;flex-wrap:wrap;margin-top:22px;}
.portfolio-context dl>div {flex:1 1 230px;}
.portfolio-context dt {color:#9be8d7;font-weight:600;margin-bottom:8px;}
.portfolio-context dd {margin:0;color:#c8d5db;line-height:1.8;font-size:14px;}
.project-evidence {margin:24px 0;max-width:100%;}
.phone-gallery {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:24px;align-items:start;}
.phone-gallery .phone-evidence {margin:12px 0;}
.phone-gallery .phone-evidence img {max-height:640px;width:100%;object-fit:contain;background:#eaf0f0;}
.project-access {color:#d0e0e5;background:#233d49;padding:16px;border-radius:8px;font-size:14px;line-height:1.8;}
.project-walkthrough {margin:26px 0;}
.project-walkthrough h3 {font-size:20px;margin-bottom:16px;}
.project-walkthrough ol {padding-left:24px;line-height:1.8;color:#c8d8de;}
.project-walkthrough strong {color:#eff7f7;}
.project-walkthrough p {margin:4px 0 16px;}
.project-attribution {font-size:12px;line-height:1.7;}
.project-attribution a {color:#a1dfd3;}
.project-lettermark {width:48px;height:48px;flex-shrink:0;display:grid;place-items:center;background:#294b51;color:#d5f4ea;border-radius:10px;font-weight:700;font-size:15px;}
.macbook-showcase {grid-template-columns:1fr;gap:18px;max-width:1100px;margin-inline:auto;}
.macbook-device {height:690px;width:100%;margin:0;}
#macbookMount {width:512px;transform:translateX(-50%) scale(1.4);top:12px;}
.macbook-device[data-device="phone"] {height:745px;}
.macbook-device[data-device="phone"] #macbookMount {transform:translateX(-50%) scale(1);}
.macbook-caption {width:100%;}
.macbook-caption {display:contents;}
.macbook-caption>.eyebrow {display:none;}
.macbook-showcase #macbookProjectSummary {margin:0;}
.macbook-caption>p:not(.eyebrow) {max-width:70ch;}
.macbook-caption h3 {font-size:30px;margin:8px 0;}
.macbook-tabs {gap:8px;margin-top:18px;}
.macbook-tabs button {font-size:13px;padding:10px 12px;}
.device-image-controls {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;color:#c8d8de;font-size:13px;text-align:center;}
.device-image-controls span {max-width:70ch;line-height:1.7;}
.device-image-controls p {flex-basis:100%;margin:0;color:#a9bdc8;font-size:12px;}
.device-image-controls button {min-width:44px;min-height:44px;}
.project-web-links {display:flex;gap:20px;flex-wrap:wrap;align-items:center;margin:18px 0;}
#vibe-coding>#vibeGrid .project-card>summary {display:grid;grid-template-columns:260px minmax(0,1fr) 30px;align-items:center;gap:28px;padding:28px 0;}
.project-cover {width:260px;height:175px;object-fit:cover;object-position:top;background:#142331;border-radius:8px;}
#vibeGrid .experience-detail {max-width:900px;margin-left:auto;padding:0 0 28px;}
#vibeGrid .experience-detail>p {font-size:15px;line-height:1.9;margin:12px 0;max-width:68ch;}
#vibeGrid .experience-role {margin:8px 0;line-height:1.6;}
#vibeGrid .experience-summary {line-height:1.8;font-size:15px;max-width:55ch;}
#vibeGrid .project-cover {order:0;}
#vibeGrid .experience-copy {order:1;min-width:0;}
#vibeGrid .expand-icon {order:2;}
@media(max-width:850px){.macbook-device{height:530px}#macbookMount{transform:translateX(-50%) scale(1.05)}#vibe-coding>#vibeGrid .project-card>summary{grid-template-columns:180px minmax(0,1fr) 24px;gap:18px}.project-cover{width:180px;height:135px}}
@media(max-width:520px){.macbook-device{height:345px}#macbookMount{transform:translateX(-50%) scale(.68)}.macbook-device[data-device="phone"]{height:640px}.macbook-device[data-device="phone"] #macbookMount{transform:translateX(-50%) scale(.85)}#vibe-coding>#vibeGrid .project-card>summary{grid-template-columns:minmax(0,1fr) 24px;gap:14px}.project-cover{grid-column:1/-1;width:100%;height:210px}.macbook-caption h3{font-size:25px}.device-image-controls span{max-width:calc(100% - 115px)}}
.project-evidence a {display:block;color:#92e5d3;text-decoration:none;}
.project-evidence img {display:block;width:100%;height:auto;max-height:580px;object-fit:contain;background:#edf1f6;border-radius:8px;}
.project-evidence a span {display:block;margin-top:8px;font-size:13px;}
.project-evidence figcaption {color:#bac9d0;line-height:1.7;font-size:13px;margin-top:8px;}
.project-case-intro {color:#d9e6e9;line-height:1.8;max-width:65ch;}
.macbook-tabs {flex-wrap:wrap;}
.macbook-tabs button {white-space:normal;text-align:left;}
.project-grid .project-card {min-width:0;}
.project-grid .experience-name {overflow-wrap:anywhere;}
.desktop-content ul {
  padding-left: 20px;
  color: #cfdae2;
}
.desktop-content li {
  margin-bottom: 14px;
}
@media (max-width: 600px) {
  .project-desktop-window {
    width: calc(100vw - 20px);
    height: calc(100dvh - 24px);
    border-radius: 12px;
  }
  .desktop-toolbar {
    padding: 10px 14px;
  }
  .desktop-content {
    padding: 22px 20px;
  }
}

/* Separate project navigation from the selected work. */
.macbook-showcase {grid-template-columns:210px minmax(0,1fr);gap:42px;max-width:1280px;align-items:start;}
.project-directory {border-right:1px solid var(--line);padding-right:24px;}
.project-directory>summary {list-style:none;pointer-events:none;padding:8px 0 24px;color:var(--ink);font-size:14px;}
.project-directory>summary::-webkit-details-marker {display:none;}
.project-directory>summary small {margin-left:10px;font-size:11px;color:var(--muted);font-weight:400;}
.project-directory>summary strong {display:none;}
.project-directory .macbook-tabs {display:block;margin:0;}
.project-directory-group {margin-bottom:26px;}
.project-directory-group>p {margin:0 0 8px;font-size:11px;letter-spacing:.12em;color:var(--muted);}
.project-directory .macbook-tabs button {display:block;width:100%;border:0;border-left:2px solid transparent;border-radius:0;padding:11px 12px;margin:2px 0;font-size:14px;background:transparent;color:#c5d3d9;line-height:1.5;}
.project-directory .macbook-tabs button[aria-pressed="true"] {border-left-color:var(--accent);color:var(--accent);background:#75dfca0c;}
.project-directory .macbook-tabs button:hover {background:#ffffff08;}
.project-stage {min-width:0;}
.project-stage .macbook-caption {display:block;min-height:125px;padding:0 0 24px;border-bottom:1px solid var(--line);}
.project-stage .macbook-caption h3 {margin:0 0 14px;font-size:clamp(24px,2.2vw,32px);line-height:1.35;}
.project-stage #macbookProjectSummary {font-size:15px;line-height:1.85;max-width:54ch;color:#bfced6;}
.project-stage .macbook-device {height:600px;}
.project-stage #macbookMount {transform:translateX(-50%) scale(1.2);}
.project-stage .macbook-device[data-device="phone"] {height:745px;}
.project-stage .macbook-device[data-device="phone"] #macbookMount {transform:translateX(-50%) scale(1);}
.project-stage .macbook-playback {margin-top:24px;padding-top:20px;border-top:1px solid var(--line);gap:26px;}
.project-stage #showcaseWebLinks {font-size:14px;}
@media(min-width:1001px){.project-directory>summary{cursor:default;}.project-directory:not([open])>.macbook-tabs{display:block;}}
@media(max-width:1000px){
 .macbook-showcase {grid-template-columns:minmax(0,1fr);gap:26px;}
 .project-directory {border-right:0;border-block:1px solid var(--line);padding:0;}
 .project-directory>summary {display:flex;justify-content:space-between;align-items:center;gap:16px;pointer-events:auto;cursor:pointer;padding:17px 0;}
 .project-directory>summary strong {display:block;color:var(--accent);font-size:13px;font-weight:500;}
 .project-directory>summary strong::after {content:' ＋';}
 .project-directory[open]>summary strong::after {content:' −';}
 .project-directory[open] .macbook-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding-top:8px;}
 .project-stage .macbook-caption {min-height:0;}
 .project-stage .macbook-device {height:530px;}
 .project-stage #macbookMount {transform:translateX(-50%) scale(1.05);}
}
@media(max-width:520px){
 .project-directory[open] .macbook-tabs {grid-template-columns:1fr;gap:0;}
 .project-directory-group {margin-bottom:18px;}
 .project-directory .macbook-tabs button {padding:10px 12px;}
 .project-stage .macbook-device {height:345px;}
 .project-stage #macbookMount {transform:translateX(-50%) scale(.68);}
 .project-stage .macbook-device[data-device="phone"] {height:640px;}
 .project-stage .macbook-device[data-device="phone"] #macbookMount {transform:translateX(-50%) scale(.85);}
 .project-stage .macbook-caption h3 {font-size:24px;}
}
#galaxyCanvas.deep-space-background {
  background-color:#05090f;
  background-image:linear-gradient(90deg,rgba(5,9,15,.72),rgba(5,9,15,.50) 55%,rgba(5,9,15,.40)),url('/assets/earth/nasa-starmap.jpg');
  background-size:cover,auto 170%;
  background-position:center;
}
#home .globe-viewport {mask-image:none;}
#home .chapter-panel::before {background:radial-gradient(ellipse,#05090fd9 10%,#05090f70 45%,transparent 73%);}
body:has(#home:not([hidden])) .site-header {background:#080e17;border-bottom-color:#ffffff0a;}
#home .place-dock {background:#090f19b3;border-color:#a8b9cc26;}

/* These standalone pages end with their content, without a second footer strip. */
body:has(#home:not([hidden])) .site-footer,
body:has(#storyFlow:not([hidden])) .site-footer,
body:has(#sales:not([hidden])) .site-footer,
body:has(#film:not([hidden])) .site-footer,
body:has(#conversation:not([hidden])) .site-footer {display:none;}
/* One continuous sky for the page and navigation; quieter behind inner pages. */
body:not(.login-page) {
  --page-sky: linear-gradient(90deg,rgba(20,33,46,.91),rgba(20,33,46,.84)),url('/assets/earth/nasa-starmap.jpg');
  background-color:#14212e;
  background-image:var(--page-sky);
  background-size:cover,auto 170svh;
  background-position:center;
  background-repeat:no-repeat;
  background-attachment:fixed;
}
body:has(#home:not([hidden])) {
  --page-sky:linear-gradient(90deg,rgba(5,9,15,.72),rgba(5,9,15,.50) 55%,rgba(5,9,15,.40)),url('/assets/earth/nasa-starmap.jpg');
  background-color:#05090f;
}
body:not(.login-page) .site-header,
body:has(#home:not([hidden])) .site-header {
  background-color:#14212e;
  background-image:var(--page-sky);
  background-size:cover,auto 170svh;
  background-position:center;
  background-repeat:no-repeat;
  background-attachment:fixed;
  backdrop-filter:none;
  border-bottom-color:#a8b9cc14;
}
body:has(#home:not([hidden])) .site-header {background-color:#05090f;border-bottom-color:transparent;}
#galaxyCanvas.deep-space-background {display:none;}
/* Brightness pulses follow the existing star map, behind all page content. */
body:not(.login-page) {isolation:isolate;}
.sky-shimmer {position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.14;}
body:has(#home:not([hidden])) .sky-shimmer {opacity:.5;}
.sky-shimmer span {position:absolute;inset:0;background:url('/assets/earth/nasa-starmap.jpg') center / auto 170svh no-repeat;animation:sky-twinkle 7s ease-in-out infinite alternate;opacity:.12;}
.sky-shimmer span:nth-child(1) {mask-image:radial-gradient(circle 55px at 12% 25%,#000,transparent),radial-gradient(circle 65px at 47% 18%,#000,transparent),radial-gradient(circle 60px at 81% 39%,#000,transparent),radial-gradient(circle 70px at 27% 73%,#000,transparent),radial-gradient(circle 60px at 91% 87%,#000,transparent);}
.sky-shimmer span:nth-child(2) {animation-duration:9s;animation-delay:-5s;mask-image:radial-gradient(circle 70px at 34% 36%,#000,transparent),radial-gradient(circle 60px at 72% 12%,#000,transparent),radial-gradient(circle 65px at 9% 61%,#000,transparent),radial-gradient(circle 55px at 60% 83%,#000,transparent),radial-gradient(circle 65px at 96% 52%,#000,transparent);}
.sky-shimmer span:nth-child(3) {animation-duration:11s;animation-delay:-8s;mask-image:radial-gradient(circle 65px at 20% 12%,#000,transparent),radial-gradient(circle 60px at 55% 46%,#000,transparent),radial-gradient(circle 70px at 87% 23%,#000,transparent),radial-gradient(circle 60px at 39% 91%,#000,transparent),radial-gradient(circle 65px at 76% 67%,#000,transparent);}
@keyframes sky-twinkle {0%,15%{opacity:.08}65%,100%{opacity:.85}}
.sky-shimmer.is-paused span {animation-play-state:paused;}
.reduce-motion .sky-shimmer {display:none;}
@media(prefers-reduced-motion:reduce){.sky-shimmer {display:none;}}

/* Keep the video frame proportional instead of clamping height alone. */
#videoCard {width:100%;max-width:1102px;min-height:0;margin-inline:auto;}
#videoCard video {width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:16 / 9;object-fit:contain;}
/* Compact, complete views for the photo map and film. */
#storyFlow .memory-actions,#storyFlow .memory-context {display:none;}
#siteMain>#storyFlow,#siteMain>#film {padding-top:24px;padding-bottom:20px;}
#storyFlow .section-heading,#film .section-heading {margin-bottom:20px;}
#storyFlow .memory-ring-stage {height:clamp(180px,calc(100svh - var(--header-height) - 350px),520px);}
#storyFlow .ring-counter {margin-bottom:0;}
#videoCard {max-width:min(1102px,calc((100svh - var(--header-height) - 220px) * 16 / 9));}
#vibe-coding>.section-heading,#vibe-coding>#magicRings {display:none;}
#vibe-coding .macbook-showcase {margin-top:0;}
@media(max-width:600px){
 #storyFlow .section-heading h2,#film .section-heading h2 {font-size:26px;}
 #storyFlow .section-heading>p {display:none;}
 #storyFlow .memory-city-tabs {margin-bottom:8px;}
 #storyFlow .ring-controls {gap:8px;}
 #videoCard {max-width:min(100%,calc((100svh - var(--header-height) - 245px) * 16 / 9));}
}
/* A quiet directory surface, distinct group labels and an unmistakable selection. */
.project-directory {padding:18px 16px;background:rgba(8,18,28,.78);border:1px solid #718c9f30;border-radius:12px;}
.project-directory>summary {padding:0 8px 18px;font-weight:600;}
.project-directory-group {margin:0;padding:18px 0;}
.project-directory-group+.project-directory-group {border-top:1px solid #718c9f38;}
.project-directory-group:last-child {padding-bottom:0;}
.project-directory-group>p {display:flex;align-items:center;gap:8px;margin:0 8px 12px;color:#9bafbd;font-size:11px;font-weight:600;letter-spacing:.08em;}
.project-directory-group>p::before {content:'';width:5px;height:5px;border:1px solid #9bafbd;transform:rotate(45deg);}
.project-directory .macbook-tabs button {position:relative;width:100%;padding:10px 22px 10px 16px;border:1px solid transparent;border-radius:6px;color:#d5e0e6;font-size:14px;line-height:1.5;margin:3px 0;}
.project-directory .macbook-tabs button:hover {background:#263c4a;}
.project-directory .macbook-tabs button[aria-pressed="true"] {background:#75dfca;color:#0b2925;border-color:#75dfca;font-weight:650;}
.project-directory .macbook-tabs button[aria-pressed="true"]::after {content:'›';position:absolute;right:9px;font-size:20px;line-height:20px;top:10px;}
#storyFlow .memory-ring-stage {height:clamp(180px,calc(100svh - var(--header-height) - 230px),610px);}
@media(max-width:1000px){.project-directory>summary{padding:0 4px;}.project-directory[open]>summary{padding-bottom:14px;}.project-directory[open] .macbook-tabs{padding-top:0;}.project-directory-group+.project-directory-group{border-top:0;}}
@media(max-width:520px){.project-directory-group+.project-directory-group{border-top:1px solid #718c9f38;}}
/* A sharper, left-weighted sky and a homepage that fits its viewport. */
body:has(#home:not([hidden])) {
 --page-sky:linear-gradient(90deg,rgba(5,9,15,.38),rgba(5,9,15,.48) 42%,rgba(5,9,15,.90) 74%,rgba(5,9,15,.96)),url('/assets/earth/nasa-starmap-8k.jpg');
 background-size:cover,auto 125svh;background-position:center,18% center;
}
body:has(#home:not([hidden])) .site-header {background-size:cover,auto 125svh;background-position:center,18% center;}
body:has(#home:not([hidden])) .sky-shimmer {mask-image:linear-gradient(90deg,#000,transparent 70%);}
body:has(#home:not([hidden])) .sky-shimmer span {background-image:url('/assets/earth/nasa-starmap-8k.jpg');background-size:auto 125svh;background-position:18% center;}
#home.globe-stage {height:calc(100svh - var(--header-height));min-height:0;max-height:none;}
#home .hero-intro {padding-top:clamp(40px,9svh,110px);}
#home .globe-viewport {bottom:58px;}
@media(max-width:540px){
 #home .hero-intro {padding-top:22px;}
 #home .hero-intro h1 {font-size:32px;}
 #home .hero-description {font-size:14px;margin-top:12px;}
 #home .globe-viewport {inset:200px -20px 132px;}
 #home .chapter-panel {bottom:76px;}
 #home .place-dock {bottom:14px;}
}
/* Lift the Milky Way on the left independently from foreground text and Earth. */
body:has(#home:not([hidden])) {
 --page-sky:linear-gradient(90deg,rgba(0,3,7,.10),rgba(0,3,7,.24) 40%,rgba(0,3,7,.86) 73%,rgba(0,3,7,.96)),url('/assets/earth/nasa-starmap-8k.jpg');
 background-image:none;
}
body:has(#home:not([hidden]))::before {
 content:'';position:fixed;inset:0;z-index:-2;pointer-events:none;
 background-image:var(--page-sky);background-size:cover,auto 125svh;background-position:center,18% center;background-repeat:no-repeat;
 filter:brightness(2.3);
}
body:has(#home:not([hidden])) .site-header {isolation:isolate;background-image:none;background-color:transparent;}
body:has(#home:not([hidden])) .site-header::before {
 content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background-color:#000307;
 background-image:var(--page-sky);background-size:cover,auto 125svh;background-position:center,18% center;background-attachment:fixed;background-repeat:no-repeat;filter:brightness(2.3);
}
