@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700&family=Orbitron:wght@600;700;800;900&family=Quicksand:wght@500;600;700&family=Rajdhani:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #090408;
  --surface: rgba(28, 12, 18, 0.78);
  --surface-solid: #130910;
  --text: #fff8f0;
  --muted: #dac5c9;
  --line: rgba(255, 120, 64, 0.28);
  --accent: #ff2a5f;
  --accent-strong: #ff8a19;
  --amber: #ffd166;
  --cyan: #23e7ff;
  --magenta: #ff46e8;
  --code-bg: #14040b;
  --code-text: #fff0db;
  --shadow: 0 22px 70px rgba(255, 45, 96, 0.18), 0 0 38px rgba(35, 231, 255, 0.09);
  --font-body: "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  --font-display: Orbitron, Rajdhani, "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-cjk-display: "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-hero-quote: Quicksand, Nunito, "Segoe UI Rounded", "Trebuchet MS", var(--font-body);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090408;
  --surface: rgba(28, 12, 18, 0.78);
  --surface-solid: #130910;
  --text: #fff8f0;
  --muted: #dac5c9;
  --line: rgba(255, 120, 64, 0.28);
  --accent: #ff2a5f;
  --accent-strong: #ff8a19;
  --amber: #ffd166;
  --cyan: #23e7ff;
  --magenta: #ff46e8;
  --code-bg: #14040b;
  --code-text: #fff0db;
  --shadow: 0 22px 70px rgba(255, 45, 96, 0.18), 0 0 38px rgba(35, 231, 255, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 42, 95, 0.32), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(255, 138, 25, 0.24), transparent 30%),
    radial-gradient(circle at 58% 72%, rgba(35, 231, 255, 0.15), transparent 28%),
    linear-gradient(140deg, #050306 0%, #16050c 46%, #08040b 100%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

.progress {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong), var(--cyan));
  box-shadow: 0 0 18px rgba(255, 42, 95, 0.75);
}

.site-header {
  position: relative;
  min-height: 100vh;
  color: #fff;
  overflow: hidden;
}

.site-header.compact {
  min-height: 360px;
  background:
    linear-gradient(rgba(8, 3, 8, 0.62), rgba(8, 3, 8, 0.78)),
    url("hero-anime-glitch.png") center / cover no-repeat;
}

.navbar {
  position: fixed;
  z-index: 70;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
  padding: 0 clamp(18px, 5vw, 72px);
  background: rgba(12, 5, 10, 0.58);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 138, 25, 0.26);
  box-shadow: 0 0 28px rgba(255, 42, 95, 0.14);
}

.brand {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow:
    2px 0 0 rgba(35, 231, 255, 0.5),
    -2px 0 0 rgba(255, 42, 95, 0.42),
    0 0 18px rgba(255, 138, 25, 0.2);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu a,
.icon-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active,
.icon-button:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 42, 95, 0.26), rgba(255, 138, 25, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.22), 0 0 20px rgba(255, 42, 95, 0.18);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 6px;
  min-width: 40px;
  min-height: 40px;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 42, 95, 0.36), rgba(255, 138, 25, 0.24));
  cursor: pointer;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 96px 24px 88px;
}

.hero-bg,
.hero-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg {
  object-fit: cover;
}

.hero-mask {
  background:
    radial-gradient(circle at 50% 42%, rgba(2, 0, 4, 0.04), rgba(2, 0, 4, 0.58) 62%),
    linear-gradient(180deg, rgba(5, 0, 5, 0.02), rgba(5, 0, 5, 0.32) 58%, rgba(5, 0, 5, 0.76)),
    linear-gradient(90deg, rgba(255, 42, 95, 0.1), rgba(3, 0, 8, 0.18), rgba(255, 138, 25, 0.13)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 5px);
}

.hero-content {
  position: relative;
  width: min(960px, 92vw);
  text-align: center;
  filter: drop-shadow(0 0 28px rgba(255, 42, 95, 0.35));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1,
.post-hero h1 {
  margin: 0;
  font-family: var(--font-cjk-display);
  font-weight: 900;
  font-size: clamp(3.4rem, 8vw, 7.2rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow:
    3px 0 0 rgba(255, 42, 95, 0.58),
    -3px 0 0 rgba(35, 231, 255, 0.5),
    0 0 34px rgba(255, 138, 25, 0.35);
}

.hero-avatar {
  display: block;
  width: clamp(168px, 24vw, 260px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 209, 102, 0.92);
  box-shadow:
    0 0 0 8px rgba(255, 42, 95, 0.16),
    0 0 42px rgba(255, 42, 95, 0.72),
    0 0 74px rgba(35, 231, 255, 0.36),
    inset 0 0 18px rgba(255, 255, 255, 0.18);
}

.subtitle {
  min-height: 38px;
  margin: 30px auto 0;
  font-family: var(--font-cjk-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: rgba(255, 248, 240, 0.9);
  text-shadow: 0 0 18px rgba(255, 138, 25, 0.35);
}

.subtitle span::after {
  content: "_";
  color: var(--cyan);
  animation: blink 1s steps(2, start) infinite;
}

.hero-name {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  text-shadow:
    2px 0 0 rgba(255, 42, 95, 0.55),
    -2px 0 0 rgba(35, 231, 255, 0.5),
    0 0 28px rgba(255, 138, 25, 0.25);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.hero-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.18), transparent 30%),
    rgba(10, 8, 16, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 28px rgba(255, 42, 95, 0.14),
    0 12px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.hero-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  filter: drop-shadow(0 0 10px rgba(255, 42, 95, 0.18));
}

.hero-link::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translate(-50%, -4px);
  padding: 4px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(8, 6, 12, 0.78);
  box-shadow: 0 0 18px rgba(255, 42, 95, 0.16);
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-link:hover,
.hero-link:focus-visible {
  transform: translateY(-4px) scale(1.06);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 32px rgba(255, 42, 95, 0.34),
    0 0 54px rgba(35, 231, 255, 0.14),
    0 18px 34px rgba(0, 0, 0, 0.28);
}

.hero-link:hover::after,
.hero-link:focus-visible::after {
  transform: translate(-50%, 0);
  opacity: 1;
}

.hero-link:active {
  transform: translateY(-1px) scale(0.98);
}

.github-link:hover,
.github-link:focus-visible {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 42, 95, 0.22));
}

.bilibili-link:hover,
.bilibili-link:focus-visible {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(35, 231, 255, 0.26), rgba(255, 70, 232, 0.22));
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 78px;
}

body[data-page="home"] .page-shell {
  width: 100%;
  margin: 0;
  padding: 86px 0 110px;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 64px;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 42, 95, 0.2), transparent 28%),
    radial-gradient(circle at 86% 22%, rgba(255, 138, 25, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(5, 1, 6, 0.9), rgba(5, 1, 6, 0.72) 42%, rgba(5, 1, 6, 0.94)),
    url("hero-anime-glitch.png") center top / cover fixed no-repeat;
}

body[data-page="home"] .page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 42, 95, 0.13), transparent 18%, transparent 82%, rgba(255, 138, 25, 0.16)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 6px);
}

.content-band {
  margin-top: -52px;
  position: relative;
}

body[data-page="home"] .content-band {
  width: min(1040px, calc(100% - 34px));
  margin: 0 auto;
  padding: clamp(34px, 5vw, 64px) clamp(28px, 6vw, 76px);
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgba(64, 56, 63, 0.58), rgba(22, 25, 35, 0.72) 44%, rgba(8, 12, 22, 0.86)),
    radial-gradient(circle at 4% 6%, rgba(255, 255, 255, 0.12), transparent 28%),
    radial-gradient(circle at 8% 78%, rgba(35, 231, 255, 0.11), transparent 30%);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.45),
    0 0 86px rgba(255, 42, 95, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(26px) saturate(1.08);
}

body[data-page="home"] .content-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(35, 231, 255, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 20%);
  opacity: 0.54;
}

.section-heading {
  margin-bottom: 22px;
}

