:root {
  --ink: #4a3b3b;
  --muted: #8a7676;
  --pink: #ef5f6a;
  --pink-deep: #d9444f;
  --peach: #fdeee2;
  --line: #eadfd9;
  --brown: #5c3f3f;
  --paper: #ffffff;
  --radius: 12px;
  --round: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --script: "Dancing Script", "Brush Script MT", cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--round);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--peach) radial-gradient(circle, rgba(150, 110, 110, .25) 1px, transparent 1.5px) 0 0 / 18px 18px;
}
img { max-width: 100%; height: auto; }
a { color: var(--pink-deep); text-underline-offset: 3px; }
a:hover { color: var(--brown); }

/* Header */
.masthead { width: min(1100px, 100%); margin: 0 auto; background: #fff; }
.masthead-art {
  position: relative;
  aspect-ratio: 992 / 372;
  background: url(/assets/header.jpg) center top / 100% auto no-repeat;
}
.logo {
  position: absolute;
  left: 4%;
  top: 6%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #9a6f6f;
  line-height: 1;
}
.logo-name { font-family: var(--script); font-size: clamp(1.3rem, 4.4vw, 3rem); color: #8d5e5e; }
.logo-tag { font-size: clamp(.55rem, 1.2vw, .85rem); letter-spacing: .06em; margin-top: .3em; color: #a48585; }
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 10px 4%;
  margin-top: -64px;
  min-height: 64px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 55%;
}
.topnav a {
  font-weight: 800;
  text-decoration: none;
  color: #8a7272;
  padding: 6px 12px;
  border-radius: 999px;
}
.topnav a:hover { background: var(--peach); color: var(--brown); }
.topnav a[aria-current="page"] { background: var(--pink); color: #fff; }
@media (max-width: 700px) {
  .topnav { margin-top: 0; width: 100%; justify-content: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
}

/* Page */
.page {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  margin: 0 auto;
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 40px;
  padding: 24px clamp(16px, 4vw, 48px) 48px;
}
@media (max-width: 860px) { .page { grid-template-columns: 1fr; gap: 24px; } }

.list-head h1 { font-family: var(--script); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3rem); color: var(--pink-deep); margin: 0 0 8px; }

/* Posts */
.post { padding: 0 0 36px; margin: 0 0 36px; border-bottom: 2px dotted var(--line); }
.post-head .date { margin: 0; color: var(--muted); font-weight: 700; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.post-head h1, .post-head h2 { font-weight: 800; line-height: 1.2; margin: 4px 0 6px; color: var(--brown); }
.post-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.post-head h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.post-head h2 a { color: inherit; text-decoration: none; }
.post-head h2 a:hover { color: var(--pink-deep); }
.meta { margin: 0 0 14px; font-size: .92rem; color: var(--muted); }
.tag { display: inline-block; background: var(--peach); color: #9a5f5f; text-decoration: none; font-weight: 700; font-size: .8rem; padding: 2px 10px; border-radius: 999px; margin-right: 4px; }
.tag:hover { background: var(--pink); color: #fff; }
.entry p { margin: 0 0 1em; }
.entry img { border-radius: 8px; vertical-align: middle; }
.entry a.lb { display: inline-block; cursor: zoom-in; }
.entry figure.deadvid { display: inline-block; margin: .5em 0 1em; }
.entry figure.deadvid img { opacity: .9; }
.entry figure.deadvid figcaption { font-size: .85rem; color: var(--muted); font-style: italic; }
.more a { font-weight: 800; text-decoration: none; background: var(--pink); color: #fff; padding: 8px 16px; border-radius: 999px; display: inline-block; }
.more a:hover { background: var(--pink-deep); color: #fff; }

/* Gallery grid */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 10px; margin: 16px 0 8px; scroll-margin-top: 16px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; background: var(--peach); cursor: zoom-in; }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }

/* Comments */
.comments { background: #fff8f3; border-radius: var(--radius); padding: 20px clamp(16px, 3vw, 28px); margin: 0 0 28px; }
.comments h3 { margin: 0 0 10px; color: var(--brown); }
.comments ol { list-style: none; margin: 0; padding: 0; }
.comments li { padding: 12px 0; border-top: 1px dotted var(--line); }
.comments li:first-child { border-top: 0; }
.comments .who { margin: 0 0 4px; }
.comments .who span { color: var(--muted); font-size: .85rem; margin-left: 6px; }
.comments li p { margin: 0 0 .5em; }

/* Navigation */
.pager, .postnav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 700; }
.pager span { color: var(--muted); font-weight: 600; font-size: .9rem; }
.postnav a { max-width: 48%; text-decoration: none; }

/* Sidebar */
.sidebar section { background: #fff8f3; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.sidebar h3 { font-family: var(--script); font-weight: 600; font-size: 1.8rem; color: var(--pink-deep); margin: 0 0 6px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { display: flex; justify-content: space-between; padding: 3px 0; }
.sidebar li a { text-decoration: none; font-weight: 700; color: var(--brown); }
.sidebar li a:hover { color: var(--pink-deep); }
.sidebar li span { color: var(--muted); font-size: .85rem; }
.sidebar details { border-top: 1px dotted var(--line); padding: 6px 0; }
.sidebar summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.sidebar details ul { padding: 4px 0 4px 10px; }
@media (max-width: 860px) {
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
  .sidebar section { margin: 0; }
}

/* Footer */
.foot { width: min(1100px, 100%); margin: 0 auto; background: var(--brown) url(/assets/balloons.png) 6% bottom / auto 100% no-repeat; color: #f3e6e0; min-height: 96px; display: flex; align-items: flex-end; }
.foot-inner { width: 100%; text-align: right; padding: 16px clamp(16px, 4vw, 48px); font-size: .9rem; }
@media (max-width: 600px) { .foot { background-size: auto 70%; } .foot-inner { text-align: center; padding-top: 80px; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(40, 25, 25, .92); display: flex; align-items: center; justify-content: center; padding: 48px 12px 24px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: min(1100px, 100%); max-height: calc(100vh - 120px); width: auto; height: auto; border-radius: 6px; }
.lightbox figcaption { color: #f6ebe6; margin-top: 10px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.lightbox button:hover { background: rgba(255,255,255,.3); }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }
