:root {
  color-scheme: light;
  --bg: #f3efe5;
  --bg-soft: rgba(255, 250, 239, 0.72);
  --paper: rgba(255, 252, 245, 0.86);
  --paper-strong: #fffaf1;
  --ink: #1f2833;
  --muted: #5d675f;
  --accent: #b85c38;
  --accent-deep: #8d3f21;
  --line: rgba(31, 40, 51, 0.12);
  --shadow: 0 24px 70px rgba(61, 50, 36, 0.12);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1180px;
  --ambient-x: 74vw;
  --ambient-y: 26vh;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f141b;
  --bg-soft: rgba(16, 21, 29, 0.76);
  --paper: rgba(18, 24, 33, 0.88);
  --paper-strong: #131922;
  --ink: #eef2f6;
  --muted: #a7b2bf;
  --accent: #d58c5b;
  --accent-deep: #efb58c;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184, 92, 56, 0.18), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(132, 161, 133, 0.18), transparent 30%),
    linear-gradient(180deg, #f7f3ea 0%, #efe6d6 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(213, 140, 91, 0.12), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(104, 132, 170, 0.16), transparent 30%),
    linear-gradient(180deg, #0c1117 0%, #151d27 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 80%);
  pointer-events: none;
}

html[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

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

.ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-backdrop::before,
.ambient-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
}

.ambient-backdrop::before {
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 255, 255, 0.36), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(231, 189, 121, 0.18), transparent 18%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 48%);
  opacity: 0.72;
}

.ambient-backdrop::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 20%, rgba(255, 255, 255, 0.08) 70%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.4;
}

.ambient-orb,
.ambient-pointer,
.ambient-ripple {
  position: absolute;
  border-radius: 999px;
}

.ambient-orb {
  filter: blur(24px);
  opacity: 0.92;
}

.ambient-orb-a {
  top: 4vh;
  left: -9vw;
  width: min(44vw, 620px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(230, 187, 114, 0.26) 0, rgba(230, 187, 114, 0.12) 32%, rgba(230, 187, 114, 0) 72%);
  animation: ambientFloatA 20s ease-in-out infinite;
}

.ambient-orb-b {
  top: 34%;
  right: -6vw;
  width: min(32vw, 460px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(125, 153, 179, 0.16) 0, rgba(125, 153, 179, 0.08) 38%, rgba(125, 153, 179, 0) 74%);
  animation: ambientFloatB 24s ease-in-out infinite;
}

.ambient-orb-c {
  left: 20%;
  bottom: -12vh;
  width: min(28vw, 380px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(184, 92, 56, 0.16) 0, rgba(184, 92, 56, 0.06) 42%, rgba(184, 92, 56, 0) 74%);
  animation: ambientFloatC 22s ease-in-out infinite;
}

.ambient-pointer {
  left: var(--ambient-x);
  top: var(--ambient-y);
  width: min(38vw, 520px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 248, 235, 0.82) 0, rgba(240, 220, 188, 0.48) 28%, rgba(222, 182, 112, 0.18) 46%, rgba(255, 248, 235, 0) 74%);
  filter: blur(20px);
  opacity: 0.95;
}

.ambient-ripple {
  left: calc(var(--ambient-x) + 2vw);
  top: calc(var(--ambient-y) + 1vh);
  width: min(18vw, 240px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(184, 92, 56, 0.12);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26) 0, rgba(255, 255, 255, 0) 66%);
  opacity: 0.58;
}

html[data-theme="dark"] .ambient-backdrop::before {
  background:
    radial-gradient(circle at 14% 16%, rgba(239, 181, 140, 0.12), transparent 22%),
    radial-gradient(circle at 84% 22%, rgba(124, 167, 255, 0.12), transparent 20%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 48%);
}

html[data-theme="dark"] .ambient-backdrop::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%, rgba(255, 255, 255, 0.02) 70%, transparent 100%);
  opacity: 0.52;
}

html[data-theme="dark"] .ambient-orb-a {
  background: radial-gradient(circle, rgba(213, 140, 91, 0.18) 0, rgba(213, 140, 91, 0.08) 34%, rgba(213, 140, 91, 0) 74%);
}