body[data-page="home"] .section-heading {
  display: none;
}

body[data-page="home"] .section-heading::after {
  content: none;
}

.section-heading h2,
.timeline h2,
.simple-card h2,
.exchange-box h2,
.profile h2 {
  margin: 0 0 14px;
  font-family: var(--font-cjk-display);
  font-weight: 900;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.2;
}

.post-list {
  display: grid;
  gap: 18px;
}

body[data-page="home"] .post-list {
  position: relative;
  z-index: 1;
  gap: 0;
}

.post-card,
.simple-card,
.exchange-box,
.profile,
.article-body,
.toc,
.friend-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.post-card {
  padding: clamp(20px, 4vw, 34px);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

body[data-page="home"] .post-card {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: clamp(18px, 3.2vw, 34px) 0 clamp(26px, 4vw, 46px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

body[data-page="home"] .post-card:hover {
  transform: translateX(8px);
}

.post-card::before,
.simple-card::before,
.exchange-box::before,
.profile::before,
.article-body::before,
.friend-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 42, 95, 0.2), transparent 34%),
    radial-gradient(circle at 92% 0%, rgba(35, 231, 255, 0.14), transparent 34%);
  opacity: 0.72;
  z-index: 0;
}

body[data-page="home"] .post-card::before {
  content: none;
}

body[data-page="home"] .post-card:hover::before {
  opacity: 0;
}

.post-card > *,
.simple-card > *,
.exchange-box > *,
.profile > *,
.article-body > *,
.friend-card > * {
  position: relative;
  z-index: 1;
}

.post-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-cjk-display);
  font-weight: 900;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.35;
  color: var(--text);
  text-shadow: 1px 0 0 rgba(255, 42, 95, 0.38), -1px 0 0 rgba(35, 231, 255, 0.24);
}

body[data-page="home"] .post-card h3 {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.22rem, 2.2vw, 1.72rem);
  text-shadow: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

body[data-page="home"] .post-card:hover h3 {
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 42, 95, 0.22);
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

body[data-page="home"] .post-card p {
  max-width: 880px;
  color: rgba(232, 230, 235, 0.62);
  font-size: 0.98rem;
  line-height: 1.68;
}

.post-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

body[data-page="home"] .post-card footer {
  margin-top: 8px;
  gap: 8px 18px;
  color: rgba(232, 230, 235, 0.58);
  font-size: 0.9rem;
}

.post-card footer a {
  color: var(--amber);
}

.empty-state {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 42px 0;
  color: rgba(232, 230, 235, 0.64);
  font-family: var(--font-cjk-display);
  font-weight: 800;
  text-align: center;
  text-shadow: 0 0 18px rgba(255, 42, 95, 0.12);
}

body[data-page="home"] .post-card footer a {
  color: rgba(255, 216, 110, 0.72);
}

body[data-page="home"] .post-card footer span::before {
  content: "▣ ";
  color: rgba(232, 230, 235, 0.66);
}

body[data-page="home"] .post-card footer a:first-of-type::before {
  content: "◇ ";
  color: rgba(232, 230, 235, 0.58);
}

body[data-page="home"] .post-card footer a:last-of-type::before {
  content: "◇ ";
  color: rgba(232, 230, 235, 0.58);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

body[data-page="home"] .pagination {
  position: relative;
  z-index: 1;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(19, 9, 16, 0.86);
}

.pagination .current {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: rgba(255, 209, 102, 0.6);
  box-shadow: 0 0 26px rgba(255, 42, 95, 0.32);
}

.post-hero {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 136px 0 72px;
  text-align: center;
}

.post-hero h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.08;
}

.post-hero p:last-child {
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.78);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: -48px auto 80px;
  align-items: start;
}

.article-body {
  padding: clamp(22px, 5vw, 46px);
  background: var(--surface-solid);
  position: relative;
  overflow: hidden;
}

.article-body h2 {
  scroll-margin-top: 84px;
  margin: 34px 0 12px;
  line-height: 1.25;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body p,
.article-body li {
  color: var(--muted);
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.article-body blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.article-body th,
.article-body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.notice {
  padding: 12px 16px;
  border-left: 4px solid var(--amber);
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  color: var(--text) !important;
}

pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 18px;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  line-height: 1.55;
}

code {
  font-family: Consolas, "Cascadia Code", monospace;
}

.toc {
  position: sticky;
  top: 86px;
  padding: 18px;
  background: var(--surface);
}

.toc p {
  margin: 0 0 10px;
  font-weight: 800;
}

.toc a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.timeline {
  border-left: 2px solid var(--line);
  padding-left: 24px;
}

.timeline a {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.timeline time {
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-weight: 800;
}

.grid-page,
.about-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.simple-card,
.exchange-box,
.profile {
  padding: 24px;
  background: var(--surface-solid);
  position: relative;
  overflow: hidden;
}

.simple-card p,
.profile p,
.friend-card small {
  color: var(--muted);
}

.simple-card a {
  display: inline-block;
  margin-top: 8px;
  color: var(--amber);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.tag-cloud a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--amber);
  background: linear-gradient(135deg, rgba(255, 42, 95, 0.18), rgba(35, 231, 255, 0.09));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.taxonomy-shell {
  width: min(920px, calc(100% - 32px));
  padding-top: 0;
}

.taxonomy-board {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(28px, 5vw, 58px) clamp(24px, 6vw, 72px);
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgba(48, 45, 48, 0.58), rgba(18, 23, 31, 0.76) 46%, rgba(9, 12, 19, 0.88)),
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.12), transparent 28%),
    radial-gradient(circle at 4% 80%, rgba(35, 231, 255, 0.09), transparent 32%);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.46),
    0 0 80px rgba(255, 42, 95, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(26px) saturate(1.08);
  overflow: hidden;
}

.taxonomy-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(35, 231, 255, 0.08), transparent 18%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 6px);
  opacity: 0.68;
}

.taxonomy-group {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 8px 0 20px;
}

.taxonomy-group + .taxonomy-group {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 22px;
}

.taxonomy-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.taxonomy-group-head h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-cjk-display);
  font-weight: 900;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.3;
  text-shadow: none;
}

.taxonomy-group-head h2::after {
  content: " ›";
  color: rgba(255, 216, 110, 0.72);
}

.taxonomy-group-head span {
  min-width: 36px;
  color: rgba(232, 230, 235, 0.58);
  font-size: 0.9rem;
  text-align: right;
}

.taxonomy-group-head span::before {
  content: "▣ ";
  color: rgba(232, 230, 235, 0.5);
}

.taxonomy-posts {
  display: grid;
  gap: 4px;
  padding-left: 18px;
}

.taxonomy-posts a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 18px;
  padding: 8px 0;
  color: rgba(232, 230, 235, 0.62);
  transition: color 0.2s ease, transform 0.2s ease;
}

.taxonomy-posts a:hover {
  transform: translateX(6px);
  color: #fff;
}

.taxonomy-post-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taxonomy-post-title::before {
  content: "• ";
  color: rgba(255, 216, 110, 0.58);
}

.taxonomy-posts time {
  color: rgba(232, 230, 235, 0.48);
  font-family: var(--font-display);
  font-size: 0.86rem;
}

.friend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.friend-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 24px;
  text-align: center;
  background: var(--surface-solid);
  position: relative;
  overflow: hidden;
}

.avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong), var(--cyan));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(255, 42, 95, 0.34);
}

.avatar {
  width: 56px;
  height: 56px;
}

.profile {
  grid-column: span 2;
  text-align: center;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  font-size: 1.6rem;
  object-fit: cover;
  border: 3px solid rgba(255, 209, 102, 0.88);
  box-shadow:
    0 0 0 4px rgba(255, 42, 95, 0.18),
    0 0 28px rgba(255, 42, 95, 0.55),
    0 0 42px rgba(35, 231, 255, 0.28);
}

.skill-list {
  padding-left: 20px;
  margin: 0;
  color: var(--muted);
}

