/* ============================================================
   style.css  —  shared styles for every page of the site
   ------------------------------------------------------------
   Every .html file links to this one file, so changing a color
   or font here updates the WHOLE site at once.
   Change --accent to recolor every link and label.
   Fonts are system fonts (already on every device) so pages
   load instantly with zero downloads.
   ============================================================ */
 
:root {
  --bg:        #c9f2c7;   /* page background */
  --ink:       #243119;   /* main text */
  --muted:     #96be8c;   /* dates, captions, secondary text */
  --accent:    #629460;   /* links + labels (a warm copper — a nod to PCB traces) */
  --card:      #aceca1;   /* project card background */
  --hairline:  #e8e6e1;   /* thin divider lines */
 
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
 
  --measure:   760px;     /* max content width */
 
  /* --- Aliases used by the interactive demo widget ---------------
     These map the widget's generic token names onto the site palette
     above, so the demo inherits the site's look automatically. */
  --text-secondary: var(--muted);
  --text-muted:     var(--muted);
  --surface-1:      var(--card);
  --radius:         8px;
}
 
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
 
/* Safety net: no image may ever be wider than its container.
   (Keeps screenshots and diagrams from overflowing the column.) */
img { max-width: 100%; height: auto; }
 
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
 
/* The centered column every page lives inside */
.wrap { max-width: var(--measure); margin: 0 auto; padding: 64px 24px 96px; }
 
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
 
/* Visually hidden, but read by screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
 
/* ---------- Hero / intro ---------- */
h1 { font-size: 36px; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 8px; }
.tagline {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.04em;
  color: var(--muted); margin: 0 0 28px;
}
.lede p { margin: 0 0 16px; }
.contact { margin: 24px 0 0; }
 
/* ---------- Section heading ---------- */
.section-head { margin: 64px 0 28px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 8px;
}
.section-head h2 { font-size: 24px; letter-spacing: -0.01em; margin: 0; }
 
/* ---------- Project cards (home page) ---------- */
.cards { display: grid; gap: 20px; }
 
.card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
  padding: 18px;
  background: var(--card);
  border-left: 3px solid transparent;   /* copper line appears on hover */
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-left-color: var(--accent); transform: translateY(-2px); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
 
.card-thumb {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 6px; background: #e7e4de; display: block;
}
.card-body h3 { margin: 2px 0 6px; font-size: 20px; }
.card-desc { margin: 0 0 12px; color: #333; font-size: 16px; line-height: 1.55; }
.card-more { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
 
/* stack the card on narrow screens */
@media (max-width: 560px) { .card { grid-template-columns: 1fr; } }
 
/* ---------- Project detail page ---------- */
.back { font-family: var(--font-mono); font-size: 13px; display: inline-block; margin-bottom: 28px; }
.detail-meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin: 0 0 24px; }
.detail p { margin: 0 0 16px; }
.detail h2 { font-size: 22px; margin: 36px 0 12px; }
 
figure { margin: 28px 0; }
figure img { width: 100%; height: auto; border-radius: 8px; display: block; }
figcaption { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 8px; }
.hero-img { width: 100%; height: auto; border-radius: 8px; margin: 8px 0 28px; display: block; }
 
/* ---------- Footer ---------- */
footer {
  margin-top: 72px; padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
}
 
/* ---------- Small screens ---------- */
@media (max-width: 520px) {
  body { font-size: 17px; }
  .wrap { padding: 40px 20px 72px; }
  h1 { font-size: 30px; }
}
 
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
 
/* ---------- Project links row (Demo / GitHub) ---------- */
.links { display: flex; flex-wrap: wrap; gap: 18px; margin: 2px 0 20px; }
.links a { font-family: var(--font-mono); font-size: 20px; }
 
/* ---------- Side-by-side figures ---------- */
.figrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.figrow figure { margin: 0; }
@media (max-width: 560px) { .figrow { grid-template-columns: 1fr; } }
 
/* ---------- "In progress" markers ---------- */
.wip {
  display: inline-block; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 2px 9px; margin-left: 10px; vertical-align: middle;
}
.card-badge {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-left: 8px;
}
.card-thumb.fit {
  object-fit: contain;
}
 
/* ---------- Interactive demo (bit-depth crusher) ----------
   A framed, try-it-yourself widget. Uses the site's copper accent
   and mono utility face so it reads as part of the page. */
.demo {
  margin: 28px 0;
  padding: 20px 22px 22px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.demo-label {                 /* small mono caption above the widget */
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 16px;
}
/* copper slider + focus ring */
.demo input[type="range"] { accent-color: var(--accent); cursor: pointer; }
.demo input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* mono for the numeric readouts, matching the site's data style */
.demo .stat-title { font-family: var(--font-mono); letter-spacing: 0.02em; }
.demo .stat-value { font-family: var(--font-mono); }


video.hero-img {
  display: block;
  width: 100%;
  height: auto;
}
