:root {
  --bg: #0b0b0b;
  --bg-soft: #141414;
  --text: #f2f2f2;
  --muted: #a8a8a8;
  --border: #2a2a2a;
  --scroll-track: #121212;
  --scroll-thumb: #555555;
  --header-height: 61px;
  --page-max-width: 1400px;
  --reading-max-width: 1000px;
  --page-pad-x: clamp(18px, 2.2vw, 28px);
  --page-pad-y: clamp(36px, 4.6vw, 56px);
  --page-pad-bottom: clamp(56px, 6vw, 80px);
  --header-pad-x: clamp(18px, 2vw, 24px);
  --header-pad-y: clamp(16px, 1.5vw, 18px);
  --header-start-gap: clamp(8px, 1vw, 12px);
  --nav-gap: clamp(16px, 1.8vw, 24px);
  --nav-text-size: clamp(15px, 1.05vw, 16px);
  --section-gap: clamp(30px, 3.8vw, 52px);
  --card-gap: clamp(16px, 1.9vw, 26px);
  --hero-title-size: clamp(34px, 3.1vw, 42px);
  --section-title-size: clamp(28px, 2.6vw, 38px);
  --section-subtitle-size: clamp(28px, 2.9vw, 42px);
  --body-copy-size: clamp(16px, 1.3vw, 18px);
  --meta-copy-size: clamp(15px, 1.15vw, 17px);
  --card-radius-sm: 12px;
  --card-radius: 18px;
  --card-radius-lg: 24px;
  --card-lift: -2px;
  --card-lift-strong: -3px;
  --card-transition-fast: 0.18s;
  --card-transition-base: 0.2s;
  --card-pad: clamp(22px, 2vw, 28px);
  --card-pad-compact-y: 12px;
  --card-pad-compact-x: 14px;
  --card-label-size: 14px;
  --card-label-tracking: 0.12em;
  --card-meta-size: 13px;
}

body.light {
  --bg: #f7f7f7;
  --bg-soft: #ffffff;
  --text: #111111;
  --muted: #666666;
  --border: #d9d9d9;
  --scroll-track: #ececec;
  --scroll-thumb: #b1b1b1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
}

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

/* Header */

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

.site-header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--header-pad-y) var(--header-pad-x);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
}

.site-header-start {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: var(--header-start-gap);
}

.site-brand a {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.site-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 24px;
  overflow: visible;
}

.site-brand-logo {
  display: block;
  width: auto;
  height: 24px;
  transform: scale(2.15);
  transform-origin: left center;
}

.site-brand-logo-light {
  display: none;
}

body.light .site-brand-logo-dark {
  display: none;
}

body.light .site-brand-logo-light {
  display: block;
}

.site-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}

.site-nav a {
  color: var(--text);
  font-size: var(--nav-text-size);
  line-height: 1;
  white-space: nowrap;
}

.site-header:not(.site-header-section) .site-nav a,
.site-nav-actions a {
  display: inline-flex;
  align-items: center;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
  transform: translateY(0);
}

.site-header:not(.site-header-section) .site-nav a:hover,
.site-header:not(.site-header-section) .site-nav a:focus-visible,
.site-nav-actions a:hover,
.site-nav-actions a:focus-visible {
  transform: translateY(-2px);
}

.site-nav a.is-active {
  color: var(--muted);
}

.site-nav button {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.site-header-section .site-brand {
  min-width: clamp(80px, 7vw, 84px);
}

.site-nav-local {
  gap: var(--nav-gap);
}

.site-nav-local a {
  font-size: var(--nav-text-size);
}

.site-nav-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.site-mobile-menu-toggle,
.site-mobile-menu {
  display: none;
}

.site-mobile-menu-toggle {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
}

.site-mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  border-radius: 999px;
  background: currentColor;
}

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

.site-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  grid-template-columns: minmax(0, min(82vw, 380px)) minmax(0, 1fr);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.site-mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.site-mobile-menu-panel {
  min-width: 0;
  min-height: 100dvh;
  max-height: 100dvh;
  background: #222224;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(-18px);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.site-mobile-menu.is-open .site-mobile-menu-panel {
  transform: translateX(0);
  opacity: 1;
}

.site-mobile-menu-head {
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 0 16px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-mobile-menu-brand {
  display: flex;
  align-items: center;
  min-height: 24px;
  min-width: 84px;
  flex: 0 0 auto;
  overflow: visible;
}

.site-mobile-menu-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  overflow: visible;
}

.site-mobile-menu-logo {
  height: 24px;
  width: auto;
  display: block;
  transform: scale(2.15);
  transform-origin: left center;
}

.site-mobile-menu-logo-light {
  display: none;
}

body.light .site-mobile-menu-logo-dark {
  display: none;
}

body.light .site-mobile-menu-logo-light {
  display: block;
}

.site-mobile-menu-close {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  flex: 0 0 auto;
}