html[data-theme="dark"] .ambient-orb-b {
  background: radial-gradient(circle, rgba(124, 167, 255, 0.16) 0, rgba(124, 167, 255, 0.08) 40%, rgba(124, 167, 255, 0) 74%);
}

html[data-theme="dark"] .ambient-orb-c {
  background: radial-gradient(circle, rgba(240, 217, 170, 0.1) 0, rgba(240, 217, 170, 0.04) 40%, rgba(240, 217, 170, 0) 74%);
}

html[data-theme="dark"] .ambient-pointer {
  background: radial-gradient(circle, rgba(53, 70, 100, 0.52) 0, rgba(79, 110, 162, 0.24) 34%, rgba(240, 217, 170, 0.08) 52%, rgba(16, 21, 29, 0) 76%);
  opacity: 0.88;
}

html[data-theme="dark"] .ambient-ripple {
  border-color: rgba(240, 217, 170, 0.08);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0) 66%);
}

.site-shell,
.article-shell {
  position: relative;
  z-index: 1;
}

.site-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header,
.site-footer,
.hero,
.section,
.page-hero,
.about-layout,
.article-shell {
  animation: rise 0.8s ease both;
}

body,
.site-header,
.site-footer,
.site-brand small,
.site-nav a,
.theme-toggle,
.hero,
.section,
.post-card,
.notes-panel,
.about-card,
.article-shell,
.page-hero,
.notes-list div,
.hero-visual figcaption,
.button-secondary,
.article-back {
  transition:
    color 0.32s ease,
    background-color 0.32s ease,
    border-color 0.32s ease,
    box-shadow 0.32s ease;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) - 8px);
  background: var(--bg-soft);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.site-brand strong,
.site-brand small {
  display: block;
}

.site-brand strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.site-brand small {
  color: var(--muted);
  margin-top: 2px;
}

.site-brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #e4af6f);
  box-shadow: 0 0 0 8px rgba(184, 92, 56, 0.14);
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-weight: 700;
}

.site-nav a[aria-current="page"],
.site-nav a:hover,
.text-link:hover {
  color: var(--accent-deep);
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(184, 92, 56, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(247, 239, 226, 0.88));
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 18px rgba(61, 50, 36, 0.08);
  transition:
    transform 0.28s ease,
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    color 0.28s ease;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 1px solid rgba(184, 92, 56, 0.14);
  opacity: 0.9;
  transition: opacity 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px) rotate(8deg);
  border-color: rgba(184, 92, 56, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 24px rgba(61, 50, 36, 0.12);
}

.theme-toggle:hover::before {
  opacity: 1;
  transform: scale(0.96);
  border-color: rgba(184, 92, 56, 0.22);
}

