/* ─────────────────────────────────────────────
   FONTS
   ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

/* ─────────────────────────────────────────────
   TOKENS
   ───────────────────────────────────────────── */
:root {

  /* ── Raw colour palette ──────────────────────────────────
     Named by appearance. Edit these to retheme the site.
     Category colours are also used in blog.css .cat-- classes. */

  --warm-white:     #f5f3ee;   /* off-white ground */
  --warm-black:     #1c1916;   /* near-black ink */
  --warm-gray:      #5a5550;   /* mid warm gray */
  --warm-silver:    #9a9490;   /* light warm gray */
  --clay:           #8c5e3c;   /* terracotta / clay */
  --clay-pale:      #e8ddd3;   /* pale clay */

  /* Category palette */
  --sage:           #7a8c6e;   /* muted green */
  --slate-blue:     #5e7a8c;   /* dusty blue */
  --violet-muted:   #6e5e8c;   /* soft violet */
  --ochre:          #8c7a3c;   /* warm yellow-brown */
  --dusty-rose:     #8c3c5e;   /* muted rose */
  /* note: --clay above doubles as the Learning & Making category colour */

  /* ── Semantic tokens ─────────────────────────────────────
     Named by purpose. Used throughout all CSS files.
     Change the palette entries above, not these. */

  --bg:             var(--warm-white);
  --ink:            var(--warm-black);
  --ink-mid:        var(--warm-gray);
  --ink-light:      var(--warm-silver);
  --accent:         var(--clay);
  --accent-pale:    var(--clay-pale);

  /* ── Typography ─────────────────────────────────────────── */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Jost', system-ui, sans-serif;

  /* ── Layout ─────────────────────────────────────────────── */
  --nav-h:     3.25rem;
  --gutter:    clamp(1.25rem, 4vw, 3rem);
  --gap:       clamp(0.75rem, 2vw, 1.5rem);
  --max-w:     1360px;

  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────── */
<ul><li>, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }</li></ul>

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: underline dotted;
  text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

a:hover {
  text-decoration-style: solid;
  text-decoration-color: color-mix(in srgb, var(--ink) 60%, transparent);
}

/* No underline on UI/nav elements */
.site-header a,
.site-footer a,
.main-nav a,
.nav-toggle,
.filter-btn,
.post-item a,
.post-nav a,
.post-back,
.read-more,
.contact-link,
.site-title,
.page-hero a,
.post-header__meta a,
.blog-topics a,
.post-tags a,
.archive-year-link {
  text-decoration: none;
}

ul { list-style: none; }

/* ─────────────────────────────────────────────
   HEADER / NAV
   ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out),
              background 0.3s var(--ease-out);
}

.site-header.scrolled {
  border-color: color-mix(in srgb, var(--ink) 10%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s;
}
.site-title:hover { color: var(--accent); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.main-nav a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.2s;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s var(--ease-out);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

/* ─────────────────────────────────────────────
   PAGE SCAFFOLD
   ───────────────────────────────────────────── */
.page-body {
  padding-top: var(--nav-h);
  min-height: 100vh;
}