/*
  Liayu Blog Theme
  A static, responsive personal blog for product thinking, AI notes and everyday observations.
  No build step, no external dependency.
*/

:root {
  color-scheme: light;
  --bg: #faf8f3;
  --bg-soft: #f4efe6;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-muted: #f6f3ed;
  --text: #242424;
  --text-soft: #606060;
  --text-muted: #8a857d;
  --line: rgba(36, 36, 36, 0.12);
  --accent: #7a9e8a;
  --accent-strong: #51715d;
  --accent-soft: rgba(122, 158, 138, 0.16);
  --warm: #d78d61;
  --warm-soft: rgba(215, 141, 97, 0.16);
  --blue: #6f92b8;
  --blue-soft: rgba(111, 146, 184, 0.15);
  --shadow: 0 22px 60px rgba(45, 41, 36, 0.10);
  --shadow-soft: 0 12px 32px rgba(45, 41, 36, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171814;
  --bg-soft: #20211c;
  --surface: rgba(39, 40, 35, 0.78);
  --surface-strong: #272823;
  --surface-muted: #21221d;
  --text: #f4f0e8;
  --text-soft: #c9c2b6;
  --text-muted: #918b82;
  --line: rgba(244, 240, 232, 0.13);
  --accent: #9fc5ac;
  --accent-strong: #c1e2cb;
  --accent-soft: rgba(159, 197, 172, 0.16);
  --warm: #e3a47c;
  --warm-soft: rgba(227, 164, 124, 0.16);
  --blue: #9bb9d4;
  --blue-soft: rgba(155, 185, 212, 0.16);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 10%, rgba(122, 158, 138, 0.15), transparent 28rem),
    radial-gradient(circle at 85% 18%, rgba(215, 141, 97, 0.12), transparent 26rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 158, 138, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 158, 138, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 72%);
  z-index: -1;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

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

p {
  margin: 0 0 1rem;
}

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

button,
input,
textarea {
  font: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-140%);
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--warm));
  color: #fff;
  box-shadow: 0 12px 28px rgba(122, 158, 138, 0.26);
}

