/* Theme Color Variables */
:root,
[data-theme="black"] {
  --bg-color: #0d0d11;
  --text-color: #f4f4f6;
  --text-muted: #9e9ea7;
  --surface-color: #1a1a20;
  --surface-hover: #26262f;
  --border-color: rgba(255, 255, 255, 0.16);
  --active-ring: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="white"] {
  --bg-color: #ffffff;
  --text-color: #121316;
  --text-muted: #4e515a;
  --surface-color: #f3f4f6;
  --surface-hover: #e5e7eb;
  --border-color: rgba(0, 0, 0, 0.12);
  --active-ring: #121316;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="sage"] {
  --bg-color: #d8eedf;
  --text-color: #0c2415;
  --text-muted: #1d462d;
  --surface-color: #bee3c8;
  --surface-hover: #a5d7b2;
  --border-color: rgba(12, 36, 21, 0.18);
  --active-ring: #0c2415;
  --shadow-sm: 0 2px 8px rgba(12, 36, 21, 0.08);
}

[data-theme="lavender"] {
  --bg-color: #ebe4f7;
  --text-color: #19092e;
  --text-muted: #3a1c62;
  --surface-color: #d8cbef;
  --surface-hover: #c4b0e5;
  --border-color: rgba(25, 9, 46, 0.18);
  --active-ring: #19092e;
  --shadow-sm: 0 2px 8px rgba(25, 9, 46, 0.08);
}

[data-theme="peach"] {
  --bg-color: #fee7d6;
  --text-color: #2e1605;
  --text-muted: #5d3110;
  --surface-color: #f7d1b7;
  --surface-hover: #f1bc96;
  --border-color: rgba(46, 22, 5, 0.18);
  --active-ring: #2e1605;
  --shadow-sm: 0 2px 8px rgba(46, 22, 5, 0.08);
}

:root {
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: scroll;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.5;
}

body.theme-transition {
  transition: background-color 0.3s ease, color 0.3s ease;
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}

/* Page Layout */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Dead-Center Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}

.title {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 7.5vw, 6rem);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--text-color);
  margin-bottom: 0.85rem;
  transition: color 0.3s ease;
}

/* 3D Perspective Morph Transition */
.title-swap {
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  position: relative;
  perspective: 1200px;
}

.title-swap:focus-visible {
  outline: 2px solid var(--active-ring);
  outline-offset: 8px;
  border-radius: 8px;
}

.title-name,
.title-phonetic {
  grid-area: 1 / 1;
  display: block;
  text-align: center;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.4s ease;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.title-name {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
  filter: blur(0px);
}

.title-phonetic {
  opacity: 0;
  transform: translateY(20px) rotateX(35deg);
  filter: blur(6px);
  pointer-events: none;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text-color);
}

.title-swap:hover .title-name,
.title-swap.is-flipped .title-name {
  opacity: 0;
  transform: translateY(-20px) rotateX(-35deg);
  filter: blur(6px);
}

.title-swap:hover .title-phonetic,
.title-swap.is-flipped .title-phonetic {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
  filter: blur(0px);
}

.title-word {
  display: inline-block;
  white-space: nowrap;
}

.subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  transition: color 0.3s ease;
  text-wrap: balance;
}

.subtitle strong,
.subtitle .company,
.subtitle .author-title {
  font-weight: 600;
  color: var(--text-color);
}

.subtitle-chunk {
  display: inline-block;
  white-space: nowrap;
}

.subtitle-sep {
  opacity: 0.45;
  margin: 0 0.45rem;
}

@media (max-width: 480px) {
  .subtitle-sep {
    display: none;
  }
  .subtitle-chunk {
    display: block;
  }
}

