/* ══════════════════════════════════════════════════════════════
   太原理工大学机器人团队 · 2026 纳新
   学术风格 · 浅色 · 严肃
   ══════════════════════════════════════════════════════════════ */

:root {
  --paper: #f6f2e9;
  --paper-deep: #efe8da;
  --card: #fffdf7;
  --ink: #1d2b3a;
  --ink-soft: #3d4c60;
  --muted: #6d7887;
  --accent: #8a2f2b;
  --accent-soft: rgba(138, 47, 43, 0.08);
  --gold: #96762c;
  --line: #d8cfbc;
  --line-soft: rgba(29, 43, 58, 0.08);
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Source Han Serif CN', 'STSong', 'SimSun', serif;
  --font-num: 'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
  --nav-h: 64px;
}

/* ── Base ─────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(29, 43, 58, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 43, 58, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

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

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

a { color: var(--accent); text-decoration: none; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5.5rem 0 0;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.section:first-of-type { padding-top: 0; }

/* Section header */
.sec-head {
  text-align: center;
  margin-bottom: 3.2rem;
}

.sec-index {
  font-family: var(--font-num);
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.35em;
  display: block;
  margin-bottom: 0.9rem;
}

.sec-index::before,
.sec-index::after {
  content: '';
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 1rem;
  position: relative;
  top: -3px;
}

.sec-head h2 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--ink);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.sec-sub {
  font-family: var(--font-num);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.sec-desc {
  max-width: 560px;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(246, 242, 233, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 900;
  transition: box-shadow 0.3s;
}

.nav.scrolled { box-shadow: 0 2px 24px rgba(29, 43, 58, 0.08); }

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
}

.nav-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.nav-logo span {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
}

.nav-logo small {
  font-family: var(--font-num);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  display: block;
  line-height: 1;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-serif);
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0;
  position: relative;
  transition: color 0.25s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s;
  transform: translateX(-50%);
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
  padding: 0.25rem 0.6rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 3rem) 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, rgba(150, 118, 44, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 45% 40% at 50% 40%, rgba(138, 47, 43, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2.6rem;
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--line), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-num);
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 2.2rem;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 42px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 900;
  color: var(--ink);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.25;
  letter-spacing: 0.08em;
  margin-bottom: 1.4rem;
}

.hero h1 .yr {
  font-family: var(--font-num);
  color: var(--accent);
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: 0.14em;
  vertical-align: baseline;
  margin-left: 0.4rem;
}

.hero-rule {
  width: 72px;
  height: 3px;
  margin: 0 auto 2rem;
  background: var(--accent);
  position: relative;
}

.hero-rule::before,
.hero-rule::after {
  content: '';
  position: absolute;
  top: 1px;
  width: 5px;
  height: 1px;
  background: var(--gold);
}

.hero-rule::before { left: -14px; }
.hero-rule::after { right: -14px; }

.hero-desc {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 2.8rem;
  line-height: 2.1;
}

.hero-links {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.link-solid,
.link-line {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  letter-spacing: 0.18em;
  padding: 0.85rem 2.4rem;
  transition: all 0.3s;
  cursor: pointer;
}

.link-solid {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.link-solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.link-line {
  border: 1px solid var(--ink);
  color: var(--ink);
}

.link-line:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Stats band ───────────────────────────────────────────── */
.stats-band {
  margin-top: 6rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.6);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1080px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: 2.4rem 1rem;
  position: relative;
}

.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: var(--line);
}

.stat-num {
  font-family: var(--font-num);
  font-size: 2.9rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  margin-top: 0.4rem;
}

/* ── Team cards (组织概况) ────────────────────────────────── */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.team-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2.4rem 1.9rem 2rem;
  position: relative;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.team-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 18px 44px rgba(29, 43, 58, 0.12);
}

.team-card:hover::before { transform: scaleX(1); }

.team-no {
  font-family: var(--font-num);
  font-size: 2.1rem;
  color: var(--gold);
  font-weight: 600;
  display: block;
  line-height: 1;
  margin-bottom: 1.1rem;
}

.team-card h3 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.team-role {
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.24em;
  display: block;
  margin-bottom: 1.1rem;
}

.team-card p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  line-height: 1.95;
  margin-bottom: 1.2rem;
}

.team-meta {
  font-family: var(--font-num);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  border-top: 1px dashed var(--line);
  padding-top: 0.9rem;
}