.site-mobile-menu-close span {
  position: absolute;
  top: 13px;
  left: 2px;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.site-mobile-menu-close span:first-child {
  transform: rotate(45deg);
}

.site-mobile-menu-close span:last-child {
  transform: rotate(-45deg);
}

.site-mobile-menu-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 18px 28px;
  overflow: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

.site-mobile-menu-body::-webkit-scrollbar {
  width: 10px;
}

.site-mobile-menu-body::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

.site-mobile-menu-body::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid var(--scroll-track);
}

.site-mobile-menu-layer[hidden] {
  display: none !important;
}

.site-mobile-menu-layer {
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.site-mobile-menu-layer.is-active {
  opacity: 1;
  transform: translateX(0);
}

.site-mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-mobile-menu-link {
  display: block;
  padding: 10px 0;
  color: #f3f3f5;
  font-size: 26px;
  line-height: 1.25;
  text-align: left;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.site-mobile-menu-link.is-active {
  color: #3dd6a0;
}

.site-mobile-menu-link-button {
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
}

.site-mobile-menu-divider {
  width: 100%;
  height: 1px;
  margin: 18px 0;
  background: rgba(255, 255, 255, 0.14);
}

.site-mobile-menu-nav-secondary .site-mobile-menu-link {
  font-size: 22px;
  color: #d7d7dc;
}

.site-mobile-menu-back {
  display: inline-flex;
  align-items: center;
  padding: 6px 0 14px;
  border: none;
  background: none;
  color: #d7d7dc;
  font-size: 16px;
  line-height: 1.3;
  cursor: pointer;
}

.site-mobile-posts-index {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.site-mobile-posts-year h3 {
  margin: 0 0 10px;
  color: #d7d7dc;
  font-size: 18px;
  line-height: 1.2;
}

.site-mobile-posts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-mobile-posts-list .site-mobile-menu-link {
  font-size: 21px;
}

.site-mobile-notes-home-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.site-mobile-notes-home-link.is-active,
.site-mobile-notes-home-link:hover {
  border-color: var(--muted);
}

.site-mobile-notes-home-link-mark {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, #3dd6a0, #7ea3ff);
  flex: 0 0 auto;
}

.site-mobile-notes-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-mobile-notes-group {
  margin: 0;
}

.site-mobile-notes-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
}

.site-mobile-notes-summary::-webkit-details-marker {
  display: none;
}

.site-mobile-notes-summary:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.site-mobile-notes-summary-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-mobile-notes-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a7a, #ffd36b);
  flex: 0 0 auto;
}

.site-mobile-notes-group[data-category="music"] .site-mobile-notes-icon {
  background: #f1c84b;
}

.site-mobile-notes-group[data-category="philosophy"] .site-mobile-notes-icon {
  background: #8c63d9;
}

.site-mobile-notes-group[data-category="society"] .site-mobile-notes-icon {
  background: #4caf6a;
}

.site-mobile-notes-group[data-category="history"] .site-mobile-notes-icon {
  background: #cc4b4b;
}

.site-mobile-notes-group[data-category="culture"] .site-mobile-notes-icon {
  background: #df8a3d;
}

.site-mobile-notes-group[data-category="tech"] .site-mobile-notes-icon {
  background: #2756a8;
}

.site-mobile-notes-group[data-category="games"] .site-mobile-notes-icon {
  background: #67bff5;
}

.site-mobile-notes-group[data-category="reading"] .site-mobile-notes-icon {
  background: #e9e0cc;
}

.site-mobile-notes-group[data-category="films"] .site-mobile-notes-icon {
  background: #8b8b8b;
}

.site-mobile-notes-group[data-category="trivia"] .site-mobile-notes-icon {
  background: #ef86b4;
}

.site-mobile-notes-group[data-category="bass-funny"] .site-mobile-notes-icon {
  background: #d8b248;
}

.site-mobile-notes-group[data-category="theory"] .site-mobile-notes-icon {
  background: #556ccf;
}

.site-mobile-notes-group[data-category="diary"] .site-mobile-notes-icon {
  background: #e9e0cc;
}

.site-mobile-notes-group[data-category="slap"] .site-mobile-notes-icon {
  background: #53d3e0;
}

.site-mobile-notes-group[data-category="funk"] .site-mobile-notes-icon {
  background: #d98a37;
}

.site-mobile-notes-group[data-category="rock"] .site-mobile-notes-icon {
  background: #a94452;
}

.site-mobile-notes-group[data-category="jpop"] .site-mobile-notes-icon {
  background: #f08db4;
}

.site-mobile-notes-group[data-category="kpop"] .site-mobile-notes-icon {
  background: #8d61d6;
}

.site-mobile-notes-group[data-category="western"] .site-mobile-notes-icon {
  background: #5a6c86;
}

.site-mobile-notes-group[data-category="mandopop"] .site-mobile-notes-icon {
  background: #d85a5a;
}

.site-mobile-notes-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.site-mobile-notes-group[open] .site-mobile-notes-arrow {
  transform: rotate(45deg);
}

.site-mobile-notes-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0 0 0 18px;
}