/* Home Layout & Scroll Hint */
.home-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-home {
  min-height: calc(85vh - 3rem);
  position: relative;
  width: 100%;
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-hint:hover {
  opacity: 0.9;
  transform: translateY(2px);
}

/* Journey Timeline: Minimal & Unboxed */
.timeline-section {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 5rem;
  padding: 3rem 1rem 0;
}

.timeline-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

/* Hairline Left Guideline */
.timeline-list::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.35rem;
  width: 1px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.75rem;
  transition: transform 0.2s ease;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0.15rem;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background-color: var(--border-color);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.timeline-item:hover .timeline-marker {
  background-color: var(--text-color);
  transform: scale(1.3);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  transition: color 0.2s ease;
}

.timeline-item:hover .timeline-period {
  color: var(--text-color);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.3;
  margin: 0;
}

.timeline-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.timeline-link:hover {
  opacity: 0.75;
}

.timeline-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.timeline-org {
  font-weight: 500;
  color: var(--text-color);
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.timeline-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.timeline-role-prefix {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: normal;
  margin-right: 0.15rem;
}

.timeline-tag-book {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.85;
}

.timeline-desc-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  margin-top: 0.45rem;
}

.timeline-cover-link {
  display: block;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.timeline-cover-link:hover {
  transform: translateY(-2px) scale(1.02);
  opacity: 0.9;
}

.timeline-book-thumbnail {
  display: block;
  width: 52px;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
}

.timeline-item-book .timeline-marker {
  width: 0.55rem;
  height: 0.55rem;
  left: 0.1rem;
}

/* Footer: Single line & compact */
.footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding-top: 1rem;
}

/* Copyright text */
.copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: -0.005em;
  transition: color 0.3s ease;
  white-space: nowrap;
}

/* Color Switcher Dots: Minimal & Unboxed */
.color-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  padding: 0.2rem 0;
  border: none;
  box-shadow: none;
}

.color-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  position: relative;
  outline: none;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.15s ease;
  will-change: transform;
}

.color-dot:hover {
  transform: scale(1.35);
  z-index: 2;
  opacity: 1;
}

.color-dot:active {
  transform: scale(0.85);
  transition-duration: 0.08s;
}

.color-dot:focus-visible,
.color-dot[aria-pressed="true"],
[data-theme="black"] .dot-black,
[data-theme="white"] .dot-white,
[data-theme="sage"] .dot-sage,
[data-theme="lavender"] .dot-lavender,
[data-theme="peach"] .dot-peach {
  box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 3.5px var(--active-ring);
}

/* Individual Dot Swatches */
.dot-black {
  background-color: #0d0d11;
  border-color: rgba(255, 255, 255, 0.3);
}

.dot-white {
  background-color: #ffffff;
  border-color: rgba(0, 0, 0, 0.2);
}

.dot-sage {
  background-color: #d8eedf;
  border-color: rgba(12, 36, 21, 0.25);
}

.dot-lavender {
  background-color: #ebe4f7;
  border-color: rgba(25, 9, 46, 0.25);
}

.dot-peach {
  background-color: #fee7d6;
  border-color: rgba(46, 22, 5, 0.25);
}

/* Minimal Unboxed Social Icons */
.social-links {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 4px;
  background: transparent;
  border: none;
  transition: color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  will-change: transform;
}

.social-icon-link:hover {
  color: var(--text-color);
  transform: translateY(-1.5px);
}

.social-icon-link:active {
  transform: scale(0.88) translateY(0);
  transition-duration: 0.08s;
}

.social-icon-link:focus-visible {
  outline: 2px solid var(--active-ring);
  outline-offset: 2px;
}

.social-icon-link svg {
  flex-shrink: 0;
}

/* Mobile layout */
@media (max-width: 480px) {
  .title {
    font-size: clamp(2.15rem, 8.8vw, 2.75rem);
  }

  .hero-home {
    min-height: calc(80vh - 3rem);
  }

  .timeline-section {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    margin-bottom: 3.5rem;
  }

  .timeline-item {
    padding-left: 1.65rem;
    padding-bottom: 2.25rem;
  }

  .timeline-title {
    font-size: 1.125rem;
  }

  .footer {
    gap: 0.5rem;
  }
}

/* Unified Site Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 3rem;
  margin-bottom: 2rem;
  padding: 0;
  box-sizing: border-box;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.9375rem;
  font-weight: 600;
  height: 2rem;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  will-change: transform;
}

.brand-link:hover {
  transform: translateY(-1px);
  opacity: 0.75;
}

.brand-link:active {
  transform: scale(0.97) translateY(0);
  opacity: 0.6;
  transition-duration: 0.08s;
}

.brand-link:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--active-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

.brand-desktop {
  display: inline;
}

.brand-mobile {
  display: none;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.brand-link:hover .brand-mobile {
  transform: scale(1.18) rotate(6deg);
}

.brand-link:active .brand-mobile {
  transform: scale(0.9) rotate(0deg);
  transition-duration: 0.08s;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  height: 2rem;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 2rem;
  padding: 0.25rem 0;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: color 0.2s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

.nav-link:hover {
  color: var(--text-color);
  transform: translateY(-1px);
}

.nav-link:active {
  transform: scale(0.95) translateY(0);
  transition-duration: 0.08s;
}

.nav-link.active {
  color: var(--text-color);
  font-weight: 500; /* Identical font-weight guarantees 0px layout shift */
}