/* ── Photos (团队风采) ────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.photo-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.55rem 0.55rem 0;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.photo-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 14px 36px rgba(29, 43, 58, 0.14);
}

.photo-frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-deep);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
  transition: transform 0.6s, filter 0.6s;
}

.photo-card:hover img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

.photo-cap {
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 0.7rem 0.3rem 0.75rem;
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

/* ── Support (身后的人) ───────────────────────────────────── */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--card);
}

.support-item {
  padding: 2.2rem 1.8rem;
  position: relative;
}

.support-item + .support-item::before {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 1px;
  background: var(--line);
}

.support-item h4 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

.support-item h4::before {
  content: '§';
  color: var(--gold);
  margin-right: 0.55rem;
  font-family: var(--font-num);
}

.support-item p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.9;
}

/* ── Threshold & chain (关于加入) ─────────────────────────── */
.threshold {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 3.2rem 2rem;
  position: relative;
}

.threshold::before,
.threshold::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold);
}

.threshold::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.threshold::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.threshold h3 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 1.1rem;
  letter-spacing: 0.1em;
}

.threshold p {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 2;
}

.threshold .em { color: var(--accent); font-weight: 700; }

.chain {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2.6rem;
  border: 1px solid var(--line);
  background: var(--card);
}

.chain-node {
  flex: 1;
  min-width: 150px;
  padding: 1.4rem 1rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: 0.1em;
  position: relative;
}

.chain-node + .chain-node::before {
  content: '→';
  position: absolute;
  left: -0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 0.9rem;
  z-index: 2;
  background: var(--card);
  width: 1.4rem;
  text-align: center;
}

.chain-node + .chain-node { border-left: 1px solid var(--line); }

.chain-note {
  text-align: center;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.2em;
}

/* ── Training ─────────────────────────────────────────────── */
/* Overview timeline */
.tl-overview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  margin: 0 auto 3.6rem;
  max-width: 920px;
  padding-top: 0.5rem;
}

.tl-overview::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--line);
}

.tl-node {
  flex: 0 1 125px;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 0.4rem;
}

.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
  margin: 0 auto 0.9rem;
  position: relative;
  z-index: 2;
}

.tl-node:nth-child(odd) .tl-dot { border-color: var(--accent); }

.tl-stage {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
  letter-spacing: 0.05em;
}

.tl-theme {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Tabs */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.8rem;
}

.tab-btn {
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  padding: 0.9rem 2.2rem;
  cursor: pointer;
  position: relative;
  transition: color 0.25s;
}

.tab-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 0;
  height: 3px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width 0.3s;
}

.tab-btn:hover { color: var(--ink); }

.tab-btn.active {
  color: var(--accent);
  font-weight: 900;
}

.tab-btn.active::after { width: 100%; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.scale-badge {
  text-align: center;
  font-family: var(--font-num);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-bottom: 2.4rem;
}

.scale-badge::before,
.scale-badge::after {
  content: '◆';
  font-size: 0.6rem;
  margin: 0 0.8rem;
  vertical-align: middle;
  opacity: 0.7;
}

/* Year blocks */
.year-block {
  margin-bottom: 2.2rem;
}

.year-title {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.year-badge {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 0.88rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  background: var(--accent-soft);
  padding: 0.15rem 0.7rem;
  white-space: nowrap;
}

.year-note {
  font-size: 0.95rem;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

/* Tables */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
}

.detail-table th {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--paper);
  background: var(--ink);
  letter-spacing: 0.2em;
  text-align: left;
  padding: 0.65rem 1.1rem;
}

.detail-table td {
  padding: 0.62rem 1.1rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.detail-table tr:last-child td { border-bottom: none; }

.detail-table td:first-child {
  font-family: var(--font-num);
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.06em;
  white-space: nowrap;
  width: 110px;
}

.detail-table tbody tr:hover td { background: rgba(150, 118, 44, 0.05); }

/* ── Research ─────────────────────────────────────────────── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.resource-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2.2rem 1.8rem;
  text-align: center;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.resource-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(29, 43, 58, 0.12);
}

.resource-no {
  font-family: var(--font-num);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  display: block;
  margin-bottom: 1rem;
}

.resource-card h3 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.18rem;
  color: var(--ink);
  margin-bottom: 0.7rem;
  letter-spacing: 0.05em;
}

.resource-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}

.resource-spec {
  display: inline-block;
  font-family: var(--font-num);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.28rem 0.9rem;
}

/* Platform grid */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--card);
}

.platform-item {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.7rem 1.9rem;
  position: relative;
  transition: background 0.25s;
}

.platform-item:hover { background: rgba(150, 118, 44, 0.05); }

