:root {
  --night: #1c2547;
  --dusk: #6a5a8c;
  --rose: #e79c9a;
  --peach: #f6c7a4;
  --pale: #fdeedb;
  --paper: #fff7ec;
  --ink: #1a2140;
  --muted: rgba(26, 33, 64, 0.68);
  --line: rgba(26, 33, 64, 0.16);
  --cream: #fff7ec;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--pale);
  color: var(--ink);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Noto Serif CJK JP", "Source Han Serif JP", Georgia, serif;
  line-height: 1.9;
}

a {
  color: inherit;
  text-decoration-color: rgba(26, 33, 64, 0.32);
  text-underline-offset: 4px;
  transition: opacity 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover {
  opacity: 0.78;
  text-decoration-color: currentColor;
}

/* Hero (Home) */
.sky-hero {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 5vw, 64px);
  background: linear-gradient(180deg, var(--night) 0%, var(--dusk) 38%, var(--rose) 74%, var(--peach) 100%);
  overflow: hidden;
}

.sky-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 18%, rgba(255, 247, 236, 0.65), transparent),
    radial-gradient(1px 1px at 32% 11%, rgba(255, 247, 236, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 56% 24%, rgba(255, 247, 236, 0.45), transparent),
    radial-gradient(1px 1px at 78% 14%, rgba(255, 247, 236, 0.6), transparent),
    radial-gradient(1px 1px at 88% 28%, rgba(255, 247, 236, 0.4), transparent);
  pointer-events: none;
}

.top-nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-brand {
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.18em;
  font-weight: 500;
}

.sky-hero .top-nav,
.sky-hero .top-nav a {
  color: rgba(255, 247, 236, 0.92);
  text-decoration-color: rgba(255, 247, 236, 0.35);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
  font-weight: 600;
}

.hero-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  margin-top: 2.5rem;
}

.sky-hero h1 {
  grid-column: 2;
  margin: 0;
  writing-mode: vertical-rl;
  font-size: clamp(2.4rem, 7.2vw, 5.2rem);
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: 0.22em;
  color: var(--cream);
  text-shadow: 0 4px 24px rgba(28, 37, 71, 0.22);
}

.lede {
  grid-column: 1;
  grid-row: 1;
  max-width: 26rem;
  color: var(--ink);
}

.lede p {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}

.lede small {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.hero-meta {
  margin-top: 1rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 247, 236, 0.36);
  backdrop-filter: blur(4px);
}

/* Subpage compact header */
.sub-header {
  background: linear-gradient(135deg, var(--night) 0%, var(--dusk) 58%, var(--rose) 100%);
  color: var(--cream);
  padding: clamp(20px, 4vw, 36px) clamp(20px, 5vw, 64px);
}
.sub-header .top-nav a {
  color: rgba(255, 247, 236, 0.94);
  text-decoration-color: rgba(255, 247, 236, 0.38);
}

/* Main container */
main {
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 36px) 56px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 1.5rem;
}

h2 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.section-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Featured Card */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.4rem;
  padding: 1.15rem;
  border-radius: 14px;
  background: rgba(255, 247, 236, 0.58);
  border: 1px solid var(--line);
  margin-bottom: 2.6rem;
}

.featured-media {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, var(--dusk), var(--rose));
}

.featured-media img,
.post-hero-img img,
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.featured-title {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
}

.featured-title a { text-decoration: none; }
.featured-title a:hover { text-decoration: underline; }

.featured-excerpt {
  margin: 0 0 0.85rem;
  font-size: 0.94rem;
  color: rgba(26, 33, 64, 0.88);
}

/* Tag filter bar */
.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.tag-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 247, 236, 0.55);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tag-btn:hover,
.tag-btn.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* Entry list */
.entry {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.6rem 1.25rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
}

.entry:last-of-type {
  border-bottom: 1px solid var(--line);
}

.entry-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.entry time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-size: 0.9rem;
}

.entry-weather {
  font-size: 0.78rem;
  color: var(--muted);
}

.entry-title {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: 600;
}

.entry-title a { text-decoration: none; }
.entry-title a:hover { text-decoration: underline; }

.entry-text {
  margin: 0 0 0.55rem;
  font-size: 0.96rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.76rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(26, 33, 64, 0.07);
  color: var(--muted);
}

/* Single Post Page */
.breadcrumb {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.post-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3.8vw, 2.05rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.06em;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.post-hero-img {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 0.5rem;
  border: 1px solid var(--line);
}

.post-caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  margin-bottom: 1.8rem;
}

.post-body p {
  margin: 0 0 1.3rem;
  font-size: 1.02rem;
}

.post-nav {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 247, 236, 0.62);
}

.gallery-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
}

.gallery-info {
  padding: 0.85rem 1rem;
}

.gallery-info time {
  font-size: 0.78rem;
  color: var(--muted);
}

.gallery-info h3 {
  margin: 0.15rem 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(16, 21, 42, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  max-width: 880px;
  width: 100%;
  color: var(--cream);
  text-align: center;
}
.lightbox-inner img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 10px;
}
.lightbox-cap {
  margin-top: 10px;
  font-size: 0.9rem;
  opacity: 0.88;
}

/* Archive & About */
.month-group { margin-bottom: 2rem; }
.month-title {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.prose-box {
  background: rgba(255, 247, 236, 0.56);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
}

/* Footer */
footer {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem clamp(18px, 5vw, 36px) 48px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 680px) {
  .featured { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .hero-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .sky-hero h1 {
    grid-column: 1;
    justify-self: end;
  }
  .lede {
    grid-column: 1;
    grid-row: 2;
    max-width: 100%;
  }
  .entry {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
