:root {
  --bg: #fbfbfb;
  --surface: #eeeeef;
  --ink: #252527;
  --muted: #68686d;
  --line: #d8d8dc;
  --accent: hsl(228 68% 50%);
  --accent-soft: hsl(228 68% 50% / 0.1);
  --max: 72rem;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
}

body.menu-open { overflow: hidden; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.85rem;
  z-index: 100;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.skip-link:focus { left: 1rem; top: 1rem; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.65rem 0;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  text-transform: none;
}

.wordmark span {
  margin-left: 0.35rem;
  font-weight: 500;
  opacity: 0.85;
}

.desk-nav {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.desk-nav a {
  color: var(--ink);
  text-decoration: none;
}

.desk-nav a:hover,
.desk-nav a:focus-visible,
.desk-nav a.is-active {
  color: var(--accent);
  outline: none;
}

.nav-sep {
  color: var(--line);
  user-select: none;
}

.menu-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.45rem 0;
  cursor: pointer;
}

.menu-btn:hover,
.menu-btn:focus-visible {
  color: var(--accent);
  outline: none;
}

.mobile-nav {
  background: var(--accent);
  color: #fff;
  padding: 0.35rem 0 1.1rem;
}

.mobile-nav[hidden] { display: none !important; }

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-family: var(--mono);
  font-size: 0.92rem;
}

.mobile-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.mobile-nav a {
  color: #fff;
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.mobile-nav-row span { opacity: 0.55; }

/* Dot rules */
.dot-rule {
  border: 0;
  height: 0.55rem;
  margin: 0;
  background-image: radial-gradient(circle, #cfcfd3 1.1px, transparent 1.2px);
  background-size: 7px 7px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.9;
}

/* Chapters */
.chapter {
  padding: 2rem 0 2.25rem;
}

.chapter-index {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.chapter-index span {
  color: var(--accent);
  font-weight: 600;
}

.chapter-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.chapter-deck {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.chapter-head {
  margin-bottom: 1.5rem;
}

/* Hero */
.hero-grid {
  display: grid;
  gap: 1.5rem;
}

.hero-mark {
  width: min(100%, 14rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
}

.hero-glyph {
  font-family: var(--mono);
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  line-height: 1;
}

.hero-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero-mark {
  position: relative;
}

.hero-mark .hero-caption {
  position: absolute;
  left: 0.65rem;
  bottom: 0.55rem;
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-lead {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 3.6vw, 1.45rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.hero-lead strong { font-weight: 700; }

.hero-body {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 40rem;
}

.hero-meta {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.text-link {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.text-link:hover,
.text-link:focus-visible {
  opacity: 0.8;
  outline: none;
}

/* Experience stories — editorial rows, not cards */
.story-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.story-row {
  display: grid;
  gap: 0.65rem 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.story-row:last-child {
  border-bottom: 1px solid var(--line);
}

.story-year {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.story-place {
  margin: 0.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.story-main h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.story-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* Entry lists (placeholders) */
.entry-list {
  display: flex;
  flex-direction: column;
}

.entry {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.35rem 0.9rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.entry:last-child { border-bottom: 1px solid var(--line); }

.entry-index {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.entry-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.entry-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.entry-meta {
  grid-column: 2;
  margin: 0.35rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* Social directory */
.social-dir {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  padding: 0.35rem 0 0.5rem;
}

.social-platform {
  margin: 0 0 0.25rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 650;
}

.social-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.social-handle {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.88rem;
}

/* Footer */
.site-footer {
  padding: 1.5rem 0 2.5rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
  outline: none;
}

.footer-copy {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* Desktop */
@media (min-width: 820px) {
  .wrap {
    width: min(100% - 3.5rem, var(--max));
  }

  .menu-btn { display: none; }

  .desk-nav { display: flex; }

  .mobile-nav { display: none !important; }

  .chapter {
    padding: 2.75rem 0 3rem;
  }

  .hero-grid {
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }

  .hero-mark {
    width: 100%;
  }

  .chapter-head {
    display: grid;
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
    gap: 2rem;
  }

  .chapter-head > div:first-child {
    grid-column: 1 / -1;
    max-width: 40rem;
  }

  .story-row {
    grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
    gap: 2rem;
    padding: 1.6rem 0;
  }

  .story-main h3 { font-size: 1.12rem; }
  .story-main p { font-size: 1rem; max-width: 42rem; }

  .entry {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.5rem 1.1rem;
    padding: 1.35rem 0;
  }

  .entry-meta {
    grid-column: auto;
    margin: 0.2rem 0 0;
    white-space: nowrap;
  }

  .social-dir {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 2rem;
  }

  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}

@media (min-width: 1100px) {
  .wrap {
    width: min(100% - 4.5rem, var(--max));
  }

  .hero-lead {
    font-size: 1.55rem;
  }
}