.theme-toggle:focus-visible {
  outline: none;
  border-color: rgba(184, 92, 56, 0.34);
  box-shadow:
    0 0 0 4px rgba(184, 92, 56, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 24px rgba(61, 50, 36, 0.12);
}

.theme-toggle-glyph {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a7603b;
  filter: drop-shadow(0 0 8px rgba(215, 130, 79, 0.16));
}

.theme-toggle-glyph svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(25, 31, 42, 0.9), rgba(16, 21, 29, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .theme-toggle:hover {
  border-color: rgba(240, 217, 170, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 28px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .theme-toggle::before {
  border-color: rgba(240, 217, 170, 0.12);
}

html[data-theme="dark"] .theme-toggle:hover::before {
  border-color: rgba(240, 217, 170, 0.2);
}

html[data-theme="dark"] .theme-toggle:focus-visible {
  border-color: rgba(240, 217, 170, 0.3);
  box-shadow:
    0 0 0 4px rgba(124, 167, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 28px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .theme-toggle-glyph {
  color: #f0d9aa;
  filter: drop-shadow(0 0 10px rgba(124, 167, 255, 0.14));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 252, 246, 0.92), rgba(250, 243, 229, 0.82));
  border: 1px solid rgba(31, 40, 51, 0.08);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .hero {
  background: linear-gradient(135deg, rgba(19, 25, 34, 0.96), rgba(13, 18, 25, 0.88));
  border-color: rgba(255, 255, 255, 0.08);
}

.eyebrow,
.section-kicker,
.card-label,
.meta {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.77rem;
  color: var(--accent-deep);
}

.hero h1,
.section h2,
.page-hero h1,
.article-header h1 {
  margin: 10px 0 16px;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3.3rem, 8vw, 6.5rem);
  max-width: 11ch;
}

.hero-text,
.section-text,
.post-card p,
.notes-list p,
.page-hero p,
.about-card p,
.article-body p,
.article-body li {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-visual {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
  gap: 14px;
  padding-top: 0;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(41, 64, 95, 0.22);
}

.hero-visual figcaption {
  margin: 0;
  padding: 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #465663;
}

html[data-theme="dark"] .hero-visual figcaption {
  color: #c4ccd6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff9f1;
  background: linear-gradient(135deg, var(--accent), #cf7b50);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .button-secondary {
  background: rgba(255, 255, 255, 0.04);
}

.post-card,
.notes-panel,
.about-card,
.article-shell {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.section {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 251, 244, 0.72);
  border: 1px solid var(--line);
}

html[data-theme="dark"] .section {
  background: rgba(18, 24, 33, 0.78);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 20px;
  align-items: end;
}

.section h2,
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 20px;
}

.text-link {
  font-weight: 800;
  color: var(--accent);
}

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

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.archive-list li {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(31, 40, 51, 0.08);
}

html[data-theme="dark"] .archive-list li {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.archive-list a {
  display: inline-block;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}

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

.archive-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.music-dock {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.music-disc {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.3), rgba(18, 18, 22, 0.92) 55%, rgba(10, 10, 12, 0.98) 100%);
  padding: 0;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}

.music-disc-rotor {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.music-disc:hover {
  transform: translateY(-1px);
}

.music-disc:focus-visible {
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.22), var(--shadow);
}

.music-disc-groove {
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, transparent 58%, rgba(255, 255, 255, 0.08) 59%, transparent 60%),
    radial-gradient(circle at center, transparent 44%, rgba(255, 255, 255, 0.06) 45%, transparent 46%),
    radial-gradient(circle at center, transparent 30%, rgba(255, 255, 255, 0.05) 31%, transparent 32%);
  opacity: 0.55;
}

.music-disc-art {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.38), transparent 52%),
    radial-gradient(circle at 65% 70%, rgba(184, 92, 56, 0.26), transparent 55%),
    var(--music-cover, radial-gradient(circle at 40% 20%, rgba(184, 92, 56, 0.26), rgba(255, 255, 255, 0.06)));
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(31, 40, 51, 0.12);
  position: relative;
  z-index: 1;
}

.music-disc-hole {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 2px rgba(31, 40, 51, 0.12);
  z-index: 2;
}

.music-disc-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 3;
}

.music-disc-icon::before {
  content: "▶";
  font-weight: 900;
  font-size: 0.9rem;
  transform: translateX(1px);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.music-dock.is-playing .music-disc-icon::before {
  content: "Ⅱ";
  transform: none;
}

.music-dock:hover .music-disc-icon,
.music-dock:focus-within .music-disc-icon {
  opacity: 1;
}

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

.music-dock.is-playing .music-disc-rotor {
  animation: music-spin 5.6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .music-dock.is-playing .music-disc-rotor {
    animation: none;
  }
}

.music-panel {
  max-width: 0;
  min-width: 0;
  opacity: 0;
  transform: translateX(-10px);
  overflow: hidden;
  pointer-events: none;
  transition:
    max-width 0.28s ease,
    opacity 0.22s ease,
    transform 0.28s ease;
}

.music-dock:hover .music-panel,
.music-dock:focus-within .music-panel {
  max-width: min(320px, calc(100vw - 120px));
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.music-panel-inner {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  width: 320px;
  max-width: calc(100vw - 120px);
}

.music-title {
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist,
.music-status {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-controls {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.music-skip {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

html[data-theme="dark"] .music-skip {
  background: rgba(255, 255, 255, 0.06);
}

.music-skip:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 92, 56, 0.28);
  background: rgba(184, 92, 56, 0.08);
}

.music-skip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.22);
}

.music-skip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.music-skip-icon {
  font-size: 0.95rem;
  opacity: 0.88;
}

.post-card {
  border-radius: var(--radius-md);
  padding: 22px;
}

.post-card.featured {
  background: linear-gradient(180deg, rgba(248, 240, 226, 0.96), rgba(255, 251, 245, 0.86));
}

html[data-theme="dark"] .post-card.featured {
  background: linear-gradient(180deg, rgba(28, 35, 47, 0.96), rgba(18, 24, 33, 0.88));
}

.post-card h3 {
  margin: 12px 0;
  font-size: 1.5rem;
  line-height: 1.25;
}

.post-card a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 800;
  color: var(--accent);
}

.notes-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.notes-list div {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(31, 40, 51, 0.08);
}

html[data-theme="dark"] .notes-list div {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.notes-list strong,
.about-card h2 {
  font-size: 1.1rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
  padding: 18px 4px 0;
  color: var(--muted);
}

.page-main {
  margin-top: 28px;
}

.page-hero {
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

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

.about-card {
  padding: 22px;
  border-radius: var(--radius-md);
}

.article-page {
  background:
    radial-gradient(circle at top, rgba(184, 92, 56, 0.12), transparent 24%),
    linear-gradient(180deg, #f8f4ec 0%, #efe6d9 100%);
}

html[data-theme="dark"] .article-page {
  background:
    radial-gradient(circle at top, rgba(213, 140, 91, 0.12), transparent 24%),
    linear-gradient(180deg, #0d1219 0%, #151d27 100%);
}

.article-shell {
  max-width: 820px;
  margin: 28px auto 48px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.article-header h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  max-width: 10ch;
}

.article-body ul {
  padding-left: 22px;
}

.article-body code {
  padding: 0.16em 0.5em;
  border-radius: 999px;
  background: rgba(184, 92, 56, 0.1);
  color: var(--accent-deep);
  font-family: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.92em;
}

html[data-theme="dark"] .article-body code {
  background: rgba(240, 217, 170, 0.1);
  color: #f0d9aa;
}

.article-body .code-editor code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
}

.article-back {
  display: inline-flex;
  color: var(--accent);
  font-weight: 800;
}

.article-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

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

.article-pagination-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 132px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease, box-shadow 0.24s ease;
}

.article-pagination-topline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-pagination-card-next .article-pagination-topline {
  justify-content: flex-end;
}

.article-pagination-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(184, 92, 56, 0.08);
  color: var(--accent-deep);
  font-size: 0.92rem;
  line-height: 1;
  transition: transform 0.24s ease, background-color 0.24s ease;
}

.article-pagination-title {
  font-size: 1.08rem;
  line-height: 1.55;
}

.article-pagination-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  color: var(--accent-deep);
}

.article-pagination-date {
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--muted);
}

.article-pagination-card-prev {
  text-align: left;
}

.article-pagination-card-next {
  text-align: right;
}

.article-pagination a:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 92, 56, 0.28);
  background: rgba(255, 251, 244, 0.78);
  box-shadow: 0 18px 38px rgba(61, 50, 36, 0.12);
}

