/* =========================================================
   if you're looking at my stylesheet i know its a mess be nice
   ========================================================= */

:root {
  /* Color palette */
  --bg:        #f9d5e5;   /* soft pink background */
  --bg-box:    #fcebf2;   /* lighter pink for the content box (NEW) */
  --bg-line:   #B0195D;   /* borders / dividers */
  --text:      #B0195D;   /* primary text */
  --text-dim:  #891449;   /* soft text & links*/

  /* Typography */
  --font-display: "Fraunces", Arial, serif;
  --font-body:    "Newsreader", Arial, serif; /* change to comic sans */

  /* Layout */
  --measure: 68ch;          /* ideal reading width */
  --maxw: 640px;            /* width of the content box */
  --radius: 10px;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text-dim); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   THE CONTAINER BOX  (new)
   One centered box that holds everything. margin: auto on the
   left/right is what centers a fixed-width block. The border +
   shadow + lighter bg make it read as a card on the pink page.
   ========================================================= */
.container {
  max-width: var(--maxw);
  margin: 2.5rem auto;          /* top/bottom space, auto = centered */
  background: var(--bg-box);
  border: 2px solid var(--bg-line);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--bg-line);   /* hard retro shadow */
  padding: 0 1.5rem 1.5rem;     /* inner breathing room */
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--text);
  padding-top: 1rem;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
}
.brand { font-weight: 700; font-size: 1.2rem; color: var(--text); }
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  font-size: .85rem;
}
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }

/* ---------- Main + side-by-side layout (new) ---------- */
main { padding-top: 2rem; }

/* flex = put children in a row; wrap = stack them when too narrow */
.layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;   /* both boxes align to the top */
}
.intro { flex: 1; }          /* text takes all remaining space */
.intro h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.intro p { margin: 0 0 1rem; }

/* ---------- Links box off to the side (new) ---------- */
.links-box {
  flex: 0 0 140px;           /* fixed 140px wide, never grows/shrinks */
  border: 1px solid var(--bg-line);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  background: var(--bg);     /* slightly deeper pink than the card */
}
.links-box h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 .5rem;
}
.links-box ul { list-style: none; margin: 0; padding: 0; }
.links-box li { margin: .3rem 0; }

/* ---------- Clipart helper (new) ---------- */
.clipart {
  display: block;
  max-width: 150px;          /* keeps it from blowing up the layout */
  height: auto;              /* preserves aspect ratio */
  margin: 1rem 0;            /* space above/below */
  image-rendering: pixelated; /* keeps tiny pixel GIFs crisp; remove if not wanted */
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-line);
  color: var(--text-dim);
  font-size: .9rem;
}
.site-footer p { margin: .3rem 0; }

/* =========================================================
   Blog post styles
   ========================================================= */
.post { max-width: var(--measure); margin: 0 auto; padding: 2rem 0; }
.post-header { margin-bottom: 2rem; }
.post-header .post-meta {
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.post-header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0;
}
.post-body h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.post-body h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 2rem 0 .75rem; }
.post-body p { margin: 1.25rem 0; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote {
  border-left: 3px solid var(--text-dim);
  margin: 1.5rem 0;
  padding: .25rem 0 .25rem 1.5rem;
  color: var(--text);
  font-style: italic;
}
.post-body code {
  font-family: monospace;
  font-size: .85em;
  background: var(--bg);          /* was undefined --bg-soft */
  padding: .15em .4em;
  border-radius: 5px;
  border: 1px solid var(--bg-line);
}
.post-body pre {
  background: var(--bg);          /* was undefined --bg-soft */
  border: 1px solid var(--bg-line);   /* was typo --bg=line */
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  font-size: .9rem;
  line-height: 1.5;
}
.post-body pre code { background: none; border: none; padding: 0; }
.post-body img { max-width: 100%; border-radius: var(--radius); }
.post-body ul, .post-body ol { padding-left: 1.5rem; }
.post-body li { margin: .5rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .layout { flex-direction: column; }      /* stack text + links on phones */
  .links-box { flex: 1 1 auto; width: 100%; }
}
