:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-tint: #edf7f5;
  --text: #1f2a2e;
  --muted: #637176;
  --line: #dce4e2;
  --teal: #147d73;
  --teal-dark: #0f5f58;
  --coral: #d86b4b;
  --shadow: 0 18px 50px rgba(31, 42, 46, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id],
.timeline-item[id] {
  scroll-margin-top: 120px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(251, 250, 247, 0.88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 26px rgba(31, 42, 46, 0.08);
}

.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
}

.site-nav a {
  border-bottom: 2px solid transparent;
  padding: 22px 0 20px;
  transition:
    border-color 160ms ease,
    color 160ms ease;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: 56px;
  min-height: min(76vh, 760px);
  padding: 72px 7vw 88px;
  border-bottom: 1px solid var(--line);
}

.hero__media {
  display: grid;
  place-items: center;
}

.hero__media img {
  width: min(100%, 360px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero__content {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 8px 0 12px;
  font-size: 22px;
  line-height: 1.25;
}

.hero__lead {
  margin: 28px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 20px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero__tags {
  max-width: 600px;
  margin-top: 30px;
}

.hero__tag-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.hero__tag-hint span {
  color: #111;
  font-size: 20px;
  line-height: 1;
}

.hero__tags .tag-list {
  gap: 8px;
}

.hero__tags .interest-tag {
  min-height: 28px;
  padding: 3px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.interest-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 15px;
  border: 1px solid #c9ded8;
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

a.interest-tag:hover {
  transform: translateY(-2px);
  background: var(--surface-tint);
  border-color: var(--teal);
  box-shadow: 0 5px 14px rgba(15, 95, 88, 0.1);
}

a.interest-tag:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.interest-tag--static {
  background: var(--surface-tint);
  cursor: default;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  font-weight: 750;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--secondary {
  color: var(--teal-dark);
}

.button--secondary:hover {
  background: #e1f2ef;
}

.section {
  padding: 88px 7vw;
}

.section--tint {
  background: var(--surface-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto 34px;
}

.section__heading .eyebrow {
  min-width: 130px;
}

.about-layout {
  display: grid;
  gap: 30px;
  max-width: 1120px;
  margin: 0 auto;
}

.timeline-hidden {
  display: none;
}

.timeline-hidden.is-open {
  display: contents;
}

.expand-btn {
  display: block;
  width: max-content;
  min-width: 150px;
  margin: 14px auto 0;
  padding: 10px 22px;
  background: var(--surface);
  border: 1px solid #c9ded8;
  border-radius: 999px;
  box-shadow: 0 5px 16px rgba(15, 95, 88, 0.06);
  color: var(--teal-dark);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  grid-column: 1 / -1;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.expand-btn:hover {
  transform: translateY(-2px);
  background: var(--surface-tint);
  border-color: var(--teal);
}

.expand-btn:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
}

.about-text p {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.85;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 240px;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.project-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.project-card__meta {
  margin: 0 0 8px;
  padding: 2px 8px;
  display: inline-block;
  background: rgba(20, 125, 115, 0.08);
  border-radius: 4px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}

.project-card h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.3;
}

.updates-timeline {
  position: relative;
  display: grid;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
}

.updates-timeline::before {
  position: absolute;
  top: 14px;
  bottom: 68px;
  left: 113px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--teal), rgba(20, 125, 115, 0.18));
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 44px;
  min-width: 0;
}

.timeline-item::before {
  position: absolute;
  top: 22px;
  left: 113px;
  z-index: 1;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  background: var(--surface);
  border: 3px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--bg);
  content: "";
}

.timeline-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-top: 13px;
  text-align: right;
}

.timeline-date .year {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}

.timeline-date .month-day {
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.update-body {
  min-width: 0;
}

.update-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 250px);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 24px;
  min-height: 178px;
  padding: 18px 20px;
  background: linear-gradient(120deg, var(--surface) 55%, #f7fbf9);
  border: 1px solid var(--line);
  border-left: 4px solid #9fcec4;
  border-radius: 16px;
  box-shadow: 0 9px 26px rgba(15, 95, 88, 0.05);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.update-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(15, 95, 88, 0.1);
}

.update-card:has(img.zoomed),
.update-card:has(img.zoomed):hover {
  transform: none;
  box-shadow: 0 9px 26px rgba(15, 95, 88, 0.05);
}

.update-card:not(:has(.update-media)) {
  grid-template-columns: minmax(0, 1fr);
  min-height: 120px;
}

.update-card h3,
.update-card p {
  grid-column: 1;
  margin: 0;
}

.update-card h3 {
  align-self: end;
  color: var(--text);
  font-size: 19px;
}

.update-card p {
  align-self: start;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.update-media {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  width: 100%;
  max-width: 250px;
  min-width: 0;
  margin: 0;
}

.update-media img {
  display: block;
  width: 100%;
  height: 142px;
  object-fit: cover;
  background: #edf4f1;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: zoom-in;
}

.update-media--contain {
  width: max-content;
  max-width: 100%;
  justify-self: center;
  text-align: center;
}

.update-media--contain img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.update-media img.zoomed {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  width: auto;
  height: auto;
  max-width: 80vw;
  max-height: 80vh;
  transform: translate(-50%, -50%);
  object-fit: contain;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  cursor: zoom-out;
}

.update-media figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.update-media--grid figcaption {
  grid-column: 1 / -1;
  margin-top: 0;
}

.section--contact {
  background: #f7faf8;
}

.contact-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 40px;
  overflow: hidden;
  background: linear-gradient(120deg, #eaf6f2, #fffdf8);
  border: 1px solid #d5e9e3;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 95, 88, 0.06);
}

.contact-panel::after {
  position: absolute;
  right: -78px;
  bottom: -178px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(20, 125, 115, 0.13);
  border-radius: 50%;
  pointer-events: none;
  content: "";
}

.contact-panel__copy,
.contact-panel__link {
  position: relative;
  z-index: 1;
}

.contact-panel__copy {
  max-width: 580px;
}

.contact-panel__eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}

.contact-panel h3 {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: clamp(24px, 3vw, 30px);
}

.contact-panel__copy > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.contact-panel__link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  background: var(--teal);
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(20, 125, 115, 0.19);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.contact-panel__link:hover {
  transform: translateY(-2px);
  background: var(--teal-dark);
  box-shadow: 0 14px 24px rgba(20, 125, 115, 0.22);
}

.contact-panel__link:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.contact-panel__link svg {
  flex: none;
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-panel__link .contact-panel__arrow {
  margin-left: 4px;
}

.site-footer {
  padding: 28px 7vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1080px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
    padding: 16px 20px 0;
  }

  .site-nav {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .site-nav a {
    padding: 6px 0 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding: 50px 24px 64px;
  }

  .hero__media {
    order: -1;
    justify-content: start;
  }

  .hero__media img {
    max-width: 260px;
  }

  .hero__lead {
    font-size: 18px;
  }

  .section {
    padding: 64px 24px;
  }

  .section__heading {
    display: block;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .updates-timeline {
    gap: 18px;
    padding-left: 22px;
  }

  .updates-timeline::before {
    left: 7px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-item::before {
    top: 13px;
    left: -15px;
  }

  .timeline-date {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding-top: 0;
    text-align: left;
  }

  .contact-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 700px) {
  .update-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 18px;
  }

  .update-media {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    max-width: 280px;
    margin-top: 6px;
  }

  .update-media--contain {
    width: max-content;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 34px;
  }

  .hero__actions {
    gap: 8px;
  }

  .hero__actions .button {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 0 8px;
    font-size: 14px;
  }

  .button {
    width: 100%;
  }

  .about-text p {
    font-size: 16px;
  }

  .contact-panel {
    padding: 26px 22px;
  }

  .contact-panel__link {
    max-width: 100%;
    font-size: 14px;
  }

  .contact-panel__link span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* ===== 旅行足迹：经纬度地图 ===== */
.travel-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  align-items: start;
  gap: 18px;
}

.travel-map-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.travel-map-panel h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 17px;
}

.travel-map-hint {
  display: none;
  margin: -6px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.travel-map-viewport {
  overflow-x: auto;
  border-radius: 12px;
  background: #e9f3f5;
}

.travel-map-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
}

.travel-map-stage--china {
  min-width: 600px;
  aspect-ratio: 1000 / 764;
}

.travel-map-stage--sea {
  max-width: 420px;
  margin-inline: auto;
  aspect-ratio: 560 / 499;
}

.travel-map-stage > img {
  display: block;
  width: 100%;
  height: 100%;
}

.travel-markers {
  position: absolute;
  inset: 0;
}

.travel-marker-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.travel-marker-links line {
  stroke: var(--teal-dark);
  stroke-opacity: 0.55;
  stroke-width: 1.4;
}

.travel-marker-links circle {
  fill: var(--teal-dark);
  fill-opacity: 0.65;
}

.travel-marker {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 7px rgba(31, 42, 46, 0.27);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transform: translate(
    calc(-50% + var(--marker-shift-x, 0px)),
    calc(-50% + var(--marker-shift-y, 0px))
  );
  transition: background 160ms ease, box-shadow 160ms ease, scale 160ms ease;
}

.travel-marker:hover,
.travel-marker:focus-visible,
.travel-marker[aria-pressed="true"] {
  z-index: 3;
  background: var(--coral);
  box-shadow: 0 4px 12px rgba(31, 42, 46, 0.35);
  scale: 1.15;
}

.travel-marker:focus-visible,
.travel-place:focus-visible,
.travel-filter:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.travel-preview {
  position: fixed;
  z-index: 30;
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 11px;
  width: min(320px, calc(100vw - 24px));
  padding: 9px;
  border: 1px solid #d5e4df;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 42px rgba(25, 57, 54, 0.2);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.travel-preview[hidden] {
  display: none;
}

.travel-preview > img {
  display: block;
  width: 106px;
  height: 104px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-tint);
}

.travel-preview__details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  line-height: 1.35;
}

.travel-preview__details strong {
  color: var(--text);
  font-size: 15px;
}

.travel-preview__details span,
.travel-preview__details time,
.travel-preview__details small {
  color: var(--muted);
  font-size: 12px;
}

.travel-preview__details time {
  color: var(--teal-dark);
  font-weight: 700;
}

.travel-preview__details small:empty {
  display: none;
}

.travel-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 地点标签（城市 + 数量）默认收起，点击「展开地点标签」后显示 */
.travel-places {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 30px;
}

.travel-places.is-open {
  display: flex;
}

.travel-place,
.travel-filter {
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.travel-place:hover,
.travel-filter:hover,
.travel-place.is-active,
.travel-filter.is-active {
  border-color: var(--teal);
  background: var(--surface-tint);
  color: var(--teal-dark);
}

.travel-album {
  scroll-margin-top: 90px;
}

.travel-album__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
}

.travel-album[open] > .travel-album__heading {
  margin-bottom: 12px;
}

.travel-album__heading::-webkit-details-marker {
  display: none;
}

.travel-album__heading:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.travel-album__heading .eyebrow {
  display: block;
  font-size: 13px;
  letter-spacing: .08em;
}

.travel-album__name {
  display: block;
  margin-top: 2px;
  font-size: 25px;
  font-weight: 700;
}

.travel-album__status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.travel-album__toggle-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  background: linear-gradient(145deg, var(--teal), var(--teal-dark));
  border-radius: 50%;
  box-shadow: 0 5px 12px rgba(20, 125, 115, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.travel-album__toggle-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.travel-album__heading:hover .travel-album__toggle-icon {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(20, 125, 115, 0.27);
}

.travel-album[open] .travel-album__toggle-icon svg {
  transform: rotate(180deg);
}

.travel-filters {
  margin-bottom: 22px;
}

.travel-year-group {
  margin: 0 0 30px;
}

.travel-year-group h4 {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 17px;
}

.travel-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.travel-photo-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.travel-photo-card > a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-tint);
}

