@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-normal-var.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-italic-var.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/newsreader-normal-var.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/newsreader-italic-var.woff2") format("woff2");
}

:root {
  --base-color: #ffffff;
  --text-color: #3a3a3a;
  --accent-color: #3a3a3a;
  --secondary-color: #646464;
  --lowcontrast: #8d8d8d;
  --line-color: #e0e0e0;
  --book-0: #785440;
  --book-1: #56708a;
  --book-2: #6a7f56;
  --book-3: #785b6e;
  --book-4: #557f78;
  --book-5: #8b694d;
  --book-6: #685983;
  --panel-color: #f9f9f9;
  --surface-color: #f9f9f9;
  --faint: #bbbbbb;
  --text-faint: var(--lowcontrast);
  --border-soft: var(--line-color);
  --card-bg: var(--surface-color);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

html.darkmode {
  --base-color: #1a1a1a;
  --text-color: #e5e5e5;
  --accent-color: #e5e5e5;
  --secondary-color: #a0a0a0;
  --lowcontrast: #707070;
  --line-color: #2e2e2e;
  --book-0: #5b3a29;
  --book-1: #3a4a5b;
  --book-2: #4a5b3a;
  --book-3: #5b3a4a;
  --book-4: #3a5b56;
  --book-5: #5b4a3a;
  --book-6: #4a3a5b;
  --panel-color: #1c1c1c;
  --surface-color: #1c1c1c;
  --faint: #505050;
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--base-color);
  color: var(--text-color);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0;
  font-feature-settings: "kern", "frac", "ss02";
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--line-color);
  text-shadow: none;
}

/* ---- floating action cluster (search + theme) ---- */

.float-actions {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--base-color) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.float-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--secondary-color);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.float-actions button:hover {
  color: var(--accent-color);
  background: var(--line-color);
}

.float-actions button svg {
  width: 18px;
  height: 18px;
}

#theme-toggle .icon-sun {
  display: none;
}

html.darkmode #theme-toggle .icon-moon {
  display: none;
}

html.darkmode #theme-toggle .icon-sun {
  display: inline;
}

/* ---- search panel ---- */

.search-panel {
  position: fixed;
  right: 20px;
  bottom: 76px;
  z-index: 100;
  width: min(420px, calc(100vw - 40px));
  box-sizing: border-box;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-color) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-color);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.search-panel[hidden] {
  display: none;
}

#search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-color);
  background: var(--panel-color);
  border: 1px solid var(--line-color);
  border-radius: 8px;
  outline: none;
}

#search-input:focus {
  border-color: var(--accent-color);
}

#search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

#search-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}

#search-results li a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
}

#search-results li a:hover {
  background: var(--line-color);
}

.search-title {
  display: block;
  font-size: 15px;
  font-weight: bold;
  color: var(--text-color);
}

.search-snippet {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--secondary-color);
  line-height: 1.4;
}

.search-url {
  display: block;
  margin-top: 2px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: var(--accent-color);
}

.search-empty {
  padding: 8px 10px;
  font-size: 13px;
  color: var(--secondary-color);
}

/* ---- centered content column ---- */

#content {
  max-width: 640px;
  margin: 0 auto;
  padding: 128px 24px 64px;
  min-height: calc(100vh - 48px);
  box-sizing: border-box;
  overflow-wrap: break-word;
  animation: 0.6s both enter;
}

@keyframes enter {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#content h1,
#content h2,
#content h3,
#content h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0;
  font-feature-settings: "kern", "calt", "case";
  margin: 56px 0 28px 0;
}

#content h1:first-child,
#content h2:first-child {
  margin-top: 0;
}

#content p {
  margin: 0 0 28px 0;
}

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

#content b,
#content strong {
  font-weight: 500;
}

#content a {
  color: var(--text-color);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 2.5px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s ease;
}

#content a:hover {
  text-decoration-color: var(--text-color);
}

