:root {
  --bg: #f7f5f0;
  --paper: #ffffff;
  --ink: #161616;
  --muted: #6f6f6f;
  --line: #e6e1d8;
  --accent: #2b5f4d;
  --accent-2: #9d6b3d;
  --header-bg: rgba(247, 245, 240, 0.82);
  --glow-1: rgba(157, 107, 61, 0.08);
  --glow-2: rgba(43, 95, 77, 0.08);
  --maxw: 960px;
}

:root[data-theme="dark"] {
  --bg: #121417;
  --paper: #1b1f25;
  --ink: #eceff3;
  --muted: #a4adb8;
  --line: #343b45;
  --accent: #88c7ae;
  --accent-2: #c5966f;
  --header-bg: rgba(18, 20, 23, 0.84);
  --glow-1: rgba(197, 150, 111, 0.12);
  --glow-2: rgba(136, 199, 174, 0.11);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 520px at 110% -8%, var(--glow-1), transparent 60%),
    radial-gradient(900px 420px at -10% 0%, var(--glow-2), transparent 62%),
    var(--bg);
  color: var(--ink);
}

body {
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", serif;
  line-height: 1.72;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  z-index: 8;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand {
  letter-spacing: 0.12em;
  font-size: 3rem;
  font-weight: bolder;
  text-transform: uppercase;
  /* text-emphasis: "😊"; */
}

.menu {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: var(--muted);
}

.menu a {
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}

.menu-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main {
  padding: 26px 0 52px;
}

.hero {
  /* background: var(--paper); */
  /* border: 1px solid var(--line); */
  padding: 14px;
  border-bottom: 1px solid var(--line);
  margin: 24px 0;
}

.hero-main {
  display: grid;
  grid-template-columns:1fr 1fr;
  gap: 22px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
  padding: 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.3vw, 3rem);
  line-height: 1.16;
  letter-spacing: 0.02em;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
}

.hero-links {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 1.05rem;
}

.hero-links a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-links a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-photo-wrap {
  /* width: 180px; */
  /* height: 180px; */
  /* border-radius: 24px; */
  overflow: hidden;
  /* border: 1px solid var(--line); */
  background: linear-gradient(140deg, #ece5d8, #ddd3c1);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.08);
}

.post-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #efefef;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-body {
  padding: 14px 14px 16px;
}

.post-title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}

.meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.87rem;
}

.home-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-card {
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.08);
}

.home-card-cover {
  aspect-ratio: 16 / 10;
}

.home-cover {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  background: #e9e3d8;
}

.home-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.home-cover-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  color: #f7f5f0;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0) 0%, rgba(8, 8, 8, 0.82) 100%);
}

.home-card-cover:hover .home-cover img {
  transform: scale(1.04);
}

.home-card-text .home-body {
  padding: 14px 14px 16px;
}

.home-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.34;
}

.home-title a {
  color: inherit;
}

.home-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.home-cover-layer .home-meta {
  color: rgba(247, 245, 240, 0.92);
}

.home-summary {
  margin: 8px 0 0;
  color: #4f4a43;
  font-size: 0.9rem;
  line-height: 1.55;
}

.home-pager {
  margin: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* border-top: 1px solid var(--line); */
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-pager a {
  color: var(--ink);
}

.home-pager span {
  opacity: 0.55;
}

/* Home motion layer (layout-preserving) */
.hero-main .hero-photo-wrap,
.hero-main .hero-copy {
  opacity: 0;
  animation: home-fade-up 0.56s ease forwards;
}

.hero-main .hero-photo-wrap {
  animation-delay: 0.04s;
}

.hero-main .hero-copy {
  animation-delay: 0.12s;
}

.hero-photo {
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s ease;
}

.hero-photo-wrap:hover .hero-photo {
  transform: scale(1.03);
  filter: saturate(1.05);
}

.hero-links a i {
  transition: transform 0.2s ease;
}

.hero-links a:hover i {
  transform: translateY(-1px) scale(1.08);
}

.home-grid .home-card {
  opacity: 0;
  transform: translateY(10px);
  animation: home-fade-up 0.52s ease forwards;
}

.home-grid .home-card:nth-child(1) { animation-delay: 0.06s; }
.home-grid .home-card:nth-child(2) { animation-delay: 0.1s; }
.home-grid .home-card:nth-child(3) { animation-delay: 0.14s; }
.home-grid .home-card:nth-child(4) { animation-delay: 0.18s; }
.home-grid .home-card:nth-child(5) { animation-delay: 0.22s; }
.home-grid .home-card:nth-child(6) { animation-delay: 0.26s; }
.home-grid .home-card:nth-child(7) { animation-delay: 0.3s; }
.home-grid .home-card:nth-child(8) { animation-delay: 0.34s; }

.home-card .home-title a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.22s ease, color 0.22s ease;
}