.travel-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.travel-photo-card > a:hover img {
  transform: scale(1.04);
}

.travel-photo-card figcaption {
  display: grid;
  gap: 3px;
  padding: 12px 14px 14px;
  font-size: 13px;
}

.travel-photo-card figcaption strong {
  font-size: 15px;
}

.travel-photo-card figcaption time {
  color: var(--muted);
}

@media (max-width: 820px) {
  .travel-map-layout {
    grid-template-columns: 1fr;
  }

  .travel-map-hint {
    display: block;
  }

  .travel-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .travel-photo-grid {
    grid-template-columns: 1fr;
  }
}

/* 全局图片响应式修复 */
img {
  max-width: 100%;
  height: auto;
}

/* ===== 项目卡片与单页详情 ===== */
.project-section-lead {
  max-width: 1120px;
  margin: -8px auto 26px;
  color: var(--muted);
  font-size: 15px;
}

.project-card:focus-visible,
.project-gallery a:focus-visible,
.project-gallery button:focus-visible,
.project-detail button:focus-visible,
.project-detail__footer a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.project-card__visual {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  height: 174px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #e6f1ee, #f3f5f0);
  border-bottom: 1px solid var(--line);
}

.project-card[data-project="vegetation"] .project-card__visual { background: #edf1e4; }
.project-card[data-project="sea-ice"] .project-card__visual { background: #e8f0f5; }
.project-card[data-project="internship"] .project-card__visual { background: #f5eee9; }
.project-card__visual img { width: 100%; height: 100%; min-height: 0; max-height: 134px; object-fit: contain; }
.project-card__number {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 750;
}

.project-card__body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 24px; }
.project-card__summary { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.project-card__footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.project-card__action { color: var(--teal-dark); font-size: 13px; font-weight: 750; white-space: nowrap; }
.project-card__action span { display: inline-block; margin-left: 4px; transition: transform 180ms ease; }
.project-card:hover .project-card__action span { transform: translate(2px, -2px); }

body.has-project-dialog { overflow: hidden; }
.project-dialog {
  --project-color: #147d73;
  --project-tint: #edf7f5;
  width: min(1120px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 28px 100px rgba(14, 38, 42, 0.25);
  overscroll-behavior: contain;
}
.project-dialog[data-theme="green"] { --project-color: #60733a; --project-tint: #edf2e4; }
.project-dialog[data-theme="blue"] { --project-color: #326b8b; --project-tint: #eaf2f7; }
.project-dialog[data-theme="coral"] { --project-color: #b8563a; --project-tint: #f8ece7; }
/* 遮罩不用 backdrop-filter：它会让弹窗内的滚动每帧重新模糊整页，是滑动卡顿的根源。 */
.project-dialog::backdrop { background: rgba(21, 39, 42, 0.68); }
.project-detail { position: relative; padding: 32px 36px 22px; }
.project-detail__close {
  position: sticky;
  top: 10px;
  float: right;
  z-index: 2;
  margin: -10px -12px -26px 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.project-detail__close:hover { color: var(--text); border-color: var(--project-color); }
.project-detail__close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; }
.project-detail__labels { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding-right: 44px; }
.project-detail__labels .eyebrow { margin: 0; color: var(--project-color); font-size: 12px; letter-spacing: 1px; }
.project-detail__status { padding: 2px 8px; border-radius: 20px; background: var(--project-tint); color: var(--project-color); font-size: 11px; }
.project-detail__heading h2 { margin: 0; padding-right: 30px; font-size: clamp(24px, 3vw, 32px); line-height: 1.35; letter-spacing: -0.5px; }
.project-detail__subtitle { margin: 6px 0 0; color: var(--project-color); font-size: 14px; }
.project-detail__intro { margin: 16px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.project-detail__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 12px; }
.project-detail__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 18px 0 22px; padding: 15px 20px; border-radius: 10px; background: var(--project-tint); }
/* 数值在上、标签在下（column-reverse 的主轴朝上，所以 flex-end 才是"内容贴顶"）。
   贴顶后，某一列标签折行只会向下延伸，不会再把该列数值顶上去，三列数值始终对齐。 */
.project-detail__metrics > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; }
.project-detail__metrics > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.project-detail__metrics dt { color: var(--muted); font-size: 11px; }
.project-detail__metrics dd { margin: 0; color: var(--project-color); font-size: clamp(17px, 2vw, 24px); font-weight: 750; line-height: 1.4; }
.project-detail__layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; }
.project-detail__narrative { min-width: 0; }
.project-detail__section + .project-detail__section { margin-top: 16px; }
.project-detail__section h3,
.project-gallery__heading h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.project-detail__section h3 { border-left: 3px solid var(--project-color); padding-left: 9px; }
.project-detail__section p,
.project-detail__section li { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.project-detail__section p + p { margin-top: 8px; }
.project-detail__section ul { margin: 0; padding-left: 17px; }
.project-detail__section li + li { margin-top: 7px; }
.project-detail__section li::marker { color: var(--project-color); }
.project-gallery { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); align-self: start; }
.project-gallery__heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.project-gallery__heading h3 { margin: 0; }
.project-gallery__counter { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.project-gallery__figure { margin: 0; }
.project-gallery__viewport { display: grid; min-width: 0; }
.project-gallery__viewport--comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.project-gallery__image-link { display: grid; place-items: center; width: 100%; height: 200px; padding: 8px; border: 1px solid #eef1ef; border-radius: 6px; background: #fff; }
.project-gallery__image-link img { display: block; width: 100%; height: 100%; max-height: 182px; object-fit: contain; }
.project-gallery__viewport--comparison .project-gallery__image-link { grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-width: 0; }
.project-gallery__viewport--comparison img { min-height: 0; }
.project-gallery__comparison-label { color: var(--text); font-size: 11px; line-height: 1.4; text-align: center; }
.project-gallery figcaption { min-height: 18px; margin: 8px 0 10px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.project-gallery__thumbnails { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.project-gallery__thumbnail { position: relative; height: 57px; min-width: 0; padding: 4px; border: 1px solid var(--line); border-radius: 5px; background: #fff; cursor: pointer; }
.project-gallery__thumbnail[aria-pressed="true"] { border: 2px solid var(--project-color); padding: 3px; background: var(--project-tint); }
.project-gallery__thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.project-gallery__thumbnail--comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.project-gallery__thumbnail span { position: absolute; bottom: 1px; right: 3px; padding: 0 3px; background: rgba(255, 255, 255, 0.9); color: var(--muted); font-size: 9px; }
.project-gallery__hint { margin: 6px 0 10px; color: var(--muted); font-size: 10px; }
.project-detail__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); list-style: none; }
.project-detail__tags li { padding: 3px 7px; border-radius: 4px; background: var(--project-tint); color: var(--project-color); font-size: 10px; }
.project-detail__footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.project-detail__footer a { color: var(--project-color); white-space: nowrap; }

@media (min-width: 851px) and (max-height: 800px) {
  .project-detail { padding: 16px 30px 12px; }
  .project-detail__heading h2 { font-size: 28px; }
  .project-detail__intro { margin-top: 10px; }
  .project-detail__metrics { margin: 12px 0 14px; padding: 10px 18px; }
  .project-detail__section + .project-detail__section { margin-top: 12px; }
  .project-detail__section p, .project-detail__section li { font-size: 12px; line-height: 1.7; }
  .project-gallery__image-link { height: 170px; }
  .project-gallery__image-link img { max-height: 152px; }
  .project-gallery { padding: 12px; }
  .project-gallery__heading { margin-bottom: 8px; }
  .project-detail__footer { margin-top: 8px; padding-top: 10px; }
}

@media (max-width: 850px) {
  .project-dialog { width: calc(100% - 28px); max-height: calc(100dvh - 28px); border-radius: 16px; }
  .project-detail { padding: 26px 24px 20px; }
  .project-detail__layout { grid-template-columns: 1fr; gap: 22px; }
  .project-detail__close { margin-right: -6px; }
  .project-gallery__image-link { height: 290px; }
  .project-gallery__image-link img { max-height: 272px; }
  .project-gallery__thumbnail { height: 68px; }
}

@media (max-width: 480px) {
  .project-card__visual { height: 165px; }
  .project-card__body { padding: 20px; }
  .project-detail { padding: 24px 18px 18px; }
  .project-detail__heading h2 { font-size: 24px; }
  .project-detail__subtitle { font-size: 12px; }
  .project-detail__intro { font-size: 13px; }
  .project-detail__metrics { gap: 8px; padding: 12px; }
  .project-detail__metrics > div + div { padding-left: 8px; }
  .project-detail__metrics dt { font-size: 10px; }
  .project-detail__metrics dd { font-size: 16px; overflow-wrap: anywhere; }
  .project-gallery { padding: 12px; }
  .project-gallery__image-link { height: 220px; }
  .project-gallery__image-link img { max-height: 202px; }
  .project-gallery__thumbnail { height: 49px; }
  .project-detail__footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-card, .project-card__action span, .interest-tag { transition: none; }
  a.interest-tag:hover { transform: none; }
}
