@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6,500&family=Playfair+Display:wght@400;700&family=Lora:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@400;600&display=swap');

:root {
  --teal: #3aada8;
  --teal-dark: #2d8a86;
  --lime: #7bbf3a;
  --cream: #f8f4ed;
  --warm: #f2ece0;
  --ink: #2c2416;
  --muted: #7a6e62;
  --card-bg: #fffdf9;
  --border: #e4ddd3;
  --accent: #8b5e3c;
  --accent-soft: #c49a6c;
  --header-h: 70px;
  --sidebar-w: 280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Lora', Georgia, serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(58, 173, 168, .08) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 70%, rgba(123, 191, 58, .06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 95%, rgba(242, 204, 143, .12) 0%, transparent 45%);
  background-attachment: fixed;
}

/* ─── HEADER ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 253, 249, .70);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-icon {
  max-height: 36px;
  max-width: 36px;
}

.brand-name {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(20px, 5vw, 25px);
  font-weight: 500;
  font-variant: small-caps;
}

/* ─── HAMBURGER ─── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
  transform-origin: center;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── OVERLAY ─── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 36, 22, .45);
  z-index: 149;
  opacity: 0;
  transition: opacity .25s ease;
}

.overlay.visible {
  display: block;
  opacity: 1;
}

/* ─── LAYOUT ─── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--header-h));
}

.sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 20px 0 32px;
  background: rgba(255, 253, 249, .85);
  backdrop-filter: blur(4px);
  width: 280px;
  flex-shrink: 0;
}

.sidebar ul {
  list-style: none;
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  padding: 4px 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.sidebar-title em {
  color: var(--accent);
}

.nav-section-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  padding: 15px 20px 6px;
}

.sidebar>.nav-section-label:first-child {
  padding-top: 4px;
}

.sidebar li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
  line-height: 1.3;
  white-space: nowrap;
}

.sidebar li a:hover {
  color: var(--ink);
  background: rgba(139, 94, 60, .05);
  border-left-color: var(--accent-soft);
}

.sidebar li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
  background: rgba(139, 94, 60, .07);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .85;
}

/* ─── CONTENT COLUMN ─── */
.content-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

main {
  padding: 2.5rem 2.5rem 4rem;
  flex: 1;
}

/* ─── PAGE TYPOGRAPHY ─── */
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: .4rem;
  line-height: 1.2;
}

.page-title em {
  color: var(--accent);
}

.page-subtitle {
  font-size: 1rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.breadcrumb {
  font-family: 'Source Sans 3', sans-serif;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--teal);
  text-decoration: none;
}

.main-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(44, 36, 22, .04);
  border: 1px solid var(--border);
  border-left: 4px solid #c96a6a;
  object-fit: cover;
  margin-bottom: 2rem;
}

/* ─── CARDS ─── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.8rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--teal);
  box-shadow: 0 2px 8px rgba(44, 36, 22, .04);
}

.card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin-bottom: .75rem;
  color: var(--ink);
}

.card h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--teal-dark);
  margin: 1rem 0 .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.card p {
  font-size: .95rem;
  line-height: 1.7;
  color: #3d3328;
  margin-bottom: .6rem;
}

.card ul {
  padding-left: 1.3rem;
}

.card ul li {
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: .3rem;
}

/* card border variants */
.card.lime {
  border-left-color: var(--lime);
}

.card.warm {
  border-left-color: #c89b4a;
}

.card.rose {
  border-left-color: #c96a6a;
}

.card.violet {
  border-left-color: #8a6aaa;
}

/* ─── CALLOUT ─── */
.callout {
  background: rgba(58, 173, 168, .07);
  border: 1px solid rgba(58, 173, 168, .25);
  border-radius: 8px;
  padding: .9rem 1.2rem;
  margin: .8rem 0;
  font-size: .9rem;
  font-style: italic;
  color: var(--teal-dark);
}

/* ─── STEPS ─── */
.steps {
  counter-reset: step;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  padding: .4rem 0 .4rem 2.5rem;
  position: relative;
  font-size: .95rem;
  line-height: 1.65;
  margin-bottom: .15rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--teal);
  opacity: .7;
  line-height: 1.5;
}

/* ─── SWATCHES ─── */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .6rem 0;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .8);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  cursor: default;
  position: relative;
}

.swatch[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: .7rem;
  white-space: nowrap;
  font-family: 'Source Sans 3', sans-serif;
}

/* ─── LESSON REFS ─── */
.lesson-refs {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.lesson-ref {
  display: inline-block;
  padding: .3rem .8rem;
  border: 1.5px solid var(--teal);
  border-radius: 20px;
  color: var(--teal);
  font-family: 'Source Sans 3', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s;
  width: fit-content;
}

.lesson-ref:hover {
  background: var(--teal);
  color: #fff;
}



/* ─── FOOTER ─── */
.site-footer {
  background: var(--warm);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: 'Source Sans 3', sans-serif;
  font-size: .82rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--teal);
  text-decoration: none;
}

.site-footer .usage-note {
  margin-top: .5rem;
  font-size: .75rem;
  font-style: italic;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 800px) {

  /* show hamburger */
  .hamburger {
    display: flex;
  }

  /* sidebar becomes off-canvas drawer */
  .page-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
    position: fixed;
    top: 0;
    width: min(280px, 80vw);
    height: 100vh;
    height: 100dvh;
    z-index: 150;
    transition: transform .28s ease;
    border-right: 1px solid var(--border);
    padding-top: calc(var(--header-h) + 1rem);
    padding-bottom: 40px;
    background: rgba(255, 253, 249, .98);
    backdrop-filter: blur(12px);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  main {
    padding: 1.5rem 1.1rem 3rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .page-subtitle {
    font-size: .95rem;
    margin-bottom: 2rem;
  }

  .card {
    padding: 1.2rem 1.25rem;
  }

  .topic-grid {
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
  }


  .header-left {
    flex: 1;
    justify-content: space-between;
  }

}

@media (max-width: 480px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }
}