#content a[target="_blank"]::after {
  content: "↗";
  font-size: 0.8em;
  margin-left: 2px;
  color: var(--secondary-color);
  text-decoration: none;
  display: inline-block;
}

#content em,
#content i {
  font-family: var(--serif);
  font-style: italic;
  font-size: calc(1em + 1px);
  color: var(--text-color);
}

#content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
}

#content ul {
  padding-left: 16px;
  list-style-type: disc;
  list-style-position: outside;
  margin: 0 0 28px 0;
}

#content li {
  line-height: 28px;
}

#content li::marker {
  color: var(--secondary-color);
}

#content li + li {
  margin-top: 8px;
}

#content blockquote {
  margin: 0 0 28px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--book-2);
  color: var(--secondary-color);
  position: relative;
}

#content blockquote::before {
  content: "\201C";
  display: block;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 0.8;
  color: var(--book-2);
  margin-bottom: -16px;
}

#content blockquote p {
  color: var(--secondary-color);
}

#content pre,
#content table {
  max-width: 100%;
  overflow-x: auto;
}

#content pre {
  tab-size: 4;
  background: var(--panel-color);
  border-radius: 8px;
  font-size: 13px;
  line-height: 24px;
  padding: 12px 16px;
  margin: 0 0 28px 0;
}

#content pre code {
  font-family: var(--mono);
  background: none;
  padding: 0;
}

#content code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-color);
  background: var(--line-color);
  border-radius: 6px;
  padding: 4px;
}

/* ---- paco-style homepage ---- */

.site-name {
  margin: 0 0 28px 0 !important;
  font-family: var(--serif) !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  font-style: italic !important;
  line-height: 28px !important;
}

.intro p {
  margin: 0 0 28px 0 !important;
}

.intro p:last-child {
  margin-bottom: 0 !important;
}

.intro a {
  white-space: nowrap;
}

.stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.column h2 {
  margin: 0 !important;
  font-family: var(--sans) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  letter-spacing: 0;
  color: var(--secondary-color) !important;
}

.column .rows {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

.column .rows > * + * {
  margin-top: 16px;
}

.column .row {
  min-height: 0;
  box-sizing: border-box;
}

.column .row a {
  color: var(--text-color);
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
  text-decoration: none;
}

.column .row a:hover {
  text-decoration: underline;
  text-underline-offset: 2.5px;
  text-decoration-color: var(--faint);
}

.column .row p {
  margin: 0 !important;
  font-size: 14px;
  color: var(--secondary-color);
  line-height: 20px;
}


[data-animate] {
  --stagger: 0;
  --delay: 0.12s;
  --start: 0s;
  animation: 0.6s both enter;
  animation-delay: calc(var(--stagger) * var(--delay) + var(--start));
}

@keyframes enter {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-animate],
  #content {
    animation: none;
  }
}

/* ---- now grid (micros + listening) ---- */

.now-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 32px;
  margin-top: 64px;
}

/* ================= MICROS ================= */

.micros {
  max-height: 230px;
  overflow-y: auto;
  padding: 0;
  margin-top: 12px;

  scrollbar-width: thin;
  scrollbar-color: var(--line-color) transparent;
}

.micros::-webkit-scrollbar {
  width: 6px;
}

.micros::-webkit-scrollbar-track {
  background: transparent;
}

.micros::-webkit-scrollbar-thumb {
  background: var(--line-color);
  border-radius: 999px;
}

.micro {
  display: block;

  padding: 8px 0;

  border-bottom: 1px solid var(--line-color);
}

.micro:last-child {
  border-bottom: none;
}

.micro-date {
  display: inline;

  margin: 0 8px 0 0;

  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--secondary-color);
}

#content .micro p {
  display: inline;
  margin: 0;

  line-height: 1.35;
  color: var(--text-color);
}

#content .micros-loading {
  margin: 0;
  padding: 7px 0;

  font-size: 14px;
  color: var(--secondary-color);
}

.spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 6px;

  vertical-align: -1px;

  border: 2px solid var(--line-color);
  border-top-color: var(--text-color);
  border-radius: 50%;

  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================= MUSIC BOX ================= */

.music-box {
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;

  width: 200px;
  min-height: 56px;
  margin: 12px auto 0;

  border-radius: 14px;
  cursor: pointer;

  background: var(--surface-color);
  border: 1px solid var(--line-color);

  transition: min-height 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
    border-radius 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.45s ease,
    background 0.45s ease, transform 0.2s ease;
}

.music-box:hover {
  min-height: 230px;

  border-radius: 18px;

  background: linear-gradient(
      110deg,
      rgba(255, 255, 255, 0.08),
      transparent 35%
    ),
    var(--surface-color);

  border-color: var(--line-color);

  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;

  transform: translateY(-3px);
}

.music-background {
  position: absolute;
  inset: 0;

  background-position: center;
  background-size: cover;

  filter: blur(22px);
  transform: scale(1.2);

  opacity: 0.45;
}

.music-overlay {
  position: absolute;
  inset: 0;

  background: color-mix(in srgb, var(--base-color) 35%, rgba(0, 0, 0, 0.55));
  backdrop-filter: saturate(150%);
}

html:not(.darkmode) .music-background {
  opacity: 0.25;
}

html:not(.darkmode) .music-overlay {
  background: color-mix(in srgb, var(--base-color) 82%, transparent);
}

html:not(.darkmode) #content .music-title {
  color: var(--text-color);
}

html:not(.darkmode) #content p.music-artist {
  color: var(--secondary-color);
}

html.darkmode .music-background {
  opacity: 0.25;
}

html.darkmode .music-overlay {
  background: color-mix(in srgb, var(--base-color) 82%, transparent);
}

.music-box.playing .music-background {
  opacity: 0.9;
}

html.darkmode .music-box.playing .music-overlay {
  background: color-mix(in srgb, var(--base-color) 25%, rgba(0, 0, 0, 0.4));
}

html:not(.darkmode) .music-box.playing .music-overlay {
  background: color-mix(in srgb, var(--base-color) 30%, transparent);
}

.music-content {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;

  gap: 12px;

  padding: 10px 12px;

  width: 100%;

  transition: gap 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
    padding 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.music-box:hover .music-content {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
}

.record-stage {
  position: relative;

  flex-shrink: 0;

  width: 48px;
  height: 48px;

  transition: width 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
    height 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.music-box:hover .record-stage {
  width: 100%;
  height: 110px;
}

.music-cover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;

  width: 48px;
  height: 48px;

  object-fit: cover;

  border-radius: 8px;

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);

  transition: width 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
    height 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
    border-radius 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.45s ease,
    transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.music-box:hover .music-cover {
  width: 88px;
  height: 88px;

  border-radius: 3px;

  box-shadow: 6px 10px 24px rgba(0, 0, 0, 0.35);

  transform: rotate(-4deg);
}

.music-vinyl {
  position: absolute;
  top: -4px;
  left: 0;
  z-index: 1;

  width: 88px;
  height: 88px;

  border-radius: 50%;
  opacity: 0;

  background: repeating-radial-gradient(
      circle,
      transparent 0 1.5px,
      rgba(255, 255, 255, 0.07) 2px 2.5px,
      transparent 3px 4px,
      rgba(255, 255, 255, 0.04) 4.5px 5px
    ),
    conic-gradient(
      from 15deg,
      #0b0c0a,
      #1b1c19 8%,
      #0c0d0b 17%,
      #181916 30%,
      #0a0b09 49%,
      #1b1c19 63%,
      #0c0d0a 78%,
      #161714 90%,
      #0b0c0a
    );

  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);

  transform: rotate(0deg);
  pointer-events: none;

  transition: left 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.35s ease;
}

