:root {
  --page-bg: #F1F0EC;
  --paper: #F6F3EC;
  --card-bg: #FFFFFF;
  --header-bg: #F5F4F0;
  --ink: #4A453D;
  --ink-soft: #7A756C;
  --ink-faint: #A8A296;
  --line: #E4E0D5;
  --accent: #EF7A57;
  --lavender: #B7A0D4;
  --rose: #E8919F;
  --plum: #7C5470;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page-bg); color: var(--ink); font-family: var(--font); }
a { color: inherit; text-decoration: none; }

/* ---- gradient canvas, fixed to the viewport so it stays a compact
   corner glow regardless of page/content height ---- */
.glass-wrap { position: relative; min-height: 100vh; overflow: hidden; padding: 3.5rem 1.5rem 5rem; }
.glass-wrap .blob { position: fixed; border-radius: 50%; filter: blur(70px); z-index: 0; pointer-events: none; }
.glass-wrap .b1 { width: 480px; height: 480px; top: -160px; left: -140px; background: var(--rose); opacity: .55; }
.glass-wrap .b2 { width: 460px; height: 460px; bottom: -180px; right: -160px; background: var(--lavender); opacity: .55; }
.glass-wrap .b3 { width: 380px; height: 380px; top: 30%; right: 8%; background: var(--accent); opacity: .3; }
.glass-wrap .b4 { width: 340px; height: 340px; bottom: 18%; left: 6%; background: var(--plum); opacity: .22; }

/* fixed-px blobs read as one or two huge shapes on a narrow viewport
   instead of a soft multi-corner glow — scale down to keep the same
   proportions relative to the screen that desktop has */
@media (max-width: 700px) {
  .glass-wrap .b1 { width: 260px; height: 260px; top: -90px; left: -80px; }
  .glass-wrap .b2 { width: 250px; height: 250px; bottom: -100px; right: -90px; }
  .glass-wrap .b3 { width: 200px; height: 200px; }
  .glass-wrap .b4 { width: 180px; height: 180px; }
}

.glass-card {
  position: relative; z-index: 1; margin: 0 auto;
  background:
    linear-gradient(135deg, rgba(255,255,255,.4) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 68%, rgba(255,255,255,.16) 100%),
    rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255,255,255,.55); border-radius: 30px; overflow: hidden;
  box-shadow: 0 24px 48px rgba(28,26,23,.10), inset 0 1px 0 rgba(255,255,255,.7);
}

/* ---- index page ---- */
.a-container { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }
.a-head { margin-bottom: 2.4rem; max-width: 640px; }
.a-head h1 {
  margin: 0; font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; color: var(--ink);
  text-shadow: 0 1px 4px rgba(255,255,255,.5);
}
.a-head p { margin: .6rem 0 0; color: var(--ink); font-size: .98rem; line-height: 1.6; text-shadow: 0 1px 3px rgba(255,255,255,.6); }

