/* abbaszoeb.com - shared shell. Every project page on this domain pulls this file, so
   the site stays one thing as more projects land. Page-specific rules live in the page. */

/* ── Tokens ─────────────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  --bg: #0d1211;
  --surface: #141b1a;
  --surface-2: #1b2422;
  --line: #26312f;
  --line-strong: #35433f;
  --text: #e7e9e6;
  --muted: #8b9a96;
  --accent: #58b5a3;
  --accent-soft: #14302c;
  --crit: #e0705f;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 64ch;
  --radius: 3px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.5);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f2f4f1;
    --surface: #ffffff;
    --surface-2: #e8ece7;
    --line: #d6dcd7;
    --line-strong: #bcc5bf;
    --text: #15201d;
    --muted: #5a6b66;
    --accent: #1f7a6b;
    --accent-soft: #dff0ec;
    --crit: #b23c2b;
    --shadow: 0 1px 2px rgb(21 32 29 / 0.06), 0 8px 24px -14px rgb(21 32 29 / 0.22);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f4f1;
  --surface: #ffffff;
  --surface-2: #e8ece7;
  --line: #d6dcd7;
  --line-strong: #bcc5bf;
  --text: #15201d;
  --muted: #5a6b66;
  --accent: #1f7a6b;
  --accent-soft: #dff0ec;
  --crit: #b23c2b;
  --shadow: 0 1px 2px rgb(21 32 29 / 0.06), 0 8px 24px -14px rgb(21 32 29 / 0.22);
}

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

/* Any class that sets display would otherwise beat the browser's [hidden] rule, which
   silently reveals panels the page means to keep closed. Settle it once, here. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 40;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.012em;
}

p { margin: 0; }

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 2rem) 5rem;
}

.stack { display: flex; flex-direction: column; }

/* ── Site header ────────────────────────────────────────────────────────────────────── */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 7vw, 4rem);
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.wordmark:hover { color: var(--text); }

.theme-toggle {
  appearance: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }

/* ── Shared bits ────────────────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede { color: var(--muted); font-size: 1.0625rem; }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.btn {
  appearance: none;
  font: inherit;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  background: var(--accent);
  color: var(--bg);
  transition: filter 120ms ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-quiet {
  background: none;
  color: var(--muted);
  border-color: var(--line);
}
.btn-quiet:hover:not(:disabled) { color: var(--text); border-color: var(--line-strong); filter: none; }

.site-foot {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

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