.music-box:hover .music-vinyl {
  left: 56px;
  opacity: 1;
}

.music-box.playing:hover .music-vinyl {
  animation: vinyl-spin 3s linear infinite;
}

@keyframes vinyl-spin {
  to {
    transform: rotate(360deg);
  }
}

.music-vinyl::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;

  width: 28px;
  height: 28px;

  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.12);

  background: #9e4b40;
}


.music-vinyl::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;

  width: 7px;
  height: 7px;

  border-radius: 50%;
  border: 1.5px solid #5a5a52;

  background: #121210;
}

.tonearm {
  position: absolute;
  top: -12px;
  left: 105px;
  z-index: 3;

  width: 62px;
  height: 88px;

  opacity: 0;
  pointer-events: none;

  transform: rotate(-14deg);
  transform-origin: 94% 7%;

  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.3s ease 0.08s;
}

.music-box:hover .tonearm {
  opacity: 1;
}

.music-box.playing:hover .tonearm {
  transform: rotate(5deg);
}

.tonearm-pivot {
  position: absolute;
  top: 2px;
  right: 0;

  width: 20px;
  height: 20px;

  border-radius: 50%;
  border: 2.5px solid #6e6e67;

  background: #b5b1a5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.tonearm-arm {
  position: absolute;
  top: 11px;
  right: 12px;

  width: 2.5px;
  height: 68px;

  border-radius: 2px;

  background: linear-gradient(90deg, #706f68, #dad5c6 45%, #706f68);

  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);

  transform-origin: 100% 0;
  transform: rotate(18deg);
}

.tonearm-head {
  position: absolute;
  right: 32px;
  bottom: 9px;

  width: 12px;
  height: 5px;

  border-radius: 2px 4px 4px 2px;

  background: #52534c;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.music-text {
  display: flex;
  flex-direction: column;
  justify-content: center;

  position: relative;

  min-width: 0;
  flex: 1;

  padding-right: 12px;
  top: 6px;

  transition: padding-right 0.45s ease;
}

.music-box:hover .music-text {
  padding-right: 0px;
  top: 0;
}

.music-title-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 110px;
  transition: max-width 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.music-box:hover .music-title-wrapper {
  max-width: none;
}

#content .music-title {
  margin: 0;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;

  color: white;

  white-space: nowrap;
  overflow: hidden;

  padding-right: 16px;
  box-sizing: border-box;

  transition: font-size 0.45s ease;
}

.music-box:hover .music-title {
  font-size: 16px;
  white-space: normal;
  overflow: visible;
  padding-right: 30px;
}

.music-title span {
  display: inline-block;
  padding-right: 20px;
  will-change: transform;
}

.music-box:hover .music-title span {
  display: inline;
  padding-right: 0;
  transform: none !important;
  will-change: auto;
}

#content p.music-artist {
  margin: 0;

  font-size: 10px;
  font-weight: 500;

  color: rgba(255, 255, 255, 0.82);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;

  transition: font-size 0.45s ease, margin-top 0.45s ease;
}

.music-box:hover .music-artist {
  font-size: 12px;
  margin-top: 6px;
  padding-right: 30px;
}


.music-box.is-expanded {
  min-height: 230px;
  border-radius: 18px;
  background: linear-gradient(
      110deg,
      rgba(255, 255, 255, 0.08),
      transparent 35%
    ),
    var(--surface-color);
  border-color: var(--line-color);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(-3px);
}

.music-box.is-expanded .music-content {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
}

.music-box.is-expanded .record-stage {
  width: 100%;
  height: 110px;
}

.music-box.is-expanded .music-cover {
  width: 88px;
  height: 88px;
  border-radius: 3px;
  box-shadow: 6px 10px 24px rgba(0, 0, 0, 0.35);
  transform: rotate(-4deg);
}

.music-box.is-expanded .music-vinyl {
  left: 56px;
  opacity: 1;
}

