/* NOTE: shared.css and variables.css are loaded via <link> in HTML for better performance */

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

html {
  scroll-behavior: smooth;
  /* Ensure html covers entire viewport including safe area */
  background-color: var(--color-bg);
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent body from creating gaps at safe area edges */
  min-height: 100vh;
  min-height: 100dvh;
  transition: var(--theme-transition);
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  /* Safe area support for top navigation */
  padding: max(16px, env(safe-area-inset-top, 16px)) max(24px, env(safe-area-inset-right, 24px)) 24px max(24px, env(safe-area-inset-left, 24px));
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(to bottom, var(--color-bg) 0%, rgba(250, 248, 245, 0.7) 50%, rgba(250, 248, 245, 0) 100%);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  transition: var(--theme-transition);
}

/* Dark mode nav background */
[data-theme="dark"] .nav {
  background: linear-gradient(to bottom, var(--color-bg) 0%, rgba(17, 33, 45, 0.7) 50%, rgba(17, 33, 45, 0) 100%);
}

.nav__logo {
    width: 24px;
    height: 28px;
    flex-shrink: 0;
    position: relative;
  }
  
  .nav__logo::before,
  .nav__logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-mask: url('/content/img/AI_icon.svg') no-repeat center;
    -webkit-mask-size: contain;
    mask: url('/content/img/AI_icon.svg') no-repeat center;
    mask-size: contain;
    transition: opacity 0.4s ease;
  }
  
  .nav__logo::before {
    background: var(--logo-gradient-light);
    opacity: 1;
  }
  
  .nav__logo::after {
    background: var(--logo-gradient-dark);
    opacity: 0;
  }
  
  .nav__logo:hover::before {
    opacity: 0;
  }
  
  .nav__logo:hover::after {
    opacity: 1;
  }
.nav__links {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  flex: 1;
}

/* Theme toggle in nav - positioned right */
.nav .theme-toggle {
  flex-shrink: 0;
}

.nav__link {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 5px 12px;
  border-radius: 60px;
  border: 1px solid transparent;
}

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

.nav__link--active {
  color: var(--color-text);
  background-color: var(--stone-100);
  border-color: var(--stone-200);
}

/* ============================================
   MOBILE HAMBURGER MENU
   ============================================ */

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  margin-left: auto;
  z-index: 102;
  position: relative;
}

.nav__hamburger-line {
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav__hamburger-line:not(:last-child) {
  margin-bottom: 4px;
}

/* Hamburger animation to X */
.nav__hamburger--open .nav__hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav__hamburger--open .nav__hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav__hamburger--open .nav__hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu dropdown */
.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 80px 24px 24px;
  background: linear-gradient(
    to bottom, 
    rgba(250, 248, 245, 0.98) 0%,
    rgba(250, 248, 245, 0.95) 40%,
    rgba(250, 248, 245, 0.85) 70%,
    rgba(250, 248, 245, 0) 100%
  );
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  z-index: 99;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.nav__mobile-menu--open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.nav__mobile-menu .nav__link {
  font-size: 14px;
  padding: 6px 10px;
  width: 100%;
  text-align: left;
  border-radius: 12px;
}

.nav__mobile-menu .nav__link:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.nav__mobile-menu .nav__link--active {
  background-color: var(--stone-100);
  border-color: var(--stone-200);
}

/* Overlay for mobile menu */
.nav__overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 98;
}

.nav__overlay--visible {
  display: block;
}

.main {
  max-width: 580px;
  margin: 0;
  /* Safe area support for main content */
  padding: max(120px, calc(100px + env(safe-area-inset-top, 20px))) max(24px, env(safe-area-inset-right, 24px)) max(120px, calc(100px + env(safe-area-inset-bottom, 20px))) max(68px, calc(44px + env(safe-area-inset-left, 24px)));
}

.main--wide {
  max-width: 900px;
}

.title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 48px;
}

.content p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--stone-700);
  margin-bottom: 20px;
}

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

.content a {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border-bottom: 1px solid transparent;
}

.content a:hover {
  opacity: 1;
  color: var(--accent-link);
  border-bottom-color: var(--accent-link);
}

/* Utility class for links without underline on hover */
.content a.no-underline,
.content a.no-underline:hover,
.content .no-underline a,
.content .no-underline a:hover {
  border-bottom: none;
}

.content strong {
  font-weight: 600;
}

.content em {
  font-style: italic;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 20px;
  margin-top: 48px;
}

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