.site-mobile-notes-links .site-mobile-menu-link {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-mobile-notes-links .site-mobile-menu-link:hover,
.site-mobile-notes-links .site-mobile-menu-link.is-active {
  background: rgba(255, 255, 255, 0.05);
}

.site-mobile-menu-scrim {
  width: 100%;
  min-height: 100dvh;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.58);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.site-mobile-menu.is-open .site-mobile-menu-scrim {
  opacity: 1;
}

body.light .site-mobile-menu-panel {
  background: #f3f3ef;
  border-right-color: rgba(20, 20, 20, 0.08);
}

body.light .site-mobile-menu-head {
  border-bottom-color: rgba(20, 20, 20, 0.08);
}

body.light .site-mobile-menu-link {
  color: #161616;
}

body.light .site-mobile-menu-link.is-active {
  color: #128a63;
}

body.light .site-mobile-menu-nav-secondary .site-mobile-menu-link,
body.light .site-mobile-menu-back,
body.light .site-mobile-posts-year h3 {
  color: #5a5a54;
}

body.light .site-mobile-menu-divider {
  background: rgba(20, 20, 20, 0.12);
}

body.light .site-mobile-notes-home-link,
body.light .site-mobile-notes-summary {
  background: rgba(20, 20, 20, 0.025);
}

body.light .site-mobile-notes-summary:hover,
body.light .site-mobile-notes-links .site-mobile-menu-link:hover,
body.light .site-mobile-notes-links .site-mobile-menu-link.is-active {
  background: rgba(20, 20, 20, 0.06);
}

body.light .site-mobile-menu-scrim {
  background: rgba(0, 0, 0, 0.18);
}

body.mobile-nav-open {
  overflow: hidden;
}

/* Home */

.home-page {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 10px var(--page-pad-x) 8px;
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
}

.hero {
  text-align: center;
  margin-bottom: 6px;
}

.hero-logo {
  display: block;
  width: min(100%, 680px);
  height: auto;
  margin: 0 auto;
}

.hero-logo-light {
  display: none;
}

body.light .hero-logo-dark {
  display: none;
}

body.light .hero-logo-light {
  display: block;
}

.hero p {
  display: none;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-gap);
  margin-top: 0;
}

.entry-card {
  position: relative;
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--bg-soft);
  display: block;
}

.entry-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 0.25s ease;
}

.entry-card-bg-light {
  display: none;
}

body.light .entry-card-bg-dark {
  display: none;
}

body.light .entry-card-bg-light {
  display: block;
}

.entry-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.94) 0%,
    rgba(0, 0, 0, 0.6) 34%,
    rgba(0, 0, 0, 0.22) 62%,
    rgba(0, 0, 0, 0.04) 100%
  );
}

body.light .entry-card-overlay {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.72) 34%,
    rgba(255, 255, 255, 0.28) 62%,
    rgba(255, 255, 255, 0.06) 100%
  );
}

.entry-card-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
}

.entry-card h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
  font-family: "Cormorant Garamond", "Iowan Old Style", "Baskerville", "Palatino Linotype", "Noto Serif TC", serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.entry-card p {
  display: none;
}

.entry-card:hover .entry-card-bg {
  transform: scale(1.04);
}

.entry-card:hover {
  border-color: var(--muted);
}

/* Blog */

.blog-home {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) var(--page-pad-bottom);
  min-height: calc(100dvh - var(--header-height));
}

.blog-home-hero {
  margin-bottom: 44px;
}

.blog-home-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blog-home-hero h1,
.blog-home-heading h2 {
  margin: 0;
  font-size: var(--section-subtitle-size);
  line-height: 1.05;
}

.blog-home-intro,
.blog-home-heading p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--body-copy-size);
  line-height: 1.7;
}

.blog-home-section + .blog-home-section {
  margin-top: var(--section-gap);
}

.blog-home-heading {
  margin-bottom: 20px;
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-gap);
}

.blog-card {
  min-height: 300px;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    var(--bg-soft);
  transition: border-color var(--card-transition-base) ease, transform var(--card-transition-base) ease;
}

.blog-card:hover {
  border-color: var(--muted);
  transform: translateY(var(--card-lift-strong));
}

.blog-card-content {
  height: 100%;
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.blog-home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.blog-home-card-preview {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 60%),
    var(--bg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.blog-home-card-preview.has-image {
  background-color: var(--bg);
}

.blog-home-card .blog-card-content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  justify-content: flex-end;
  padding-top: 136px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.22) 32%, rgba(0, 0, 0, 0.58) 56%, rgba(0, 0, 0, 0.96) 100%);
}

body.light .blog-home-card .blog-card-content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.26) 32%, rgba(255, 255, 255, 0.68) 56%, rgba(255, 255, 255, 0.98) 100%);
}

.blog-home-card .blog-card-label {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.96);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.88),
    0 2px 3px rgba(0, 0, 0, 0.78),
    0 0 12px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(0, 0, 0, 0.28);
}

body.light .blog-home-card .blog-card-label {
  color: rgba(12, 12, 12, 0.84);
  text-shadow: none;
}

.blog-card-label {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: var(--card-label-size);
  letter-spacing: var(--card-label-tracking);
  text-transform: uppercase;
}

