/* ==========================================================================
   MKPS STEAM 小組 — Design Tokens
   Direction: bold, energetic, lab/circuit-board maker aesthetic.
   Deliberately avoids the cream/terracotta AI-default palette.
   ========================================================================== */

:root {
  /* ---- Color: instrument-panel base + circuit accents ---- */
  --ink: #0E1116;           /* near-black base, not pure #000 */
  --ink-soft: #171B22;      /* panel surfaces on dark */
  --paper: #F2F0E8;         /* warm paper white for light sections */
  --paper-line: #E4E1D6;    /* hairlines on paper */
  --line-dark: #2A2F38;     /* hairlines on ink */

  --amber: #FFB000;         /* primary accent — oscilloscope/multimeter glow */
  --amber-dim: #B87E00;
  --trace-green: #3DDC97;   /* secondary accent — PCB trace */
  --breadboard-blue: #4C6FFF; /* tertiary — links, tags, sparingly */

  --text-on-ink: #F2F0E8;
  --text-on-ink-dim: #9BA3AF;
  --text-on-paper: #14161B;
  --text-on-paper-dim: #565B66;

  /* ---- Type ---- */
  --font-display: "Space Grotesk", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-body: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-mono: "IBM Plex Mono", "Noto Sans Mono TC", monospace;

  /* Type scale (major third-ish, tuned) */
  --step-1: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  --step0:  clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step1:  clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --step2:  clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --step3:  clamp(2.5rem, 2rem + 2vw, 3.5rem);
  --step4:  clamp(3rem, 2.2rem + 3.5vw, 5.25rem);

  /* ---- Layout ---- */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius-sm: 4px;
  --radius-md: 8px;
  --border-w: 1.5px;
  --content-max: 1180px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: light) {
  /* Reserved for future light-mode-first pages; dark ink is default hero treatment */
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text-on-paper);
  font-size: var(--step0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p { max-width: 68ch; }

a {
  color: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--amber);
  outline-offset: 3px;
}

/* Corner-bracket motif — viewfinder/instrument framing, used sparingly */
.bracket {
  position: relative;
}
.bracket::before,
.bracket::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: var(--border-w) solid currentColor;
}
.bracket::before {
  top: -6px; left: -6px;
  border-right: none; border-bottom: none;
}
.bracket::after {
  bottom: -6px; right: -6px;
  border-left: none; border-top: none;
}