.i-tags-label { font-size: .82rem; color: var(--ink); text-shadow: 0 1px 3px rgba(255,255,255,.6); margin-bottom: .9rem; }
.i-tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.i-tag { font-size: .84rem; font-weight: 600; padding: .5rem 1rem; border-radius: 999px; border: none; cursor: pointer; font-family: var(--font); }
.i-tag[aria-pressed="true"] { box-shadow: inset 0 0 0 2px rgba(28,26,23,.4); }
.i-tag.tall { background: var(--ink); color: #fff; }
.i-tag.t1 { background: #FBE3D3; color: #8A4A22; }
.i-tag.t2 { background: #F6DCE0; color: #8A3B4A; }
.i-tag.t3 { background: #E4DAF2; color: #4F3B7A; }
.i-tag.t4 { background: #DCEBE6; color: #2C5C4E; }
.i2-empty { padding: 1.6rem 0; font-size: .9rem; color: var(--ink-faint); font-style: italic; }

.a-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.4rem; margin-bottom: 2rem; }
.a-post.glass-card {
  margin: 0; border-radius: 20px; padding: 1.8rem 2rem 2rem; display: flex; flex-direction: column;
  min-height: 190px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.a-post.glass-card:hover {
  background:
    linear-gradient(135deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.05) 32%, rgba(255,255,255,.05) 68%, rgba(255,255,255,.24) 100%),
    rgba(255,255,255,.7);
  transform: translateY(-3px);
  box-shadow: 0 30px 54px rgba(28,26,23,.16), inset 0 1px 0 rgba(255,255,255,.8);
}
.a-cat { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; display: block; }
.a-title { font-size: 1.14rem; font-weight: 600; margin-bottom: .6rem; line-height: 1.32; }
.a-excerpt { font-size: .88rem; color: var(--ink-soft); line-height: 1.55; margin-bottom: auto; padding-bottom: 1rem; }
.a-date { font-size: .76rem; color: var(--ink-faint); }

.pager {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1.2rem;
  padding: 1rem 0 1.6rem; font-size: .86rem; font-weight: 600; color: var(--ink);
  text-shadow: 0 1px 3px rgba(255,255,255,.6);
}
.pager a:hover { color: var(--accent); }
.pager-count { color: var(--ink-faint); font-weight: 500; }

/* ---- individual post page ---- */
.post-card { max-width: 700px; padding: 3rem 3.2rem 3.5rem; }
.post-back { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 1.8rem; }
.post-back:hover { color: var(--accent); }
.post-card h1 { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700; line-height: 1.22; margin: 0 0 .9rem; }
.post-meta { font-size: .82rem; color: var(--ink-faint); margin-bottom: 2.4rem; }
.post-body { font-size: 1.02rem; line-height: 1.8; }
.post-body p { margin: 0 0 1.3rem; }
.post-body h2 { font-family: var(--font-serif); font-size: 1.32rem; font-weight: 700; margin: 2.2rem 0 .9rem; }
.post-body a { color: var(--accent); text-decoration: underline; }
.post-nav { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: .86rem; }
.post-nav a { font-weight: 600; color: var(--ink-soft); text-decoration: none; max-width: 46%; }
.post-nav a:hover { color: var(--accent); }
.post-archive-note { margin-top: 1.2rem; font-size: .8rem; color: var(--ink-faint); }
.post-body img { max-width: 100%; height: auto; border-radius: 14px; display: block; margin: 1.8rem auto; box-shadow: 0 8px 20px rgba(28,26,23,.10); }
.post-body blockquote {
  font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; color: var(--ink-soft);
  border-left: 3px solid var(--accent); padding-left: 1.2rem; margin: 1.8rem 0;
}
.post-body blockquote p { margin: 0 0 .7rem; }
.post-video { position: relative; width: 100%; padding-top: 56.25%; margin: 1.8rem 0; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 20px rgba(28,26,23,.10); }
.post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

@media (max-width: 640px) {
  .a-head h1 { font-size: 2rem; }
  .post-nav { flex-direction: column; gap: .6rem; }
  .post-nav a { max-width: 100%; }

  /* 5rem of bottom padding leaves a big empty gap below the pager on a
     short mobile screen — trim it down */
  .glass-wrap { padding-bottom: 2rem; }

  /* the glass card is nice as a discrete object to glance at (the hub,
     the index grid) but for something you're actually reading, the
     rounded corners and side margins just steal width from the text —
     go full-bleed and solid instead of floating in a frame */
  .post-card {
    max-width: none; margin: 0 -1.5rem; padding: 1.4rem 1.5rem 1.8rem;
    border-radius: 0; border: none; box-shadow: none;
    background: var(--paper);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .post-card h1 { font-size: 1.7rem; }

  /* the gradient reads as a nice glass backdrop when there's a floating
     card on top of it, but once the card goes full-bleed and solid,
     a strip of gradient peeking out above it just looks like a stray
     color band — drop it entirely on mobile reading pages */
  .glass-wrap.post-page { background: var(--paper); }
  .glass-wrap.post-page .blob { display: none; }

  /* the 3.5rem/5rem top/bottom padding on .glass-wrap was sized to give
     the gradient room to glow — dead space now that this page is flat */
  .glass-wrap.post-page { padding: 1.2rem 1.5rem 1.2rem; }
}