.blog-card h3 {
  margin: 0;
  font-size: var(--section-title-size);
  line-height: 1.05;
}

.blog-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.section-page {
  max-width: var(--reading-max-width);
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) var(--page-pad-bottom);
  min-height: calc(100dvh - var(--header-height));
}

.about-page {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) var(--page-pad-bottom);
  min-height: calc(100dvh - var(--header-height));
}

.about-card {
  min-height: calc(100dvh - var(--header-height) - (var(--page-pad-y) * 2));
}

.about-card .post-single-header {
  margin-bottom: 20px;
}

.section-page h1 {
  margin: 0 0 16px;
  font-size: var(--hero-title-size);
  line-height: 1.05;
}

.section-page p {
  margin: 0;
  color: var(--muted);
  font-size: var(--body-copy-size);
  line-height: 1.7;
}

.sheets-shell {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) var(--page-pad-bottom);
  min-height: calc(100dvh - var(--header-height));
  --sheet-card-height: 214px;
  --sheet-card-gap: 16px;
}

.sheets-shell-hero {
  max-width: 900px;
  margin-bottom: 32px;
}

.sheets-shell-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sheets-shell-hero h1 {
  margin: 0;
  font-size: var(--hero-title-size);
  line-height: 1.05;
}

.sheets-shell-intro {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--body-copy-size);
  line-height: 1.7;
}

.sheets-home-section + .sheets-home-section {
  margin-top: var(--section-gap);
}

.sheets-home-heading {
  margin-bottom: 14px;
}

.sheets-home-heading h2 {
  margin: 0;
  font-size: clamp(26px, 2.5vw, 32px);
  line-height: 1.05;
}

.sheets-home-grid .sheet-card {
  min-width: 0;
}

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

.sheets-shell-card {
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--card-radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: border-color var(--card-transition-fast) ease, transform var(--card-transition-fast) ease;
}

.sheets-shell-card:hover {
  border-color: var(--muted);
  transform: translateY(var(--card-lift));
}

.sheets-shell-card.is-active {
  border-color: var(--text);
}

.sheets-shell-card-label {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: var(--card-label-size);
  letter-spacing: var(--card-label-tracking);
}

.sheets-shell-card h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
}

.sheets-shell-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.sheets-shell-index {
  padding-top: 24px;
  padding-bottom: 48px;
}

.sheets-index-header {
  margin-bottom: 16px;
}

.sheets-index-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.sheets-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: max(var(--sheet-card-gap), var(--card-gap));
}

.sheets-pagination-shell {
  position: relative;
  padding-bottom: 20px;
}

.sheet-card {
  position: relative;
  height: var(--sheet-card-height);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--bg-soft);
  transition: border-color var(--card-transition-fast) ease, transform var(--card-transition-fast) ease;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.sheet-card:hover {
  border-color: var(--muted);
  transform: translateY(var(--card-lift));
}

.sheet-card-preview {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 60%),
    var(--bg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.sheet-card-preview.has-image {
  background-color: var(--bg);
}

.sheet-card-footer {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: var(--card-pad-compact-y) var(--card-pad-compact-x) 14px;
  padding-top: 136px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.22) 32%, rgba(0, 0, 0, 0.58) 56%, rgba(0, 0, 0, 0.96) 100%);
}

body.light .sheet-card-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.26) 32%, rgba(255, 255, 255, 0.68) 56%, rgba(255, 255, 255, 0.98) 100%);
}

.sheet-card-date {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  letter-spacing: var(--card-label-tracking);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.88),
    0 2px 3px rgba(0, 0, 0, 0.72);
}

body.light .sheet-card-date {
  color: rgba(12, 12, 12, 0.84);
  text-shadow: none;
}

.sheet-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
}

.sheet-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--card-meta-size);
  line-height: 1.45;
  word-break: break-word;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body.light .sheet-card p {
  color: rgba(24, 24, 24, 0.66);
  text-shadow: none;
}

.sheet-card.is-hidden {
  display: none;
}

.sheet-page-control.is-hidden {
  display: none;
}

.sheet-page-control,
.sheet-page-jump {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    var(--bg-soft);
  color: var(--text);
}

.sheet-page-control {
  position: absolute;
  top: calc(var(--sheet-card-height) + var(--sheet-card-gap));
  width: 54px;
  height: var(--sheet-card-height);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: none;
  transition: border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
  z-index: 2;
}

.sheet-page-control:hover:not(:disabled) {
  border-color: var(--muted);
}

.sheet-page-control:disabled {
  cursor: default;
  opacity: 0.45;
}

