/* ==========================================================================
   Wei Xia — Personal Website Design System v2 (ericwxia.xyz)
   Typography: Google Sans Flex, Newsreader, Noto Sans/Serif SC, Google Sans Code
   Palette: Warm Museum Paper & Deep Obsidian (#FAF8F5 / #171717 / #1A5276)
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #24262b;
  --bg-elevated: #2d3036;
  --bg-subtle: #363940;
  --bg-muted: #40444c;
  --bg-obsidian: #1b1c20;
  --ink: #efeee9;
  --ink-secondary: #cbccd0;
  --ink-muted: #9fa2aa;
  --border: rgba(239, 238, 233, 0.12);
  --border-strong: rgba(239, 238, 233, 0.23);
  --accent: #e8cb96;
  --accent-hover: #f5e2bc;
  --accent-soft: rgba(232, 203, 150, 0.12);
  --accent-border: rgba(232, 203, 150, 0.36);
  --header-bg: rgba(36, 38, 43, 0.88);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 12px 30px -10px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 52px -14px rgba(0, 0, 0, 0.42);
  --fig-re: #4bc498;
  --fig-re-soft: rgba(75, 196, 152, 0.16);
  --fig-md: #e59a3c;
  --fig-ga: #e06c6c;
  --fig-tier1-fill: rgba(75, 196, 152, 0.18);
  --fig-tier2-fill: rgba(232, 203, 150, 0.14);
  --fig-tier3-fill: rgba(239, 238, 233, 0.07);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-sans: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Noto Sans SC', sans-serif;
  --font-serif: 'Newsreader', 'Noto Serif SC', Georgia, serif;
  --font-mono: 'Google Sans Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --container-max: 1040px;
  --prose-max: 690px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-variant-ligatures: no-contextual;
  font-feature-settings: "calt" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.22s ease, color 0.22s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

[hidden] {
  display: none !important;
}

body.is-modal-open {
  overflow: hidden;
}

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

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.skip-link:focus {
  left: 16px;
}

.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Header, Monogram & Reading Progress Bar
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.915rem;
  font-weight: 480;
  color: var(--ink-secondary);
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--bg-subtle);
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  font-weight: 580;
  background: var(--bg-subtle);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.menu-toggle {
  display: none;
}

.reading-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}

.reading-progress::-webkit-progress-bar {
  background: transparent;
}

.reading-progress::-webkit-progress-value {
  background: var(--accent);
  transition: width 0.08s linear;
}

.reading-progress::-moz-progress-bar {
  background: var(--accent);
}

/* ==========================================================================
   Main Container & Section Rhythm
   ========================================================================== */

main {
  flex: 1;
  padding-bottom: 36px;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 46px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 26px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.085em;
  color: var(--ink-muted);
  margin: 0 0 7px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 620;
  letter-spacing: -0.022em;
  margin: 0;
}

.section-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.scholar-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 540;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.scholar-pill:hover {
  color: var(--accent-hover);
  background: rgba(226, 198, 146, 0.15);
  border-color: rgba(226, 198, 146, 0.52);
  transform: translateY(-1px);
}

.scholar-pill .scholar-arrow {
  opacity: 0.85;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.scholar-pill:hover .scholar-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.16s ease;
}

.section-more:hover {
  color: var(--accent-hover);
}

.section-more .icon {
  transition: transform 0.16s ease;
}

