/* Minimal by decision (D1, D11): a name, then each project with a title, one
   line and its interactive demo. System fonts only, so the page makes no
   third-party requests (D12). Colours follow the viewer's light or dark
   setting; the dark palette is Doorcam's. */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --fg: #1b1a1f;
  --muted: #5d5967;
  --line: #e3e1e8;
  --accent: #6b3fae;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1c1c1c;
    --fg: #ededed;
    --muted: #9e9e9e;
    --line: #2e2e2e;
    --accent: #a06bd4;
    color-scheme: dark;
  }
}

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

/* The hidden attribute must win over any display rule, or toggled elements
   (screens, notifications) stay visible. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 48px);
}

header.page {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem);
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.project {
  display: grid;
  gap: 0.5rem;
  padding-block: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 650;
  line-height: 1.25;
}

.project > p {
  margin: 0;
  max-width: 65ch;
  color: var(--muted);
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Each demo mounts into its slot. Until then the slot says so plainly. */
.demo {
  margin-top: 1rem;
  min-height: 16rem;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.demo > p {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

footer.page {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 2.5rem;
}

footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
