:root {
  --black: #000100;
  --cool-steel: #A1A6B4;
  --light-blue: #94C5CC;
  --pale-sky: #B4D2E7;
  --bright-snow: #F8F8F8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bright-snow);
  color: var(--black);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

main, .site-header, .site-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header-bar {
  background: var(--bright-snow);
}

article, .post-list, .tag-overview {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
  text-decoration: none;
}

.site-header .brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: block;
}

.site-header nav a {
  color: var(--black);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.95rem;
}

.site-header nav a:hover { color: var(--light-blue); }

main { padding-top: 12px; padding-bottom: 48px; }

h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.4rem; margin: 2em 0 0.6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 0.5em; }

a { color: var(--black); }
a:visited { color: var(--black); }

.post-meta {
  color: var(--cool-steel);
  font-size: 0.9rem;
  margin: 0 0 4px;
}

.post-tags a {
  color: var(--light-blue);
  text-decoration: none;
}

.post-body p, .post-body ul, .post-body ol { margin: 1em 0; }
.post-body img { max-width: 100%; border-radius: 12px; }
.post-body blockquote {
  margin: 1.4em 0;
  padding: 0.2em 1.2em;
  border-left: 4px solid var(--light-blue);
  color: var(--black);
  background: #fff;
  border-radius: 0 8px 8px 0;
}
.post-body code {
  background: #fff;
  padding: 0.15em 0.4em;
  border-radius: 6px;
}

.post-list { list-style: none; padding: 0; margin: 1.5em 0; }
.post-list li { padding: 20px 0; border-top: 1px solid var(--pale-sky); }
.post-list li:first-child { border-top: none; }
.post-list li a { font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.post-list li a:hover { color: var(--light-blue); }

.tag-block { margin: 2em 0; }
.tag-block h2 { margin-top: 0; }
.tag-block h2 a { text-decoration: none; }
.tag-block h2 a:hover { color: var(--light-blue); }
.tag-post-list { list-style: none; padding: 0; margin: 0.5em 0 0; }
.tag-post-list li { padding: 6px 0; }
.tag-post-list li a { text-decoration: none; }
.tag-post-list li a:hover { color: var(--light-blue); }
.tag-more { color: var(--cool-steel); font-weight: 700; letter-spacing: 0.15em; }
.tag-more:hover { color: var(--light-blue); }

.cta {
  max-width: 680px;
  background: var(--pale-sky);
  border-radius: 20px;
  padding: 28px 32px;
  margin: 24px auto 32px;
  text-align: center;
}
.cta h2 { margin-top: 0; }
.cta .button {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 28px;
  background: var(--black);
  color: var(--bright-snow);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.cta .button:hover { background: var(--light-blue); color: var(--black); }

.site-footer {
  color: var(--cool-steel);
  font-size: 0.85rem;
  padding-bottom: 32px;
}

.empty-state { color: var(--cool-steel); }

/* ---- Homepage: hero ----
   Full-bleed (breaks out of the centered container). Image is a plain <img>
   at .hero-bg — drop a file at src/static/img/hero.jpg (recommended export
   1920x800px, ~12:5 / 2.4:1 landscape, subject centered since edges crop
   on very wide or very narrow viewports). Rendered box is 100vw wide,
   height = aspect-ratio 12/5 capped at 640px tall on large screens. */

.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  aspect-ratio: 12 / 5;
  max-height: 640px;
  min-height: 320px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--pale-sky), var(--bright-snow));
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(248,248,248,0.6) 0%, rgba(180,210,231,0.7) 100%);
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 32px;
  text-align: center;
  color: var(--black);
}
.hero-copy h1 { font-size: 2.4rem; }
.hero-copy p { color: rgba(0, 1, 0, 0.75); max-width: 46ch; margin: 0.6em auto 0; }
.hero-copy .button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 28px;
  background: var(--black);
  color: var(--bright-snow);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.hero-copy .button:hover { background: var(--light-blue); color: var(--black); }

/* ---- Homepage: paths ----
   Each card is a full-bleed background image with a text scrim, sized via
   aspect-ratio 4/5 (portrait). Drop files at src/static/img/path-<tag>.jpg
   (recommended export 800x1000px, 4:5, subject weighted toward center/top
   since the bottom is covered by the text gradient). Rendered card width
   is ~330px at desktop (3-column, 1080px container), so 800x1000 gives
   ~2.4x pixel density — plenty crisp on retina. */

.paths { text-align: center; margin-top: 40px; }
.section-subtitle { color: var(--cool-steel); margin: 0 0 1.5em; }

.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  text-align: left;
}

.path-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  background: var(--cool-steel);
  transition: transform 0.15s ease;
}

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

.path-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  z-index: 0;
}

.path-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248,248,248,0) 30%, rgba(248,248,248,0.95) 100%);
  z-index: 1;
}

.path-card-content { position: relative; z-index: 2; padding: 24px; color: var(--black); }
.path-card h3 { margin: 0 0 4px; color: var(--black); }
.path-card p { color: rgba(0, 1, 0, 0.75); margin: 0 0 8px; }
.path-link { font-weight: 600; font-size: 0.9rem; }
.path-link { font-weight: 600; font-size: 0.9rem; margin-top: 8px; }

/* ---- Homepage: post grid ---- */

.posts-section { margin-top: 24px; }

.post-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}

.post-card {
  display: block;
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: var(--bright-snow);
  border: 1px solid var(--pale-sky);
  border-radius: 18px;
  padding: 22px;
  text-decoration: none;
  color: var(--black);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover { border-color: var(--light-blue); transform: translateY(-2px); }
.post-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.post-card p:not(.post-meta) { color: var(--cool-steel); margin: 0; }

.post-card-viewall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--pale-sky);
  gap: 8px;
}
.post-card-viewall h3 { margin: 0; }
.post-card-viewall-arrow { font-size: 1.6rem; }

/* ---- Homepage: subscribe ---- */

.subscribe {
  text-align: center;
  margin-top: 40px;
  padding: 8px 0 16px;
}
.subscribe form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 380px;
  margin: 20px auto 0;
}
.subscribe input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--cool-steel);
  font-size: 1rem;
  outline: none;
  background: #fff;
}
.subscribe input[type="email"]:focus {
  border-color: var(--light-blue);
  box-shadow: 0 0 0 3px rgba(148, 197, 204, 0.35);
}
.subscribe button {
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  background: var(--black);
  color: var(--bright-snow);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.subscribe button:disabled { opacity: 0.5; cursor: not-allowed; }
.subscribe .message { min-height: 20px; font-size: 0.9rem; margin: 0; }
.subscribe .message.success { color: #2a7d4f; }
.subscribe .message.error { color: #c0392b; }

/* ---- Footer: about placeholders ---- */

.footer-about { margin-bottom: 12px; }
.footer-about-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  margin: 0 0 8px;
}
.footer-about-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  margin: 0 0 16px;
}
.footer-link-placeholder {
  color: var(--cool-steel);
  cursor: default;
}
.footer-link-placeholder .soon {
  font-size: 0.75rem;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .hero-copy h1 { font-size: 1.6rem; }
}