.brand span:last-child {
  font-size: 1.05rem;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.site-nav a,
.icon-button,
.nav-toggle {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-soft);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.82rem;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.is-active,
.icon-button:hover,
.nav-toggle:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.icon-button,
.nav-toggle {
  width: 40px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.nav-toggle {
  display: none;
}

.icon-button svg,
.nav-toggle svg {
  width: 19px;
  height: 19px;
}

main {
  padding: 52px 0 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  align-items: center;
  gap: 42px;
  min-height: calc(100vh - 188px);
  padding: 30px 0 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 680;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero h1 .serif,
.page-hero h1 .serif {
  font-family: var(--font-serif);
  font-weight: 560;
  letter-spacing: -0.06em;
}

.hero-lead,
.page-lead {
  max-width: 720px;
  margin-top: 1.45rem;
  color: var(--text-soft);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 680;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.button.primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.button.ghost {
  background: transparent;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.35rem 0.68rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  white-space: nowrap;
}

.hero-card {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
}

.orbit {
  position: relative;
  width: min(430px, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 48% 52% 51% 49% / 48% 45% 55% 52%;
  background:
    radial-gradient(circle at 52% 42%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 28%),
    radial-gradient(circle at 63% 70%, color-mix(in srgb, var(--warm) 30%, transparent), transparent 28%),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.orbit::before {
  width: 64%;
  height: 64%;
  left: 18%;
  top: 14%;
  border: 1px dashed color-mix(in srgb, var(--accent) 48%, transparent);
  animation: rotate 22s linear infinite;
}

.orbit::after {
  width: 12px;
  height: 12px;
  left: 24%;
  top: 25%;
  background: var(--warm);
  box-shadow: 170px 160px 0 var(--accent), 215px 82px 0 var(--blue);
}

.avatar-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  box-shadow: var(--shadow-soft);
}

.avatar-card img {
  border-radius: 32px;
}

.float-note {
  position: absolute;
  max-width: 220px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  color: var(--text-soft);
  font-size: 0.92rem;
}

.float-note strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.float-note.one {
  right: 0;
  top: 72px;
}

.float-note.two {
  left: 0;
  bottom: 86px;
}

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

.section {
  padding: 76px 0;
}

.section.compact {
  padding: 48px 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-kicker {
  margin: 0 0 0.45rem;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.section-desc {
  max-width: 620px;
  margin: 0.8rem 0 0;
  color: var(--text-soft);
}

.grid {
  display: grid;
  gap: 1rem;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card.pad {
  padding: 1.35rem;
}

.card:hover .card-arrow {
  transform: translate(3px, -3px);
}

.card-arrow {
  transition: transform 180ms ease;
}

.now-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1rem;
  padding: 1.2rem;
}

.now-panel {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.35rem;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent-soft), var(--warm-soft));
}

.now-panel h3 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.now-panel p {
  color: var(--text-soft);
}

.check-list {
  list-style: none;
  display: grid;
  gap: 0.78rem;
  margin: 0;
  padding: 0;
}

.check-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.75rem;
  align-items: start;
  color: var(--text-soft);
}

.check-list li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  line-height: 1;
}

.article-card,
.project-card,
.note-card,
.link-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.25rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.article-card:hover,
.project-card:hover,
.note-card:hover,
.link-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 72%, var(--surface));
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.article-card h3,
.project-card h3,
.note-card h3,
.link-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.article-card p,
.project-card p,
.note-card p,
.link-card p {
  margin-top: 0.7rem;
  color: var(--text-soft);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.52rem;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.project-cover {
  display: grid;
  place-items: center;
  min-height: 190px;
  margin: -0.2rem -0.2rem 1rem;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent-soft), var(--blue-soft));
  overflow: hidden;
}

.project-cover img {
  width: 82%;
  max-height: 166px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0.9rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.85rem;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 800;
}

.quote-card {
  padding: clamp(1.4rem, 4vw, 2.4rem);
  background:
    radial-gradient(circle at 86% 24%, var(--warm-soft), transparent 30%),
    var(--surface);
}

.quote-card blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.quote-card cite {
  display: block;
  margin-top: 1.1rem;
  color: var(--text-soft);
  font-style: normal;
}

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

.page-hero h1 {
  max-width: 930px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.search-input {
  flex: 1 1 260px;
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 1rem;
  outline: none;
}

.search-input:focus {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  padding: 0.45rem 0.72rem;
  cursor: pointer;
}

.chip:hover,
.chip.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.empty-state {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--text-soft);
}

.empty-state.is-visible {
  display: block;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 260px;
  align-items: start;
  gap: 48px;
}

.article-main {
  min-width: 0;
}

.article-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.075em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.prose {
  padding-top: 2rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.prose h2,
.prose h3 {
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.prose h2 {
  margin: 2.5rem 0 0.85rem;
  font-size: 1.85rem;
}

.prose h3 {
  margin: 2rem 0 0.7rem;
  font-size: 1.32rem;
}

.prose a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose blockquote {
  margin: 1.6rem 0;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 18px 18px 0;
  background: var(--surface);
  color: var(--text);
}

.prose code {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 0.1rem 0.32rem;
  color: var(--text);
}

.aside-card {
  position: sticky;
  top: 98px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text-soft);
}

.aside-card h2 {
  margin: 0 0 0.7rem;
  color: var(--text);
  font-size: 1rem;
}

.toc {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.toc a:hover {
  color: var(--accent-strong);
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  background:
    radial-gradient(circle at 10% 20%, var(--accent-soft), transparent 26%),
    radial-gradient(circle at 90% 20%, var(--warm-soft), transparent 28%),
    var(--surface);
}

.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-links a:hover {
  color: var(--accent-strong);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .hero,
  .now-card,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-card {
    min-height: 470px;
  }

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

  .aside-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 28px, var(--container));
  }

  .header-inner {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 10px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
  }

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

  .site-nav a {
    justify-content: center;
  }

  main {
    padding-top: 34px;
  }

  .hero {
    gap: 20px;
    padding-top: 16px;
  }

  .hero-card {
    min-height: 390px;
  }

  .orbit {
    width: min(340px, 92%);
  }

  .avatar-card {
    width: 176px;
    border-radius: 32px;
  }

  .float-note {
    max-width: 178px;
    padding: 0.78rem;
  }

  .float-note.one {
    right: 4px;
    top: 42px;
  }

  .float-note.two {
    left: 4px;
    bottom: 48px;
  }

  .section {
    padding: 52px 0;
  }

  .section-header,
  .footer-inner,
  .contact-card {
    align-items: start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    align-items: stretch;
  }

  .chip-row {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .brand span:last-child {
    display: none;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.5rem, 15vw, 3.9rem);
  }

  .float-note.two {
    display: none;
  }
}


/* Sidebar navigation redesign
   The original top navigation is replaced by a fixed left sidebar on desktop
   and a slide-in drawer on small screens. */
:root {
  --sidebar-width: 286px;
}

body {
  padding-left: var(--sidebar-width);
}

.skip-link {
  left: calc(var(--sidebar-width) + 12px);
}

.site-sidebar {
  position: fixed;
  z-index: 70;
  left: 18px;
  top: 18px;
  bottom: 18px;
  width: calc(var(--sidebar-width) - 36px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
  overflow-y: auto;
  scrollbar-width: none;
}

.site-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1rem;
}

.sidebar-brand {
  width: 100%;
  padding: 0.4rem 0.3rem;
}

.sidebar-tagline {
  margin: 0.55rem 0 0;
  padding: 0 0.3rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.site-sidebar .site-nav {
  position: static;
  display: grid;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-sidebar .site-nav a {
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 0.76rem;
  padding: 0.56rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--text-soft);
}

.site-sidebar .site-nav a:hover,
.site-sidebar .site-nav a.is-active {
  color: var(--text);
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--warm-soft) 55%, transparent));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.nav-glyph {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: 800;
  line-height: 1;
}

.nav-label {
  display: grid;
  gap: 0.08rem;
}

.nav-label strong {
  font-size: 0.98rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.nav-label small {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.1;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 0.78rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.sidebar-bottom p {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.58;
}

.theme-toggle {
  min-height: 44px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text-soft);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.menu-fab {
  display: none;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(24, 22, 18, 0.36);
  backdrop-filter: blur(4px);
}

.aside-card {
  top: 32px;
}

@media (max-width: 980px) {
  body {
    padding-left: 0;
  }

  .skip-link {
    left: 16px;
  }

  .menu-fab {
    position: fixed;
    z-index: 90;
    left: 16px;
    top: 16px;
    width: 52px;
    min-height: 52px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
    color: var(--text);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
  }

  .menu-fab svg {
    width: 22px;
    height: 22px;
  }

  .site-sidebar {
    left: 16px;
    top: 16px;
    bottom: 16px;
    width: min(330px, calc(100vw - 32px));
    transform: translateX(calc(-100% - 36px));
    transition: transform 220ms ease;
  }

  .site-sidebar.is-open {
    transform: translateX(0);
  }

  .site-sidebar .sidebar-inner {
    padding-top: 4.25rem;
  }

  body.nav-open {
    overflow: hidden;
  }

  main {
    padding-top: 86px;
  }
}

@media (max-width: 440px) {
  .sidebar-brand .brand span:last-child,
  .site-sidebar .brand span:last-child {
    display: inline;
  }
}
