/* ==========================================================================
   gbrockleonard.com
   Dark, cinematic theme: charcoal, brass, serif display type.
   ========================================================================== */

:root {
  --bg: #0d0e11;
  --bg-alt: #121318;
  --surface: #17191f;
  --surface-2: #1d2028;
  --line: #2a2d36;
  --text: #e8e4dc;
  --muted: #9b968c;
  --brass: #c9a45c;
  --brass-bright: #e2c07c;
  --brass-dim: rgba(201, 164, 92, 0.14);
  --steel: #7f9bb3;
  --danger: #e07a6a;
  --ok: #8fcfa4;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brass-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--brass); color: #111; }

.container { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -60px; z-index: 100; background: var(--brass); color: #111; padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-weight: 600; transition: top 0.2s; }
.skip-link:focus { top: 1rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(13, 14, 17, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--text); text-decoration: none; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--brass);
  border-radius: 10px; font: 700 0.8rem/1 var(--font-mono); color: var(--brass-bright); letter-spacing: 0.04em;
}
.brand-name { font-family: var(--font-display); font-size: 1.15rem; }
.nav-menu { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: block; padding: 0.5rem 0.8rem; color: var(--muted); text-decoration: none;
  font-size: 0.93rem; font-weight: 500; border-radius: var(--radius-sm); transition: color 0.2s, background 0.2s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--text); background: var(--brass-dim); }