.article-pagination-card-prev:hover .article-pagination-arrow {
  transform: translateX(-2px);
}

.article-pagination-card-next:hover .article-pagination-arrow {
  transform: translateX(2px);
}

.article-pagination .is-disabled {
  opacity: 0.72;
  box-shadow: none;
}

html[data-theme="dark"] .article-pagination-card {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .article-pagination-arrow {
  background: rgba(240, 217, 170, 0.08);
  color: #f0d9aa;
}

html[data-theme="dark"] .article-pagination a:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.code-editor {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.92), rgba(248, 241, 230, 0.88));
}

.code-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(31, 40, 51, 0.08);
  background: rgba(255, 255, 255, 0.36);
}

.code-editor-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-editor-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.code-editor-dot-red {
  background: #ef8f76;
}

.code-editor-dot-yellow {
  background: #e9c46a;
}

.code-editor-dot-green {
  background: #7fb18a;
}

.code-editor-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-family: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.82rem;
  color: var(--muted);
}

.code-editor-language {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(184, 92, 56, 0.1);
  color: var(--accent-deep);
  font-weight: 700;
}

.code-editor-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 40, 51, 0.12);
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-family: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.code-editor-copy:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 92, 56, 0.28);
  background: rgba(184, 92, 56, 0.08);
  color: var(--accent-deep);
}

.code-editor-copy:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.22);
  border-color: rgba(184, 92, 56, 0.34);
}