.quick-links {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 48px;
  color: var(--stone-500);
  font-style: italic;
}

.quick-links__label {
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-right: 2px;
}

.quick-links__list a {
  color: var(--stone-500);
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  font-style: normal;
  border-bottom: 1px solid transparent;
}

.quick-links__list a:hover {
  color: var(--accent-link);
  border-bottom-color: var(--accent-link);
}

.quick-links__separator {
  margin: 0 4px;
  opacity: 0.4;
}

.qa-item {
  margin-bottom: 20px;
}

.qa-item__question {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
}

.qa-item__answer {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.qa-item__answer a {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border-bottom: 1px solid transparent;
}

.qa-item__answer a:hover {
  opacity: 1;
  color: var(--accent-link);
  border-bottom-color: var(--accent-link);
}

.qa-item__answer code {
  font-family: var(--font-mono);
  font-size: 12px;
  background-color: var(--stone-200);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--stone-300);
}

.precise-age {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--stone-800);
}

.pronunciation {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 15px;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.pronunciation__play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--stone-300);
  border-radius: 50%;
  background: transparent;
  color: var(--stone-500);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pronunciation__play-btn:hover {
  border-color: var(--stone-500);
  color: var(--stone-700);
  background: var(--stone-100);
}

.pronunciation__play-btn.playing {
  border-color: var(--accent-clay);
  color: var(--accent-clay);
  animation: pulse 1s ease-in-out infinite;
}

.pronunciation__play-btn ion-icon {
  font-size: 16px;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--stone-200);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease forwards;
}

.tab {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  padding: 16px 28px;
  color: var(--stone-400);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
}

.tab:hover {
  color: var(--stone-600);
}

.tab--active {
  color: var(--stone-800);
  border-bottom-color: var(--stone-800);
}

.tab ion-icon {
  font-size: 16px;
}

.tab-content {
  display: none;
}

.tab-content--active {
  display: block;
}

.section-intro {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--stone-600);
  margin-bottom: 40px;
  max-width: 560px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease forwards;
  animation-delay: 0.1s;
}

.tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid var(--stone-200);
  background-color: transparent;
  color: var(--stone-500);
}

.tag:hover {
  background-color: var(--stone-100);
  border-color: var(--stone-300);
}

.tag--active {
  background-color: var(--stone-800);
  color: var(--stone-50);
  border-color: var(--stone-800);
}

.tag--active:hover {
  background-color: var(--stone-700);
  border-color: var(--stone-700);
}

.tag--all {
  font-weight: 500;
}

.tag--top {
  border-color: var(--tag-accent);
  color: var(--tag-accent);
}

.tag--top:hover {
  background-color: color-mix(in srgb, var(--tag-accent) 10%, transparent);
  border-color: var(--tag-accent);
}

.tag--top.tag--active {
  background-color: var(--tag-accent);
  border-color: var(--tag-accent);
  color: white;
}

.tag--top.tag--active:hover {
  background-color: color-mix(in srgb, var(--tag-accent) 85%, black);
  border-color: color-mix(in srgb, var(--tag-accent) 85%, black);
}

.tag__count {
  font-size: 10px;
  opacity: 0.6;
  margin-left: 4px;
}

.tag--active .tag__count {
  opacity: 0.8;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 0.5s ease forwards;
  animation-delay: 0.15s;
}

.grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 32px;
}

.year-group {
  display: flex;
  gap: 32px;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease forwards;
}

.year-group:nth-child(1) { animation-delay: 0.2s; }
.year-group:nth-child(2) { animation-delay: 0.3s; }
.year-group:nth-child(3) { animation-delay: 0.4s; }
.year-group:nth-child(4) { animation-delay: 0.5s; }
.year-group:nth-child(5) { animation-delay: 0.6s; }

.year-sidebar__books {
  flex-shrink: 0;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: end;
  margin-top: 4px;
}

.year-sidebar__posts {
  flex-shrink: 0;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: end;
  margin-top: 28px;
}

.year-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 300;
  color: var(--stone-800);
  letter-spacing: -0.02em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  line-height: 1;
}

.year-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(to bottom, var(--stone-300) 0%, transparent 100%);
  margin-top: 20px;
  min-height: 40px;
}

.year-count {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  color: var(--stone-400);
  margin-top: 16px;
  letter-spacing: 0.1em;
}

.year-books {
  flex: 1;
  min-width: 0;
}

.book-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--stone-100);
  cursor: pointer;
  transition: all 0.3s ease;
}