.nav-menu a.nav-cta { color: #111; background: var(--brass); margin-left: 0.4rem; }
.nav-menu a.nav-cta:hover { background: var(--brass-bright); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brass); color: #111; }
.btn-primary:hover { background: var(--brass-bright); color: #111; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass-bright); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 5rem; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1200px 600px at 85% 10%, rgba(201, 164, 92, 0.13), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(127, 155, 179, 0.10), transparent 60%),
    linear-gradient(180deg, #0b0c0f 0%, var(--bg) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
.hero-grain {
  position: absolute; inset: -50%; z-index: -1; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(8) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0); } 25% { transform: translate(-3%,2%); } 50% { transform: translate(2%,-3%); } 75% { transform: translate(-2%,-1%); } }
.eyebrow { font: 500 0.85rem/1.4 var(--font-mono); color: var(--brass-bright); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.2rem; }
.hero h1 { font-size: clamp(2.8rem, 7.5vw, 6rem); margin-bottom: 0.15em; max-width: 14ch; }
.hero-role { font: 500 clamp(1.15rem, 2.4vw, 1.6rem)/1.4 var(--font-mono); color: var(--steel); min-height: 1.5em; margin-bottom: 1.4rem; }
.caret { display: inline-block; width: 0.6ch; height: 1.1em; margin-left: 2px; background: var(--brass); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #cfcac0; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 2rem 0 3rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 880px; }
.stats div { background: rgba(18, 19, 24, 0.85); padding: 1.1rem 1.25rem; }
.stats dt { font: 500 0.75rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stats dd { margin: 0.35rem 0 0; font: 700 1.2rem/1.3 var(--font-display); color: var(--text); white-space: nowrap; }
.scroll-cue { position: absolute; left: 50%; bottom: 1.8rem; width: 26px; height: 42px; border: 1px solid var(--muted); border-radius: 14px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--brass); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; position: relative; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-feature { background: linear-gradient(180deg, var(--bg) 0%, #15130f 100%); }
.section-head { max-width: 760px; margin-bottom: 3rem; }
.section-kicker { font: 500 0.82rem/1 var(--font-mono); color: var(--brass); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1rem; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-copy p { color: #d4cfc5; }
.callout { border-left: 2px solid var(--brass); padding: 1rem 1.25rem; background: var(--brass-dim); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text) !important; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--brass), var(--line) 30%, var(--line)); }
.role { position: relative; padding-left: 3rem; margin-bottom: 1.25rem; }
.role::before {
  content: ""; position: absolute; left: 4px; top: 1.6rem; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg-alt); border: 2px solid var(--brass); transition: background 0.2s, box-shadow 0.2s;
}
.role.open::before { background: var(--brass); box-shadow: 0 0 0 6px var(--brass-dim); }
.role-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.2s, transform 0.2s var(--ease); }
.role-card:hover { border-color: #3a3e49; }
.role.open .role-card { border-color: rgba(201, 164, 92, 0.45); }
.role-toggle {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; align-items: center;
  padding: 1.35rem 1.5rem; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.role-company { font: 700 0.8rem/1.3 var(--font-mono); color: var(--brass-bright); letter-spacing: 0.08em; text-transform: uppercase; }
.role-title { font: 700 1.2rem/1.3 var(--font-display); grid-column: 1; }
.role-dates { font: 500 0.85rem/1.3 var(--font-mono); color: var(--muted); grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
.role-chevron { grid-column: 2; grid-row: 2; justify-self: end; width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.3s var(--ease); margin-top: -6px; }
.role.open .role-chevron { transform: rotate(-135deg); margin-top: 4px; border-color: var(--brass); }
.role-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.role.open .role-body { grid-template-rows: 1fr; }
.role-body-inner { overflow: hidden; }
.role-content { padding: 0 1.5rem 1.5rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.role-summary { color: #cfcac0; }
.role-points { margin: 0; padding: 0; list-style: none; columns: 2 320px; column-gap: 2rem; }
.role-points li { position: relative; padding-left: 1.2rem; margin-bottom: 0.55rem; break-inside: avoid; color: #c9c4ba; font-size: 0.97rem; }
.role-points li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 6px; height: 6px; border-radius: 1px; background: var(--brass); transform: rotate(45deg); }
.timeline-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; padding-left: 3rem; }
.noscript { color: var(--muted); }

/* ---------- Skills ---------- */
.skills-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.5rem 0.95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font: 500 0.88rem/1 var(--font-body); cursor: pointer; transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: #3a3e49; }
.chip[aria-selected="true"] { background: var(--brass); border-color: var(--brass); color: #111; }
.chip .n { font-family: var(--font-mono); opacity: 0.7; margin-left: 0.35rem; font-size: 0.78rem; }
.search input {
  width: min(340px, 100%); padding: 0.7rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.93rem;
}
.search input::placeholder { color: #6f6b64; }
.search input:focus { border-color: var(--brass); outline: none; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.skill-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; animation: fadeUp 0.45s var(--ease) both; }
.skill-group h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 0.6rem; }
.skill-group h3 .ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--brass-dim); color: var(--brass-bright); font: 600 0.8rem/1 var(--font-mono); }
.skill-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-list li { padding: 0.32rem 0.65rem; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.85rem; color: #d2cdc3; }
.skill-list li mark { background: var(--brass); color: #111; border-radius: 3px; padding: 0 2px; }
.empty { color: var(--muted); text-align: center; padding: 2rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Strength cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; overflow: hidden; transition: border-color 0.25s, transform 0.25s var(--ease);
}
.card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--brass), transparent); opacity: 0; transition: opacity 0.25s; }
.card:hover { border-color: #3a3e49; transform: translateY(-3px); }
.card:hover::after { opacity: 1; }
.card-num { font: 500 0.8rem/1 var(--font-mono); color: var(--brass); margin-bottom: 1rem; display: block; }
.card p { color: #c9c4ba; font-size: 0.98rem; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.project { background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.25s var(--ease); }
.project:hover { border-color: rgba(201, 164, 92, 0.45); transform: translateY(-3px); }
.project-tag { font: 500 0.75rem/1 var(--font-mono); color: var(--steel); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.project p { color: #c9c4ba; font-size: 0.97rem; flex: 1; }
.tech { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tech li { font: 500 0.75rem/1 var(--font-mono); padding: 0.4rem 0.6rem; border-radius: 6px; color: var(--brass-bright); background: var(--brass-dim); }

/* ---------- Writing / books ---------- */
.writing-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; margin-bottom: clamp(3rem, 7vw, 6rem); }
.writing-grid:last-child { margin-bottom: 0; }
.writing-grid-flip { grid-template-columns: 1fr 300px; }
.writing-grid-flip .book { order: 2; }
.book { perspective: 1200px; }
.book-cover {
  aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; padding: 2rem 1.6rem; display: flex; flex-direction: column;
  justify-content: space-between; text-align: center; color: #f1e6cf; position: relative;
  background:
    radial-gradient(circle at 50% 35%, rgba(201, 164, 92, 0.28), transparent 60%),
    linear-gradient(160deg, #2a2117 0%, #120f0b 70%);
  box-shadow: var(--shadow), inset 6px 0 10px rgba(0, 0, 0, 0.45), inset -1px 0 0 rgba(255, 255, 255, 0.06);
  transform: rotateY(-14deg) rotateX(3deg); transition: transform 0.6s var(--ease);
}
.book-cover::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: rgba(0, 0, 0, 0.35); }
.book:hover .book-cover { transform: rotateY(-4deg) rotateX(1deg); }
.book-cover-security {
  color: #d8f3e6;
  background:
    linear-gradient(rgba(143, 207, 164, 0.08) 1px, transparent 1px) 0 0 / 100% 22px,
    radial-gradient(circle at 50% 40%, rgba(143, 207, 164, 0.22), transparent 60%),
    linear-gradient(160deg, #0f1c1a 0%, #070b0b 75%);
}
.book-series { font: 500 0.72rem/1.4 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.8; }
.book-title { font: 700 2.1rem/1.05 var(--font-display); }
.book-author { font: 500 0.8rem/1 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.85; }
.book-label { font: 500 0.78rem/1 var(--font-mono); color: var(--steel); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.8rem; }
.book-heading { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.writing-lede { font-size: 1.2rem; color: var(--text); }
.writing-grid p { color: #cfcac0; }
.pull-quote { margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 2px solid var(--brass); font: 500 1.2rem/1.5 var(--font-display); color: var(--brass-bright); font-style: italic; }
.book-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.book-actions .btn[hidden] { display: none; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-list { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-label { width: 90px; flex: none; font: 500 0.78rem/1 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.contact-list a { font-size: 1.1rem; text-decoration: none; }
.copy { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 0.35rem 0.8rem; font: 500 0.78rem/1 var(--font-mono); cursor: pointer; }
.copy:hover { color: var(--text); border-color: var(--brass); }
.copy.done { color: var(--ok); border-color: var(--ok); }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font: 500 0.85rem/1 var(--font-body); color: var(--muted); margin-bottom: 0.5rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 0.95rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 0.97rem; transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brass); outline: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 0.82rem; margin-top: 0.35rem; }
.contact-form .btn { width: 100%; margin-top: 0.4rem; }
.form-note { font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.to-top { color: var(--muted); }
.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(23, 25, 31, 0.92); color: var(--brass-bright); font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow); transition: transform 0.2s var(--ease), border-color 0.2s;
}
.back-to-top:hover { transform: translateY(-3px); border-color: var(--brass); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .projects { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.75rem 1rem 1.25rem; background: rgba(13, 14, 17, 0.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); transform: translateY(-110%); visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
  }
  .nav-menu.open { transform: none; visibility: visible; }
  .nav-menu a { padding: 0.9rem 0.75rem; font-size: 1rem; }
  .nav-menu a.nav-cta { margin: 0.5rem 0 0; text-align: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .writing-grid, .writing-grid-flip { grid-template-columns: 1fr; }
  .writing-grid-flip .book { order: 0; }
  .book { max-width: 240px; }
}
@media (max-width: 640px) {
  .projects { grid-template-columns: 1fr; }
  .role { padding-left: 2.2rem; }
  .timeline-actions { padding-left: 2.2rem; }
  .role-toggle { grid-template-columns: 1fr; padding: 1.1rem 1.15rem; }
  .role-dates { grid-column: 1; grid-row: auto; text-align: left; }
  .role-chevron { display: none; }
  .role-content { padding: 1rem 1.15rem 1.2rem; }
  .contact-list li { flex-wrap: wrap; }
  .hero-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Hero contact strip and availability ---------- */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 0.6rem; vertical-align: middle; box-shadow: 0 0 0 0 rgba(143, 207, 164, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(143, 207, 164, 0); } 100% { box-shadow: 0 0 0 0 rgba(143, 207, 164, 0); } }
.hero-contact { list-style: none; margin: -1.5rem 0 2.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; font-size: 0.98rem; }
.hero-contact li { display: flex; align-items: baseline; gap: 0.6rem; color: var(--text); }
.hero-contact span { font: 500 0.72rem/1 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.hero-contact a { text-decoration: none; color: var(--text); border-bottom: 1px solid var(--brass); }
.hero-contact a:hover { color: var(--brass-bright); }

/* ---------- Services ---------- */
.targets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-bottom: 2rem; padding: 1.1rem 1.25rem; border: 1px solid rgba(201, 164, 92, 0.35); border-radius: var(--radius); background: var(--brass-dim); }
.targets-label { font: 700 0.75rem/1 var(--font-mono); color: var(--brass-bright); text-transform: uppercase; letter-spacing: 0.12em; }
.targets ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.targets li { padding: 0.38rem 0.75rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 0.86rem; font-weight: 500; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: border-color 0.25s, transform 0.25s var(--ease); }
.service:hover { border-color: rgba(201, 164, 92, 0.45); transform: translateY(-3px); }
.service h3 { font-size: 1.12rem; padding-top: 0.9rem; border-top: 2px solid var(--brass); display: inline-block; }
.service p { color: #c9c4ba; font-size: 0.95rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note.ok { color: var(--ok); }
.form-note.bad { color: var(--danger); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-actions .btn { width: 100%; margin-top: 0.4rem; }
@media (max-width: 1080px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services, .form-actions { grid-template-columns: 1fr; } }
@media print {
  .hero-contact { margin: 0.3rem 0 0.5rem; gap: 0 1.2rem; font-size: 10pt; }
  .hero-contact a { border: 0; }
  .status-dot, .hero-lede { display: none; }
  .services { display: block; } .service { border: 0; padding: 2pt 0; background: none; } .service h3 { border: 0; padding: 0; font-size: 11pt; } .service p { color: #111; }
  .targets { border: 0; background: none; padding: 0; } .targets li { border: 0; background: none; padding: 0; } .targets li:not(:last-child)::after { content: ","; }
}

/* ---------- Print: a clean one-column résumé ---------- */
@media print {
  :root { --text: #111; --muted: #444; --line: #ccc; --brass: #7a5a1c; --brass-bright: #7a5a1c; }
  body { background: #fff; color: #111; font-size: 10.5pt; line-height: 1.45; }
  .site-header, .scroll-cue, .hero-actions, .hero-grain, .back-to-top, .skills-toolbar, .timeline-actions,
  #projects, #writing, .contact-form, .copy, .site-footer, .role-chevron, .caret, .skip-link { display: none !important; }
  .hero, .section, .section-alt, .section-feature { background: none !important; min-height: 0; padding: 0.6rem 0; border: 0; }
  .hero::before { display: none; }
  .hero h1 { font-size: 22pt; margin: 0; }
  .hero-role { font-size: 12pt; color: #333; margin: 0.2rem 0; }
  .stats { display: none; }
  h2 { font-size: 14pt; border-bottom: 1px solid #999; padding-bottom: 2pt; margin-top: 10pt; }
  .section-kicker, .section-sub, .eyebrow { display: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .about-grid, .contact-grid { display: block; }
  .callout { background: none; border-left: 2px solid #999; }
  .timeline::before, .role::before { display: none; }
  .role { padding-left: 0; break-inside: avoid-page; }
  .role-card { border: 0; background: none; }
  .role-toggle { padding: 4pt 0; }
  .role-body { grid-template-rows: 1fr !important; }
  .role-content { padding: 0 0 6pt; border: 0; }
  .role-points { columns: 2; }
  .role-points li { color: #111; margin-bottom: 1pt; font-size: 9.5pt; }
  .skill-group, .card { border: 0; padding: 4pt 0; background: none; break-inside: avoid; }
  .skills-grid, .cards { display: block; }
  .skill-list li { background: none; border: 0; padding: 0; color: #111; }
  .skill-list li:not(:last-child)::after { content: ","; }
  .card p, .about-copy p, .role-summary { color: #111; }
  a { color: #111; text-decoration: none; }
}