.home-card:hover .home-title a {
  background-size: 100% 1px;
}

@keyframes home-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* 
@media (prefers-reduced-motion: reduce) {
  .hero-main .hero-photo-wrap,
  .hero-main .hero-copy,
  .home-grid .home-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-photo,
  .hero-links a i,
  .home-card,
  .home-cover img,
  .home-card .home-title a {
    transition: none !important;
  }
} */

.list-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.list-card {
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
}

.list-card-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(170deg, #f2ede3, #e8e1d2);
  color: inherit;
}

.list-card-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease, filter 0.3s ease;
}

.list-card-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0) 0%, rgba(20, 20, 20, 0.82) 100%);
  color: #f7f5f0;
}

.list-card.no-cover .list-card-layer {
  top: 0;
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.22));
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.list-card-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.32;
}

.list-card-title a {
  color: inherit;
}

.list-card-title a:hover {
  color: #ffffff;
}

.list-card-meta {
  margin-top: 6px;
  font-size: 0.75rem;
  font-family: "JetBrains Mono", "Consolas", monospace;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  opacity: 0.95;
}

.list-card-meta a {
  color: inherit;
  border-bottom: 1px solid rgba(247, 245, 240, 0.55);
}

.list-card-meta a:hover {
  border-bottom-color: #ffffff;
}

.list-card.has-cover:hover .list-card-cover {
  transform: scale(1.05);
  filter: saturate(1.08);
}

.list-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.content {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 26px;
}

.content h1,
.content h2,
.content h3 {
  line-height: 1.32;
}

.content img {
  max-width: 100%;
  height: auto;
}

.content pre,
.content code {
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.content pre {
  overflow-x: auto;
  background: #111;
  color: #e7e7e7;
  padding: 12px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 30px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 840px) {
  .site-nav {
    position: relative;
  }

  .brand {
    letter-spacing: 0.12em;
    font-size: 1.2rem;
    }

  .menu-toggle {
    display: inline-flex;
  }

  .menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(260px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    z-index: 30;
  }

  .menu.is-open {
    display: flex;
  }

  .menu a,
  .menu .theme-toggle {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    text-align: center;
  }

  .menu .theme-toggle {
    justify-content: center;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .hero-main {
    grid-template-columns: 1fr;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .list-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .content {
    padding: 18px;
  }
}

@media (max-width: 680px) {
  .home-pager {
    gap: 8px;
    flex-wrap: wrap;
  }

  .list-card-grid {
    grid-template-columns: 1fr;
  }
}

.photo-stage {
  position: relative;
  margin: 0 0 28px;
  border: 1px solid #d5cec1;
  background: linear-gradient(145deg, #fdfcf8, #f2ede3 52%, #e7dfd0);
  padding: 22px;
  overflow: hidden;
}

.photo-stage-glow {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 95, 77, 0.22), rgba(43, 95, 77, 0) 70%);
  pointer-events: none;
}

.photo-stage-head {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.photo-kicker {
  margin: 0;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  text-transform: uppercase;
  color: #5d6257;
}

.photo-stage h1 {
  margin: 6px 0 8px;
  font-size: clamp(2.1rem, 5vw, 4.3rem);
  line-height: 1;
}

.photo-intro {
  margin: 0;
  color: #544d44;
  max-width: 56ch;
}

.photo-stat {
  margin: 14px 0 0;
  font-family: "JetBrains Mono", "Consolas", monospace;
  color: #7a4f2d;
}

.photo-collage {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, 130px);
  gap: 10px;
}

.collage-item {
  border: 1px solid #dfd6c6;
  overflow: hidden;
  background: #e6ded0;
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c1 { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.c2 { grid-column: 3 / span 2; grid-row: 1 / span 1; }
.c3 { grid-column: 5 / span 2; grid-row: 1 / span 1; }
.c4 { grid-column: 3 / span 2; grid-row: 2 / span 1; }
.c5 { grid-column: 5 / span 2; grid-row: 2 / span 1; }

.photo-stream {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 14px;
  margin-bottom: 30px;
}

.stream-card {
  grid-column: span 4;
  border: 1px solid #ddd4c5;
  background: #fff;
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  animation: stream-in 0.5s ease forwards;
}

.stream-card:nth-child(2n) { animation-delay: 0.05s; }
.stream-card:nth-child(3n) { animation-delay: 0.1s; }
.stream-card:nth-child(4n) { animation-delay: 0.15s; }

.stream-card.wide { grid-column: span 8; }
.stream-card.wide-right { grid-column: 5 / span 8; }
.stream-card.tall .stream-cover { aspect-ratio: 3 / 4; }

.stream-cover {
  display: block;
  aspect-ratio: 5 / 4;
  background: #ece5d9;
}

.stream-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stream-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #746a5d;
}

.stream-meta {
  padding: 10px 12px 12px;
}

.stream-meta p {
  margin: 0 0 4px;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.75rem;
  color: #7f7568;
}

.stream-meta h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.33;
}

@keyframes stream-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .photo-collage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, 110px);
  }

  .c1 { grid-column: 1 / span 4; grid-row: 1 / span 1; }
  .c2 { grid-column: 1 / span 2; grid-row: 2 / span 1; }
  .c3 { grid-column: 3 / span 2; grid-row: 2 / span 1; }
  .c4 { grid-column: 1 / span 2; grid-row: 3 / span 1; }
  .c5 { grid-column: 3 / span 2; grid-row: 3 / span 1; }

  .stream-card { grid-column: span 6; }
  .stream-card.wide { grid-column: span 12; }
  .stream-card.wide-right { grid-column: span 12; }
}