.section-more:hover .icon {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Home Hero & Museum Mat Portrait Frame
   ========================================================================== */

.hero {
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.5rem, 4.8vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 660;
  margin: 0 0 22px;
  text-wrap: balance;
}

.hero-lead,
.hero-sub {
  font-family: var(--font-sans);
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 430;
  max-width: 54ch;
}

.hero-lead {
  margin: 0 0 16px;
}

.hero-sub {
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.contact-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.contact-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.contact-handle {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(226, 198, 146, 0.38);
  text-underline-offset: 3px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.inline-link:hover {
  color: var(--accent-hover);
  text-decoration-color: rgba(242, 221, 179, 0.85);
}

/* Compact Portrait Frame */
.portrait-card {
  width: 196px;
  max-width: 196px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-obsidian);
}

.portrait-frame {
  background: var(--bg-obsidian);
  aspect-ratio: 760 / 826;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ==========================================================================
   Media Coverage List (With Domain & Year Context)
   ========================================================================== */

.page-hero {
  padding: 56px 0 8px;
}

.page-title {
  font-size: clamp(2.05rem, 3.6vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.028em;
  font-weight: 650;
  margin: 0 0 12px;
}

.page-subtitle {
  font-size: 1.0625rem;
  color: var(--ink-secondary);
  margin: 0;
  max-width: 620px;
}

.page-subtitle + .page-subtitle {
  margin-top: 10px;
}

.media-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.media-item {
  border-bottom: 1px solid var(--border);
}

.media-item:first-child {
  border-top: 1px solid var(--border);
}

.media-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 14px;
  margin: 0 -14px;
  border-radius: var(--radius-sm);
  transition: background-color 0.16s ease;
}

.media-link:hover {
  background-color: var(--bg-subtle);
}

.media-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.media-context {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.media-headline {
  font-size: 1.05rem;
  font-weight: 540;
  line-height: 1.45;
  color: var(--ink);
  transition: color 0.16s ease;
}

.media-link:hover .media-headline {
  color: var(--accent);
}

.media-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.outlet-badge {
  font-family: var(--font-mono);
  font-size: 0.77rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  white-space: nowrap;
}

.media-arrow {
  color: var(--ink-muted);
  transition: transform 0.16s ease, color 0.16s ease;
}

.media-link:hover .media-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Blog Cards & Toolbar
   ========================================================================== */

.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-pill {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.filter-pill.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.search-field {
  position: relative;
  min-width: 248px;
}

.search-field .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 14px 8px 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.post-card-main {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
}

.post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card-cover img {
  transform: scale(1.03);
}

.post-card-body {
  padding: 24px 24px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.post-card-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-sans);
  font-weight: 560;
}

.post-card-title {
  font-size: 1.24rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 620;
  margin: 0 0 10px;
  color: var(--ink);
}

.post-card-excerpt {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px 18px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.post-card-footer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 560;
  color: var(--accent);
  transition: color 0.16s ease;
}

.post-card-footer:hover {
  color: var(--accent-hover);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.like-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--ink);
}

.like-btn:active {
  transform: scale(0.95);
}

.like-btn .heart-icon {
  width: 16px;
  height: 16px;
  color: #e46c78;
  transition: transform 0.18s ease, color 0.16s ease;
}

.like-btn:hover .heart-icon {
  transform: scale(1.12);
}

.like-btn.is-liked {
  color: var(--ink);
  background: rgba(228, 108, 120, 0.12);
  border-color: rgba(228, 108, 120, 0.28);
}

.like-btn.is-liked .heart-icon {
  color: #ec6b78;
}

.like-btn-post {
  border-color: var(--border);
  background: var(--bg-elevated);
  padding: 6px 14px;
}

.post-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.post-actions-row .hashtag-row {
  margin: 0;
}

.post-actions-end {
  justify-content: flex-end;
}

/* Horizontal Related Post Card */
.next-post-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.next-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.next-post-thumb {
  height: 100%;
  min-height: 130px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.next-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.next-post-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Zen Minimalist Writing List (Homepage) */
.zen-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.zen-post-item {
  border-bottom: 1px solid var(--border);
}

.zen-post-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 12px;
  margin: 0 -12px;
  border-radius: var(--radius-sm);
  transition: background-color 0.16s ease;
}

.zen-post-link:hover {
  background-color: var(--bg-subtle);
}

.zen-post-title {
  font-size: 1.05rem;
  font-weight: 520;
  color: var(--ink);
  transition: color 0.16s ease;
}

.zen-post-link:hover .zen-post-title {
  color: var(--accent);
}

.zen-post-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.empty-state {
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-muted);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Personal Page & Journey Trail
   ========================================================================== */

.personal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: start;
  padding: 28px 0 64px;
}

.personal-prose {
  max-width: 60ch;
}

.personal-prose > p {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 430;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 22px;
}

.personal-social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.86rem;
  font-weight: 480;
  color: var(--ink-muted);
  transition: color 0.16s ease;
}

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

.social-link .icon-sm {
  width: 13px;
  height: 13px;
  transition: transform 0.16s ease;
}

.social-link:hover .icon-sm {
  transform: translate(2px, -2px);
}

.social-sep {
  color: var(--border-strong);
  user-select: none;
}

.art-card {
  width: 276px;
  max-width: 276px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.art-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

/* ==========================================================================
   Article / Essay Layout + Sticky Margin TOC
   ========================================================================== */

.article-shell {
  padding: 44px 0 76px;
}

.article-with-toc {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, var(--prose-max)) 200px;
  gap: 56px;
  justify-content: center;
}

.article-container {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding: 0 24px;
}

.article-with-toc .article-container {
  padding: 0;
  margin: 0;
}

.toc-aside {
  position: sticky;
  top: 98px;
  align-self: start;
  padding-top: 4px;
}

.toc-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-muted);
  margin: 0 0 12px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
}