.music-box.is-expanded .tonearm {
  opacity: 1;
}

.music-box.is-expanded .music-text {
  padding-right: 0px;
  top: 0;
}

.music-box.is-expanded .music-title-wrapper {
  max-width: none;
}

#content .music-box.is-expanded .music-title {
  font-size: 16px;
  white-space: normal;
  overflow: visible;
  padding-right: 30px;
}

.music-box.is-expanded .music-title span {
  display: inline;
  padding-right: 0;
  transform: none !important;
  will-change: auto;
}

#content .music-box.is-expanded p.music-artist {
  font-size: 12px;
  margin-top: 6px;
  padding-right: 30px;
  white-space: normal;
  overflow: visible;
}


.music-box.playing.is-expanded .music-vinyl {
  animation: vinyl-spin 3s linear infinite;
}

.music-box.playing.is-expanded .tonearm {
  transform: rotate(5deg);
}

.music-title-link {
  display: block;

  color: inherit;
  text-decoration: none;

  cursor: pointer;
}

#content a.music-title-link {
  text-decoration: none;
}

#content a.music-title-link::after {
  content: none;
}

.music-title-link:hover .music-title {
  opacity: 0.85;
}

/* ---- tiny footer ---- */

.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line-color);
  font-size: 14px;
  line-height: 20px;
  color: var(--secondary-color);
  white-space: nowrap;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.site-footer a {
  color: var(--secondary-color);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- writing index (year tables) ---- */

.back {
  margin: 0 0 28px 0;
}

.back a {
  text-decoration: none;
  font-size: 16px;
  color: var(--text-color);
}

.back a:hover {
  text-decoration: underline;
  text-underline-offset: 2.5px;
  text-decoration-color: var(--faint);
}

.post-head:has(+ .crumbs) {
  margin-bottom: 0;
}

.crumbs {
  display: flex;
  align-items: center;
  margin: 6px 0 28px 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: visible;
}

.crumbs a,
.crumbs [aria-current="page"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
  color: var(--text-color);
  text-decoration: none;
}

.crumbs .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid #4b607f;
  flex-shrink: 0;
}

.crumbs [aria-current="page"] .dot {
  background: #4b607f;
  border-color: #4b607f;
}

.crumbs .lbl {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text-color);
  color: var(--base-color);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.crumbs .lbl::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text-color);
}

.crumbs a:hover .lbl,
.crumbs [aria-current="page"]:hover .lbl {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.crumbs .conn {
  flex: 0 0 28px;
  height: 2px;
  background: #4b607f;
  margin: 0;
}

.crumbs .sep {
  display: none;
}

.index-tables {
  margin-top: 16px;
}

.page-desc {
  margin: 0 0 8px 0 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  color: var(--secondary-color) !important;
}

#content h1:has(+ .page-desc) {
  margin-bottom: 8px;
}


.library-content h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.library-content hr {
  display: none;
}


.book-review {
  border: 1px solid var(--line-color);
  border-radius: 12px;
  background: var(--panel-color);
  padding: 20px 22px;
  margin: 0 0 28px 0;
}

#content .book-review-title {
  margin: 0 0 6px 0;
}

.book-meta {
  font-size: 13px;
  color: var(--secondary-color);
  margin-bottom: 16px;
}

.book-review > .book-body > :last-child {
  margin-bottom: 0;
}

.index-tables:hover .index-row {
  opacity: 0.4;
}

.index-tables:hover .index-row:hover {
  opacity: 1;
  transition: none;
}

.index-table {
  border-top: 1px solid var(--line-color);
  position: relative;
}

.index-year {
  user-select: none;
  pointer-events: none;
  position: absolute;
  top: 12px;
  left: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--lowcontrast);
}

.index-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: -1px;
  padding: 12px 0;
  border-top: 1px solid var(--line-color);
  border-bottom: 1px solid var(--line-color);
  text-decoration: none;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.index-row:first-child {
  border-top-color: transparent;
}