.book-card:first-child {
  padding-top: 0;
}

.book-card:last-child {
  border-bottom: none;
}

.book-card:hover {
  padding-left: 12px;
}

.book-card__header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.book-card__info {
  flex: 1;
  min-width: 200px;
}

.book-card__title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 400;
  color: var(--stone-800);
  margin-bottom: 6px;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.book-card:hover .book-card__title {
  color: var(--stone-600);
}

.book-card__author {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--stone-400);
  letter-spacing: 0.02em;
}

.book-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.book-card__category {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 12px;
  white-space: nowrap;
  background-color: var(--stone-100);
  color: var(--stone-600);
}

.book-card__rating {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 12px;
  color: var(--accent-clay);
}

.star--empty {
  color: var(--stone-200);
}

.book-card__description {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.8;
  color: var(--stone-500);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--stone-100);
  display: none;
  animation: fadeIn 0.3s ease;
}

.book-card--expanded .book-card__description {
  display: block;
}

.vinyl-card {
  cursor: pointer;
}

.vinyl-card__cover {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--stone-200);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

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

.vinyl-card:hover .vinyl-card__cover img {
  transform: scale(1.03);
}

.vinyl-card__title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  color: var(--stone-800);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vinyl-card__artist {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--stone-500);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.drink-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.drink-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.drink-card__image-wrap {
  position: relative;
  overflow: hidden;
}

.drink-card__image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background-color: var(--stone-100);
  transition: transform 0.4s ease;
  display: block;
}

.drink-card:hover .drink-card__image {
  transform: scale(1.05);
}

.drink-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drink-card__badge--cocktail {
  background-color: var(--badge-cocktail-bg);
  color: var(--badge-cocktail);
}

.drink-card__badge--wine {
  background-color: var(--badge-wine-bg);
  color: var(--badge-wine);
}

.drink-card__badge--mocktail {
  background-color: var(--badge-mocktail-bg);
  color: var(--badge-mocktail);
}

.drink-card__badge--coffee {
  background-color: var(--badge-coffee-bg);
  color: var(--badge-coffee);
}

.drink-card__favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drink-card__favorite ion-icon {
  font-size: 14px;
  color: var(--accent-heart);
}

.drink-card__name-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.drink-card__name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--stone-800);
  line-height: 1.3;
  margin: 0;
  text-align: center;
}

/* NOTE: Base modal styles are in shared.css
   Styles below are page-specific extensions only */

.modal__favorite {
  color: var(--accent-heart);
  font-size: 18px;
  animation: heartPulse 0.6s ease;
}

.modal__image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.modal__tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 12px;
  background: var(--stone-100);
  color: var(--stone-600);
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal__tag ion-icon {
  font-size: 13px;
}

.modal__tag--outline {
  background: transparent;
  border: 1px solid var(--stone-200);
  color: var(--stone-500);
  font-style: italic;
}

.modal__section {
  margin-bottom: 20px;
}

.modal__section:last-child {
  margin-bottom: 0;
}

.modal__label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 8px;
}

.modal__text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--stone-600);
}

.modal__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal__list li {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--stone-600);
  padding: 6px 0;
  border-bottom: 1px solid var(--stone-100);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal__list li:last-child {
  border-bottom: none;
}

.modal__list li::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--stone-300);
  border-radius: 50%;
  flex-shrink: 0;
}

.modal__quote {
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  line-height: 1.7;
  color: var(--stone-500);
  padding: 16px;
  background: var(--stone-50);
  border-radius: 8px;
  margin: 0;
}

/* NOTE: .loading, .empty, .error-state styles are in shared.css */

#books-list,
#vinyl-list {
  min-height: 200px;
}

/* Books Controls */
.books-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.books-controls .tags {
  margin-bottom: 0;
  flex: 1;
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--stone-100);
  padding: 4px;
  border-radius: 8px;
  flex-shrink: 0;
}

.view-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone-400);
  transition: all 0.2s ease;
}

.view-btn:hover {
  color: var(--stone-600);
}

.view-btn--active {
  background: white;
  color: var(--stone-800);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.view-btn ion-icon {
  font-size: 18px;
}

/* Year Cover Groups */
.year-cover-group {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s ease forwards;
}

.year-cover-group:last-child {
  margin-bottom: 0;
}

.year-cover-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.year-cover-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 300;
  color: var(--stone-800);
  letter-spacing: -0.02em;
}

.year-cover-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--stone-200) 0%, var(--stone-200) 80%, transparent 100%);
}