.top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.top-button.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  padding: 12vh 18px 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 42, 95, 0.18), transparent 34%),
    rgba(5, 2, 6, 0.76);
}

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

.search-panel {
  width: min(720px, 100%);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  color: var(--text);
  border: 1px solid var(--line);
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.search-head h2 {
  margin: 0;
}

.search-head .icon-button {
  color: var(--text);
}

.search-box {
  display: grid;
  gap: 8px;
  padding: 18px 22px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  background: transparent;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 42, 95, 0.16);
}

.search-results {
  max-height: 340px;
  overflow: auto;
  padding: 0 22px 22px;
}

.search-results a {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.search-results strong {
  display: block;
  color: var(--amber);
}

.search-results span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .navbar {
    height: 60px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-menu {
    position: absolute;
    top: 60px;
    left: 16px;
    right: 16px;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
    border-radius: 8px;
    background: rgba(18, 6, 14, 0.94);
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: grid;
  }

  .nav-menu a,
  .icon-button {
    text-align: center;
  }

  .site-header,
  .hero {
    min-height: 78vh;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 18vw, 5.2rem);
  }

  .hero-avatar {
    width: clamp(148px, 42vw, 210px);
  }

  body[data-page="home"] .content-band {
    margin-top: -42px;
    padding: 20px;
  }

  body[data-page="home"] .section-heading {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  body[data-page="home"] .section-heading::after {
    justify-self: start;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: -1;
  }

  .grid-page,
  .about-layout,
  .friend-grid {
    grid-template-columns: 1fr;
  }

  .taxonomy-shell {
    width: min(100% - 24px, 920px);
  }

  .taxonomy-board {
    padding: 24px 22px;
  }

  .profile {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 24px, 1100px);
  }

  .timeline a {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .post-card footer {
    display: grid;
    gap: 6px;
  }

  .taxonomy-posts {
    padding-left: 0;
  }

  .taxonomy-posts a {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .taxonomy-post-title {
    white-space: normal;
  }
}

/* Natural directory layout: no cards, no panels, just a table-of-contents rhythm. */
body[data-page="categories"] .page-shell,
body[data-page="tags"] .page-shell,
body[data-page="archives"] .page-shell,
body[data-page="links"] .page-shell {
  width: min(760px, calc(100% - 36px));
  padding: clamp(28px, 5vw, 56px) 0 82px;
}

body[data-page="home"] .content-band {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 12px 0 76px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-page="home"] .content-band::before {
  content: none;
}

.empty-state {
  width: fit-content;
  margin: 0 auto;
  padding: 24px 0;
  color: rgba(255, 248, 240, 0.7);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0 16px rgba(255, 42, 95, 0.14);
}

.empty-state::before,
.empty-state::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  margin: 0 12px 0.32em;
  background: rgba(255, 216, 110, 0.32);
}

.taxonomy-shell {
  width: min(760px, calc(100% - 36px));
  padding-top: 0;
}

.taxonomy-board {
  display: grid;
  gap: 2px;
  padding: 4px 0 72px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.taxonomy-board::before {
  content: none;
}

.taxonomy-group {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: 8px 0;
}

.taxonomy-group + .taxonomy-group {
  border-top: 0;
}

.taxonomy-group-head {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto;
  align-items: baseline;
  gap: 10px;
}

.taxonomy-group-head::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  height: 2px;
  margin-bottom: 0.48em;
  background: repeating-linear-gradient(90deg, rgba(255, 216, 110, 0.36) 0 2px, transparent 2px 8px);
}

.taxonomy-group-head h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: rgba(255, 248, 240, 0.88);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.7vw, 1.14rem);
  font-weight: 500;
  line-height: 1.45;
  text-shadow: 0 0 12px rgba(255, 42, 95, 0.12);
}

.taxonomy-group-head h2::after {
  content: none;
}

.taxonomy-group-head span {
  grid-column: 3;
  grid-row: 1;
  min-width: 1.5em;
  color: rgba(255, 248, 240, 0.58);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: right;
}

.taxonomy-group-head span::before {
  content: none;
}

.taxonomy-posts {
  display: grid;
  gap: 2px;
  padding-left: 22px;
}

.taxonomy-posts a {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  color: rgba(255, 248, 240, 0.64);
  transition: color 0.2s ease, transform 0.2s ease;
}

.taxonomy-posts a::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  height: 2px;
  margin-bottom: 0.48em;
  background: repeating-linear-gradient(90deg, rgba(255, 216, 110, 0.22) 0 2px, transparent 2px 8px);
}

.taxonomy-posts a:hover {
  transform: translateX(4px);
  color: #fff;
}

.taxonomy-post-title {
  grid-column: 1;
  grid-row: 1;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.taxonomy-post-title::before {
  content: none;
}

.taxonomy-posts time {
  grid-column: 3;
  grid-row: 1;
  color: rgba(255, 248, 240, 0.44);
  font-family: var(--font-body);
  font-size: 0.86rem;
}

body[data-page="home"] .post-list {
  gap: 0;
}

body[data-page="home"] .post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px 14px;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-page="home"] .post-card a {
  display: contents;
}

body[data-page="home"] .post-card h3 {
  grid-column: 1;
  margin: 0;
  color: rgba(255, 248, 240, 0.88);
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  font-weight: 500;
  line-height: 1.45;
}

body[data-page="home"] .post-card p {
  grid-column: 1 / -1;
  max-width: 100%;
  margin: 0;
  color: rgba(255, 248, 240, 0.56);
  font-size: 0.92rem;
}

body[data-page="home"] .post-card footer {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: rgba(255, 248, 240, 0.5);
  font-family: var(--font-body);
  font-size: 0.86rem;
}

body[data-page="home"] .post-card footer a {
  display: none;
}

body[data-page="home"] .post-card::after {
  content: "";
  grid-column: 1 / -1;
  height: 1px;
  margin-top: 8px;
  background: linear-gradient(90deg, rgba(255, 216, 110, 0.24), transparent);
}

body[data-page="home"] .post-card:hover {
  transform: translateX(4px);
}

.timeline {
  display: grid;
  gap: 8px;
  padding: 0 0 76px;
}

.timeline h2 {
  margin: 20px 0 6px;
  color: rgba(255, 216, 110, 0.82);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
}

.timeline a {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.timeline a::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  height: 2px;
  align-self: end;
  margin-bottom: 0.48em;
  background: repeating-linear-gradient(90deg, rgba(255, 216, 110, 0.22) 0 2px, transparent 2px 8px);
}

.timeline time {
  grid-column: 3;
  grid-row: 1;
  color: rgba(255, 248, 240, 0.48);
}

body[data-page="about"] .about-layout {
  width: min(880px, calc(100% - 36px));
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: clamp(28px, 5vw, 56px);
}

body[data-page="about"] .profile,
body[data-page="about"] .simple-card,
body[data-page="links"] .friend-card,
body[data-page="links"] .exchange-box {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-page="about"] .profile::before,
body[data-page="about"] .simple-card::before,
body[data-page="links"] .friend-card::before,
body[data-page="links"] .exchange-box::before {
  content: none;
}

body[data-page="about"] .profile,
body[data-page="about"] .simple-card {
  padding: 0;
}

body[data-page="about"] .profile {
  align-content: start;
  justify-items: start;
  text-align: left;
}

body[data-page="about"] .profile-avatar {
  width: 118px;
}

body[data-page="about"] .profile h2,
body[data-page="about"] .simple-card h2,
body[data-page="links"] .exchange-box h2 {
  font-family: var(--font-body);
  font-weight: 600;
  text-shadow: 0 0 14px rgba(255, 42, 95, 0.16);
}

body[data-page="about"] .profile p {
  max-width: 560px;
  color: rgba(255, 248, 240, 0.72);
  line-height: 1.9;
}

body[data-page="about"] .skill-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-page="about"] .skill-list li {
  color: rgba(255, 248, 240, 0.82);
}

body[data-page="about"] .skill-list li::before {
  content: ">";
  margin-right: 10px;
  color: var(--amber);
}

