:root {
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 150ms;
  --duration-instant: 120ms;
  --accent: #0391FF;
  --accent-hover: #4db4ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #FCFCFC;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', sans-serif;
  font-size: 14px;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  color: rgba(0, 0, 0, 0.45);
  -webkit-font-smoothing: antialiased;
}

.main {
  max-width: 582px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 57px 24px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Theme toggle */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color var(--duration-instant) var(--ease-out), background var(--duration-instant) var(--ease-out);
  z-index: 5;
}

.theme-toggle:hover {
  color: rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.04);
}

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

:root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }

.content {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.header > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header .avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}

.header .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transform: scale(1.15);
  transform-origin: center 30%;
  image-rendering: -webkit-optimize-contrast;
}

.header h1 {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
}

.header p {
  color: rgba(0, 0, 0, 0.45);
}

.header .role-line {
  color: rgba(0, 0, 0, 0.55);
  font-weight: 500;
}

.intro p {
  color: rgba(0, 0, 0, 0.6);
}

.intro p + p {
  padding-top: 14px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  transition: color var(--duration-instant) var(--ease-out);
}

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

.work + .work {
  margin-top: -18px;
}

.work h2 {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  padding-bottom: 6px;
}

.work .lede {
  color: rgba(0, 0, 0, 0.5);
  padding-bottom: 18px;
}

.work ul {
  list-style: none;
}

.work li {
  transition: opacity var(--duration-fast) var(--ease-out);
  padding: 11px 0;
}

.work ul:has(a.row:hover) li {
  opacity: 0.3;
}

.work ul:has(a.row:hover) li:has(a.row:hover) {
  opacity: 1;
}

.work .row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

div.row {
  cursor: default;
}