.year-cover-count {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  color: var(--stone-400);
  letter-spacing: 0.08em;
}

/* Book Covers Grid */
.book-covers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 32px 24px;
}

.book-cover-card {
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: bookFadeIn 0.5s ease forwards;
}

@keyframes bookFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-cover-card__spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 12px;
  width: 8px;
  background: linear-gradient(to right, 
    rgba(0,0,0,0.2) 0%, 
    rgba(0,0,0,0.05) 40%,
    rgba(255,255,255,0.1) 50%,
    rgba(0,0,0,0.1) 100%
  );
  border-radius: 3px 0 0 3px;
  z-index: 2;
  transform: translateX(-6px);
}

.book-cover-card__cover {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 2px 6px 6px 2px;
  overflow: hidden;
  background: var(--stone-200);
  box-shadow: 
    4px 4px 12px rgba(0,0,0,0.15),
    1px 1px 3px rgba(0,0,0,0.1);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-cover-card:hover .book-cover-card__cover {
  transform: translateY(-8px) rotateY(-5deg);
  box-shadow: 
    8px 12px 24px rgba(0,0,0,0.2),
    2px 2px 6px rgba(0,0,0,0.1);
}

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

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

.book-cover-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  text-align: center;
  color: rgba(255,255,255,0.9);
}

.book-cover-card__placeholder-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-cover-card__placeholder-author {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.book-cover-card__rating {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  display: flex;
  justify-content: center;
  gap: 1px;
}

.book-cover-card__rating .star {
  font-size: 15px;
  color: var(--accent-rating);
}

.book-cover-card__rating .star--empty {
  color: rgba(255,255,255,0.3);
}

.book-cover-card__shadow {
  position: absolute;
  bottom: -8px;
  left: 10%;
  right: 10%;
  height: 12px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, transparent 70%);
  transition: all 0.35s ease;
}

.book-cover-card:hover .book-cover-card__shadow {
  bottom: -16px;
  opacity: 0.7;
}

/* Book List View */
.books-list-view .year-group {
  animation: fadeInUp 0.5s ease forwards;
}

.book-list-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--stone-100);
  cursor: pointer;
  transition: all 0.25s ease;
  align-items: center;
}

.book-list-item:first-child {
  padding-top: 0;
}

.book-list-item:last-child {
  border-bottom: none;
}

.book-list-item:hover {
  padding-left: 8px;
}

.book-list-item__cover {
  width: 44px;
  height: 66px;
  border-radius: 2px 4px 4px 2px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.12);
}

.book-list-item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-list-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.book-list-item__title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  color: var(--stone-800);
  margin-bottom: 2px;
  line-height: 1.3;
}

.book-list-item:hover .book-list-item__title {
  color: var(--stone-600);
}

.book-list-item__author {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--stone-400);
}

.book-list-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.book-list-item__category {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 10px;
  background-color: var(--stone-100);
  color: var(--stone-600);
}

.book-list-item__rating {
  display: flex;
  gap: 2px;
}

.book-list-item__rating .star {
  font-size: 14px;
  color: var(--accent-rating);
}

.book-list-item__rating .star--empty {
  color: var(--stone-200);
}

/* Blog Post List View */
.month-group {
  margin-bottom: 40px;
}

.month-group:last-child {
  margin-bottom: 0;
}

.month-header {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  color: var(--stone-800);
  text-align: right;
  margin-bottom: 16px;
  padding-right: 0;
}

.month-posts {
  display: flex;
  flex-direction: column;
}

.post-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  padding-left: 0;
  border-bottom: 1px dotted var(--stone-200);
  cursor: pointer;
  transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(10px);
  animation: postFadeIn 0.4s ease forwards;
}

