/* BlindBear Labs — shared styles
   Auto-switches with the browser/OS color scheme (prefers-color-scheme).
   Light: paper #F4F6F6, ink #1D2023, teal #2F8577
   Dark:  paper #1D2023, ink #EEF1F2, teal #59B3A6  (Option G)
   Type: Space Grotesk (display), IBM Plex Sans (body), IBM Plex Mono (labels)
*/

:root {
  /* Light mode (default) */
  --paper: #F4F6F6;
  --ink: #1D2023;
  --muted: #63696D;
  --muted-2: #8B9094;
  --line: #DDE1E2;
  --brass: #2F8577;
  --brass-dim: #8FC4BA;
  --body-text: #33383B; /* secondary paragraph color, tuned for light bg */

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1D2023;
    --ink: #EEF1F2;
    --muted: #9CA1A6;
    --muted-2: #6F7478;
    --line: #2E3236;
    --brass: #59B3A6;
    --brass-dim: #35635C;
    --body-text: #C9CDCF; /* secondary paragraph color, tuned for dark bg */
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */

header.site-nav { padding-top: 28px; }

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.wordmark b { color: var(--brass); font-weight: 500; }

.nav-links { display: flex; gap: 26px; }

.nav-links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--muted);
}

.nav-links a:hover { color: var(--brass); }

/* ---------- Hero ---------- */

.hero { padding: 108px 0 100px 0; }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  align-items: end;
}

h1.giant {
  grid-column: 1 / -1;
  font-family: var(--display);
  font-size: clamp(46px, 8.2vw, 96px);
  line-height: 0.99;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 44px 0;
}

.hero-sub {
  grid-column: 6 / 13;
  font-size: 19px;
  color: var(--body-text);
  max-width: 46ch;
  margin: 0;
}

@media (max-width: 760px) {
  .hero-sub { grid-column: 1 / -1; }
}

/* ---------- Rotating headline word ---------- */

.rotator {
  display: inline-block;
  color: var(--brass);
  position: relative;
}

.rotator-word {
  display: inline-block;
  transition: opacity 0.26s ease, transform 0.26s ease;
  opacity: 1;
  transform: translateY(0);
}

.rotator-word.rotator-out {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.rotator-word.rotator-in {
  animation: rotatorIn 0.32s ease-out both;
}

@keyframes rotatorIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .rotator-word { transition: none; animation: none; }
}

/* ---------- Sections ---------- */

section.projects { padding: 20px 0 96px 0; }

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin: 0 0 36px 0;
}

/* ---------- Project rows (replaces boxed plates) ---------- */

.project-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 28px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.project-row:last-of-type { border-bottom: 1px solid var(--line); }

.index-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brass);
  padding-top: 10px;
}

.project-row.reserved .index-num { color: var(--muted-2); }

.project-title {
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px 0;
}

.project-row.reserved .project-title { color: var(--muted-2); }

.project-desc {
  color: var(--body-text);
  max-width: 58ch;
  margin: 0 0 16px 0;
  font-size: 16.5px;
}

.project-row.reserved .project-desc { color: var(--muted-2); }

.project-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
  margin: 0 0 16px 0;
  letter-spacing: 0.02em;
}

a.project-link {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
}

a.project-link:hover { color: var(--brass); }

@media (max-width: 560px) {
  .project-row { grid-template-columns: 1fr; gap: 8px; }
  .index-num { padding-top: 0; }
}

/* ---------- Long-form page sections (Hephaestus, etc) ---------- */

.page-hero { padding: 96px 0 88px 0; }

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 22px 0;
  max-width: 18ch;
}

.page-hero .lede {
  font-size: 19px;
  color: var(--body-text);
  max-width: 58ch;
  margin: 0;
}

.content-block { padding: 56px 0; }

.content-block h2 {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 20px 0;
  max-width: 20ch;
}

.content-block p.body-text {
  max-width: 62ch;
  color: var(--body-text);
  font-size: 17px;
}

.content-block .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin: 0 0 18px 0;
}

/* record list — flat, generous spacing, no boxed border */

.record-list { list-style: none; margin: 0; padding: 0; }

.record-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.record-list li:last-child { border-bottom: 1px solid var(--line); }

.record-list .label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--brass);
}

.record-list .desc { color: var(--body-text); }

@media (max-width: 560px) {
  .record-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* boundary paragraph — set apart by scale, not a colored rule */

.boundary p {
  font-size: 18px;
  color: var(--body-text);
  max-width: 58ch;
  line-height: 1.7;
}

/* ---------- Footer ---------- */

footer { padding: 56px 0 64px 0; border-top: 1px solid var(--line); margin-top: 20px; }

footer .foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

footer, footer a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
  text-decoration: none;
  letter-spacing: 0.02em;
}

footer a:hover { color: var(--brass); }

/* ---------- Motion ---------- */

.fade-in { animation: fadeUp 0.5s ease-out both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { animation: none; }
}

/* ---------- Error pages (404 / 403) ---------- */

.error-hero { padding: 132px 0 120px 0; }

.error-code {
  font-family: var(--display);
  font-size: clamp(96px, 16vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--brass);
  margin: 0 0 28px 0;
}

.error-hero h1 {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 18px 0;
  max-width: 22ch;
}

.error-hero .lede {
  font-size: 18px;
  color: var(--body-text);
  max-width: 52ch;
  margin: 0 0 40px 0;
}

.error-actions { display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap; }

a.error-link {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
}

a.error-link:hover { color: var(--brass); }

a.error-link.secondary {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

a.error-link.secondary:hover { color: var(--brass); border-bottom-color: var(--brass); }

/* ---------- Back link ---------- */

.back-link {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--brass); }