.sheet-page-control-prev {
  left: -54px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.sheet-page-control-next {
  right: -54px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.sheet-page-jump {
  position: absolute;
  top: -80px;
  right: 0;
  min-width: 176px;
  min-height: 64px;
  padding: 14px 16px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.sheet-page-jump-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sheet-page-jump-input {
  width: 64px;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 22px;
  text-align: right;
}

.sheet-page-jump-input::-webkit-outer-spin-button,
.sheet-page-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sheet-page-jump-input[type="number"] {
  -moz-appearance: textfield;
}

.sheet-page-jump-total {
  color: var(--muted);
  font-size: 16px;
}

.sheet-single-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 28px 56px;
  min-height: calc(100dvh - var(--header-height));
}

.sheet-single-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.sheet-single-back,
.sheet-single-download,
.sheet-single-fallback-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.sheet-single-back:hover,
.sheet-single-download:hover,
.sheet-single-fallback-actions a:hover {
  border-color: var(--muted);
  transform: translateY(-1px);
}

.sheet-single-frame {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg-soft);
  overflow: hidden;
}

.sheet-single-header {
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.sheet-single-header h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
}

.sheet-single-file {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.sheet-single-viewer-wrap {
  padding: 0;
}

.sheet-single-viewer {
  display: block;
  width: 100%;
  height: min(1200px, calc(100dvh - 240px));
  border: 0;
  background: #ffffff;
}

.sheet-single-fallback {
  min-height: 380px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.sheet-single-fallback p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.sheet-single-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Posts */

.posts-page,
.post-single-page,
.posts-layout {
  max-width: min(1320px, calc(var(--page-max-width) - 80px));
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) var(--page-pad-bottom);
  min-height: calc(100dvh - var(--header-height));
}

.posts-layout,
.post-single-page {
  display: grid;
  grid-template-columns: 352px minmax(0, 1fr);
  gap: clamp(22px, 2.4vw, 32px);
  align-items: stretch;
  padding-top: 0;
  padding-bottom: 0;
}

.posts-hero,
.post-single-header {
  margin-bottom: 34px;
}

.posts-kicker,
.post-single-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.posts-hero h1,
.post-single-header h1 {
  margin: 0;
  font-size: var(--hero-title-size);
  line-height: 1.05;
}

.posts-intro,
.post-single-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--meta-copy-size);
  line-height: 1.7;
}

.post-single-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.posts-sidebar {
  align-self: stretch;
  min-height: 100%;
  padding-bottom: 24px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), var(--bg-soft);
}

.posts-sidebar-inner {
  position: sticky;
  top: 72px;
  max-height: calc(100dvh - 96px);
  overflow: auto;
  padding: 28px 18px 28px 24px;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

.posts-sidebar-inner::-webkit-scrollbar {
  width: 10px;
}

.posts-sidebar-inner::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

.posts-sidebar-inner::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid var(--scroll-track);
}

.posts-sidebar-title {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.2;
}

.posts-sidebar-year + .posts-sidebar-year {
  margin-top: 24px;
}

.posts-sidebar-year h3 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.2;
}

.posts-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.posts-sidebar-list a {
  display: block;
  color: var(--text);
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.posts-sidebar-list a.is-active {
  color: #3dd6a0;
}

.posts-main {
  min-width: 0;
  padding: 56px 0 56px;
  align-self: start;
}

.posts-empty-card {
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--bg-soft);
  padding: var(--card-pad);
}

.posts-empty-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.posts-empty-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.post-single {
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--bg-soft);
  padding: 34px 36px;
}

.post-single-content {
  font-size: 18px;
  line-height: 1.9;
}

.post-single-content > :first-child {
  margin-top: 0;
}

.post-single-content > :last-child {
  margin-bottom: 0;
}

.post-single-content h1,
.post-single-content h2,
.post-single-content h3 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  line-height: 1.2;
  scroll-margin-top: 92px;
}

.post-single-content h1 {
  font-size: 2em;
}

.post-single-content :is(h1, h2, h3) :is(strong, em, del, a) {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.post-single-content del {
  text-decoration-thickness: 0.08em;
  text-decoration-skip-ink: auto;
}

.post-single-content :is(h1, h2, h3) del {
  text-decoration-thickness: 0.09em;
}

.post-single-content p,
.post-single-content ul,
.post-single-content ol,
.post-single-content blockquote {
  margin: 0 0 1.2em;
}

.post-single-content blockquote {
  margin: 0 0 1.4em;
  padding: 12px 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(242, 242, 242, 0.92);
}

.post-single-content blockquote > :first-child {
  margin-top: 0;
}

.post-single-content blockquote > :last-child {
  margin-bottom: 0;
}

.post-single-content blockquote p {
  margin: 0;
}

body.light .post-single-content blockquote {
  border-left-color: rgba(17, 17, 17, 0.18);
  background: rgba(17, 17, 17, 0.055);
  color: rgba(17, 17, 17, 0.86);
}

.post-single-content img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 1.4em 0;
  border-radius: 10px;
}

.post-single-content video {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 1.4em 0;
  border-radius: 10px;
}

.post-single-content p > img:only-child {
  margin: 0;
}

.post-single-content p > video:only-child {
  margin: 0;
}

.post-single-content figure {
  max-width: 100%;
  margin: 1.4em 0;
}

.post-single-content figure img {
  margin: 0;
}