.content a.post-list-item {
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes postFadeIn {
  to {
    transform: translateY(0);
  }
}

.post-list-item:first-child {
  padding-top: 0;
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-item:hover {
  padding-left: 8px;
}

.content a.post-list-item:hover {
  text-decoration: none;
  border-bottom-color: transparent;
}

.post-list-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-list-item__title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  color: var(--stone-800);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.post-list-item:hover .post-list-item__title {
  color: var(--stone-600);
}

.post-list-item__date {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--stone-500);
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

/* Book Modal Styles */
.modal__content--book {
  max-width: 640px;
}

.book-modal__layout {
  display: flex;
  gap: 28px;
  padding: 0 24px 24px;
}

.book-modal__left {
  flex-shrink: 0;
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.book-modal__cover {
  position: relative;
  width: 160px;
  height: 240px;
  border-radius: 2px 6px 6px 2px;
  overflow: visible;
  box-shadow: 
    4px 4px 16px rgba(0,0,0,0.15),
    1px 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 16px;
}

.book-modal__favorite {
    position: absolute;
    top: -20px;
    right: -20px;
    animation: spin-slow 12s linear infinite;
    pointer-events: none;
    display: none;
    z-index: 9999;
    width: 90px !important;
    height: 90px !important;
}

.book-modal__favorite--visible {
  display: block;
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.book-modal__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-modal__author {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--stone-500);
  line-height: 1.4;
}


.book-modal__rating {
  display: flex;
  gap: 3px;
}

.book-modal__rating .star {
  font-size: 18px;
  color: var(--accent-rating);
}

.book-modal__rating .star--empty {
  color: var(--stone-200);
}

.book-modal__category {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 12px;
  background-color: var(--stone-100);
  color: var(--stone-600);
}

.book-modal__right {
  flex: 1;
  min-width: 0;
}

.book-modal__description {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--stone-600);
}

.book-modal__description p {
  margin-bottom: 14px;
}

.book-modal__description p:last-child {
  margin-bottom: 0;
}

/* NOTE: Common keyframes (fadeInUp, fadeIn, spin, heartPulse) are in shared.css */

@media (max-width: 640px) {
  .nav {
    /* Safe area support for mobile navigation */
    padding: max(12px, env(safe-area-inset-top, 12px)) max(16px, env(safe-area-inset-right, 16px)) 12px max(16px, env(safe-area-inset-left, 16px));
    gap: 16px;
  }
  
  /* Hide desktop nav links on mobile */
  .nav__links {
    display: none;
  }
  
  /* Show hamburger button on mobile */
  .nav__hamburger {
    display: flex;
  }
  
  /* Mobile menu visible state handled by JS toggle */
  .nav__mobile-menu {
    display: flex;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    /* Safe area for mobile menu */
    padding-top: max(80px, calc(60px + env(safe-area-inset-top, 20px)));
    padding-left: max(24px, env(safe-area-inset-left, 24px));
    padding-right: max(24px, env(safe-area-inset-right, 24px));
  }
  
  .nav__mobile-menu--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav__link {
    font-size: 12px;
    padding: 4px 10px;
  }
  
  .main {
    /* Safe area support for mobile main content */
    padding: max(90px, calc(70px + env(safe-area-inset-top, 20px))) max(20px, env(safe-area-inset-right, 20px)) max(80px, calc(60px + env(safe-area-inset-bottom, 20px))) max(20px, env(safe-area-inset-left, 20px));
  }
  
  .title {
    font-size: 26px;
    margin-bottom: 36px;
  }
  
  .content p {
    font-size: 15px;
  }
  
  .section-heading {
    font-size: 18px;
    margin-top: 36px;
  }
  
  .quick-links {
    font-size: 15px;
    margin-bottom: 36px;
  }
  
  .qa-item__question,
  .qa-item__answer {
    font-size: 13px;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    padding: 14px 20px;
    font-size: 14px;
  }

  .year-group {
    flex-direction: column;
    gap: 16px;
  }

  .year-sidebar {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding-top: 0;
  }

  .year-title {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 24px;
  }

  .year-line {
    flex: 1;
    height: 1px;
    width: auto;
    margin-top: 0;
    min-height: 0;
    background: linear-gradient(to right, var(--stone-300) 0%, transparent 100%);
  }

  .year-count {
    margin-top: 0;
  }

  .book-card__header {
    flex-direction: column;
    gap: 12px;
  }

  .book-card__meta {
    width: 100%;
    justify-content: space-between;
  }

  .tags {
    gap: 6px;
  }

  .tag {
    font-size: 10px;
    padding: 6px 12px;
  }

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

  .grid--compact {
    gap: 20px;
  }

  .drink-card__badge {
    font-size: 8px;
    padding: 4px 8px;
  }

  .drink-card__name-wrap {
    padding: 8px 10px;
  }

  .drink-card__name {
    font-size: 12px;
  }

  .drink-card__favorite {
    width: 24px;
    height: 24px;
  }

  .drink-card__favorite ion-icon {
    font-size: 12px;
  }

  .modal__content {
    max-height: 90vh;
  }

  .modal__body {
    padding: 16px;
  }

  .modal__header {
    padding: 14px 16px 20px;
    margin-bottom: -12px;
  }

  .modal__title {
    font-size: 17px;
  }

  .modal__favorite {
    font-size: 16px;
  }

  /* Books responsive */
  .books-controls {
    flex-direction: column;
    gap: 16px;
  }

  .books-controls .tags {
    order: 2;
  }

  .view-toggle {
    display: none;
  }

  .year-cover-group {
    margin-bottom: 36px;
  }

  .year-cover-header {
    gap: 12px;
    margin-bottom: 16px;
  }

  .year-cover-title {
    font-size: 22px;
  }

  .year-cover-count {
    font-size: 11px;
  }

  .book-covers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 12px;
  }

  .book-cover-card__spine {
    width: 5px;
    transform: translateX(-4px);
  }

  .book-cover-card__placeholder {
    padding: 10px;
  }

  .book-cover-card__placeholder-title {
    font-size: 11px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .book-cover-card__placeholder-author {
    font-size: 9px;
  }

  .book-cover-card__rating {
    padding: 6px;
  }

  .book-cover-card__rating .star {
    font-size: 8px;
  }

  .book-list-item {
    gap: 12px;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .book-list-item__cover {
    width: 40px;
    height: 60px;
  }

  .book-list-item__info {
    flex: 1;
    min-width: 120px;
  }

  .book-list-item__title {
    font-size: 14px;
  }

  .book-list-item__author {
    font-size: 11px;
  }

  .book-list-item__meta {
    width: calc(100% - 52px);
    margin-left: 52px; /* align with text after cover */
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .book-list-item__category {
    font-size: 9px;
    padding: 4px 10px;
  }

  .book-list-item__rating .star {
    font-size: 12px;
  }

  /* Blog Post List responsive */
  .month-group {
    margin-bottom: 32px;
  }

  .month-header {
    font-size: 14px;
    margin-bottom: 12px;
    text-align: right;
  }

  .post-list-item {
    gap: 12px;
    padding: 10px 0;
    padding-left: 0;
  }

  .post-list-item__title {
    font-size: 14px;
  }

  .post-list-item__date {
    font-size: 12px;
  }

  /* Book Modal responsive */
  .book-modal__layout {
    flex-direction: column;
    padding: 0 20px 20px;
    gap: 20px;
  }

  .book-modal__left {
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto auto 1fr;
    gap: 4px 16px;
    width: 100%;
    text-align: left;
    align-items: start;
    align-content: start;
    padding-top: 12px;
  }

  .book-modal__cover {
    width: 100px;
    height: 150px;
    margin-bottom: 0;
    grid-row: 1 / 4;
    grid-column: 1;
  }

  .book-modal__author {
    grid-row: 1;
    grid-column: 2;
    margin-bottom: 0;
    align-self: start;
    font-size: 12px;
  }

  .book-modal__rating {
    grid-row: 2;
    grid-column: 2;
    margin-bottom: 0;
    align-self: start;
  }

  .book-modal__rating .star {
    font-size: 14px;
  }

  .book-modal__category {
    grid-row: 3;
    grid-column: 2;
    justify-self: start;
    width: auto;
    font-size: 9px;
    padding: 4px 10px;
  }
}

/* ============================================
   COLOPHON TABLE
   ============================================ */

.colophon-card {
  background: var(--stone-50);
  border-radius: 16px;
  padding: 28px 36px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--stone-100);
}

.colophon-row {
  display: flex;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--stone-100);
}

.colophon-row:first-child {
  padding-top: 0;
}

.colophon-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.colophon-label {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: var(--stone-800);
  width: 110px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .colophon-card {
    padding: 20px;
    margin-bottom: 36px;
    border-radius: 12px;
  }
  
  .colophon-row {
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
  }
  
  .colophon-label {
    width: auto;
    font-size: 12px;
  }
}

/* ============================================
   BLOG POST PAGE
   ============================================ */

.post-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.post-error {
  text-align: center;
  padding: 60px 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--stone-500);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

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

.back-link ion-icon {
  font-size: 16px;
}

.post {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.post__header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--stone-200);
}

.post__date {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--stone-500);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.post__title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 20px;
}

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