body[data-page="links"] .friend-grid {
  display: grid;
  gap: 18px;
}

body[data-page="links"] .friend-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: center;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(255, 216, 110, 0.16);
}

body[data-page="links"] .friend-card .avatar {
  grid-row: span 2;
}

body[data-page="links"] .friend-card img.avatar {
  display: block;
  object-fit: cover;
  border: 2px solid rgba(255, 216, 110, 0.72);
  background: rgba(255, 255, 255, 0.12);
}

body[data-page="links"] .friend-card strong {
  color: rgba(255, 248, 240, 0.9);
}

body[data-page="links"] .friend-card small {
  color: rgba(255, 248, 240, 0.58);
}

body[data-page="links"] .exchange-box {
  margin-top: 44px;
  padding: 0;
}

body[data-page="links"] .exchange-box pre {
  border-left: 2px solid rgba(255, 216, 110, 0.34);
  padding-left: 18px;
  background: transparent;
}

@media (max-width: 760px) {
  body[data-page="about"] .about-layout {
    grid-template-columns: 1fr;
  }
}

/* Fixed background + glass content layers, applied across all pages. */
html {
  background: #080914;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: transparent;
  color: rgba(246, 248, 255, 0.92);
}

body::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(9, 12, 28, 0.42)),
    url("site-bg.png") center / cover no-repeat,
    url("hero-anime-glitch.png") center / cover no-repeat;
}

body::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 255, 255, 0.24), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(185, 124, 255, 0.16), transparent 30%),
    linear-gradient(90deg, rgba(5, 8, 24, 0.22), rgba(255, 255, 255, 0.04), rgba(5, 8, 24, 0.18));
}

.site-header,
.site-header.compact,
body[data-page="home"] .page-shell {
  background: transparent;
}

.site-header.compact {
  min-height: 360px;
}

.hero-bg {
  display: none;
}

.hero-mask {
  background:
    linear-gradient(180deg, rgba(7, 10, 24, 0.12), rgba(7, 10, 24, 0.38) 58%, rgba(7, 10, 24, 0.58)),
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.08), transparent 36%);
}

.navbar {
  background: rgba(20, 24, 42, 0.38);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 28px rgba(10, 13, 30, 0.16);
  backdrop-filter: blur(18px) saturate(1.12);
}

.nav-menu a:hover,
.nav-menu a.active,
.icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 22px rgba(178, 121, 255, 0.18);
}

.progress {
  background: linear-gradient(90deg, #9a7bff, #ffe28a, #7fe7ff);
  box-shadow: 0 0 18px rgba(154, 123, 255, 0.42);
}

.hero-content,
.post-hero {
  filter: drop-shadow(0 18px 36px rgba(8, 12, 28, 0.32));
}

.eyebrow {
  color: #ffe28a;
}

.hero h1,
.post-hero h1,
.hero-name,
.brand {
  text-shadow:
    2px 0 0 rgba(132, 98, 255, 0.55),
    -2px 0 0 rgba(120, 232, 255, 0.42),
    0 12px 34px rgba(8, 12, 28, 0.3);
}

.subtitle,
.post-hero p:last-child {
  color: rgba(255, 255, 255, 0.9);
}

.hero-avatar {
  border-color: rgba(255, 226, 138, 0.9);
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.18),
    0 0 42px rgba(154, 123, 255, 0.42),
    0 0 74px rgba(127, 231, 255, 0.28);
}

.content-band,
.taxonomy-board,
.timeline,
body[data-page="about"] .about-layout,
body[data-page="links"] .page-shell,
.article-body,
.toc {
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 25, 42, 0.68), rgba(8, 12, 26, 0.76)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 80px rgba(7, 10, 24, 0.32);
  backdrop-filter: blur(24px) saturate(1.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
}

body[data-page="home"] .content-band,
.taxonomy-board {
  padding: clamp(34px, 5vw, 64px) clamp(28px, 6vw, 76px);
}