@media (max-width: 640px) {
  .brand-desktop {
    display: none;
  }

  .brand-mobile {
    display: inline-block;
  }

  .site-nav {
    gap: 1rem;
  }

  .nav-links {
    gap: 0.85rem;
  }

  .nav-link {
    font-size: 0.875rem;
  }
}

/* Page Content Container */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* Speaker Hero */
.speaker-hero {
  margin-bottom: 3rem;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.speaker-tagline {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.speaker-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.cta-pill:hover {
  background-color: var(--surface-hover);
  transform: translateY(-1px);
}

/* Spotlight: Recent Conversations */
.spotlight-section {
  margin-bottom: 3.5rem;
}

.spotlight-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.spotlight-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.35rem;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.spotlight-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.badge-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-color);
  background-color: var(--surface-hover);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.spotlight-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.spotlight-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.spotlight-title a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.spotlight-title a:hover {
  opacity: 0.75;
}

.spotlight-show {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Archive Controls: Tabs & Live Search */
.archive-header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.filter-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--surface-color);
  padding: 0.2rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  position: relative;
  z-index: 2;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.18s ease;
  white-space: nowrap;
  user-select: none;
}

.filter-tab:hover {
  color: var(--text-color);
}

.filter-tab.active {
  color: var(--text-color);
  font-weight: 600;
  box-shadow: none !important;
}

.search-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.search-field {
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text-color);
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 200px;
}

.search-field:focus {
  border-color: var(--text-color);
}

.search-field::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.results-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Timeline Rows by Year */
.archive-timeline {
  display: flex;
  flex-direction: column;
  margin-bottom: 4rem;
}