.post__tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 16px;
  background-color: color-mix(in srgb, var(--tag-color) 12%, transparent);
  color: var(--tag-color);
  border: 1px solid color-mix(in srgb, var(--tag-color) 25%, transparent);
}

/* Post body typography */
.post__body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--stone-700);
}

.post__body h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  color: var(--color-text);
  margin-top: 48px;
  margin-bottom: 20px;
}

.post__body h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--color-text);
  margin-top: 36px;
  margin-bottom: 16px;
}

.post__body h4 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 28px;
  margin-bottom: 12px;
}

.post__body p {
  margin-bottom: 24px;
}

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

.post__body a {
  color: var(--accent-clay);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-clay) 40%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.post__body a:hover {
  text-decoration-color: var(--accent-clay);
  opacity: 1;
}

.post__body strong {
  font-weight: 600;
  color: var(--stone-800);
}

.post__body em {
  font-style: italic;
}

.post__body blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent-clay);
  background-color: var(--stone-50);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--stone-600);
}

.post__body blockquote p {
  margin-bottom: 0;
}

.post__body ul,
.post__body ol {
  margin: 24px 0;
  padding-left: 24px;
}

.post__body li {
  margin-bottom: 8px;
}

.post__body li:last-child {
  margin-bottom: 0;
}