body[data-page="home"] .content-band {
  background:
    linear-gradient(135deg, rgba(18, 25, 42, 0.68), rgba(8, 12, 26, 0.76)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 80px rgba(7, 10, 24, 0.32);
  backdrop-filter: blur(24px) saturate(1.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
}

body[data-page="categories"] .page-shell,
body[data-page="tags"] .page-shell,
body[data-page="archives"] .page-shell,
body[data-page="links"] .page-shell {
  width: min(980px, calc(100% - 36px));
}

.taxonomy-board,
.timeline {
  width: 100%;
  margin: 0 auto;
}

.timeline {
  padding: clamp(34px, 5vw, 64px) clamp(28px, 6vw, 76px);
  border-left: 0;
}

body[data-page="about"] .about-layout,
body[data-page="links"] .page-shell {
  padding: clamp(34px, 5vw, 64px) clamp(28px, 6vw, 76px);
}

.simple-card,
.exchange-box,
.profile,
.friend-card,
.post-card {
  background: transparent;
  box-shadow: none;
}

.simple-card::before,
.exchange-box::before,
.profile::before,
.article-body::before,
.friend-card::before,
.post-card::before {
  content: none;
}

body[data-page="home"] .post-card::after,
.timeline a::before,
.taxonomy-group-head::before,
.taxonomy-posts a::before {
  background: repeating-linear-gradient(90deg, rgba(255, 226, 138, 0.28) 0 2px, transparent 2px 8px);
}

.article-layout {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 28px;
  width: min(1180px, calc(100% - 36px));
  margin: -42px auto 90px;
}

.article-body {
  padding: clamp(28px, 5vw, 62px);
  overflow: visible;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: none;
}

.article-body h1,
.article-body h2 {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(205, 218, 255, 0.18);
}

.article-body p,
.article-body li,
.toc a {
  color: rgba(235, 240, 255, 0.72);
}

.article-body img {
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 46px rgba(8, 12, 28, 0.22);
}

.article-body blockquote,
.notice {
  border-left-color: #8f7cff;
  background: rgba(255, 255, 255, 0.1);
}

.article-body th,
.article-body td {
  border-color: rgba(205, 218, 255, 0.16);
}

pre {
  background: rgba(8, 10, 22, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.toc {
  top: 88px;
  padding: 18px 20px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.toc p {
  color: rgba(255, 255, 255, 0.92);
}

.toc a {
  padding: 5px 0 5px 10px;
  border-left: 2px solid transparent;
}

.toc a:hover {
  color: #ffe28a;
  border-left-color: #8f7cff;
}

.search-panel {
  background: rgba(10, 14, 28, 0.86);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(22px);
}

@media (max-width: 860px) {
  .nav-menu {
    background: rgba(14, 18, 34, 0.88);
    backdrop-filter: blur(20px);
  }

  .article-layout {
    width: calc(100% - 24px);
    max-width: none;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .article-body {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .article-body img,
  pre {
    max-width: 100%;
  }

  .toc {
    display: none;
  }

  body[data-page="home"] .content-band,
  .taxonomy-board,
  .timeline,
  body[data-page="about"] .about-layout,
  body[data-page="links"] .page-shell,
  .article-body {
    padding: 26px 20px;
  }
}

/* Final fixed-wallpaper scroll model. Keep this last so every page follows it. */
:root {
  --line: rgba(205, 226, 244, 0.22);
  --accent: #65d8ff;
  --accent-strong: #d8bd78;
  --amber: #e8ca85;
  --cyan: #7ee8ff;
  --magenta: #9eb8ff;
  --muted: rgba(232, 243, 250, 0.76);
}

body::before {
  background:
    linear-gradient(180deg, rgba(238, 248, 255, 0.16), rgba(4, 14, 24, 0.42)),
    linear-gradient(90deg, rgba(0, 30, 48, 0.22), rgba(255, 255, 255, 0.03), rgba(9, 24, 42, 0.22)),
    url("site-bg.jpg") center / cover no-repeat,
    url("site-bg.png") center / cover no-repeat;
  background-attachment: fixed;
}

body::after {
  background:
    radial-gradient(circle at 18% 12%, rgba(228, 245, 255, 0.2), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(216, 189, 120, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(6, 17, 28, 0.06), rgba(3, 10, 20, 0.2));
}

body[data-page="home"] .site-header,
body[data-page="home"] .hero {
  min-height: 100svh;
}

body[data-page="home"] .hero {
  padding: clamp(86px, 12vh, 132px) 24px clamp(78px, 11vh, 118px);
}

body[data-page="home"] .hero-mask {
  background:
    linear-gradient(180deg, rgba(6, 18, 30, 0.1), rgba(5, 18, 30, 0.18) 48%, rgba(4, 14, 24, 0.34)),
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.1), transparent 40%);
}

.navbar {
  background: rgba(24, 38, 54, 0.42);
  border-bottom: 1px solid rgba(220, 238, 250, 0.22);
  box-shadow: 0 10px 30px rgba(3, 12, 22, 0.18);
}

.nav-menu a:hover,
.nav-menu a.active,
.icon-button:hover {
  background: rgba(230, 244, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(235, 247, 255, 0.2), 0 0 26px rgba(101, 216, 255, 0.18);
}

.progress {
  background: linear-gradient(90deg, #d8bd78, #7ee8ff, #9eb8ff);
  box-shadow: 0 0 18px rgba(126, 232, 255, 0.42);
}

.hero-avatar {
  border-color: rgba(232, 202, 133, 0.95);
  box-shadow:
    0 0 0 8px rgba(235, 248, 255, 0.2),
    0 0 42px rgba(126, 232, 255, 0.38),
    0 0 78px rgba(216, 189, 120, 0.24);
}

.hero h1,
.post-hero h1,
.hero-name,
.brand {
  text-shadow:
    2px 0 0 rgba(126, 232, 255, 0.48),
    -2px 0 0 rgba(216, 189, 120, 0.3),
    0 14px 34px rgba(2, 10, 18, 0.34);
}

body[data-page="home"] .page-shell {
  min-height: 100svh;
  width: 100%;
  padding: clamp(78px, 10vh, 118px) 0 clamp(82px, 12vh, 130px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: transparent;
}

body[data-page="home"] .content-band {
  width: min(1060px, calc(100% - 64px));
  min-height: min(760px, calc(100svh - 150px));
  margin: 0 auto;
  padding: clamp(46px, 6vw, 78px) clamp(34px, 6vw, 86px);
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(38, 52, 68, 0.64), rgba(7, 18, 30, 0.74)),
    rgba(238, 248, 255, 0.08);
  box-shadow: 0 34px 110px rgba(3, 11, 20, 0.4);
  backdrop-filter: blur(28px) saturate(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(1.08);
}

body[data-page="home"] .content-band::before,
body[data-page="home"] .post-card::before,
body[data-page="home"] .post-card::after {
  content: none;
}

body[data-page="home"] .section-heading {
  display: block;
  margin: 0 0 clamp(30px, 5vw, 58px);
}

body[data-page="home"] .section-heading::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 22px;
  background: linear-gradient(90deg, rgba(232, 202, 133, 0.34), rgba(126, 232, 255, 0.22), transparent);
}

body[data-page="home"] .section-heading h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

body[data-page="home"] .post-list {
  gap: 0;
}

body[data-page="home"] .post-card {
  min-height: 0;
  padding: clamp(28px, 5vw, 52px) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="home"] .post-card + .post-card {
  border-top: 1px solid rgba(220, 238, 250, 0.14);
}

body[data-page="home"] .post-card h3 {
  font-size: clamp(1.45rem, 2.7vw, 2.15rem);
  color: rgba(243, 249, 252, 0.88);
}

body[data-page="home"] .post-card p {
  max-width: 780px;
  color: rgba(225, 239, 248, 0.7);
}

body[data-page="home"] .post-meta {
  color: rgba(225, 239, 248, 0.66);
}

body[data-page="home"] .post-card:hover {
  transform: translateX(8px);
}

.content-band,
.taxonomy-board,
.timeline,
body[data-page="about"] .about-layout,
body[data-page="links"] .page-shell,
.article-body,
.toc {
  background:
    linear-gradient(135deg, rgba(38, 52, 68, 0.64), rgba(7, 18, 30, 0.74)),
    rgba(238, 248, 255, 0.08);
  box-shadow: 0 34px 110px rgba(3, 11, 20, 0.4);
}

@media (max-width: 860px) {
  body[data-page="home"] .hero {
    padding: 92px 18px 78px;
  }

  body[data-page="home"] .page-shell {
    padding: 54px 0 76px;
  }

  body[data-page="home"] .content-band {
    width: calc(100% - 24px);
    min-height: calc(100svh - 108px);
    padding: 30px 22px;
  }

  body[data-page="home"] .post-card {
    padding: 30px 0;
  }

  body[data-page="home"] .post-card:hover {
    transform: none;
  }
}

/* Snow-white refinement: icy white surfaces with blue shadows and gold details. */
:root {
  --bg: #edf7fb;
  --surface: rgba(244, 251, 255, 0.58);
  --surface-solid: rgba(238, 248, 253, 0.72);
  --text: #163247;
  --muted: rgba(38, 65, 84, 0.72);
  --line: rgba(78, 131, 158, 0.18);
  --accent: #38bfe9;
  --accent-strong: #c8a755;
  --amber: #c8a755;
  --cyan: #51d8ff;
  --magenta: #8da9ff;
}

html {
  background: #edf7fb;
}

body {
  color: #163247;
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(232, 246, 252, 0.28) 48%, rgba(7, 23, 35, 0.18)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(214, 241, 252, 0.04), rgba(255, 255, 255, 0.16)),
    url("site-bg.jpg") center / cover no-repeat,
    url("site-bg.png") center / cover no-repeat;
  background-attachment: fixed;
}

body::after {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.32), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(200, 167, 85, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(225, 244, 252, 0.16));
}

.navbar {
  color: #173449;
  background: rgba(240, 249, 253, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.54);
  box-shadow: 0 10px 30px rgba(15, 54, 75, 0.12);
}

.brand {
  color: #143149;
}

.nav-menu a,
.icon-button {
  color: rgba(22, 50, 71, 0.86);
}

.nav-menu a:hover,
.nav-menu a.active,
.icon-button:hover {
  color: #0d2a40;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.66), 0 0 24px rgba(81, 216, 255, 0.2);
}

.nav-toggle {
  color: #123047;
  background: rgba(244, 251, 255, 0.72);
  box-shadow: 0 10px 28px rgba(15, 54, 75, 0.14);
}

.hero-mask {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(240, 250, 255, 0.16) 54%, rgba(7, 23, 35, 0.22)),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), transparent 42%);
}

.hero-name,
.subtitle,
.post-hero h1,
.post-hero p:last-child {
  color: #153248;
}

.subtitle,
.hero-name,
.brand,
.post-hero h1 {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72),
    0 14px 34px rgba(9, 37, 55, 0.22);
}

.hero-link {
  color: #163247;
  background: rgba(244, 251, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 14px 34px rgba(12, 45, 66, 0.15);
}

.content-band,
.taxonomy-board,
.timeline,
body[data-page="about"] .about-layout,
body[data-page="links"] .page-shell,
.article-body,
.toc {
  color: #163247;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(226, 244, 252, 0.54)),
    rgba(255, 255, 255, 0.44);
  box-shadow:
    0 34px 110px rgba(12, 45, 66, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(30px) saturate(1.08);
  -webkit-backdrop-filter: blur(30px) saturate(1.08);
}

body[data-page="home"] .content-band {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(226, 244, 252, 0.56)),
    rgba(255, 255, 255, 0.44);
  box-shadow:
    0 34px 110px rgba(12, 45, 66, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.eyebrow,
.post-card footer a,
body[data-page="home"] .post-card footer a {
  color: #b4913d;
}

body[data-page="home"] .section-heading h2,
.section-heading h2,
.timeline h2,
.simple-card h2,
.exchange-box h2,
.profile h2,
.article-body h1,
.article-body h2,
.article-body h3,
.toc p,
body[data-page="home"] .post-card h3 {
  color: #163247;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-page="home"] .section-heading::after,
body[data-page="home"] .post-card + .post-card,
.article-body h1,
.article-body h2 {
  border-color: rgba(70, 121, 148, 0.18);
}

body[data-page="home"] .section-heading::after {
  background: linear-gradient(90deg, rgba(200, 167, 85, 0.34), rgba(81, 216, 255, 0.26), transparent);
}

body[data-page="home"] .post-card p,
.article-body p,
.article-body li,
.toc a,
.simple-card p,
.profile p,
.friend-card small {
  color: rgba(38, 65, 84, 0.72);
}

body[data-page="home"] .post-meta,
body[data-page="home"] .post-card footer {
  color: rgba(38, 65, 84, 0.58);
}

.article-body blockquote,
.notice {
  color: #163247 !important;
  background: rgba(255, 255, 255, 0.45);
  border-left-color: #38bfe9;
}

.toc a:hover {
  color: #0a8fba;
  border-left-color: #c8a755;
}

/* Exact background image pass: use the supplied image without color overlays. */
body::before {
  background: url("site-bg-restored-4k.jpg") center / cover no-repeat;
  background-attachment: fixed;
}

body::after,
body[data-page="home"] .hero-mask,
.hero-mask {
  background: transparent;
}

/* Transparent blurred navigation bar. */
.navbar {
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
  backdrop-filter: blur(22px) saturate(1.05);
  -webkit-backdrop-filter: blur(22px) saturate(1.05);
}

.nav-menu a,
.icon-button {
  color: rgba(13, 42, 64, 0.86);
}

.nav-menu a:hover,
.nav-menu a.active,
.icon-button:hover {
  color: #0c2a42;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

/* Move the personal identity block from the home hero into the about page. */
body[data-page="home"] .hero {
  place-items: center;
}

body[data-page="about"] .about-identity {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(620px, 100%);
  margin: 0 auto clamp(18px, 4vw, 36px);
}

body[data-page="about"] .about-identity .hero-avatar {
  width: clamp(168px, 24vw, 260px);
}

body[data-page="about"] .about-identity .hero-links {
  margin-bottom: 18px;
}

body[data-page="about"] .profile {
  grid-column: span 2;
  text-align: left;
}

body[data-page="about"] .profile h2 {
  margin-top: 0;
}

body[data-page="about"] .profile p,
body[data-page="about"] .skill-list,
body[data-page="about"] .skill-list li {
  color: rgba(22, 50, 71, 0.78);
}

@media (max-width: 760px) {
  body[data-page="about"] .profile,
  body[data-page="about"] .simple-card {
    grid-column: 1;
  }
}

/* Clean home hero: keep only the background and the line. */
body[data-page="home"] .hero-content {
  display: grid;
  place-items: center;
  min-height: 38px;
}

body[data-page="home"] .subtitle {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.9rem);
  line-height: 1.28;
}

body[data-page="home"] .subtitle span::after {
  margin-left: 0.08em;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 22px;
}

body[data-page="about"] .profile-avatar {
  width: 118px;
  height: 118px;
  margin: 0 0 14px;
}

.profile-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #163247;
  background: rgba(244, 251, 255, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 14px 34px rgba(12, 45, 66, 0.14);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.profile-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.profile-link::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: -32px;
  transform: translate(-50%, -4px);
  padding: 4px 10px;
  border-radius: 999px;
  color: #163247;
  background: rgba(244, 251, 255, 0.74);
  box-shadow: 0 12px 26px rgba(12, 45, 66, 0.12);
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-link:hover,
.profile-link:focus-visible {
  transform: translateY(-4px) scale(1.05);
  color: #0c2a42;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 38px rgba(12, 45, 66, 0.18);
}

.profile-link:hover::after,
.profile-link:focus-visible::after {
  transform: translate(-50%, 0);
  opacity: 1;
}

body[data-page="about"] .profile p,
body[data-page="about"] .skill-list li {
  color: rgba(38, 65, 84, 0.76);
}

body[data-page="about"] .skill-list li::before {
  color: #b4913d;
}

/* Unified transparent blurred content panels. */
body[data-page] .content-band,
body[data-page] .taxonomy-board,
body[data-page] .timeline,
body[data-page="about"] .about-layout,
body[data-page="links"] .page-shell,
body[data-page] .article-body,
body[data-page] .toc,
body[data-page] .search-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(7, 20, 34, 0.34), rgba(8, 22, 36, 0.18)),
    rgba(255, 255, 255, 0.06);
  box-shadow: none;
  backdrop-filter: blur(22px) saturate(1.05);
  -webkit-backdrop-filter: blur(22px) saturate(1.05);
}

/* Softer typography and readable ink colors for glass surfaces. */
:root {
  --text: #17324a;
  --muted: rgba(49, 76, 96, 0.76);
  --amber: #9b7830;
  --cyan: #2d93aa;
  --font-body: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --font-display: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --font-cjk-display: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

body,
button,
input {
  color: var(--text);
  font-family: var(--font-body);
}

.brand,
.nav-menu a,
.icon-button,
.eyebrow,
.subtitle,
.post-hero h1,
.section-heading h2,
.timeline h2,
.simple-card h2,
.exchange-box h2,
.profile h2,
.article-body h1,
.article-body h2,
.article-body h3,
.toc p,
.post-card h3,
body[data-page="home"] .section-heading h2,
body[data-page="home"] .post-card h3,
.taxonomy-group-head h2,
.taxonomy-post-title {
  font-family: var(--font-body);
  letter-spacing: 0;
  text-shadow: none;
}

.brand {
  color: #143047;
  font-weight: 700;
}

.nav-menu a,
.icon-button {
  color: rgba(20, 48, 71, 0.84);
  font-weight: 500;
}

.eyebrow {
  color: #947231;
  font-weight: 650;
  text-transform: none;
}

.subtitle,
body[data-page="home"] .subtitle {
  color: #123149;
  font-family: var(--font-hero-quote);
  font-weight: 500;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.74),
    0 12px 28px rgba(255, 255, 255, 0.2);
}

.subtitle span::after {
  color: #2d93aa;
}

.post-hero h1,
.section-heading h2,
.timeline h2,
.simple-card h2,
.exchange-box h2,
.profile h2,
.article-body h1,
.article-body h2,
.article-body h3,
.toc p,
.post-card h3,
body[data-page="home"] .section-heading h2,
body[data-page="home"] .post-card h3,
.taxonomy-group-head h2,
.taxonomy-post-title {
  color: #17324a;
  font-weight: 650;
}

.post-hero p:last-child,
.post-card p,
body[data-page="home"] .post-card p,
.article-body p,
.article-body li,
.toc a,
.simple-card p,
.profile p,
body[data-page="about"] .profile p,
body[data-page="about"] .skill-list li,
.friend-card small,
.taxonomy-posts a,
.post-meta,
body[data-page="home"] .post-card footer {
  color: rgba(49, 76, 96, 0.76);
  text-shadow: none;
}

.post-card footer a,
body[data-page="home"] .post-card footer a,
.simple-card a,
.timeline time,
.taxonomy-group-head span {
  color: #8d6f2f;
  font-weight: 600;
}

.post-card:hover h3,
body[data-page="home"] .post-card:hover h3 {
  color: #0f2b42;
  text-shadow: 0 10px 24px rgba(255, 255, 255, 0.2);
}

body[data-page="home"] .section-heading::after,
body[data-page="home"] .post-card + .post-card,
.article-body h1,
.article-body h2 {
  border-color: rgba(20, 48, 71, 0.16);
}

/* Contrast pass for transparent panels over mixed light/dark wallpaper. */
body[data-page] .content-band,
body[data-page] .taxonomy-board,
body[data-page] .timeline,
body[data-page="about"] .about-layout,
body[data-page="links"] .page-shell,
body[data-page] .article-body,
body[data-page] .toc,
body[data-page] .search-panel {
  color: rgba(238, 248, 255, 0.94);
}

body[data-page] .content-band .section-heading h2,
body[data-page] .content-band .post-card h3,
body[data-page] .taxonomy-board h2,
body[data-page] .timeline h2,
body[data-page="about"] .about-layout h2,
body[data-page="links"] .page-shell h2,
body[data-page] .article-body h1,
body[data-page] .article-body h2,
body[data-page] .article-body h3,
body[data-page] .toc p,
body[data-page] .search-panel h2,
body[data-page] .taxonomy-post-title {
  color: rgba(238, 248, 255, 0.96);
  text-shadow: 0 2px 16px rgba(2, 12, 22, 0.52);
}

body[data-page] .content-band .post-card p,
body[data-page] .content-band .post-card footer,
body[data-page] .article-body p,
body[data-page] .article-body li,
body[data-page] .toc a,
body[data-page] .simple-card p,
body[data-page] .profile p,
body[data-page="about"] .skill-list li,
body[data-page] .friend-card small,
body[data-page] .taxonomy-posts a,
body[data-page] .search-results a span {
  color: rgba(222, 238, 248, 0.82);
  text-shadow: 0 1px 10px rgba(2, 12, 22, 0.38);
}

body[data-page] .content-band .eyebrow,
body[data-page] .content-band .post-card footer a,
body[data-page] .simple-card a,
body[data-page] .timeline time,
body[data-page] .taxonomy-group-head span,
body[data-page="about"] .skill-list li::before {
  color: #e0c36d;
  text-shadow: 0 1px 10px rgba(2, 12, 22, 0.36);
}

body[data-page] .content-band .section-heading::after,
body[data-page] .content-band .post-card + .post-card,
body[data-page] .article-body h1,
body[data-page] .article-body h2 {
  border-color: rgba(238, 248, 255, 0.2);
}

/* Rounded display titles: smoother and more playful than bold system sans. */
:root {
  --font-heading-soft: "ZCOOL KuaiLe", "YouYuan", "\5e7c\5706", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

body[data-page] .content-band .section-heading h2,
body[data-page] .content-band .post-card h3,
body[data-page] .taxonomy-board h2,
body[data-page] .timeline h2,
body[data-page="about"] .about-layout h2,
body[data-page="links"] .page-shell h2,
body[data-page] .article-body h1,
body[data-page] .article-body h2,
body[data-page] .article-body h3,
body[data-page] .search-panel h2,
body[data-page] .taxonomy-post-title {
  font-family: var(--font-heading-soft);
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 0 2px 14px rgba(2, 12, 22, 0.38);
}

body[data-page] .content-band .section-heading h2 {
  font-size: clamp(2.1rem, 5vw, 3.9rem);
}

body[data-page] .content-band .post-card h3 {
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
}

/* Book-like article table of contents. */
body[data-page="post"] .article-layout {
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 42px);
  width: min(1240px, calc(100% - 36px));
}

body[data-page="post"] .toc {
  order: -1;
  top: 88px;
  max-height: calc(100vh - 112px);
  padding: 26px 24px 28px;
  overflow: auto;
  border-radius: 8px;
}

body[data-page="post"] .toc p {
  margin: 0 0 20px;
  color: rgba(238, 248, 255, 0.98);
  font-family: var(--font-heading-soft);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 0 2px 14px rgba(2, 12, 22, 0.42);
}

body[data-page="post"] .toc nav {
  position: relative;
  display: grid;
  gap: 6px;
  padding-left: 22px;
}

body[data-page="post"] .toc nav::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 5px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e0c36d, rgba(224, 195, 109, 0.32), rgba(238, 248, 255, 0.12));
  box-shadow: 0 0 18px rgba(224, 195, 109, 0.18);
}

body[data-page="post"] .toc a {
  position: relative;
  display: block;
  padding: 5px 8px 5px 0;
  border: 0;
  color: rgba(222, 238, 248, 0.8);
  font-family: var(--font-body);
  font-size: 0.96rem;
  line-height: 1.55;
  text-shadow: 0 1px 10px rgba(2, 12, 22, 0.34);
  transition: color 0.18s ease, transform 0.18s ease;
}

body[data-page="post"] .toc a::before {
  content: "";
  position: absolute;
  top: 1.05em;
  left: -23px;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: rgba(238, 248, 255, 0.32);
  transition: width 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

body[data-page="post"] .toc a.toc-level-1 {
  margin-top: 4px;
  color: rgba(238, 248, 255, 0.94);
  font-size: 1.04rem;
  font-weight: 650;
}

body[data-page="post"] .toc a.toc-level-2 {
  padding-left: 12px;
}

body[data-page="post"] .toc a.toc-level-3 {
  padding-left: 26px;
  color: rgba(222, 238, 248, 0.66);
  font-size: 0.9rem;
}

body[data-page="post"] .toc a:hover,
body[data-page="post"] .toc a.active {
  color: #fff8d7;
  transform: translateX(4px);
}

body[data-page="post"] .toc a:hover::before,
body[data-page="post"] .toc a.active::before {
  width: 16px;
  background: #e0c36d;
  box-shadow: 0 0 16px rgba(224, 195, 109, 0.34);
}

body[data-page="post"] .toc::-webkit-scrollbar {
  width: 6px;
}

body[data-page="post"] .toc::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(238, 248, 255, 0.2);
}

body[data-page="categories"]::before {
  background: url("category-post-bg.png") center 44% / cover no-repeat;
  background-attachment: fixed;
}

body[data-page="post"]::before {
  background: url("post-bg-kuuga-579.jpg") center 52% / cover no-repeat;
  background-attachment: fixed;
}

@media (max-width: 980px) {
  body[data-page="post"] .article-layout {
    grid-template-columns: 1fr;
  }

  body[data-page="post"] .toc {
    display: block;
    position: static;
    order: -1;
    max-height: none;
  }
}

body[data-page="archives"] .post-hero .eyebrow,
body[data-page="archives"] .post-hero h1,
body[data-page="archives"] .post-hero p,
body[data-page="categories"] .post-hero .eyebrow,
body[data-page="categories"] .post-hero h1,
body[data-page="categories"] .post-hero p,
body[data-page="tags"] .post-hero .eyebrow,
body[data-page="tags"] .post-hero h1,
body[data-page="tags"] .post-hero p,
body[data-page="links"] .post-hero .eyebrow,
body[data-page="links"] .post-hero h1,
body[data-page="links"] .post-hero p,
body[data-page="about"] .post-hero .eyebrow,
body[data-page="about"] .post-hero h1,
body[data-page="about"] .post-hero p {
  display: none;
}

body[data-page="archives"] .post-hero,
body[data-page="categories"] .post-hero,
body[data-page="tags"] .post-hero,
body[data-page="links"] .post-hero,
body[data-page="about"] .post-hero {
  padding: 112px 0 58px;
}

body[data-page="archives"] .site-header.compact,
body[data-page="categories"] .site-header.compact,
body[data-page="tags"] .site-header.compact,
body[data-page="links"] .site-header.compact,
body[data-page="about"] .site-header.compact {
  min-height: clamp(620px, 82svh, 900px);
}

body[data-page="post"] .site-header.compact {
  min-height: clamp(620px, 82svh, 900px);
}

body[data-page="post"] .post-hero {
  position: absolute;
  left: 50%;
  bottom: clamp(72px, 9svh, 110px);
  transform: translateX(-50%);
  padding: 0;
}

body[data-page="links"]::before {
  background: url("links-bg-snow.png") center 42% / cover no-repeat;
  background-attachment: fixed;
}

body[data-page="about"]::before {
  background: url("about-bg-kuuga.jpg") 53% 42% / cover no-repeat;
  background-attachment: fixed;
}

body[data-page="archives"]::before {
  background: url("archives-bg-kuuga.png") center 42% / cover no-repeat;
  background-attachment: fixed;
}

body[data-page="tags"]::before {
  background: url("tags-bg-kuuga-3840.jpg") 58% 34% / cover no-repeat;
  background-attachment: fixed;
}

body[data-page="links"] .site-header.compact {
  background: transparent;
}

body[data-page="links"] .page-shell {
  background:
    linear-gradient(135deg, rgba(5, 16, 24, 0.36), rgba(12, 29, 40, 0.18)),
    rgba(244, 250, 255, 0.06);
}

body[data-page="links"] .friend-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
  justify-items: stretch;
  gap: clamp(16px, 2vw, 22px);
  margin: 0 0 clamp(44px, 6vw, 68px);
}

body[data-page="links"] .friend-card {
  position: relative;
  min-height: 224px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  align-items: center;
  justify-items: center;
  gap: 10px;
  padding: 26px 22px 24px;
  overflow: hidden;
  border: 1px solid rgba(238, 248, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 10%, rgba(224, 195, 109, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(238, 248, 255, 0.18), rgba(6, 18, 28, 0.34)),
    rgba(6, 18, 28, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 44px rgba(2, 12, 22, 0.18);
  color: rgba(238, 248, 255, 0.94);
  text-align: center;
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

body[data-page="links"] .friend-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 36%),
    radial-gradient(circle at 94% 96%, rgba(81, 216, 255, 0.12), transparent 34%);
}

body[data-page="links"] .friend-card::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(224, 195, 109, 0.72), rgba(81, 216, 255, 0.28), transparent);
  opacity: 0.62;
}

body[data-page="links"] .friend-card > * {
  position: relative;
  z-index: 1;
}

body[data-page="links"] .friend-card:hover,
body[data-page="links"] .friend-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(255, 248, 216, 0.36);
  background:
    radial-gradient(circle at 18% 10%, rgba(224, 195, 109, 0.24), transparent 32%),
    linear-gradient(145deg, rgba(238, 248, 255, 0.24), rgba(6, 18, 28, 0.28)),
    rgba(6, 18, 28, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 24px 54px rgba(2, 12, 22, 0.28);
}

body[data-page="links"] .friend-card .avatar,
body[data-page="links"] .friend-card img.avatar {
  grid-row: auto;
  width: 82px;
  height: 82px;
  align-self: center;
  justify-self: center;
  object-fit: cover;
  border: 2px solid rgba(224, 195, 109, 0.84);
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.06),
    0 16px 34px rgba(2, 12, 22, 0.28),
    0 0 26px rgba(224, 195, 109, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

body[data-page="links"] .friend-card:hover img.avatar,
body[data-page="links"] .friend-card:focus-visible img.avatar {
  transform: scale(1.04) rotate(-2deg);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.08),
    0 20px 40px rgba(2, 12, 22, 0.34),
    0 0 34px rgba(224, 195, 109, 0.3);
}

body[data-page="links"] .friend-card strong {
  align-self: center;
  max-width: 100%;
  color: rgba(255, 252, 235, 0.96);
  font-family: var(--font-heading-soft);
  font-size: clamp(1.18rem, 2vw, 1.42rem);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 14px rgba(2, 12, 22, 0.46);
}

body[data-page="links"] .friend-card small {
  grid-column: auto;
  max-width: 23ch;
  min-height: 3.6em;
  color: rgba(222, 238, 248, 0.82);
  font-size: 0.95rem;
  line-height: 1.68;
  text-align: center;
  text-shadow: 0 1px 10px rgba(2, 12, 22, 0.34);
}

body[data-page="links"] .exchange-box {
  display: grid;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 36px);
  align-items: start;
  margin-top: 0;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid rgba(238, 248, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(238, 248, 255, 0.13), rgba(6, 18, 28, 0.2)),
    rgba(6, 18, 28, 0.14);
  backdrop-filter: blur(16px) saturate(1.04);
  -webkit-backdrop-filter: blur(16px) saturate(1.04);
}