@media (max-width: 680px) {
  .photo-stage {
    padding: 16px;
  }

  .photo-stage h1 {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }

  .photo-collage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 92px);
  }

  .c1 { grid-column: 1 / span 2; grid-row: 1 / span 1; }
  .c2 { grid-column: 1 / span 1; grid-row: 2 / span 1; }
  .c3 { grid-column: 2 / span 1; grid-row: 2 / span 1; }
  .c4 { grid-column: 1 / span 1; grid-row: 3 / span 1; }
  .c5 { grid-column: 2 / span 1; grid-row: 3 / span 1; }

  .photo-stream {
    grid-template-columns: 1fr;
  }

  .stream-card,
  .stream-card.wide,
  .stream-card.tall {
    grid-column: span 1;
  }
}

/* Re-designed photograph page: structured layout inspired by original site rhythm */
.photo-shell {
  margin-bottom: 30px;
}

.photo-headline {
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.photo-headline h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}

.photo-headline p {
  margin: 6px 0 0;
  color: var(--muted);
}

.photo-hero-stack {
  display: grid;
  /* grid-template-columns: 1fr 1fr; */
  gap: 14px;
  margin-bottom: 14px;
}

.hero-card,
.feature-card,
.grid-card,
.side-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hero-card:hover,
.feature-card:hover,
.grid-card:hover,
.side-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.08);
}

.hero-cover,
.feature-cover,
.grid-cover {
  position: relative;
  display: block;
  background: #e9e3d8;
  overflow: hidden;
}

.hero-cover {
  aspect-ratio: 16 / 9;
}

.feature-cover {
  aspect-ratio: 4 / 3;
}

.grid-cover {
  aspect-ratio: 16 / 9;
  height: 100%;
}

.hero-cover img,
.feature-cover img,
.grid-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.hero-card:hover .hero-cover img,
.feature-card:hover .feature-cover img,
.side-card:hover .grid-cover img,
.grid-card:hover .grid-cover img {
  transform: scale(1.04);
}

.hero-meta,
.feature-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 12px;
  color: #f7f5f0;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0) 0%, rgba(8, 8, 8, 0.82) 100%);
}

.hero-meta h2,
.feature-meta h2,
.grid-card h3,
.side-card h3 {
  margin: 0;
  line-height: 1.32;
}

.hero-meta p,
.feature-meta p,
.grid-card p,
.side-card p {
  margin: 6px 0 0;
  color: rgba(247, 245, 240, 0.92);
  font-size: 0.86rem;
}

.hero-meta h2 a,
.feature-meta h2 a,
.grid-card h3 a,
.side-card h3 a {
  color: #f7f5f0;
}

.grid-card::after,
.side-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0) 0%, rgba(8, 8, 8, 0.82) 100%);
}

.photo-feature-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.feature-side {
  display: grid;
  gap: 10px;
}

.photo-grid-clean {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.side-card h3,
.grid-card h3 {
  font-size: 1rem;
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 28px;
  z-index: 2;
  padding: 0;
}

.side-card p,
.grid-card p {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 0;
  margin: 0;
}

.fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #7b756c;
}