.platform-item:nth-child(odd) { border-right: 1px solid var(--line); }
.platform-item:nth-child(-n+4) { border-bottom: 1px solid var(--line); }

.platform-no {
  font-family: var(--font-num);
  font-size: 1.05rem;
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
  line-height: 1.5;
}

.platform-item h4 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
  letter-spacing: 0.06em;
}

.platform-item p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.8;
}

/* Figure (medal / paper images) */
.figure {
  margin: 3rem auto 0;
  max-width: 720px;
  text-align: center;
}

.figure img {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0.5rem;
  transition: box-shadow 0.35s;
}

.figure:hover img { box-shadow: 0 14px 40px rgba(29, 43, 58, 0.14); }

.figure figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  margin-top: 0.9rem;
}

/* Output stats */
.output-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}

.output-card {
  text-align: center;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 2.2rem 1rem;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.output-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 14px 36px rgba(29, 43, 58, 0.1);
}

.output-num {
  font-family: var(--font-num);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.output-label {
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

/* Quote */
.quote-box {
  max-width: 640px;
  margin: 4rem auto 0;
  text-align: center;
  position: relative;
  padding: 2.6rem 2rem 0;
}

.quote-box::before {
  content: '「';
  font-family: var(--font-serif);
  font-size: 3.4rem;
  color: var(--gold);
  opacity: 0.55;
  display: block;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.quote-box p {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 2.1;
  letter-spacing: 0.04em;
}

.quote-attr {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.24em;
}

.quote-attr::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin-right: 0.8rem;
}

/* Community */
.community-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  max-width: 820px;
  margin: 0 auto;
}

.community-card {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 2rem 1.9rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.community-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 14px 36px rgba(29, 43, 58, 0.12);
}

.community-mark {
  font-family: var(--font-num);
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
}

.community-card h3 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
  letter-spacing: 0.06em;
}

.community-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.85;
}

/* ── History ──────────────────────────────────────────────── */
.history-intro {
  max-width: 620px;
  margin: 0 auto 4.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 2.1;
}

.history-intro strong {
  font-family: var(--font-num);
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0.15rem;
}

.h-timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.h-timeline::before {
  content: '';
  position: absolute;
  left: 119px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.h-year {
  display: grid;
  grid-template-columns: 100px 40px 1fr;
  position: relative;
  margin-bottom: 3.4rem;
}

.h-year-num {
  font-family: var(--font-num);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  line-height: 1.2;
  padding-top: 0.6rem;
}

.h-year-tag {
  display: block;
  font-family: var(--font-num);
  font-size: 0.62rem;
  color: var(--gold);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.h-year-dot {
  display: flex;
  justify-content: center;
  padding-top: 1.15rem;
  position: relative;
  z-index: 2;
}

.h-year-dot::before {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
}

.h-year:nth-child(odd) .h-year-dot::before { border-color: var(--accent); }

.h-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.8rem 1.9rem;
  transition: box-shadow 0.35s, border-color 0.35s;
}

.h-card:hover {
  border-color: var(--accent);
  box-shadow: 0 14px 36px rgba(29, 43, 58, 0.1);
}

.h-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 2;
  margin-bottom: 1.3rem;
}

.h-card p strong {
  font-family: var(--font-num);
  color: var(--accent);
  font-size: 1.08rem;
  font-weight: 600;
}

.h-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.9rem;
}

.h-photo {
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  background: var(--paper-deep);
}

.h-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  transition: transform 0.6s, filter 0.6s;
}

.h-photo:hover img {
  transform: scale(1.07);
  filter: saturate(1.05);
}

.h-photo-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.6rem 0.7rem 0.5rem;
  background: linear-gradient(transparent, rgba(29, 43, 58, 0.82));
  color: #f3efe6;
  font-size: 0.74rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
}

.h-photo:hover .h-photo-cap { opacity: 1; transform: translateY(0); }

.history-end {
  text-align: center;
  font-family: var(--font-num);
  color: var(--muted);
  letter-spacing: 0.3em;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.history-end::before,
.history-end::after {
  content: '◆';
  color: var(--gold);
  font-size: 0.6rem;
  vertical-align: middle;
  margin: 0 0.9rem;
}

/* ── Ending ───────────────────────────────────────────────── */
.ending {
  text-align: center;
  padding: 7rem 2rem 6rem;
}

.ending-line {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  color: var(--ink);
  letter-spacing: 0.12em;
  margin-bottom: 1.4rem;
}

.ending-line .cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: -0.12em;
  animation: blink 1.1s steps(1) infinite;
}

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