.index-row:last-child {
  border-bottom-color: transparent;
}

.index-row p {
  margin: 0 !important;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-color);
  line-height: 28px;
}

#content a.index-row {
  text-decoration: none;
}

#content a.index-row:hover {
  text-decoration: none;
}

.index-date {
  flex-shrink: 0;
  margin: 0 16px 0 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--lowcontrast);
  white-space: nowrap;
}

/* ---- paco-style reading lists ---- */

.reading-ledger-header p {
  color: var(--secondary-color);
}

.reading-ledger-header strong {
  font-weight: 500;
}

.book-groups {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 32px;
}

.book-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}

.book-group-heading h2 {
  margin: 0 !important;
  font-family: var(--sans) !important;
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--secondary-color);
}

.book-group-heading > span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--secondary-color);
  opacity: 0.7;
}

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

.reading-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.reading-list .reading-title {
  color: var(--text-color);
  font-weight: 550;
  text-decoration: none;
}

#content a.reading-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--text-color);
}

.reading-date {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--secondary-color);
}

/* ---- post pages ---- */

.post-head {
  margin-bottom: 24px;
}

.post-head h1 {
  margin-bottom: 6px !important;
}

.post-head p {
  color: var(--secondary-color);
  font-size: 14px;
}

.post-tags {
  font-family: var(--mono);
  font-size: 13px;
}

.post-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 40px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line-color);
  font-size: 14px;
}

.post-nav-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.post-nav-side .post-nav-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.post-nav-side-next {
  align-items: flex-end;
  text-align: right;
}

.post-nav-label {
  font-size: 13px;
  color: var(--secondary-color);
}

#content .post-nav a {
  text-decoration: none;
}

#content .post-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--faint);
}

.post-nav-all {
  flex-shrink: 0;
  font-size: 14px;
  white-space: nowrap;
}

.post-nav-empty {
  color: var(--secondary-color);
  font-size: 14px;
}

/* ---- post meta ---- */
.post-meta {
  margin: 0 0 20px;
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.3px;
  color: var(--text-faint);
}

/* ---- inline post image ---- */
.post-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 20px;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  filter: saturate(0.85) contrast(0.98);
}

/* ---- photo gallery ---- */
.photos-panel .post-body {
  max-width: none;
}
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin: 28px 0 4px;
}
.photo-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
  cursor: zoom-in;
}
.photo-item img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  filter: saturate(0.6) contrast(0.94);
  transition: transform 0.35s ease, filter 0.35s ease;
}
.photo-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.25));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.photo-item:hover img {
  transform: scale(1.06);
  filter: saturate(0.85) contrast(1);
}
.photo-item:hover::after {
  opacity: 1;
}

/* ---- lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 30px;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.lightbox.open img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #eee;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
  .photo-gallery {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
  }
  .photo-item img {
    height: 140px;
  }
}

/* ---- bookshelf index (4-column grid after macwright.com/reading) ---- */

.book-grid {
  display: grid;
  grid-template-columns: 1fr 0.75fr min-content 70px;
  column-gap: 12px;
  row-gap: 8px;
  margin-top: 32px;
}

.book-grid > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.book-grid-title a {
  font-weight: 500;
}

.book-grid time {
  color: var(--secondary-color);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.book-stars {
  color: var(--secondary-color);
  letter-spacing: 2px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .book-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }
  .book-grid > div {
    white-space: normal;
  }
  .book-grid > div:nth-child(4n) {
    padding-bottom: 20px;
  }
}

@media (max-width: 640px) {
  .now-grid {
    grid-template-columns: 280px 200px;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .stack {
    grid-template-columns: repeat(3, 240px);
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  #content {
    padding: 64px 20px 48px;
  }
  .site-footer {
    margin-bottom: 70px;
  }
  .music-box.is-expanded,
  .music-box.is-expanded .music-cover {
    box-shadow: none;
  }
}