.photo-pager {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .photo-feature-row {
    grid-template-columns: 1fr;
  }

  .photo-grid-clean {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .photo-hero-stack {
    grid-template-columns: 1fr;
  }

  .photo-grid-clean {
    grid-template-columns: 1fr;
  }

  .photo-pager {
    gap: 8px;
    flex-wrap: wrap;
  }
}

/* Photograph page motion layer (layout-preserving) */
.photo-shell .hero-card,
.photo-shell .feature-card,
.photo-shell .side-card,
.photo-shell .grid-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  will-change: transform;
}

.photo-shell .hero-card:hover,
.photo-shell .feature-card:hover,
.photo-shell .side-card:hover,
.photo-shell .grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
  border-color: #d4c8b4;
}

.photo-shell .hero-cover img,
.photo-shell .feature-cover img,
.photo-shell .grid-cover img {
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}

.photo-shell .hero-card:hover .hero-cover img,
.photo-shell .feature-card:hover .feature-cover img,
.photo-shell .side-card:hover .grid-cover img,
.photo-shell .grid-card:hover .grid-cover img {
  transform: scale(1.045);
  filter: saturate(1.08) contrast(1.03);
}

.photo-shell .hero-meta h2 a,
.photo-shell .feature-meta h2 a,
.photo-shell .side-card h3 a,
.photo-shell .grid-card h3 a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.25s ease, color 0.25s ease;
}

.photo-shell .hero-card:hover .hero-meta h2 a,
.photo-shell .feature-card:hover .feature-meta h2 a,
.photo-shell .side-card:hover h3 a,
.photo-shell .grid-card:hover h3 a {
  background-size: 100% 1px;
  color: var(--accent);
}

.photo-shell .hero-card,
.photo-shell .feature-card,
.photo-shell .side-card,
.photo-shell .grid-card {
  opacity: 0;
  animation: photo-fade-up 0.56s ease forwards;
}

.photo-shell .hero-card { animation-delay: 0.04s; }
.photo-shell .feature-card { animation-delay: 0.1s; }
.photo-shell .side-card:nth-child(1) { animation-delay: 0.14s; }
.photo-shell .side-card:nth-child(2) { animation-delay: 0.18s; }
.photo-shell .grid-card:nth-child(1) { animation-delay: 0.2s; }
.photo-shell .grid-card:nth-child(2) { animation-delay: 0.24s; }
.photo-shell .grid-card:nth-child(3) { animation-delay: 0.28s; }
.photo-shell .grid-card:nth-child(4) { animation-delay: 0.32s; }

@keyframes photo-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.photo-shell a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* @media (prefers-reduced-motion: reduce) {
  .photo-shell .hero-card,
  .photo-shell .feature-card,
  .photo-shell .side-card,
  .photo-shell .grid-card,
  .photo-shell .hero-cover img,
  .photo-shell .feature-cover img,
  .photo-shell .grid-cover img {
    animation: none !important;
    transition: none !important;
  }
} */

/* Archives page */
.archive-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 18px 18px 24px;
}

.archive-headline {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.archive-headline h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.12;
}

.archive-headline p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.archive-year-block {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px 0 8px;
  margin-bottom: 10px;
  border-bottom: 1px dashed #e4dece;
}

.archive-year-block:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.archive-year {
  margin: 0;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.88rem;
  color: #7c756a;
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.archive-items {
  display: grid;
  gap: 10px;
}

.archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
}

.archive-item h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 600;
}

.archive-item h3 a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.archive-item h3 a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.archive-meta {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: "JetBrains Mono", "Consolas", monospace;
  white-space: nowrap;
}

.archive-dot {
  color: #938b7f;
}

.archive-cat {
  letter-spacing: 0.05em;
}

:root[data-theme="dark"] .home-summary {
  color: #d1d8e0;
}

:root[data-theme="dark"] .list-card-link {
  background: linear-gradient(170deg, #262b33, #1f232b);
}

:root[data-theme="dark"] .list-card.no-cover .list-card-layer {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.34));
  color: var(--ink);
}

:root[data-theme="dark"] .fallback {
  color: #a4adb8;
}

:root[data-theme="dark"] .archive-dot {
  color: #7f8896;
}

@media (max-width: 740px) {
  .archive-shell {
    padding: 14px;
  }

  .archive-year-block {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .archive-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .archive-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    white-space: normal;
  }
}