.post-single-content figcaption {
  margin-top: 0.7em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.post-single-content code {
  padding: 0.08em 0.38em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(242, 242, 242, 0.96);
  font-size: 0.94em;
}

body.light .post-single-content code {
  background: rgba(17, 17, 17, 0.08);
  color: rgba(17, 17, 17, 0.92);
}

.post-single-content pre {
  margin: 0 0 1.4em;
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

.post-single-content pre code {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 0.95em;
  line-height: 1.7;
}

body.light .post-single-content pre {
  background: rgba(17, 17, 17, 0.055);
}

.post-single-content table {
  width: auto;
  max-width: 100%;
  margin: 0 0 1.5em;
  border-collapse: collapse;
  font-size: 0.95em;
}

.post-single-content th,
.post-single-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.post-single-content th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
}

body.light .post-single-content th {
  background: rgba(17, 17, 17, 0.04);
}

.post-single-content ul,
.post-single-content ol {
  padding-left: 1.6em;
}

.post-single-content li + li {
  margin-top: 0.25em;
}

.post-single-content li > ul,
.post-single-content li > ol {
  margin-top: 0.35em;
  margin-bottom: 0.35em;
}

.post-single-content mark {
  padding: 0.05em 0.18em;
  background: rgba(255, 211, 90, 0.52);
  color: inherit;
}

body.light .post-single-content mark {
  background: rgba(255, 219, 102, 0.66);
}

.post-single-content details {
  margin: 0 0 1.4em;
  padding: 0.9em 1em;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.post-single-content summary {
  cursor: pointer;
  font-weight: 700;
}

.post-single-content details > :last-child {
  margin-bottom: 0;
}

.post-single-content hr {
  margin: 2em 0;
  border: none;
  border-top: 1px solid var(--border);
}

.post-single-content sup {
  font-size: 0.72em;
}

.post-single-content .footnotes {
  margin-top: 2em;
  padding-top: 0.6em;
}

.post-single-content .footnotes ol {
  padding-left: 1.4em;
}

.post-single-content mjx-container {
  margin: 1.4em 0;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

.post-single-content a,
.post-single-content .footnote-ref,
.post-single-content .footnote-backref {
  display: inline;
  margin: 0;
  padding: 0;
  color: #3dd6a0;
  text-decoration: none;
  text-underline-offset: 0.18em;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.post-single-content a:hover,
.post-single-content a:focus-visible,
.post-single-content .footnote-ref:hover,
.post-single-content .footnote-ref:focus-visible,
.post-single-content .footnote-backref:hover,
.post-single-content .footnote-backref:focus-visible {
  text-decoration: underline;
}

.post-pagination {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.post-pagination-card {
  min-height: 104px;
  border: 1px solid var(--border);
  border-radius: var(--card-radius-sm);
  background: var(--bg-soft);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color var(--card-transition-base) ease, transform var(--card-transition-base) ease;
}

.post-pagination-card:hover {
  border-color: var(--muted);
  transform: translateY(var(--card-lift));
}

.post-pagination-card-right {
  text-align: right;
}

.post-pagination-card.is-empty {
  visibility: hidden;
}

.post-pagination-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.post-pagination-card strong {
  font-size: 28px;
  line-height: 1.2;
}

/* Notes */

.notes-page {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 280px;
  gap: 0;
  max-width: none;
  min-height: calc(100dvh - var(--header-height));
}

.notes-sidebar {
  align-self: stretch;
  min-height: 100%;
  padding-bottom: 24px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), var(--bg-soft);
}

.notes-sidebar-inner {
  position: sticky;
  top: 72px;
  max-height: calc(100dvh - 96px);
  overflow: auto;
  padding: 45px 10px 28px;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

.notes-sidebar-inner::-webkit-scrollbar {
  width: 10px;
}

.notes-sidebar-inner::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

.notes-sidebar-inner::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid var(--scroll-track);
}

.notes-home-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.notes-home-link.is-active,
.notes-home-link:hover {
  border-color: var(--muted);
}

.notes-home-link-mark {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, #3dd6a0, #7ea3ff);
  flex: 0 0 auto;
}

.notes-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-tree-group {
  margin: 0;
}

.notes-tree-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 8px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
}

.notes-tree-summary::-webkit-details-marker {
  display: none;
}

.notes-tree-summary:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.notes-tree-summary-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.notes-tree-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a7a, #ffd36b);
  flex: 0 0 auto;
}

.notes-tree-group[data-category="music"] .notes-tree-icon {
  background: #f1c84b;
}

.notes-tree-group[data-category="philosophy"] .notes-tree-icon {
  background: #8c63d9;
}

.notes-tree-group[data-category="society"] .notes-tree-icon {
  background: #4caf6a;
}

.notes-tree-group[data-category="history"] .notes-tree-icon {
  background: #cc4b4b;
}

.notes-tree-group[data-category="culture"] .notes-tree-icon {
  background: #df8a3d;
}

.notes-tree-group[data-category="tech"] .notes-tree-icon {
  background: #2756a8;
}

.notes-tree-group[data-category="games"] .notes-tree-icon {
  background: #67bff5;
}

.notes-tree-group[data-category="reading"] .notes-tree-icon {
  background: #e9e0cc;
}

.notes-tree-group[data-category="films"] .notes-tree-icon {
  background: #8b8b8b;
}

.notes-tree-group[data-category="trivia"] .notes-tree-icon {
  background: #ef86b4;
}

.notes-tree-group[data-category="bass-funny"] .notes-tree-icon {
  background: #d8b248;
}

.notes-tree-group[data-category="theory"] .notes-tree-icon {
  background: #556ccf;
}

.notes-tree-group[data-category="diary"] .notes-tree-icon {
  background: #e9e0cc;
}

.notes-tree-group[data-category="slap"] .notes-tree-icon {
  background: #53d3e0;
}

.notes-tree-group[data-category="funk"] .notes-tree-icon {
  background: #d98a37;
}

.notes-tree-group[data-category="rock"] .notes-tree-icon {
  background: #a94452;
}

.notes-tree-group[data-category="jpop"] .notes-tree-icon {
  background: #f08db4;
}

.notes-tree-group[data-category="kpop"] .notes-tree-icon {
  background: #8d61d6;
}

.notes-tree-group[data-category="western"] .notes-tree-icon {
  background: #5a6c86;
}

.notes-tree-group[data-category="mandopop"] .notes-tree-icon {
  background: #d85a5a;
}

.notes-tree-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.notes-tree-group[open] .notes-tree-arrow {
  transform: rotate(45deg);
}

.notes-tree-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 8px 0;
  padding: 0 0 0 18px;
}

.notes-tree-links a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notes-tree-links a:hover,
.notes-tree-links a.is-active {
  background: rgba(255, 255, 255, 0.05);
}

.notes-tree-links a.is-active {
  color: #3dd6a0;
}

.notes-tree-empty {
  display: block;
  padding: 6px 14px 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.notes-main {
  min-width: 0;
  padding: var(--page-pad-y) clamp(20px, 2.4vw, 32px) var(--page-pad-bottom);
}

.notes-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.note-category-card {
  min-height: 220px;
}

.note-category-card.is-empty {
  opacity: 0.9;
}

.note-home-panel {
  margin-bottom: 0;
}

.note-single {
  margin-bottom: 0;
}

.notes-outline {
  padding: 0 28px 80px 0;
}

.notes-outline-inner {
  position: sticky;
  top: 72px;
  padding: 56px 0 18px 18px;
  border-left: 1px solid var(--border);
}

.notes-outline-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notes-outline-inner h2 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.1;
}

.notes-outline-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notes-outline-list a {
  color: var(--text);
  line-height: 1.4;
}

.notes-outline-list a:hover {
  color: #3dd6a0;
}

.notes-outline-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* Footer */

.home-footer {
  margin-top: auto;
  padding-top: 18px;
  padding-bottom: 4px;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}

.social-links a {
  width: 24px;
  height: 24px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.social-links a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.social-links svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-copyright {
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.04em;
}

@media (max-width: 1600px) and (min-width: 901px) {
  .home-page {
    padding-top: 8px;
    padding-bottom: 6px;
  }

  .hero {
    margin-bottom: 2px;
  }

  .hero-logo {
    width: min(100%, 620px);
  }

  .entry-card {
    min-height: 194px;
  }

  .entry-card-content {
    left: 22px;
    right: 22px;
    bottom: 18px;
  }

  .entry-card h2 {
    font-size: 34px;
  }

  .home-footer {
    padding-top: 14px;
    padding-bottom: 2px;
  }

  .social-links {
    gap: 20px;
    margin-bottom: 12px;
  }
}

@media (max-width: 1366px) and (min-width: 901px), (max-height: 820px) and (min-width: 901px) {
  .home-page {
    padding-top: 6px;
    padding-bottom: 4px;
  }

  .hero {
    margin-bottom: 0;
  }

  .hero-logo {
    width: min(100%, 560px);
  }

  .entry-grid {
    gap: 14px;
  }

  .entry-card {
    min-height: 174px;
  }

  .entry-card-content {
    left: 18px;
    right: 18px;
    bottom: 16px;
  }

  .entry-card h2 {
    font-size: 30px;
  }

  .home-footer {
    padding-top: 10px;
    padding-bottom: 0;
  }

  .social-links {
    gap: 18px;
    margin-bottom: 10px;
  }

  .social-links a {
    width: 22px;
    height: 22px;
  }

  .social-links svg {
    width: 20px;
    height: 20px;
  }

  .home-copyright {
    font-size: 15px;
  }
}

.section-footer {
  margin-top: 0;
  background: #8f1d1d;
  color: #fff2f2;
}

.section-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 44px 28px 30px;
}

.section-footer-header {
  margin-bottom: 28px;
}

.section-footer-kicker {
  margin: 0 0 12px;
  color: rgba(255, 242, 242, 0.72);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-footer-header h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

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

.section-footer-column {
  min-height: 220px;
  padding: 26px 0 0;
  border-top: 1px solid rgba(255, 242, 242, 0.26);
}

.section-footer-column h3 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.15;
}

.section-footer-list {
  min-height: 132px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-footer-list li + li {
  margin-top: 12px;
}

.section-footer-list a {
  color: #fff2f2;
  font-size: 18px;
  line-height: 1.55;
  transition: color 0.18s ease;
}

.section-footer-list a:hover {
  color: #7dffd3;
}

.section-footer-copyright {
  margin: 30px 0 0;
  color: rgba(255, 242, 242, 0.82);
  font-size: 15px;
  text-align: center;
}

/* Responsive */

@media (min-width: 1024px) and (max-width: 1365px) {
  .posts-layout,
  .post-single-page {
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 24px;
  }

  .posts-page,
  .post-single-page,
  .posts-layout {
    max-width: min(1260px, calc(var(--page-max-width) - 40px));
  }

  .posts-sidebar-inner {
    padding: 24px 14px 24px 18px;
  }

  .posts-main {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .post-single {
    padding: 30px 30px;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .notes-page {
    grid-template-columns: 252px minmax(0, 1fr) 220px;
  }

  .notes-sidebar-inner {
    padding: 36px 8px 24px;
  }

  .notes-main {
    padding-left: 24px;
    padding-right: 24px;
  }

  .notes-outline {
    padding: 0 18px 72px 0;
  }

  .notes-outline-inner {
    padding: 48px 0 18px 14px;
  }
}

@media (max-width: 1023px) {
  :root {
    --header-height: 61px;
  }

  .site-header-inner {
    padding: var(--header-pad-y) var(--header-pad-x);
  }

  .site-header-start {
    gap: 8px;
  }

  .site-header-section .site-brand {
    display: none;
  }

  .site-nav-local {
    gap: clamp(12px, 1.6vw, 14px);
  }

  .site-nav-local a {
    font-size: 15px;
  }

  .site-brand-logo {
    height: 24px;
  }

  .site-header-section .site-header-inner {
    gap: 10px;
  }

  .site-header-section .site-header-start {
    flex: 0 0 auto;
    gap: 8px;
  }

  .site-header-section .site-nav-blog,
  .site-header-section .site-nav-local {
    display: none;
  }

  .site-header-section .site-mobile-menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .site-header-section .site-nav-actions {
    margin-left: auto;
    gap: 14px;
  }

  .site-header-section .site-nav-actions a:not([href="/about/"]) {
    display: none;
  }

  .site-header-section .site-mobile-menu:not([hidden]) {
    display: grid;
  }

  .blog-home {
    padding: var(--page-pad-y) var(--page-pad-x) var(--page-pad-bottom);
  }

  .sheets-shell,
  .about-page,
  .posts-page,
  .posts-layout,
  .post-single-page,
  .section-page {
    padding: var(--page-pad-y) var(--page-pad-x) var(--page-pad-bottom);
  }

  .posts-layout,
  .post-single-page {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .notes-page {
    grid-template-columns: 1fr;
  }

  .blog-home-hero h1,
  .blog-home-heading h2,
  .sheets-shell-hero h1,
  .sheets-shell-card h2,
  .section-page h1,
  .posts-hero h1,
  .post-single-header h1 {
    font-size: clamp(30px, 4vw, 32px);
  }

  .blog-home-intro,
  .blog-home-heading p,
  .sheets-shell-intro,
  .sheets-shell-card p,
  .section-page p,
  .posts-intro,
  .post-single-meta {
    font-size: 16px;
  }

  .sheets-shell-grid {
    grid-template-columns: 1fr;
  }

  .sheets-sheet-grid {
    grid-template-columns: 1fr;
  }

  .sheets-pagination-shell {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 94px;
  }

  .sheet-page-control {
    top: auto;
    bottom: 0;
    width: calc(50% - 8px);
    height: 58px;
  }

  .sheet-page-control-prev {
    left: 0;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
  }

  .sheet-page-control-next {
    right: 0;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
  }

  .sheet-page-jump {
    position: static;
    width: 100%;
    margin-top: 16px;
    justify-content: center;
  }

  .sheets-shell-card {
    min-height: 180px;
    padding: 22px;
  }

  .post-single {
    padding: 24px 20px;
  }

  .post-pagination-card strong {
    font-size: 26px;
  }

  .post-single-content {
    font-size: 17px;
  }

  .posts-sidebar {
    display: none;
  }

  .notes-sidebar,
  .notes-outline {
    display: none;
  }

  .notes-main {
    padding: 36px 18px 60px;
  }

  .notes-category-grid {
    grid-template-columns: 1fr;
  }

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

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

  .blog-card {
    min-height: 210px;
  }

  .blog-card h3 {
    font-size: 30px;
  }

  .hero-logo {
    width: min(100%, 360px);
  }

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

  .entry-card {
    min-height: 250px;
  }

  .entry-card h2 {
    font-size: 30px;
  }

  .home-footer {
    padding-top: 44px;
  }

  .section-footer-inner {
    padding: 36px 18px 26px;
  }

  .section-footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .section-footer-column {
    min-height: 0;
    padding-top: 20px;
  }

  .section-footer-column h3 {
    font-size: 24px;
  }
}