.post__body code {
  font-family: var(--font-mono);
  font-size: 14px;
  background-color: var(--stone-200);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--stone-700);
  border: 1px solid var(--stone-300);
}

.post__body pre {
  margin: 32px 0;
  padding: 20px 24px;
  background-color: var(--stone-800);
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--stone-700);
}

.post__body pre code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  background: none;
  padding: 0;
  color: var(--stone-100);
}

.post__body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 32px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.post__body hr {
  border: none;
  height: 1px;
  background-color: var(--stone-200);
  margin: 48px 0;
}

/* Mobile styles for post */
@media (max-width: 768px) {
  .post__title {
    font-size: 28px;
  }
  
  .post__body {
    font-size: 16px;
  }
  
  .post__body h2 {
    font-size: 22px;
    margin-top: 40px;
  }
  
  .post__body h3 {
    font-size: 18px;
    margin-top: 32px;
  }
  
  .post__body blockquote {
    padding: 16px 20px;
    margin: 24px 0;
  }
  
  .post__body pre {
    padding: 16px;
    margin: 24px -16px;
    border-radius: 0;
  }
  
  .post__body img {
    margin: 24px -16px;
    width: calc(100% + 32px);
    max-width: none;
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .post__title {
    font-size: 24px;
  }
  
  .post__header {
    margin-bottom: 32px;
    padding-bottom: 24px;
  }
  
  .post__tags {
    gap: 6px;
  }
  
  .post__tag {
    font-size: 10px;
    padding: 5px 12px;
  }
}

/* NOTE: Base lightbox styles are in shared.css */

/* Make post images clickable */
.post__body img {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post__body img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ============================================
   LIST SECTION STYLES (uses/hates pages)
   ============================================ */

.list-section {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

.list-section__sidebar {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.list-section__title {
  margin-top: 10px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--stone-500);
  letter-spacing: -0.01em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  line-height: 1;
  white-space: nowrap;
}

.list-section__items {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 24px;
}

.list-section__items li {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--stone-600);
  padding: 6px 0;
  break-inside: avoid;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.5;
}

.list-section__items li::before {
  content: '';
  width: 3px;
  height: 3px;
  background: var(--stone-300);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.list-section__items a {
  color: inherit;
  text-decoration: none;
}

.list-section__items a:hover {
  color: var(--accent-link);
}

@media (max-width: 640px) {
  .list-section {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
  }
  
  .list-section__sidebar {
    width: auto;
    flex-direction: row;
    align-items: center;
  }
  
  .list-section__title {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 14px;
  }
  
  .list-section__items {
    columns: 1;
  }
  
  .list-section__items li {
    font-size: 15px;
    padding: 5px 0;
  }
}

/* ============================================
   TIMELINE PAGE
   ============================================ */

.timeline {
  position: relative;
  padding-left: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--stone-300);
}

.timeline-item {
  position: relative;
  padding-left: 72px;
  padding-bottom: 64px;
  opacity: 0;
  transform: translateY(20px);
  animation: timelineFadeIn 0.6s ease forwards;
}

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

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }

@keyframes timelineFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-marker {
  position: absolute;
  left: 18px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--stone-400);
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
  border-color: var(--accent-clay);
  background: var(--accent-clay);
  transform: scale(1.2);
}

.timeline-marker--current {
  border-color: var(--accent-clay);
  background: var(--accent-clay);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-clay) 20%, transparent);
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 300;
  color: var(--stone-800);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1;
}

.timeline-subtitle {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 20px;
}

.timeline-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--stone-100);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  cursor: zoom-in;
}

.timeline-image img {
  width: 100%;
  height: auto;
  display: block;
}

