/* projects.rycolston.com — brand-compliant per ~/bigbrainremote/Reference/Brand.md
   Brand status: TENTATIVE (2026-04-26). Update here when palette locks. */

:root {
  /* Brand primaries */
  --olive: #6b7c3a;
  --olive-light: #8a9b4f;
  --bamboo: #a37545;
  --bamboo-light: #c19068;
  --concrete: #d9d9d6;

  /* Surfaces */
  --canvas: #d9d9d6;
  --card: #fafaf7;
  --hairline: #c4c4be;
  --border: #a8a8a2;

  /* Text on canvas */
  --text-primary: #1f1f1d;
  --text-secondary: #4f4f4a;
  --text-tertiary: #767672;

  /* Status (system signals only — never as brand color) */
  --status-ok: #16a34a;
  --status-wip: #c2410c;
  --status-error: #b91c1c;
  --status-deferred: #7c3aed;

  /* Layout aliases */
  --bg: var(--canvas);
  --fg: var(--text-primary);
  --muted: var(--text-secondary);
  --accent: var(--olive);
  --accent-soft: var(--card);
  --code-bg: #ecece8;
  --sidebar-bg: var(--card);
  --shadow: 0 1px 3px rgba(31, 31, 29, 0.06);
}

/* Dark theme — not in brand spec; UX extension. Keeps brand hues, swaps surfaces. */
:root[data-theme="dark"] {
  --canvas: #1c1c1a;
  --card: #232321;
  --hairline: #2f2f2c;
  --border: #44443f;
  --text-primary: #ececea;
  --text-secondary: #b8b8b1;
  --text-tertiary: #888881;
  --code-bg: #1a1a18;
  --sidebar-bg: #1f1f1d;
  --olive: #a8b884;     /* lighter olive for legibility on dark */
  --bamboo: #c19068;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
#sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--hairline);
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
}
.site-title {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}
#theme-toggle {
  background: none;
  border: 1px solid var(--hairline);
  color: var(--text-primary);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
:root:not([data-theme="dark"]) .theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }

.nav-group { margin-bottom: 1.25rem; }
.nav-group-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.nav-list { list-style: none; padding: 0; margin: 0; }
.nav-list li { margin: 0.15rem 0; }
.nav-list a {
  display: block;
  padding: 0.3rem 0.55rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.92rem;
  border-left: 2px solid transparent;
}
.nav-list a:hover {
  background: var(--card);
  border-left-color: var(--bamboo);
}
.nav-list a.active {
  background: var(--card);
  border-left-color: var(--olive);
  color: var(--olive);
  font-weight: 600;
}
.nav-sublist {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0.4rem 0.6rem;
  border-left: 1px solid var(--hairline);
}
.nav-sublist li { margin: 0.1rem 0; }
.nav-sublist a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.2rem 0.55rem;
}

/* Main */
#content {
  flex: 1;
  padding: 2.5rem 3rem 4rem;
  max-width: 920px;
}
@media (max-width: 1024px) {
  #content { padding: 5rem 1.25rem 3rem; max-width: 100%; }
  #sidebar {
    position: fixed; top: 0; left: 0;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    z-index: 30; box-shadow: var(--shadow);
  }
  #sidebar.open { transform: translateX(0); }
  #sidebar-toggle {
    display: block; position: fixed; top: 0.75rem; left: 0.75rem;
    z-index: 40; background: var(--card); border: 1px solid var(--hairline);
    color: var(--text-primary); padding: 0.45rem 0.8rem; border-radius: 6px;
    cursor: pointer; font-size: 0.85rem;
  }
}
@media (min-width: 1025px) { #sidebar-toggle { display: none; } }

/* Type */
h1, h2, h3, h4 { line-height: 1.25; color: var(--text-primary); }
h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hairline);
}
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

a { color: var(--olive); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--bamboo); }

code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid var(--hairline);
}
pre code { background: none; padding: 0; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.92rem;
  background: var(--card);
}
th, td {
  border: 1px solid var(--hairline);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--card);
  font-weight: 700;
  border-bottom: 2px solid var(--olive);
}

blockquote {
  border-left: 3px solid var(--bamboo);
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: var(--card);
  color: var(--text-secondary);
}
blockquote p { margin: 0.25rem 0; }

hr { border: 0; border-top: 1px solid var(--hairline); margin: 2rem 0; }

/* Brief header meta card — off-white card on concrete canvas, hairline border, soft shadow */
.brief-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.25rem 0 2rem;
}
.brief-meta dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.brief-meta dd { margin: 0; font-size: 0.92rem; color: var(--text-primary); }

/* Pills
   Status pills use the brand-defined status palette (system signals).
   Tier pills use brand hues (olive / bamboo variants) — never status colors. */
.pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid currentColor;
  background: transparent;
  line-height: 1.4;
}
.pill--status-planning   { color: var(--text-tertiary); }
.pill--status-in-flight  { color: var(--status-wip); }
.pill--status-done       { color: var(--status-ok); }
.pill--status-held       { color: var(--status-deferred); }
.pill--status-abandoned  { color: var(--status-error); }

.pill--tier-0 { color: var(--bamboo); }         /* Ry Colston brand */
.pill--tier-1 { color: var(--olive); }          /* Operating business */
.pill--tier-2 { color: var(--olive-light); }    /* Platform */
.pill--tier-3 { color: var(--bamboo-light); }   /* Cross-cutting bet */

/* Portfolio index */
.tier-section { margin-bottom: 2rem; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.9rem;
}
.project-card {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  transition: transform 0.08s ease, border-color 0.08s ease;
}
.project-card:hover {
  transform: translateY(-1px);
  border-color: var(--olive);
}
.project-card .name { font-weight: 600; margin-bottom: 0.25rem; color: var(--text-primary); }
.project-card .desc { font-size: 0.85rem; color: var(--text-secondary); }
.project-card .pills { margin-top: 0.5rem; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.project-card .card-children {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--olive);
  font-weight: 600;
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--olive); }

.footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
