:root {
  /* Brand: scheme D4 "Olive, Rust + Sand, Sage, Brick". Full guide: docs/BRAND.md */
  --olive: #3B4A1E; --page: #F5F2E6; --surface: #FFFDF6; --ink: #2A3514; --muted: #6A6550; --line: #E1DCC8;
  --rust: #B5552B; --rust-text: #A44C26; --on-rust: #FFF8EE;
  --sand: #E3B48A; --sage: #8FA36B; --brick: #7A3E2B; --on-light-accent: #22290F; --on-dark: #F5F2E6;
  --chip: #E6EBD2; --thead: #EEF0DF; --subtotal: #E6E9D7; --code-bg: #2E3A17; --code-text: #F2E7C9;
  --danger: #9E3B2B;
  --font-head: "Josefin Sans", "Century Gothic", "Segoe UI", sans-serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  /* The names the project stylesheets use (keep these) */
  --bg: var(--page); --panel: var(--surface); --text: var(--ink);
  --accent: var(--rust-text); --on-accent: var(--on-rust);
  --live: #4D6B2C; --wip: #8A5A1E; --planned: var(--muted);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 var(--font-body); background: var(--bg); color: var(--text); }
::selection { background: var(--sand); color: var(--ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); }
h1 { font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* --- header: olive bar, sand stripe on top, lamb only (no wordmark) --- */
.site-header { background: var(--olive); border-top: 6px solid var(--sand); color: var(--on-dark); padding: 8px 0; }
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 54px; height: 54px; display: block; }
nav a { margin-left: 16px; color: var(--muted); }
nav a:hover { color: var(--text); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 22px; font-family: var(--font-head); font-weight: 600; font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; }
.site-header nav a { margin-left: 0; color: var(--on-dark); opacity: .85; padding: 12px 0 8px; border-bottom: 2px solid transparent; }
.site-header nav a:hover { opacity: 1; color: var(--on-dark); text-decoration: none; border-bottom-color: var(--sand); }
.site-header nav a[aria-current="page"] { opacity: 1; border-bottom-color: var(--on-dark); }
.site-header nav a.nav-pill { opacity: 1; background: var(--on-dark); color: var(--olive); padding: 9px 18px; border-radius: 999px; border-bottom: 0; letter-spacing: .08em; }
.site-header nav a.nav-pill:hover { background: var(--sand); color: var(--on-light-accent); }

body { min-height: 100vh; display: flex; flex-direction: column; }
main.wrap { flex: 1 0 auto; width: 100%; padding: 36px 20px 60px; }
.hero { display: flex; gap: 28px; align-items: center; }
.hero-mark { width: 140px; height: 140px; flex: none; }
@media (max-width: 600px) { .hero { flex-direction: column; align-items: flex-start; gap: 12px; } .hero-mark { width: 96px; height: 96px; } }
.hero h1 { font-size: 2.6rem; margin: 0 0 4px; }
.tagline { font-size: 1.15rem; margin: 0; }
.muted { color: var(--muted); }
.summary { margin-top: 16px; max-width: 64ch; }
h2 { margin: 40px 0 12px; font-size: 1.35rem; font-weight: 700; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.job { margin-bottom: 22px; }
.job h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.job header p { margin: 0 0 6px; }
.job ul { margin: 0; padding-left: 20px; }
.skills dt { font-weight: 600; margin-top: 10px; }
.skills dd { margin: 0; color: var(--muted); }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.card p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.badge { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.badge-live { color: var(--live); border-color: var(--live); }
.badge-in-progress { color: var(--wip); border-color: var(--wip); }
.badge-planned { color: var(--planned); border-color: var(--planned); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .75rem; font-weight: 600; background: var(--chip); border-radius: 999px; padding: 2px 9px; color: var(--ink); }

/* --- footer: olive bar, brick stripe on top, full logo with TY LAMB --- */
.site-footer { background: var(--olive); border-top: 6px solid var(--brick); color: var(--on-dark); padding: 30px 0; font-size: .92rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; }
.footer-logo { width: 140px; height: 140px; display: block; flex: none; }
.footer-text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; }
.footer-small { margin: 0; opacity: .88; }
.site-footer a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--sand); }

code, pre { font-family: var(--font-mono); }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; }
.big { font-size: 3rem; font-weight: 700; margin: 10px 0; }

/* --- auth & admin --- */
.auth { max-width: 520px; }
.auth-mark { width: 96px; height: 96px; display: block; margin-bottom: 4px; }
.auth-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 16px 0; }
.auth-box h2 { margin: 0 0 10px; border: 0; padding: 0; font-size: 1.1rem; }
.stack { display: flex; flex-direction: column; gap: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 6px; }
input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
input:focus { outline: 2px solid var(--rust); outline-offset: 1px; }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; }
button, .button { font: inherit; font-weight: 600; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: var(--on-accent); cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: var(--rust); border-color: var(--rust); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--accent); padding: 0; }
button.danger { color: var(--danger); }
.alert { background: #F6E3DC; color: #7A2E1E; border: 1px solid #E7BBA9; border-radius: 10px; padding: 8px 12px; }
.alert.ok { background: var(--chip); color: #2F4419; border-color: #C9D3A8; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; background: var(--thead); }
.legal { max-width: 68ch; }
.legal h2 { margin-top: 28px; font-size: 1.15rem; }
.legal li { margin-bottom: 6px; }
.legal blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--rust, #B5552B); background: rgba(0,0,0,.03); }

/* --- 3D prints --- */
.small { font-size: .85rem; font-weight: 400; }
h2 .small { float: right; margin-top: 6px; font-family: var(--font-body); }
.print-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.print-grid.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.print-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.print-card a { color: inherit; text-decoration: none; display: block; }
.print-card img, .print-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--chip); }
.print-noimg { display: flex; align-items: center; justify-content: center; }
.print-noimg img { width: 64px; height: 64px; aspect-ratio: auto; object-fit: contain; background: none; opacity: .7; }
.print-body { padding: 10px 12px 12px; }
.print-body strong { display: block; }
.print-body p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.print-card:hover { border-color: var(--rust); }
.print-detail h1 { margin-bottom: 2px; }
.print-photos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 16px 0; }
.print-photos img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.print-desc { font-size: 1.05rem; }
.print-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.print-details dt { color: var(--muted); }
.print-details dd { margin: 0; }
.tagbar a.tag { text-decoration: none; }