.code-editor-copy:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

.code-editor-copy.is-copied {
  border-color: rgba(184, 92, 56, 0.32);
  background: rgba(184, 92, 56, 0.12);
  color: var(--accent-deep);
}

.code-editor-copy.is-error {
  border-color: rgba(239, 143, 118, 0.45);
  background: rgba(239, 143, 118, 0.12);
  color: #8d1d14;
}

.code-editor-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  overflow-x: auto;
  background: linear-gradient(180deg, #0e151f, #111926);
}

.code-editor-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  padding: 18px 12px 18px 16px;
  background: rgba(6, 10, 15, 0.34);
  color: #70839a;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.9;
  user-select: none;
}

.code-editor-lines span,
.code-editor-code span {
  display: block;
  min-height: 1.9em;
}

.code-editor-code {
  margin: 0;
  padding: 18px 20px;
  color: #eaf2fb;
  font-family: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.9;
}

.code-editor-content {
  display: block;
}

.code-editor-code span {
  white-space: pre;
}

html[data-theme="dark"] .code-editor {
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.96), rgba(13, 18, 25, 0.92));
}

html[data-theme="dark"] .code-editor-bar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .code-editor-language {
  background: rgba(240, 217, 170, 0.08);
  color: #f0d9aa;
}

html[data-theme="dark"] .code-editor-copy {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .code-editor-copy:hover {
  border-color: rgba(240, 217, 170, 0.24);
  background: rgba(240, 217, 170, 0.08);
  color: #f0d9aa;
}

html[data-theme="dark"] .code-editor-copy:focus-visible {
  box-shadow: 0 0 0 3px rgba(124, 167, 255, 0.16);
}

html[data-theme="dark"] .code-editor-copy.is-copied {
  border-color: rgba(240, 217, 170, 0.28);
  background: rgba(240, 217, 170, 0.1);
  color: #f0d9aa;
}

html[data-theme="dark"] .code-editor-copy.is-error {
  border-color: rgba(239, 143, 118, 0.45);
  background: rgba(239, 143, 118, 0.1);
  color: #ffb4a5;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ambientFloatA {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(3vw, 2vh, 0) scale(1.06);
  }
}

@keyframes ambientFloatB {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-2vw, -3vh, 0) scale(0.96);
  }
}

@keyframes ambientFloatC {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2vw, -2vh, 0) scale(1.04);
  }
}

@media (max-width: 900px) {
  .hero,
  .section-intro,
  .notes-panel,
  .about-layout,
  .post-grid,
  .notes-list {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer,
  .section-heading,
  .header-actions,
  .article-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero h1,
  .article-header h1 {
    max-width: none;
  }

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

  .article-pagination-card-next {
    text-align: left;
  }

  .article-pagination-card-next .article-pagination-topline {
    justify-content: flex-start;
  }

  .ambient-orb-a {
    width: min(58vw, 620px);
  }

  .ambient-orb-b {
    width: min(44vw, 460px);
  }

  .ambient-pointer {
    width: min(52vw, 520px);
  }

  .hero-visual img {
    aspect-ratio: 16 / 11;
  }

  .hero-visual {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .site-header,
  .site-footer,
  .site-brand small,
  .site-nav a,
  .theme-toggle,
  .hero,
  .section,
  .post-card,
  .notes-panel,
  .about-card,
  .article-shell,
  .page-hero,
  .notes-list div,
  .hero-visual figcaption,
  .button-secondary,
  .article-back,
  .ambient-pointer,
  .ambient-ripple {
    transition: none;
  }

  .ambient-orb {
    animation: none;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 14px;
  }

  .site-header,
  .hero,
  .section,
  .page-hero,
  .article-shell {
    padding: 20px;
    border-radius: 24px;
  }

  .site-nav {
    gap: 14px;
  }

  .ambient-orb-a {
    width: 78vw;
    left: -20vw;
  }

  .ambient-orb-b {
    width: 58vw;
    right: -16vw;
  }

  .ambient-orb-c {
    width: 52vw;
    left: 8%;
    bottom: -10vh;
  }

  .ambient-pointer {
    width: 68vw;
  }

  .ambient-ripple {
    width: 28vw;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 13vw, 4.5rem);
  }

  .section h2,
  .page-hero h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }
}