.toc-link {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc-link:hover {
  color: var(--ink);
}

.toc-link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 560;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 26px;
  transition: color 0.16s ease;
}

.back-link:hover {
  color: var(--ink);
}

.article-header {
  margin-bottom: 30px;
}

.article-title {
  font-size: clamp(1.95rem, 3.8vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.026em;
  font-weight: 660;
  margin: 0 0 16px;
  text-wrap: balance;
}

.article-title:lang(zh-Hans) {
  font-size: clamp(1.72rem, 3.2vw, 2.28rem);
  letter-spacing: -0.01em;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.hashtag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hashtag {
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 3px 11px;
  border-radius: 999px;
  font-weight: 480;
}

.hashtag-link {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-border);
  font-weight: 520;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.hashtag-link:hover {
  color: var(--accent-hover);
  border-color: rgba(232, 203, 150, 0.56);
}

.disclaimer-box {
  padding: 15px 20px;
  margin: 24px 0 28px;
  background: var(--bg-subtle);
  border-left: 3px solid var(--border-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.91rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  font-style: italic;
}

/* Video Figure */
.video-card {
  margin: 28px 0 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-caption {
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
}

/* Custom Audio Player Card (Zero browser-default range chrome) */
.audio-player-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  margin: 24px 0 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.audio-cover {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.audio-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--ink);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.audio-play-btn:hover {
  transform: scale(1.05);
  opacity: 0.92;
}

.audio-body {
  flex: 1;
  min-width: 0;
}

.audio-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.audio-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.audio-title {
  font-weight: 620;
  font-size: 0.95rem;
  color: var(--ink);
}

.audio-artist {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.audio-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lyrics-jump {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.lyrics-jump:hover {
  color: var(--accent-hover);
}

.audio-time {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.audio-scrub {
  width: 100%;
  padding: 6px 0;
  cursor: pointer;
}

.audio-progress {
  width: 100%;
  height: 6px;
  border: none;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
  display: block;
  appearance: none;
  -webkit-appearance: none;
}

.audio-progress::-webkit-progress-bar {
  background: var(--bg-muted);
  border-radius: 999px;
}

.audio-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.08s linear;
}

.audio-progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

/* Prose Content */
.prose {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.84;
  color: var(--ink);
}

.prose.prose-zh {
  font-size: 1.08rem;
  line-height: 1.95;
}

.prose p {
  margin: 0 0 1.35em;
}

.prose h2 {
  font-family: var(--font-sans);
  font-size: 1.42rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 630;
  margin: 2.3em 0 0.75em;
  scroll-margin-top: 90px;
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: 1.14rem;
  line-height: 1.38;
  letter-spacing: -0.012em;
  font-weight: 610;
  margin: 1.8em 0 0.6em;
  scroll-margin-top: 90px;
}

.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.55em;
}

.prose strong {
  font-weight: 650;
  color: var(--ink);
}

.prose-divider {
  text-align: center;
  margin: 2.4em 0;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink-muted);
  letter-spacing: 0.2em;
}

/* Publication SVG Figures (Theme-adaptive!) */
.svg-figure {
  margin: 2.2em 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
}

.svg-figure svg {
  width: 100%;
  height: auto;
  font-family: var(--font-sans);
}

.svg-figure figcaption {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.855rem;
  line-height: 1.58;
  color: var(--ink-secondary);
}

/* Equation Block */
.equation-box {
  margin: 1.8em 0;
  padding: 22px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow-x: auto;
}

.equation-math {
  font-family: var(--font-serif);
  font-size: 1.38rem;
  font-style: italic;
  margin: 0 auto;
  white-space: nowrap;
  color: var(--ink);
}

.equation-math .op {
  font-style: normal;
  padding: 0 4px;
}

.equation-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Comparative Epoch Table */
.table-wrap {
  margin: 1.8em 0 2.2em;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.table-caption {
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.epoch-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-align: left;
}

.epoch-table th,
.epoch-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

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

.epoch-table th {
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-elevated);
}

.epoch-table td:first-child {
  font-weight: 560;
  color: var(--ink);
  white-space: nowrap;
}

.epoch-table td:nth-child(2) {
  color: var(--ink-secondary);
}

.epoch-table td:nth-child(3) {
  color: var(--accent);
  font-weight: 520;
}

.references-list {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.62;
  color: var(--ink-secondary);
  list-style: none;
  padding-left: 0 !important;
}

.references-list li {
  margin-bottom: 10px;
}

/* Editorial Magazine Gallery Grid (NYC Post) */
.gallery-editorial {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 22px;
}

.gallery-thumb {
  position: relative;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-subtle);
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  display: block;
  width: 100%;
}

.gallery-thumb.is-featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
  min-height: 100%;
}

.gallery-thumb.is-wide {
  grid-column: span 2;
  aspect-ratio: 8 / 3;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-thumb:hover img {
  transform: scale(1.05);
}

.gallery-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(17, 17, 16, 0.66);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.gallery-thumb:hover .gallery-badge,
.gallery-thumb.is-featured .gallery-badge {
  opacity: 1;
}

.spot-guide {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 18px 0 38px;
  font-family: var(--font-sans);
}

.spot-guide-title {
  font-size: 0.96rem;
  font-weight: 620;
  margin: 0 0 14px;
  color: var(--ink);
}

.spot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

.spot-list li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-secondary);
  margin: 0;
}

.spot-list strong {
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.lyrics-card {
  margin: 34px 0;
  padding: 24px 28px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-serif);
  scroll-margin-top: 90px;
}

.lyrics-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.lyrics-stanza {
  margin: 0 0 16px;
  font-style: italic;
  line-height: 1.78;
  color: var(--ink-secondary);
}

.lyrics-stanza:last-child {
  margin-bottom: 0;
}

.related-section {
  margin-top: 54px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-img {
  max-width: min(92vw, 1200px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  text-align: center;
  max-width: 80vw;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1080px) {
  .article-with-toc {
    display: block;
    max-width: var(--prose-max);
  }

  .toc-aside {
    display: none;
  }
}

@media (max-width: 820px) {
  .hero {
    padding: 44px 0 44px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .portrait-card {
    order: -1;
    margin: 0;
    width: 148px;
    max-width: 148px;
  }

  .personal-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .art-card {
    margin: 0;
    width: 240px;
    max-width: 240px;
  }

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

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

  .spot-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0 18px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 12px 18px 16px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
  }

  .media-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

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

  .next-post-thumb {
    aspect-ratio: 16 / 9;
  }

  .audio-player-card {
    flex-wrap: wrap;
  }

  .search-field {
    width: 100%;
  }
}
