:root{
  --bg: #12141a;
  --text: #d8d8d8;
  --text-dim: #9a9ca3;
  --accent: #7c8fac; /* dusty blue */
  --hairline: rgba(216,216,216,0.09);
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Patrick Hand', cursive;
  font-size: 19px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* grain + vignette overlay, fixed over everything */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/></svg>");
  mix-blend-mode: overlay;
}

body::after{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
}

::selection{
  background: rgba(124,143,172,0.25);
  color: #fff;
}

/* ---------- dedication ---------- */

.dedication{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 8vw;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 2.4s ease, transform 2.4s ease;
}

.dedication.visible{
  opacity: 1;
  transform: translateY(0);
}

.dedication-inner{
  max-width: 560px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 30px;
  letter-spacing: 0.02em;
  line-height: 2;
  color: var(--text-dim);
}

.dedication-inner p{
  margin: 0 0 1.4em 0;
}

.dedication-inner p:last-child{
  margin-bottom: 0;
}

/* ---------- timeline ---------- */

.timeline{
  max-width: 900px;
  margin: 0 auto;
  padding: 4vh 6vw 20vh 6vw;
  position: relative;
  z-index: 3;
}

.entry{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2.5rem;
  padding: 3.2rem 0;
  border-top: 1px solid var(--hairline);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.entry:first-child{
  border-top: none;
}

.entry.visible{
  opacity: 1;
  transform: translateY(0);
}

.entry-date{
  font-family: 'Caveat', cursive;
  font-weight: 500;
  font-size: 26px;
  color: var(--accent);
  opacity: 0.85;
  align-self: start;
  position: sticky;
  top: 2rem;
  letter-spacing: 0.02em;
}

.entry-posts{
  cursor: text;
}

.post{
  color: var(--text);
  margin: 0 0 1.6rem 0;
  max-width: 55ch;
}

.post:last-child{
  margin-bottom: 0;
}

.post p{
  margin: 0 0 0.6em 0;
}

.post p:last-child{
  margin-bottom: 0;
}

.sentinel{
  height: 1px;
}

/* ---------- end note ---------- */

.end-note{
  padding: 4rem 0 2rem 0;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 24px;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.end-note.visible{
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px){
  .entry{
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 2.4rem 0;
  }
  .entry-date{
    position: static;
    font-size: 24px;
  }
  .dedication-inner{
    font-size: 26px;
  }
  body{
    font-size: 18px;
  }
}