.timeline-image__browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--stone-100);
  border-bottom: 1px solid var(--stone-200);
}

.timeline-image__browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--stone-300);
}

/* macOS window button colors - intentionally hardcoded as system standard */
.timeline-image__browser-dot:nth-child(1) { background: #ff5f57; }
.timeline-image__browser-dot:nth-child(2) { background: #febc2e; }
.timeline-image__browser-dot:nth-child(3) { background: #28c840; }

.timeline-description {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--stone-600);
}

.timeline-description p {
  margin-bottom: 12px;
}

.timeline-description p:last-child {
  margin-bottom: 0;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.timeline-tag {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 12px;
  background: var(--stone-100);
  color: var(--stone-500);
  border: 1px solid var(--stone-200);
}

.timeline-intro {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--stone-600);
  margin-bottom: 56px;
  max-width: 520px;
}

/* Image split container for 2017 */
.timeline-images-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.timeline-images-split .timeline-image {
  margin-bottom: 0;
}

.timeline-image__label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone-400);
  padding: 8px 14px;
  background: var(--stone-50);
  border-top: 1px solid var(--stone-100);
}

/* Timeline Lightbox Extensions */
.lightbox__container {
  width: 90vw;
  height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.lightbox__container .lightbox__img {
  width: 100%;
  max-width: 100%;
  max-height: none;
  height: auto;
  cursor: default;
}

@media (max-width: 640px) {
  .timeline::before {
    left: 16px;
  }
  
  .timeline-item {
    padding-left: 48px;
    padding-bottom: 48px;
  }
  
  .timeline-marker {
    left: 8px;
    width: 16px;
    height: 16px;
  }
  
  .timeline-year {
    font-size: 24px;
  }
  
  .timeline-subtitle {
    font-size: 10px;
    margin-bottom: 16px;
  }
  
  .timeline-image {
    border-radius: 8px;
    margin-bottom: 16px;
  }
  
  .timeline-image__browser-bar {
    padding: 8px 12px;
    gap: 5px;
  }
  
  .timeline-image__browser-dot {
    width: 8px;
    height: 8px;
  }
  
  .timeline-description {
    font-size: 14px;
  }
  
  .timeline-intro {
    font-size: 15px;
    margin-bottom: 40px;
  }
  
  .timeline-images-split {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .timeline-tags {
    gap: 6px;
  }
  
  .timeline-tag {
    font-size: 9px;
    padding: 4px 10px;
  }
}

/* ============================================
   DARK MODE OVERRIDES
   ============================================ */

[data-theme="dark"] .nav__mobile-menu {
  background: linear-gradient(
    to bottom, 
    rgba(17, 33, 45, 0.98) 0%,
    rgba(17, 33, 45, 0.95) 40%,
    rgba(17, 33, 45, 0.85) 70%,
    rgba(17, 33, 45, 0) 100%
  );
}

[data-theme="dark"] .nav__mobile-menu .nav__link:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .modal__content {
  background: var(--stone-50);
}

[data-theme="dark"] .modal__header {
  background: linear-gradient(to bottom, 
    var(--stone-50) 0%, 
    rgba(17, 33, 45, 0.7) 50%, 
    rgba(17, 33, 45, 0) 100%
  );
}

[data-theme="dark"] .book-cover-card__cover {
  box-shadow: 
    4px 4px 12px rgba(0, 0, 0, 0.4),
    1px 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .book-cover-card:hover .book-cover-card__cover {
  box-shadow: 
    8px 12px 24px rgba(0, 0, 0, 0.5),
    2px 2px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .colophon-card {
  background: var(--stone-100);
  border-color: var(--stone-200);
}

[data-theme="dark"] .timeline-image {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .timeline-image__browser-bar {
  background: var(--stone-200);
  border-color: var(--stone-300);
}

[data-theme="dark"] .drink-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .drink-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .drink-card__name-wrap {
  background: rgba(17, 33, 45, 0.8);
}

[data-theme="dark"] .drink-card__favorite {
  background: rgba(17, 33, 45, 0.85);
}

[data-theme="dark"] .post__body blockquote {
  background-color: var(--stone-100);
}

[data-theme="dark"] .post__body pre {
  background-color: var(--stone-200);
  border-color: var(--stone-300);
}

[data-theme="dark"] .post__body pre code {
  color: var(--stone-800);
}

[data-theme="dark"] .lightbox {
  background: rgba(0, 0, 0, 0.95);
}
