/* ==========================================================================
   taylormcintire.com — shared stylesheet
   Palette: charcoal greys + muted brass accent. Serif typography.
   ========================================================================== */

:root {
  --bg: #1e1f22;          /* page background */
  --bg-raised: #2b2d31;   /* cards / panels */
  --bg-sunken: #18191b;   /* footer, inputs */
  --line: #3a3c42;        /* hairlines & borders */
  --text: #e8e4dc;        /* soft off-white body text */
  --text-muted: #b3ada3;  /* secondary text */
  --accent: #c9a96e;      /* muted brass */
  --accent-strong: #dcc08a;
  --focus: #e6cf9f;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 68ch;
  --wrap: 1080px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; color: var(--text); margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--accent); color: var(--bg); padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(30, 31, 34, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: 1rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  color: var(--text); text-decoration: none; letter-spacing: 0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); font-size: 0.8rem; letter-spacing: 0.06em;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.site-nav a {
  display: block; padding: 0.45rem 0.85rem; border-radius: 6px;
  color: var(--text-muted); text-decoration: none; font-size: 1rem;
}
.site-nav a:hover { color: var(--text); background: var(--bg-raised); }
.site-nav a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 0.4rem 0.7rem; font: inherit; font-size: 0.95rem; cursor: pointer;
}

@media (max-width: 640px) {
  .nav-toggle { display: inline-block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 0.5rem 1.25rem 1rem; }
  .site-nav a { padding: 0.7rem 0.5rem; }
  .no-js .site-nav { display: block; position: static; border: 0; }
  .no-js .nav-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow {
  font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.9rem;
}
.hero-title { font-size: 1.3rem; color: var(--text); margin: 0 0 0.3rem; }
.hero-title span { color: var(--text-muted); }
.hero-meta { list-style: none; padding: 0; margin: 1.25rem 0 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--text-muted); font-size: 1rem; }
.hero-meta li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.8; }

/* Headshot placeholder — replace .monogram with <img class="headshot" ...> */
.portrait { width: clamp(150px, 22vw, 230px); aspect-ratio: 1; }
.monogram, .headshot {
  width: 100%; height: 100%; border-radius: 50%;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 8px var(--bg), 0 0 0 9px var(--line);
}
.monogram {
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #34363b, var(--bg-raised) 60%, #232428);
  font-family: var(--font-display); font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 500;
  color: var(--accent); letter-spacing: 0.04em;
}
.headshot { object-fit: cover; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.3rem; border-radius: 999px; font: inherit; font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid var(--accent); transition: background 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: #1a1b1d; }
.btn-primary:hover { background: var(--accent-strong); color: #1a1b1d; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: rgba(201, 169, 110, 0.1); color: var(--accent-strong); }

@media (max-width: 640px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .portrait { width: 132px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.lede { font-size: 1.2rem; max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose p { color: var(--text); }
.muted { color: var(--text-muted); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 0.6rem; bottom: 0.6rem; width: 1px; background: var(--line); }
.timeline > li { position: relative; padding-left: 2.25rem; margin-bottom: 2.5rem; }
.timeline > li:last-child { margin-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.org { font-family: var(--font-display); font-size: 1.45rem; margin: 0 0 0.15rem; }
.org-meta { color: var(--text-muted); font-size: 0.98rem; margin: 0 0 1rem; }
.role { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 0.75rem; }
.role:last-child { margin-bottom: 0; }
.role-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; align-items: baseline; }
.role h4 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; margin: 0; color: var(--text); }
.role time, .dates { color: var(--accent); font-size: 0.95rem; white-space: nowrap; font-variant-numeric: lining-nums; }
.role ul { margin: 0.6rem 0 0; padding-left: 1.15rem; color: var(--text-muted); font-size: 1.02rem; }
.role li { margin-bottom: 0.25rem; }
.role li::marker { color: var(--accent); }
.role .note { color: var(--text-muted); font-size: 0.95rem; margin: 0.4rem 0 0; }

.tags { list-style: none; padding: 0; margin: 0.7rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li {
  font-size: 0.88rem; padding: 0.2rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-muted); background: var(--bg-sunken);
}

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.card h3 { margin-bottom: 0.4rem; }
.card p:last-child { margin-bottom: 0; }
.card .dates { display: block; margin-bottom: 0.5rem; }
.card-kicker { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.5rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 1.1rem; }
.field label { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 0.9rem;
}
.field input::placeholder, .field textarea::placeholder { color: #8f8a82; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.22); }
.field textarea { min-height: 9rem; resize: vertical; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; margin: 0; font-size: 1rem; }
.form-status.ok { color: #a9c79b; }
.form-status.err { color: #e3a3a3; }

/* ---------- Blog ---------- */
.page-head { padding: clamp(3rem, 8vw, 5.5rem) 0 2.5rem; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--text-muted); max-width: var(--measure); font-size: 1.15rem; margin: 0; }
.empty-state {
  text-align: center; max-width: 34rem; margin: 0 auto;
  padding: 3rem 2rem; border: 1px dashed var(--line); border-radius: 14px; background: var(--bg-raised);
}
.empty-state .glyph { font-family: var(--font-display); font-size: 2.6rem; color: var(--accent); line-height: 1; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.6rem; }
.empty-state p { color: var(--text-muted); }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.post-list a { text-decoration: none; color: inherit; display: block; }
.post-list a:hover h3 { color: var(--accent); }

.template-banner {
  background: rgba(201, 169, 110, 0.12); border: 1px solid var(--accent); color: var(--text);
  border-radius: var(--radius); padding: 0.9rem 1.2rem; margin: 2rem 0 0; font-size: 1rem;
}
.post { padding: clamp(2.5rem, 6vw, 4rem) 0 4rem; }
.post-header { max-width: var(--measure); margin: 0 auto 2.5rem; }
.post-header .meta { color: var(--text-muted); font-size: 1rem; }
.post-body { max-width: var(--measure); margin: 0 auto; }
.post-body h2 { font-size: 1.65rem; margin-top: 2.2rem; }
.post-body blockquote { margin: 1.8rem 0; padding: 0.3rem 0 0.3rem 1.3rem; border-left: 2px solid var(--accent); color: var(--text-muted); font-style: italic; }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--bg-raised); border: 1px solid var(--line); padding: 0.05em 0.35em; border-radius: 4px; }
.post-body pre { background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; overflow-x: auto; }
.post-body pre code { background: none; border: 0; padding: 0; }
.post-footer { max-width: var(--measure); margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.notfound .code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 7.5rem); color: var(--accent); line-height: 1; margin: 0 0 0.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-sunken); border-top: 1px solid var(--line); padding: 2rem 0; color: var(--text-muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem; align-items: center; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Refinements ---------- */
.role .tags { padding-left: 0; }
.page-head .eyebrow { color: var(--accent); font-size: 0.85rem; }
.empty-state .glyph svg { width: 2.4rem; height: 2.4rem; margin: 0 auto; }
@media (max-width: 640px) {
  .hero-title span { display: block; }
  .hero-title .sep { display: none; }
  .timeline > li { padding-left: 1.75rem; }
  .role { padding: 1rem 1.05rem; }
  .role ul:not(.tags) { padding-left: 1rem; }
}
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
@media print { body { display: block; min-height: 0; } }