.ending-sub {
  font-family: var(--font-num);
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.footer .brand {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.06em;
}

/* ── Like widget ──────────────────────────────────────────── */
.like-widget {
  position: fixed;
  left: 1.6rem;
  bottom: 1.6rem;
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.like-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--card);
  color: var(--accent);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(29, 43, 58, 0.1);
}

.like-btn:hover {
  background: var(--accent);
  color: var(--paper);
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(138, 47, 43, 0.3);
}

.like-btn.liked {
  background: var(--accent);
  color: var(--paper);
  transform: scale(1.2);
}

.like-count {
  font-family: var(--font-num);
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1;
}

.like-remaining {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.like-particle {
  position: fixed;
  z-index: 950;
  pointer-events: none;
  font-size: 0.9rem;
  color: var(--accent);
  animation: likeBurst 0.8s ease-out forwards;
}

@keyframes likeBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0), -46px) scale(0.5); }
}

/* ── QR float bar ─────────────────────────────────────────── */
.qr-bar {
  position: fixed;
  top: calc(var(--nav-h) + 1.4rem);
  right: 1.4rem;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.qr-card {
  width: 104px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.5rem 0.5rem 0.6rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.qr-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(29, 43, 58, 0.14);
}

.qr-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  padding: 3px;
}

.qr-card span {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.18em;
  margin-top: 0.35rem;
  font-family: var(--font-serif);
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 38, 0.94);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  cursor: zoom-out;
}

.lightbox.active { display: flex; }

.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  border: 1px solid var(--gold);
  padding: 6px;
  background: var(--card);
  animation: lbIn 0.35s ease-out;
}

@keyframes lbIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.lb-close {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: none;
  color: var(--gold);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.3s;
}

.lb-close:hover {
  background: var(--gold);
  color: var(--ink);
  transform: rotate(90deg);
}

/* ── Reveal animation ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .teams-grid,
  .resource-grid,
  .output-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .support-grid { grid-template-columns: 1fr; }
  .support-item + .support-item::before {
    left: 18%; right: 18%; top: 0; bottom: auto;
    width: auto; height: 1px;
  }
  .platform-grid { grid-template-columns: 1fr; }
  .platform-item:nth-child(odd) { border-right: none; }
  .platform-item:nth-child(-n+5) { border-bottom: 1px solid var(--line); }
  .community-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 15px; }

  .menu-btn { display: block; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 2rem 1rem;
    display: none;
    box-shadow: 0 14px 30px rgba(29, 43, 58, 0.1);
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: 0.7rem 0; width: 100%; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }

  .stat-item:nth-child(3)::before { display: none; }
  .stat-item:nth-child(n+3) { border-top: 1px solid var(--line); }

  .teams-grid,
  .resource-grid,
  .output-grid { grid-template-columns: 1fr; }

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

  .tl-overview { gap: 0.5rem 0; }
  .tl-overview::before { display: none; }
  .tl-node { flex: 0 1 42%; margin-bottom: 1rem; }

  .tab-nav { flex-wrap: wrap; }
  .tab-btn { padding: 0.7rem 1.2rem; font-size: 0.95rem; }

  .detail-table td:first-child { width: 80px; }
  .detail-table th, .detail-table td { padding: 0.55rem 0.7rem; font-size: 0.85rem; }

  .h-timeline::before { left: 15px; }

  .h-year {
    grid-template-columns: 32px 1fr;
    gap: 0 0.6rem;
    margin-bottom: 2.6rem;
  }

  .h-year-num {
    grid-column: 2;
    text-align: left;
    font-size: 1.5rem;
    padding-top: 0;
  }

  .h-year-tag { display: inline-block; margin-left: 0.8rem; }

  .h-year-dot {
    grid-row: 1 / span 2;
    grid-column: 1;
    justify-content: flex-start;
    padding-top: 0.45rem;
    padding-left: 9px;
  }

  .h-card {
    grid-column: 2;
    padding: 1.4rem 1.3rem;
  }

  .h-photos { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  .qr-bar {
    top: auto;
    bottom: 1rem;
    right: 0.8rem;
    flex-direction: row;
    gap: 0.5rem;
  }

  .qr-card { width: 76px; padding: 0.35rem 0.35rem 0.45rem; }
  .qr-card span { font-size: 0.62rem; letter-spacing: 0.1em; }

  .like-widget { left: 0.9rem; bottom: 0.9rem; }
  .like-btn { width: 44px; height: 44px; font-size: 1.05rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.2rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .chain-node { min-width: 120px; }
  .chain-node + .chain-node::before { left: -0.65rem; }
}
