/* ==========================================================
   matt-merrill.com — single-page bio
   Palette: navy / charcoal + warm brass accent
   ========================================================== */
:root {
  --navy-900: #0d1a30;
  --navy-800: #13233f;
  --navy-700: #1c3156;
  --charcoal: #24282f;
  --ink: #2b3038;
  --muted: #5b6370;
  --line: #e2e4e8;
  --paper: #ffffff;
  --tint: #f5f3ef;
  --accent: #b5833f;        /* brass, used for rules & large text */
  --accent-strong: #8c6020; /* AA-contrast on white for small text */
  --accent-light: #d9b37a;  /* on navy */
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1140px;
  --radius: 6px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
cite { font-style: italic; }
.nowrap { white-space: nowrap; }

h1, h2, h3, .hero-title { text-wrap: balance; }
h1, h2, h3 { font-variant-numeric: lining-nums; font-family: var(--serif); color: var(--navy-800); line-height: 1.12; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.005em; }
h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 26, 48, .96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { border-radius: 7px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav-list a { display: block; padding: 8px 12px; color: #d6dbe4; text-decoration: none; font-size: .9rem; font-weight: 500; letter-spacing: .01em; border-radius: var(--radius); }
.nav-list a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-list .nav-cta { color: var(--navy-900); background: var(--accent-light); margin-left: 8px; }
.nav-list .nav-cta:hover { background: #e6c793; color: var(--navy-900); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #e7ebf2;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(181,131,63,.16), transparent 60%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 70%);
  padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 600; color: var(--accent-light); margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(3rem, 2rem + 4.4vw, 5.4rem); font-weight: 600; line-height: 1; margin-bottom: 14px; }
.hero-title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); color: #f1e3cc; margin-bottom: 22px; line-height: 1.25; }
.hero-lede { font-size: 1.125rem; max-width: 36em; color: #c9d1de; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: var(--radius); font-weight: 600; font-size: .98rem; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent-light); color: var(--navy-900); }
.btn-primary:hover { background: #e6c793; color: var(--navy-900); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.06); }

.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.14); }
.hero-facts div { padding-right: 18px; }
.hero-facts div + div { padding-left: 18px; border-left: 1px solid rgba(255,255,255,.14); }
.hero-facts dt { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: 2rem; font-weight: 600; color: #fff; line-height: 1.1; }
.hero-facts dd { margin: 4px 0 0; font-size: .86rem; color: #aeb8c8; line-height: 1.4; }

.hero-photo { margin: 0; position: relative; justify-self: end; width: 100%; max-width: 420px; }
.hero-photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1.5px solid var(--accent); border-radius: var(--radius); opacity: .75; }
.hero-photo picture, .hero-photo img { position: relative; border-radius: var(--radius); }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 24px 60px rgba(0,0,0,.35); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--charcoal); color: #d9dde3; }
.section-dark h2 { color: #fff; }
.kicker { display: inline-flex; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 600; color: var(--accent-strong); margin-bottom: 14px; }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.section-dark .kicker { color: var(--accent-light); }
.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; max-width: 860px; margin-left: auto; margin-right: auto; }
.section-intro { color: var(--muted); font-size: 1.08rem; max-width: 46em; margin-top: 4px; }
.section-head.center .section-intro { margin-left: auto; margin-right: auto; }

.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.split .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin-bottom: 0; }
.prose { max-width: 40em; }
.prose .lead { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: clamp(1.35rem, 1.15rem + .7vw, 1.7rem); line-height: 1.45; color: var(--navy-800); font-weight: 500; margin-bottom: 1.1em; }

/* Cards */
.cards { display: grid; gap: 24px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 30px 28px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card p { color: var(--muted); }
.card h3.sub { font-size: 1.2rem; margin-top: 22px; }
.tags { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .84rem; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: #eef1f6; color: var(--navy-700); }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.plain li:last-child { border-bottom: 0; }
.plain.compact li { font-size: .9rem; padding: 6px 0; line-height: 1.45; }
.degrees li { display: flex; flex-direction: column; padding: 12px 0; }
.degrees strong { font-family: var(--serif); font-size: 1.6rem; color: var(--navy-800); line-height: 1.1; }

/* Results */
.feature-results { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }
.result-feature { background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #cfd6e2; border-radius: var(--radius); padding: 34px 34px 30px; position: relative; overflow: hidden; }
.result-feature::after { content: ""; position: absolute; left: 34px; right: 34px; bottom: 0; height: 3px; background: var(--accent); }
.result-feature h3 { color: #fff; font-size: 1.55rem; }
.result-meta { text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 600; color: var(--accent-light); margin-bottom: 10px; }
.result-figure { font-variant-numeric: lining-nums; font-family: var(--serif); font-weight: 600; font-size: clamp(3rem, 2.2rem + 2.6vw, 4.2rem); color: #fff; line-height: 1; margin-bottom: 14px; }
.result-feature p:last-child { margin-bottom: 4px; }
.result-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.result-list li { position: relative; padding: 16px 0 16px 26px; border-bottom: 1px solid var(--line); }
.result-list li::before { content: ""; position: absolute; left: 2px; top: 27px; width: 10px; height: 2px; background: var(--accent); }
.fineprint { font-size: .84rem; color: var(--muted); margin-top: 24px; font-style: italic; }
.fineprint.on-dark { color: #a3abb7; text-align: center; }

/* Awards */
.awards { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; }
.awards li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.awards li:first-child { border-top: 1px solid rgba(255,255,255,.12); }
.award-name { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; color: #fff; line-height: 1.3; }
.award-years { font-size: .92rem; font-weight: 600; color: var(--accent-light); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Speaking */
.list-title { font-size: 1.6rem; margin-bottom: 18px; }
.list-title + .timeline { margin-bottom: 48px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.timeline time { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--accent-strong); margin-bottom: 2px; }
.timeline p { margin: 0; }
.pubs { padding-left: 0; list-style: none; margin: 0; }
.pubs li { padding: 16px 20px; background: var(--tint); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 12px; }

/* Contact */
.contact { background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #cfd6e2; }
.contact h2 { color: #fff; }
.contact .kicker { color: var(--accent-light); }
.contact .section-intro { color: #b6c0cf; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.contact-card { font-style: normal; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); }
.contact-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 26px; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.contact-row:last-child { border-bottom: 0; }
a.contact-row:hover { background: rgba(255,255,255,.05); color: #fff; }
a.contact-row:hover .contact-value { color: var(--accent-light); }
.contact-label { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 600; color: var(--accent-light); flex: none; }
.contact-value { font-size: 1.05rem; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: #091323; color: #9aa5b6; font-size: .86rem; padding: 44px 0 36px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-top p { margin: 0; }
.footer-name { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: 1.4rem; color: #fff; font-weight: 600; }
.disclaimer { max-width: 62em; }
.disclaimer p { margin-bottom: .7em; line-height: 1.6; }
.disclaimer strong { color: #d6dbe4; }
.copyright { margin: 18px 0 0; color: #7f8a9c; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav-list li:not(:last-child) { display: none; }
  .cards.three { grid-template-columns: 1fr 1fr; }
  .cards.three .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; justify-self: start; max-width: 300px; margin-bottom: 8px; }
  .split { grid-template-columns: 1fr; }
  .split .section-head { position: static; margin-bottom: 8px; }
  .feature-results, .result-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  :root { --header-h: 60px; }
  .brand { font-size: 1.2rem; }
  .brand img { width: 30px; height: 30px; }
  .cards.three { grid-template-columns: 1fr; }
  .hero-photo { max-width: 240px; }
  .hero-photo::before { inset: 12px -12px -12px 12px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero-facts { grid-template-columns: 1fr; gap: 14px; }
  .hero-facts div, .hero-facts div + div { padding: 0; border-left: 0; display: flex; align-items: baseline; gap: 14px; }
  .hero-facts dt { font-size: 1.6rem; min-width: 4.2em; }
  .card { padding: 24px 22px; }
  .result-feature { padding: 28px 24px 26px; }
  .result-feature::after { left: 24px; right: 24px; }
  .awards li { flex-direction: column; gap: 4px; }
  .award-years { text-align: left; white-space: normal; }
  .award-name { font-size: 1.25rem; }
  .contact-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 20px; }
  .contact-value { text-align: left; }
}

@media print {
  .site-header, .hero-actions, .skip-link { display: none; }
  .hero, .contact, .section-dark, .result-feature, .site-footer { background: #fff !important; color: #000 !important; }
  .hero h1, .contact h2, .section-dark h2, .award-name, .result-feature h3, .result-figure { color: #000 !important; }
}
