/* Toby Miller AI — site styles. No external fonts, no external requests. */
:root {
  --bg: #0b0c0d;
  --panel: #131416;
  --panel-2: #181a1d;
  --line: #26292d;
  --text: #e9eaec;
  --muted: #9ba0a7;
  --accent: #c8f31d;
  --accent-ink: #0b0c0d;
  --radius: 10px;
  --maxw: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.18rem; color: #c9ccd1; max-width: 62ch; }
.muted { color: var(--muted); }
.spaced { margin-top: 32px; }
.eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.hl { color: var(--accent); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11,12,13,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 800; letter-spacing: .04em; font-size: 1.15rem; text-transform: uppercase; }
.brand::before { content: ""; width: 4px; height: 26px; background: var(--accent); display: block; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--text); font-size: .95rem; font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { text-decoration: none; color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); padding: 8px 12px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 8px; font-weight: 700; font-size: .98rem; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: #4a4e54; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 86px 0 70px; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; right: 0; top: 0; width: 62%; height: 100%; opacity: .9; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 34%, rgba(11,12,13,.55) 62%, rgba(11,12,13,0) 100%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: 18px; }

/* Sections */
section.block { padding: 72px 0; border-bottom: 1px solid var(--line); }
section.block.tight { padding: 52px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: border-color .15s; }
.card:hover { border-color: #3a3e44; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card .tag { display: inline-block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.card ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.card ul li { margin-bottom: 4px; }
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; border-color: var(--accent); }
.card .more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 700; font-size: .92rem; }
.icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: 14px; }

/* Next-up banner */
.nextup { background: linear-gradient(135deg, #15190a 0%, var(--panel) 60%); border: 1px solid #3b4a12; border-radius: var(--radius); padding: 30px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.nextup h3 { font-size: 1.5rem; margin: 6px 0 8px; }
.nextup .meta { color: var(--muted); font-size: .95rem; }
.badge { display: inline-block; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }

/* Lists */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 170px 1fr; gap: 20px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--accent); font-weight: 700; font-size: .92rem; }
.timeline strong { display: block; }
.timeline span.d { color: var(--muted); font-size: .95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line); background: var(--panel); padding: 7px 14px; border-radius: 99px; font-size: .9rem; color: #cfd2d6; }

/* About layout */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: start; }
.portrait { aspect-ratio: 4/5; border-radius: var(--radius); border: 1px solid var(--line);
  background: url("../img/toby.jpg") center top / cover no-repeat, linear-gradient(160deg, #1a1d12, #101112);
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 18px; color: #3d4a10; font-size: 4rem; font-weight: 800; }

/* Page heads */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); max-width: 22ch; }

/* Form */
form.contact { display: grid; gap: 18px; max-width: 640px; }
label { font-weight: 650; font-size: .93rem; display: block; margin-bottom: 6px; }
input, select, textarea { width: 100%; background: var(--panel); border: 1px solid #353a40; color: var(--text); padding: 12px 14px; border-radius: 8px; font: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 160px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .9rem; color: var(--muted); }
.status { padding: 14px 16px; border-radius: 8px; font-weight: 600; display: none; }
.status.ok { display: block; background: #16210a; border: 1px solid #3b4a12; color: var(--accent); }
.status.err { display: block; background: #2a1213; border: 1px solid #5b2326; color: #ff9a9a; }

/* Footer */
.site-footer { padding: 44px 0 56px; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: #c6c9ce; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .portrait { max-width: 260px; }
  .nextup { grid-template-columns: 1fr; }
  .hero canvas { width: 100%; opacity: .45; }
  .hero::after { background: linear-gradient(180deg, rgba(11,12,13,.5), var(--bg)); }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 24px 18px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .hero { padding: 56px 0 48px; }
  section.block { padding: 52px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