.work li + li {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.work li:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.work .company {
  color: #000;
  flex-shrink: 0;
}

.work a.row:hover .company {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.work .role {
  color: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
}

.work .period {
  color: rgba(0, 0, 0, 0.25);
  margin-left: auto;
  flex-shrink: 0;
}

.work .proj-desc {
  color: rgba(0, 0, 0, 0.55);
  padding-top: 6px;
  font-size: 13px;
  line-height: 20px;
  white-space: normal;
}

.work .proj-desc + .proj-desc {
  padding-top: 4px;
}

.footer {
  margin-top: auto;
  padding-top: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.footer p {
  font-size: 12px;
  line-height: 18.6px;
  letter-spacing: 0;
  color: rgba(0, 0, 0, 0.25);
}

.footer .details {
  position: relative;
  cursor: default;
  transition: color var(--duration-instant) var(--ease-out);
}

.footer .details:hover {
  color: rgba(0, 0, 0, 0.45);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.footer .tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 18.6px;
  color: rgba(0, 0, 0, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transform-origin: center bottom;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.footer .details:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.footer .clock {
  font-variant-numeric: tabular-nums;
}

/* Tabs */
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  margin-top: -20px;
}

.tabs a {
  color: rgba(0, 0, 0, 0.55);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  transition: color var(--duration-instant) var(--ease-out);
}

.tabs a:hover {
  color: #000;
}

.tabs a.active {
  color: #B34A1F;
  font-weight: 500;
}

.tabs .sep {
  color: rgba(0, 0, 0, 0.35);
  user-select: none;
}

/* About */
.about h2 {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  padding-bottom: 12px;
}

.about p {
  color: rgba(0, 0, 0, 0.6);
}

.about p + p {
  padding-top: 14px;
}

.about .mini-h {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  margin-top: 24px;
  padding-bottom: 4px;
}

.about .mini-h + .resume-line {
  padding-top: 0;
}

.about .resume-line + p {
  padding-top: 20px;
}

/* Empty / placeholder pages */
.empty h2 {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  padding-bottom: 12px;
}

.empty p {
  color: rgba(0, 0, 0, 0.45);
}

/* Cool stuff feed */
.cool h2 {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  padding-bottom: 6px;
}

.cool .lede {
  color: rgba(0, 0, 0, 0.45);
  padding-bottom: 24px;
}

.cool .post {
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cool .post:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cool .post-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
}

.cool .post-head h3 {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
}

.cool .post-head time {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.35);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.cool .post-body p {
  color: rgba(0, 0, 0, 0.6);
}

.cool .post-body p + p {
  padding-top: 8px;
}

.cool .post-media {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cool .post-media figure {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f2f0ec;
  aspect-ratio: 4 / 5;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 6px 18px rgba(0, 0, 0, 0.06);
}

.cool .post-media img,
.cool .post-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cool .post-media .post-video {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  background: #000;
}

.cool .post-media .post-video video {
  object-fit: contain;
  background: #000;
}

.cool .post-media:not(:has(.post-video)) figure:nth-child(3):last-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

@media (max-width: 520px) {
  .cool .post-media {
    grid-template-columns: 1fr;
  }
}

/* Books page */
.books-page h2 {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  padding-bottom: 6px;
}

.books-page .lede {
  color: rgba(0, 0, 0, 0.45);
  padding-bottom: 28px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}

.book {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.book .cover {
  display: block;
  aspect-ratio: 2 / 3;
  background: #f2f0ec;
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform var(--duration-fast) var(--ease-out);
}

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

.book .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book .title {
  color: #000;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.15px;
}

.book .author {
  color: rgba(0, 0, 0, 0.45);
  font-size: 13px;
}

.book .status {
  margin-top: 6px;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
}

.book .status-reading {
  color: #B34A1F;
  background: rgba(179, 74, 31, 0.08);
}

.book .status-next {
  color: #866300;
  background: rgba(184, 138, 6, 0.08);
}

.book .status-read {
  color: rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 520px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* =========================
   The wall (cool-stuff page)
   ========================= */

:root {
  --wall-cream: #f5eee0;
  --wall-ink: #2b1a20;
  --wall-ink-soft: #6d5a5f;
  --wall-outline: #2b1a20;
  --wall-pink: #f8c8d5;
  --wall-yellow: #f5c445;
  --wall-teal: #b8ecd8;
  --wall-peach: #fce6c9;
  --wall-green: #2e6a55;
  --wall-cream-card: #fffbf0;
  --wall-hot: #e13f7a;
}

body.cool-page {
  background: var(--wall-cream);
  color: var(--wall-ink);
  background-image:
    radial-gradient(rgba(43, 26, 32, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

body.cool-page .main {
  max-width: 960px;
}

body.cool-page .header h1,
body.cool-page .header p,
body.cool-page .header .role-line,
body.cool-page .tabs a,
body.cool-page .tabs .sep,
body.cool-page .footer p {
  color: var(--wall-ink);
}

body.cool-page .header p {
  color: rgba(43, 26, 32, 0.6);
}

body.cool-page .header .role-line {
  color: rgba(43, 26, 32, 0.7);
}

body.cool-page .tabs a {
  color: rgba(43, 26, 32, 0.65);
}

body.cool-page .tabs a:hover {
  color: var(--wall-ink);
}

body.cool-page .tabs a.active {
  color: var(--wall-hot);
}

body.cool-page .footer p {
  color: rgba(43, 26, 32, 0.5);
}

.wall {
  padding-top: 8px;
}

.wall-hero {
  position: relative;
  text-align: center;
  padding: 40px 0 24px;
}

.wall-title {
  font-family: 'Bagel Fat One', 'Fraunces', ui-serif, serif;
  font-weight: 400;
  font-size: clamp(64px, 12vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--wall-ink);
  text-shadow: 4px 4px 0 rgba(43, 26, 32, 0.08);
}

.wall-lede {
  max-width: 480px;
  margin: 14px auto 0;
  color: var(--wall-ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.wall-sparkle {
  position: absolute;
  font-size: 20px;
  color: var(--wall-ink);
  opacity: 0.55;
  pointer-events: none;
}

.wall-sparkle-a { top: 24px; left: 8%; font-size: 24px; }
.wall-sparkle-b { top: 12%; right: 6%; font-size: 18px; }
.wall-sparkle-c { bottom: 24px; left: 12%; font-size: 16px; }

.sticker {
  position: absolute;
  padding: 6px 12px;
  font-family: 'Bagel Fat One', system-ui, sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--wall-ink);
  background: #fff;
  border: 2px solid var(--wall-outline);
  border-radius: 999px;
  box-shadow: 3px 3px 0 rgba(43, 26, 32, 0.15);
  white-space: nowrap;
}

.sticker-a { top: 4px; left: 6%; background: var(--wall-peach); transform: rotate(-6deg); }
.sticker-b { top: 40px; right: 8%; background: var(--wall-teal); transform: rotate(5deg); }
.sticker-c { bottom: 12px; right: 14%; background: var(--wall-pink); transform: rotate(-3deg); }

@media (max-width: 640px) {
  .sticker-b { top: 8px; right: 4%; }
  .sticker-c { display: none; }
}

.wall-marquee {
  margin: 28px -24px 24px;
  padding: 12px 0;
  background: var(--wall-yellow);
  border-top: 2px solid var(--wall-outline);
  border-bottom: 2px solid var(--wall-outline);
  overflow: hidden;
  transform: rotate(-1.2deg);
}

.wall-marquee-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: wall-marquee 28s linear infinite;
  font-family: 'Bagel Fat One', system-ui, sans-serif;
  font-size: 20px;
  color: var(--wall-ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wall-marquee-track span {
  flex-shrink: 0;
  padding-right: 8px;
}

@keyframes wall-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.wall-count-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 24px;
}

.wall-count {
  padding: 6px 16px;
  background: #fff;
  border: 2px solid var(--wall-outline);
  border-radius: 999px;
  font-family: 'Bagel Fat One', system-ui, sans-serif;
  font-size: 13px;
  color: var(--wall-ink);
}

.wall-grid {
  column-gap: 20px;
  column-count: 1;
}

@media (min-width: 640px) {
  .wall-grid { column-count: 2; }
}

@media (min-width: 900px) {
  .wall-grid { column-count: 3; }
}

.wall-card {
  break-inside: avoid;
  position: relative;
  margin: 18px 0;
  padding: 22px 20px 18px;
  border: 2px solid var(--wall-outline);
  border-radius: 18px;
  box-shadow: 4px 5px 0 rgba(43, 26, 32, 0.16);
  color: var(--wall-ink);
  transition: transform 180ms cubic-bezier(0.25, 1, 0.5, 1), box-shadow 180ms cubic-bezier(0.25, 1, 0.5, 1);
}

.wall-card:hover {
  transform: translate(-1px, -3px) rotate(-0.4deg);
  box-shadow: 6px 8px 0 rgba(43, 26, 32, 0.2);
}

.wall-card--pink   { background: var(--wall-pink); }
.wall-card--yellow { background: var(--wall-yellow); }
.wall-card--teal   { background: var(--wall-teal); }
.wall-card--peach  { background: var(--wall-peach); }
.wall-card--cream  { background: var(--wall-cream-card); }
.wall-card--green  { background: var(--wall-green); color: #f5efe0; }

.wall-card--green .wall-card-eyebrow,
.wall-card--green p { color: #f5efe0; }

/* Featured build card (AFTERHOURS) — full-width in the grid, Midnight Moonshot palette */
body.cool-page .wall-card--feature {
  column-span: all;
  display: block;
  text-decoration: none;
  color: #f5f0e2;
  background:
    radial-gradient(ellipse 90% 55% at 50% 108%, rgba(74, 222, 128, 0.42) 0%, rgba(74, 222, 128, 0.12) 40%, transparent 62%),
    radial-gradient(circle at 16% 18%, rgba(74, 222, 128, 0.08), transparent 42%),
    linear-gradient(180deg, #05050a 0%, #070a08 100%);
  padding: 38px 30px 30px;
  box-shadow: 6px 8px 0 rgba(43, 26, 32, 0.26);
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

body.cool-page .wall-card--feature:hover { color: #f5f0e2; }

body.cool-page .wall-card--feature::before,
body.cool-page .wall-card--feature::after {
  content: "\2726";
  position: absolute;
  color: #4ade80;
  opacity: 0.55;
  pointer-events: none;
}

body.cool-page .wall-card--feature::before { top: 60px; right: 22px; font-size: 14px; }
body.cool-page .wall-card--feature::after  { bottom: 110px; left: 18px; font-size: 11px; }

body.cool-page .wall-card--feature .wall-card-num {
  background: #4ade80;
  color: #05050a;
  font-size: 18px;
  width: 40px;
  height: 40px;
}

body.cool-page .wall-card--feature .wall-card-eyebrow {
  color: rgba(245, 240, 226, 0.65);
  padding-top: 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.cool-page .wall-card--feature h3 {
  color: #ffffff;
  font-family: 'Bagel Fat One', system-ui, sans-serif;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  padding: 6px 0 12px;
  text-shadow: 3px 4px 0 rgba(0, 0, 0, 0.4);
}

body.cool-page .wall-card--feature .wall-card-tagline {
  font-family: 'Fraunces', ui-serif, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.25;
  color: #4ade80;
  padding-bottom: 14px;
  max-width: 640px;
}

body.cool-page .wall-card--feature p {
  color: rgba(245, 240, 226, 0.9);
  font-size: 15px;
  line-height: 1.6;
  max-width: 640px;
}

body.cool-page .wall-card--feature .wall-mention {
  color: #4ade80;
  font-weight: 600;
}

body.cool-page .wall-card--feature .wall-card-imgs {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 20px;
}

body.cool-page .wall-card--feature .wall-card-imgs img {
  border-color: rgba(245, 240, 226, 0.9);
  background: #0a0d0b;
  aspect-ratio: 1 / 1;
}

body.cool-page .wall-card--feature .wall-dashed {
  border-top-color: rgba(245, 240, 226, 0.25);
  margin-top: 18px;
}

body.cool-page .wall-card--feature .wall-card-foot .handle {
  background: #4ade80;
  color: #05050a;
  font-size: 13px;
  padding: 8px 16px;
  box-shadow: 2px 2px 0 rgba(43, 26, 32, 0.3);
}

body.cool-page .wall-card--feature:hover .handle {
  transform: translate(-1px, -2px);
  box-shadow: 4px 4px 0 rgba(43, 26, 32, 0.35);
}

@media (max-width: 640px) {
  body.cool-page .wall-card--feature { padding: 32px 22px 24px; }
  body.cool-page .wall-card--feature .wall-card-imgs {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================
   Dark mode
   ========================= */

:root[data-theme="dark"] body {
  background: #0e0e10;
  color: rgba(245, 240, 226, 0.6);
}

:root[data-theme="dark"] .header h1 { color: #f5f0e2; }
:root[data-theme="dark"] .header p { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] .header .role-line { color: rgba(245, 240, 226, 0.7); }

:root[data-theme="dark"] .tabs a { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] .tabs a:hover { color: #f5f0e2; }
:root[data-theme="dark"] .tabs a.active { color: #ff9558; }
:root[data-theme="dark"] .tabs .sep { color: rgba(245, 240, 226, 0.3); }

:root[data-theme="dark"] .intro p { color: rgba(245, 240, 226, 0.75); }

:root[data-theme="dark"] a { color: #74baff; }
:root[data-theme="dark"] a:hover { color: #a7d3ff; }

:root[data-theme="dark"] .work h2 { color: #f5f0e2; }
:root[data-theme="dark"] .work .lede { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] .work .company { color: #f5f0e2; }
:root[data-theme="dark"] .work .role { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] .work .period { color: rgba(245, 240, 226, 0.35); }
:root[data-theme="dark"] .work li + li { border-top-color: rgba(245, 240, 226, 0.1); }
:root[data-theme="dark"] .work li:last-child { border-bottom-color: rgba(245, 240, 226, 0.1); }
:root[data-theme="dark"] .work .row-desc,
:root[data-theme="dark"] .work .proj-desc { color: rgba(245, 240, 226, 0.55); }

:root[data-theme="dark"] .about h2 { color: #f5f0e2; }
:root[data-theme="dark"] .about p { color: rgba(245, 240, 226, 0.75); }
:root[data-theme="dark"] .about .mini-h { color: #f5f0e2; }

:root[data-theme="dark"] .empty h2 { color: #f5f0e2; }
:root[data-theme="dark"] .empty p { color: rgba(245, 240, 226, 0.6); }

:root[data-theme="dark"] .books-page h2 { color: #f5f0e2; }
:root[data-theme="dark"] .books-page .lede { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] .book .cover {
  background: #1c1c1f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.4);
}
:root[data-theme="dark"] .book .title { color: #f5f0e2; }
:root[data-theme="dark"] .book .author { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] .book .status {
  color: rgba(245, 240, 226, 0.6);
  background: rgba(245, 240, 226, 0.08);
}
:root[data-theme="dark"] .book .status-reading {
  color: #ff9558;
  background: rgba(255, 149, 88, 0.14);
}
:root[data-theme="dark"] .book .status-next {
  color: #f5c445;
  background: rgba(245, 196, 69, 0.14);
}
:root[data-theme="dark"] .book .status-read {
  color: rgba(245, 240, 226, 0.5);
  background: rgba(245, 240, 226, 0.06);
}

:root[data-theme="dark"] .footer p { color: rgba(245, 240, 226, 0.35); }
:root[data-theme="dark"] .footer .details:hover { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] .footer .tooltip {
  background: #1c1c1f;
  border-color: rgba(245, 240, 226, 0.12);
  color: rgba(245, 240, 226, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .theme-toggle { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] .theme-toggle:hover {
  color: #f5f0e2;
  background: rgba(245, 240, 226, 0.06);
}

/* Wall page in dark mode: deepen background, keep the sticker cards popping */
:root[data-theme="dark"] body.cool-page {
  background: #0a0a0c;
  color: rgba(245, 240, 226, 0.65);
  background-image: radial-gradient(rgba(245, 240, 226, 0.04) 1px, transparent 1px);
}
:root[data-theme="dark"] body.cool-page .header h1 { color: #f5f0e2; }
:root[data-theme="dark"] body.cool-page .header p { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] body.cool-page .header .role-line { color: rgba(245, 240, 226, 0.7); }
:root[data-theme="dark"] body.cool-page .tabs a { color: rgba(245, 240, 226, 0.55); }
:root[data-theme="dark"] body.cool-page .tabs a:hover { color: #f5f0e2; }
:root[data-theme="dark"] body.cool-page .tabs a.active { color: #ff9558; }
:root[data-theme="dark"] body.cool-page .tabs .sep { color: rgba(245, 240, 226, 0.3); }
:root[data-theme="dark"] body.cool-page .footer p { color: rgba(245, 240, 226, 0.4); }
:root[data-theme="dark"] body.cool-page .theme-toggle { color: rgba(245, 240, 226, 0.55); }

:root[data-theme="dark"] .wall-title {
  color: #f5f0e2;
  text-shadow: 4px 4px 0 rgba(245, 240, 226, 0.06);
}
:root[data-theme="dark"] .wall-lede { color: rgba(245, 240, 226, 0.6); }
:root[data-theme="dark"] .wall-sparkle { color: rgba(245, 240, 226, 0.5); }
:root[data-theme="dark"] .wall-count {
  background: #1a1a1e;
  color: #f5f0e2;
  border-color: rgba(245, 240, 226, 0.35);
}
:root[data-theme="dark"] .wall-outro { color: rgba(245, 240, 226, 0.55); }

:root[data-theme="dark"] .wall-card {
  border-color: rgba(245, 240, 226, 0.35);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.45);
}
:root[data-theme="dark"] .wall-card:hover {
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.55);
}
:root[data-theme="dark"] .wall-card-num,
:root[data-theme="dark"] .wall-card-foot .handle {
  border-color: rgba(245, 240, 226, 0.35);
}

.wall-card-date {
  position: absolute;
  top: -12px;
  left: 16px;
  padding: 4px 12px;
  background: var(--wall-cream-card);
  border: 2px solid var(--wall-outline);
  border-radius: 999px;
  font-family: 'Bagel Fat One', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--wall-ink);
  z-index: 2;
}

.wall-card-num {
  position: absolute;
  top: -14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--wall-cream-card);
  border: 2px solid var(--wall-outline);
  border-radius: 50%;
  font-family: 'Bagel Fat One', system-ui, sans-serif;
  font-size: 12px;
  color: var(--wall-ink);
  z-index: 2;
}

.wall-card-eyebrow {
  font-size: 12px;
  color: rgba(43, 26, 32, 0.6);
  letter-spacing: 0.02em;
  padding-top: 6px;
}

.wall-card h3 {
  font-family: 'Bagel Fat One', 'Fraunces', ui-serif, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  color: inherit;
  padding: 4px 0 12px;
  letter-spacing: -0.005em;
}

.wall-card p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(43, 26, 32, 0.82);
}

.wall-card p a {
  color: var(--wall-hot);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.wall-card--green p a { color: #f7c3d4; }

.wall-card p a:hover { opacity: 0.85; }

.wall-card-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 14px;
}

.wall-card-imgs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border: 2px solid var(--wall-outline);
  border-radius: 8px;
  background: var(--wall-cream-card);
}

.wall-card-imgs img:nth-child(3):last-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

.wall-card-imgs--2 {
  grid-template-columns: 1fr 1fr;
}

.wall-card-imgs--2 img {
  aspect-ratio: 4 / 3;
}

.wall-card-imgs--4 {
  grid-template-columns: 1fr 1fr;
}

.wall-card-imgs--4 img {
  aspect-ratio: 1 / 1;
}

.wall-dashed {
  border: none;
  border-top: 2px dashed rgba(43, 26, 32, 0.35);
  margin: 14px 0 12px;
}

.wall-card--green .wall-dashed {
  border-top-color: rgba(245, 239, 224, 0.4);
}

.wall-card-foot {
  display: flex;
  justify-content: flex-end;
}

.wall-card-foot .handle {
  padding: 4px 12px;
  background: var(--wall-cream-card);
  border: 2px solid var(--wall-outline);
  border-radius: 999px;
  font-family: 'Bagel Fat One', system-ui, sans-serif;
  font-size: 11px;
  color: var(--wall-ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: transform 150ms cubic-bezier(0.25, 1, 0.5, 1);
}

.wall-card-foot .handle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 rgba(43, 26, 32, 0.2);
}

.wall-outro {
  text-align: center;
  margin: 34px 0 8px;
  color: var(--wall-ink-soft);
  font-size: 14px;
}

.wall-outro a {
  color: var(--wall-hot);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .wall-marquee-track { animation: none; }
  .wall-card:hover { transform: none; }
}