body[data-page="links"] .exchange-box h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.12;
}

body[data-page="links"] .exchange-box pre {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid rgba(238, 248, 255, 0.14);
  border-left: 2px solid rgba(224, 195, 109, 0.5);
  border-radius: 8px;
  background: rgba(2, 12, 22, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-page="about"] .profile {
  padding: clamp(34px, 5vw, 58px);
}

body[data-page="about"] .profile h2 {
  margin: 0 0 clamp(22px, 3vw, 32px);
  font-size: clamp(3rem, 5.4vw, 4.8rem);
  line-height: 1.04;
}

body[data-page="about"] .profile-copy {
  position: relative;
  display: grid;
  gap: clamp(14px, 2vw, 20px);
  max-width: 980px;
  padding-left: clamp(16px, 2vw, 24px);
}

body[data-page="about"] .profile-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  bottom: 0.36em;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(224, 195, 109, 0.92), rgba(81, 216, 255, 0.28));
}

body[data-page="about"] .profile p {
  max-width: 68ch;
  margin: 0;
  color: rgba(229, 242, 250, 0.88);
  font-size: clamp(1.14rem, 1.55vw, 1.42rem);
  line-height: 1.9;
  text-shadow: 0 2px 14px rgba(2, 12, 22, 0.36);
}

