/* ============================================================
   Fab Academy 2026 — Weekly Documentation
   week03.css
   ============================================================

   HOW TO CUSTOMISE
   ─────────────────
   • Colors / fonts → edit the :root variables at the top
   • Layout width   → change --content-w and --nav-w
   • Add a photo    → replace <div class="img"> with <img src="...">
   • Dark mode      → swap --bg and --ink values
   ============================================================ */

   :root {
    --bg:         #f7f4ee;   /* page background */
    --ink:        #1c1b18;   /* main text */
    --ink-mid:    #5a5750;   /* secondary text */
    --ink-faint:  #a09d94;   /* captions, labels */
    --rule:       #ddd9d0;   /* borders and hr */
    --accent:     #1e3a5f;   /* links, highlights */
    --accent-bg:  #e8f0fb;   /* light accent fill */
  
    --nav-bg:     #1c1b18;   /* sidebar background */
    --nav-text:   #c8c4bc;   /* sidebar text */
    --nav-w:      250px;     /* sidebar width */
    --content-w:  680px;     /* max readable width */
  
    --font-head:  'Syne', sans-serif;
    --font-body:  Georgia, serif;
    --font-mono:  'IBM Plex Mono', monospace;
  }
  
  /* ── BASE ───────────────────────────────────────────────── */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    display: flex;
  }
  
  a { color: var(--accent); }
  a:hover { text-decoration: underline; }
  
  code {
    font-family: var(--font-mono);
    font-size: 0.87em;
    background: #ebe8e0;
    border-radius: 3px;
    padding: 1px 5px;
  }
  
  strong { font-weight: 700; }
  em { font-style: italic; }
  
  hr {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 2.5rem 0;
    max-width: var(--content-w);
  }
  
  p {
      margin-top:2rem;
  }
  
  /* ── NAVIGATION ─────────────────────────────────────────── */
  nav {
    position: fixed;
    top: 0; left: 0;
    width: var(--nav-w);
    height: 100vh;
    overflow-y: auto;
    background: var(--nav-bg);
    color: var(--nav-text);
    padding: 1.8rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  
  .nav-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
  }
  
  .nav-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 14px;
    color: #fff;
  }
  
  
  /* ── MAIN ───────────────────────────────────────────────── */
  main {
    margin-left: var(--nav-w);
    padding: 2.5rem clamp(1rem, 5vw, 3.5rem);
    flex: 1;
  }
  
  /* ── HEADER ─────────────────────────────────────────────── */
  header { max-width: var(--content-w); margin-bottom: 2.5rem; }
  
  .week-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-faint);
    margin-bottom: 0.8rem;
  }
  
  h1 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
  }
  
  .subtitle {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--ink-mid);
    margin-bottom: 1.2rem;
    max-width: 520px;
  }
  
  .tags { display: flex; flex-wrap: wrap; gap: 6px; }
  
  .tags span {
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--accent-bg);
    color: var(--accent);
    padding: 3px 9px;
    border-radius: 100px;
  }
  
  /* ── SECTIONS ───────────────────────────────────────────── */
  section { max-width: var(--content-w); margin-bottom: 0; }
  
  section p { margin-bottom: 0.8rem; }
  
  h2 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--ink);
    display: inline-block;
  }
  
  h3 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink-mid);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1.4rem;
    margin-bottom: 0.5rem;
  }
  
  /* ── LISTS ──────────────────────────────────────────────── */
  ol, ul { padding-left: 1.4rem; margin-bottom: 1rem; }
  li { margin-bottom: 0.35rem; font-size: 0.95rem; }
  
  /* Checklist */
  .checklist { list-style: none; padding: 0; }
  .checklist li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--ink-mid);
  }
  .checklist li::before {
    content: '○';
    position: absolute; left: 0;
    color: var(--ink-faint);
  }
  .checklist li.done { color: var(--ink); }
  .checklist li.done::before { content: '●'; color: var(--accent); }
  
  /* ── IMAGE PLACEHOLDERS ─────────────────────────────────── */
  /*
    These .img divs are stand-ins for real photos.
    Replace them with: <img src="images/photo.jpg" alt="description">
    The .img class on a real <img> will apply the same border + radius.
  */
  .img, img {
    display: block;
    width: 100%;
    background: #ebe8e0;
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 4/3;
  
    /* placeholder label styling — won't show on real images */
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
  }
  img { display: block; object-fit: cover; } /* reset for real images */
  
  .img.tall  { aspect-ratio: 3/4; }
  .img.wide  { aspect-ratio: 16/7; }
  .img.video { background: #111; color: #555; }
  
  figcaption {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-faint);
    margin-top: 5px;
    line-height: 1.4;
  }
  
  /* ── IMAGE GRIDS ────────────────────────────────────────── */
  .grid-2, .grid-3 {
    display: grid;
    gap: 10px;
    margin: 1.2rem 0;
  }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  
  /* ── NOTE / CALLOUT ─────────────────────────────────────── */
  .note {
    border-left: 3px solid var(--accent);
    background: var(--accent-bg);
    color: var(--accent);
    padding: 0.8rem 1rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 1.2rem 0;
  }
  .note.warn {
    border-color: #c07800;
    background: #fdf3dd;
    color: #7a4c00;
  }
  
  /* ── TABLE ──────────────────────────────────────────────── */
  table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9rem;
    margin: 0.8rem 0 1.2rem;
  }
  thead tr { background: var(--ink); color: #fff; }
  th {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 12px;
    text-align: left;
  }
  td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-mid);
  }
  tbody tr:nth-child(odd) td { background: #f0ede5; }
  
  /* ── FILE LINKS ─────────────────────────────────────────── */
  .files { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0; }
  
  .file {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--rule);
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    transition: border-color 0.15s;
  }
  .file:hover { border-color: var(--accent); text-decoration: none; }
  
  .ext {
    font-size: 10px;
    font-weight: 500;
    background: var(--accent-bg);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 3px;
  }
  
  /* ── FOOTER ─────────────────────────────────────────────── */
  footer {
    max-width: var(--content-w);
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-faint);
  }
  
  .footer-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }
  .footer-nav a {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
  }
  .footer-nav a:hover { text-decoration: underline; }
  
  /* ── MOBILE NAV TOGGLE ──────────────────────────────────── */
  #nav-toggle {
    display: none;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 200;
    background: var(--nav-bg);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
  }
  
  /* ── RESPONSIVE ─────────────────────────────────────────── */
  @media (max-width: 680px) {
    nav { transform: translateX(calc(-1 * var(--nav-w) - 4px)); transition: transform 0.25s; }
    nav.open { transform: translateX(0); }
    #nav-toggle { display: block; }
    main { margin-left: 0; padding-top: 3.8rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
  }
  
  @media (max-width: 420px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
  }
  