.timeline-year-group {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.year-heading-sticky {
  padding-top: 0.4rem;
}

.year-num {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.appearance-rows {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.appearance-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0.65rem;
  margin: 0 -0.65rem;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.appearance-item:hover {
  background-color: var(--surface-color);
}

.item-primary {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.item-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.item-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.35;
}

.mini-tag {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background-color: var(--surface-hover);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.item-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.item-location {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.item-secondary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.watch-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}

.appearance-item:hover .watch-link,
.watch-link:hover {
  color: var(--text-color);
}

/* Search Empty State */
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  max-width: 420px;
  margin: 0 auto;
}

.empty-state-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 0.35rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.empty-state-reset {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-color);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.empty-state-reset:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

.empty-state-reset:active {
  transform: scale(0.95);
}

/* Responsive adjustment */
@media (max-width: 640px) {
  .archive-header-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-wrapper {
    width: 100%;
    justify-content: space-between;
  }

  .search-field {
    width: 100%;
    max-width: 240px;
  }

  .timeline-year-group {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .year-heading-sticky {
    padding-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
  }
}

/* ==========================================================================
   Writing Archive & Timeline Styles
   ========================================================================== */

.writing-item-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.25rem 0;
}

.writing-item-link {
  color: var(--text-color);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.writing-item-link:hover {
  opacity: 0.75;
}

.writing-item-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.writing-tag-label,
.writing-tag-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  opacity: 0.7;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, color 0.15s ease;
  line-height: 1.4;
}

.writing-tag-btn:hover {
  opacity: 1;
  color: var(--text-color);
}

.writing-tag-btn:focus-visible {
  outline: 1px dotted var(--text-muted);
  outline-offset: 2px;
}

.writing-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.writing-read-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.writing-stats-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.writing-stat-views,
.writing-stat-upvotes {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.writing-stat-upvotes.has-upvoted {
  color: var(--text-color);
  font-weight: 500;
}

/* ==========================================================================
   Single Post / Article Typography & Layout
   ========================================================================== */

.post-page {
  padding-top: 1rem;
}

.post-back-bar {
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-back-link svg {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-back-link:hover {
  color: var(--text-color);
  transform: translateX(-2px);
}

.post-back-link:hover svg {
  transform: translateX(-4px);
}

.post-back-link:active svg {
  transform: translateX(-7px);
}

.post-article {
  max-width: 680px;
  margin: 0 auto 5rem;
}

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.post-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 0.35rem;
  column-gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.post-meta > * {
  white-space: nowrap;
}

.meta-sep {
  opacity: 0.5;
}

.post-title {
  font-family: var(--font-serif);
  font-size: clamp(2.15rem, 5.5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--text-color);
  margin: 0 0 1.25rem 0;
}

.post-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.75;
  text-decoration: none;
  transition: opacity 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.post-tag:hover {
  opacity: 1;
  color: var(--text-color);
}

.post-tag:focus-visible {
  outline: 1px dotted var(--text-muted);
  outline-offset: 2px;
}

.post-hero-image {
  margin: 2.5rem 0 0.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.post-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* ==========================================================================
   Editorial Prose Typography (Plain Links, High Contrast, Pure Content)
   ========================================================================== */

.prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-color);
  word-break: break-word;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.65rem;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-serif);
  color: var(--text-color);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
}

.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.65rem; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.15rem; }

/* Plain links: zero underlines, color transition */
.prose a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.prose a:hover {
  opacity: 0.7;
}

.prose strong {
  font-weight: 600;
  color: var(--text-color);
}

.prose ul,
.prose ol {
  margin: 0 0 1.65rem 1.35rem;
  padding: 0;
}

.prose li {
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.prose blockquote {
  margin: 2rem 0;
  padding: 0.35rem 0 0.35rem 1.25rem;
  border-left: 2px solid var(--border-color);
  color: var(--text-muted);
  font-style: italic;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2.5rem auto;
  display: block;
}

.prose hr {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin: 3.5rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.prose th {
  font-weight: 600;
  color: var(--text-color);
}

/* Inline Code */
:not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background-color: var(--surface-color);
  color: var(--text-color);
}

/* Code Blocks */
pre[class*="language-"] {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 10px;
  overflow-x: auto;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  -webkit-overflow-scrolling: touch;
}

pre[class*="language-"] code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

/* Syntax Highlighting Tokens (Dark Theme) */
[data-theme="black"] .token.comment,
[data-theme="black"] .token.prolog,
[data-theme="black"] .token.doctype,
[data-theme="black"] .token.cdata {
  color: #71717a;
  font-style: italic;
}

[data-theme="black"] .token.punctuation {
  color: #a1a1aa;
}

[data-theme="black"] .token.property,
[data-theme="black"] .token.tag,
[data-theme="black"] .token.boolean,
[data-theme="black"] .token.number,
[data-theme="black"] .token.constant,
[data-theme="black"] .token.symbol {
  color: #f87171;
}

[data-theme="black"] .token.selector,
[data-theme="black"] .token.attr-name,
[data-theme="black"] .token.string,
[data-theme="black"] .token.char,
[data-theme="black"] .token.builtin {
  color: #34d399;
}

[data-theme="black"] .token.operator,
[data-theme="black"] .token.entity,
[data-theme="black"] .token.url {
  color: #38bdf8;
}

[data-theme="black"] .token.atrule,
[data-theme="black"] .token.attr-value,
[data-theme="black"] .token.keyword {
  color: #c084fc;
}

[data-theme="black"] .token.function,
[data-theme="black"] .token.class-name {
  color: #60a5fa;
}

[data-theme="black"] .token.regex,
[data-theme="black"] .token.important,
[data-theme="black"] .token.variable {
  color: #fbbf24;
}

/* Syntax Highlighting Tokens (Light Themes) */
:root:not([data-theme="black"]) .token.comment,
:root:not([data-theme="black"]) .token.prolog,
:root:not([data-theme="black"]) .token.doctype,
:root:not([data-theme="black"]) .token.cdata {
  color: #64748b;
  font-style: italic;
}

:root:not([data-theme="black"]) .token.punctuation {
  color: #475569;
}

:root:not([data-theme="black"]) .token.property,
:root:not([data-theme="black"]) .token.tag,
:root:not([data-theme="black"]) .token.boolean,
:root:not([data-theme="black"]) .token.number,
:root:not([data-theme="black"]) .token.constant,
:root:not([data-theme="black"]) .token.symbol {
  color: #dc2626;
}

:root:not([data-theme="black"]) .token.selector,
:root:not([data-theme="black"]) .token.attr-name,
:root:not([data-theme="black"]) .token.string,
:root:not([data-theme="black"]) .token.char,
:root:not([data-theme="black"]) .token.builtin {
  color: #059669;
}

:root:not([data-theme="black"]) .token.operator,
:root:not([data-theme="black"]) .token.entity,
:root:not([data-theme="black"]) .token.url {
  color: #0284c7;
}

:root:not([data-theme="black"]) .token.atrule,
:root:not([data-theme="black"]) .token.attr-value,
:root:not([data-theme="black"]) .token.keyword {
  color: #7c3aed;
}

:root:not([data-theme="black"]) .token.function,
:root:not([data-theme="black"]) .token.class-name {
  color: #2563eb;
}

:root:not([data-theme="black"]) .token.regex,
:root:not([data-theme="black"]) .token.important,
:root:not([data-theme="black"]) .token.variable {
  color: #d97706;
}

/* Post Pagination */
.post-pagination {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1.5rem;
  margin-top: 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 48%;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s ease;
}

.post-nav-link:hover {
  opacity: 0.75;
}

.post-nav-direction {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.post-nav-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.35;
}

.post-nav-next {
  margin-left: auto;
  text-align: right;
}

@media (max-width: 640px) {
  .writing-meta-right {
    align-items: flex-start;
  }

  .post-pagination {
    flex-direction: column;
    gap: 2rem;
  }

  .post-nav-link {
    max-width: 100%;
  }

  .post-nav-next {
    text-align: left;
    margin-left: 0;
  }
}

/* ==========================================================================
   Post Stats (Views & Upvotes)
   ========================================================================== */

.post-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.post-stat-item:hover {
  color: var(--text-color);
}

.post-stat-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.post-stat-value {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-color);
}

.post-stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Post Feedback & Upvote Section */
.post-feedback {
  margin: 3.5rem 0 2.5rem 0;
  padding: 2.25rem 0 1.5rem 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.post-feedback-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
}

.post-upvote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.1s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.post-upvote-btn:hover {
  border-color: var(--text-color);
}

.post-upvote-btn:active {
  transform: scale(0.97);
}

.post-upvote-btn .upvote-icon {
  transition: transform 0.18s ease;
}

.post-upvote-btn:hover .upvote-icon {
  transform: translateY(-2px);
}

.post-upvote-btn .upvote-count {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
}

.post-upvote-btn .upvote-sep {
  opacity: 0.5;
}

/* Has Upvoted Active State */
.post-upvote-btn.has-upvoted {
  background-color: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
  font-weight: 600;
}

.post-upvote-btn.has-upvoted .upvote-icon {
  stroke: var(--bg-color);
  fill: var(--bg-color);
  transform: translateY(-2px);
}

.post-upvote-btn.has-upvoted .upvote-count {
  color: var(--bg-color);
}

.post-upvote-btn.has-upvoted .upvote-sep {
  color: var(--bg-color);
  opacity: 0.6;
}

.post-feedback-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
  transition: color 0.15s ease;
}

/* ==========================================================================
   404 Full-Page Liquid Atmosphere
   ========================================================================== */

.notfound-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.liquid-fullscreen-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto;
  display: block;
}

.notfound-hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  pointer-events: none;
}

.notfound-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 580px;
  pointer-events: auto;
}

.notfound-code {
  font-family: var(--font-serif);
  font-size: clamp(5.5rem, 16vw, 11rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  color: var(--text-color);
  opacity: 0.95;
  line-height: 0.95;
  margin-bottom: 1rem;
  user-select: none;
  animation: codeFloat 6s ease-in-out infinite alternate;
}

@keyframes codeFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.notfound-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 500;
  color: var(--text-color);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem 0;
}

.notfound-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 0 2.25rem 0;
  line-height: 1.55;
  text-wrap: balance;
}

.notfound-links {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--surface-color);
  padding: 0.45rem 1.15rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 95vw;
}

.notfound-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.2s ease;
}

.notfound-link svg {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notfound-link:hover {
  opacity: 0.75;
}

.notfound-link:first-child:hover svg {
  transform: translateX(-3px);
}

.notfound-link:last-child:hover svg {
  transform: translateX(3px);
}

/* Mobile Controls Refinements */
@media (max-width: 640px) {
  .archive-header-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .filter-tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .search-wrapper {
    width: 100%;
    justify-content: space-between;
  }

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

@media (prefers-reduced-motion: reduce) {
  .notfound-code {
    animation: none !important;
  }
}