body[data-page="about"] .profile .profile-lead {
  max-width: 42ch;
  color: rgba(248, 253, 255, 0.97);
  font-size: clamp(1.42rem, 2.35vw, 1.92rem);
  line-height: 1.66;
}

@media (max-width: 760px) {
  body[data-page="links"] .friend-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="links"] .friend-card {
    grid-template-columns: 1fr;
    min-height: 202px;
    padding: 22px 18px;
  }

  body[data-page="links"] .friend-card .avatar,
  body[data-page="links"] .friend-card img.avatar {
    width: 76px;
    height: 76px;
  }

  body[data-page="links"] .exchange-box {
    grid-template-columns: 1fr;
  }

  body[data-page="about"] .profile {
    padding: 28px 22px;
  }

  body[data-page="about"] .profile h2 {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
  }

  body[data-page="about"] .profile p,
  body[data-page="about"] .profile .profile-lead {
    max-width: none;
  }

  body[data-page="about"]::before {
    background-position: 54% center;
  }

  body[data-page="archives"]::before {
    background-position: center 38%;
  }

  body[data-page="tags"]::before {
    background-position: 61% 28%;
  }

  body[data-page="post"]::before {
    background-position: 50% center;
  }
}

@media (min-width: 761px) and (max-width: 1020px) {
  body[data-page="links"] .friend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile navigation should feel like the desktop glass bar, just folded. */
@media (max-width: 860px) {
  .navbar {
    height: 64px;
    padding: 0 clamp(18px, 5vw, 28px);
    background: rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(22px) saturate(1.05);
    -webkit-backdrop-filter: blur(22px) saturate(1.05);
  }

  .brand {
    color: #143047;
    font-size: 1.02rem;
    font-weight: 700;
    text-shadow: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    color: #123047;
    background: rgba(244, 251, 255, 0.58);
    box-shadow: none;
    backdrop-filter: blur(18px) saturate(1.04);
    -webkit-backdrop-filter: blur(18px) saturate(1.04);
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: clamp(14px, 4vw, 22px);
    right: clamp(14px, 4vw, 22px);
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(238, 248, 255, 0.18), rgba(8, 24, 38, 0.16)),
      rgba(238, 248, 255, 0.14);
    box-shadow: 0 18px 42px rgba(6, 18, 28, 0.18);
    backdrop-filter: blur(22px) saturate(1.05);
    -webkit-backdrop-filter: blur(22px) saturate(1.05);
  }

  .nav-menu.open {
    display: grid;
  }

  .nav-menu a,
  .nav-menu .icon-button {
    display: grid;
    place-items: center;
    min-height: 44px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    color: rgba(20, 48, 71, 0.9);
    background: rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
  }

  .nav-menu .icon-button {
    grid-column: 1 / -1;
  }

  .nav-menu a:hover,
  .nav-menu a.active,
  .nav-menu .icon-button:hover {
    color: #0c2a42;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  }
}

@media (max-width: 420px) {
  .nav-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
