/* will.mckinleymedia.com
   One palette (cool neutral + cobalt), one radius (6px), light + dark via tokens. */

:root {
  --bg: #f4f5f2;
  --surface: #fbfbf9;
  --ink: #15171a;
  --muted: #565c64;
  --faint: #8a9098;
  --line: #dcdfd9;
  --accent: #2647c4;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgb(30 40 60 / .06), 0 12px 32px -12px rgb(30 40 60 / .18);
  --radius: 6px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101113;
    --surface: #17191c;
    --ink: #e9eaec;
    --muted: #a0a6ae;
    --faint: #737a83;
    --line: #2a2d32;
    --accent: #8fa5ff;
    --accent-ink: #0d1020;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101113;
  --surface: #17191c;
  --ink: #e9eaec;
  --muted: #a0a6ae;
  --faint: #737a83;
  --line: #2a2d32;
  --accent: #8fa5ff;
  --accent-ink: #0d1020;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -12px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 520px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: var(--radius);
  font: 500 15px/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .15s ease, border-color .2s, background .2s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn svg { width: 16px; height: 16px; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 96px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 {
  font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -.035em; font-weight: 600;
  max-width: 12ch;
}
.hero .lede { margin-top: 24px; font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 46ch; }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero figure img { border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.hero figcaption { margin-top: 12px; font-size: 14px; color: var(--faint); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Sections */
section { scroll-margin-top: 64px; }
.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.section-title { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -.025em; font-weight: 600; }
.section-intro { margin-top: 16px; color: var(--muted); max-width: 60ch; }

.role { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.02em; line-height: 1.2; font-weight: 600; }
.meta { margin-top: 6px; font: 400 14px/1.5 var(--mono); color: var(--faint); }
.points { margin-top: 20px; display: grid; gap: 12px; color: var(--muted); }
.points li { padding-left: 20px; position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: .78em; width: 8px; height: 1px; background: var(--faint); }

/* Grail: text + large screenshot */
.job-feature { margin-top: 56px; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.job-feature img { border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
@media (max-width: 860px) { .job-feature { grid-template-columns: 1fr; } }

/* Personalis: header + scroll-snap strip */
.job-strip { margin-top: 96px; }
.job-strip .head { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 64px); }
.job-strip .points { margin-top: 0; }
@media (max-width: 860px) { .job-strip .head { grid-template-columns: 1fr; } .job-strip .points { margin-top: 4px; } }
.strip {
  margin-top: 40px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 34%);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
@media (max-width: 640px) { .strip { grid-auto-columns: 82%; } }
.strip figure { scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.strip figcaption, .tile figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* VoiceBase + McKinley Media: two columns, different weights */
.job-pair { margin-top: 96px; display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 5vw, 64px); }
@media (max-width: 860px) { .job-pair { grid-template-columns: 1fr; } }
.mosaic { margin-top: 32px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.tile .frame { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); }
.tile.wide { grid-column: span 4; }
.tile.wide .frame { aspect-ratio: 16 / 10.4; }
.tile.tall { grid-column: span 2; }
.tile.tall .frame { aspect-ratio: auto; height: calc(100% - 34px); }
.tile.third { grid-column: span 2; }
@media (max-width: 640px) {
  .mosaic { grid-template-columns: 1fr 1fr; }
  .tile.wide { grid-column: span 2; }
  .tile.tall, .tile.third { grid-column: span 1; }
  .tile.tall .frame { aspect-ratio: 4 / 3; height: auto; }
}

/* Projects */
.projects { margin-top: 48px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.project {
  grid-column: span 4; display: flex; flex-direction: column; gap: 10px;
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; transition: border-color .2s, transform .2s;
}
.project.lead { grid-column: span 8; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.project.lead .kind, .project.lead p { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.project.half { grid-column: span 6; }
a.project:hover { border-color: var(--ink); transform: translateY(-2px); }
a.project.lead:hover { border-color: var(--accent); }
.project h3 { font-size: 22px; letter-spacing: -.015em; font-weight: 600; }
.project.lead h3 { font-size: clamp(26px, 2.6vw, 32px); }
.project .kind { font: 400 13px/1.4 var(--mono); color: var(--faint); }
.project p { color: var(--muted); }
.project .go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.project .go svg { width: 14px; height: 14px; transition: transform .2s; }
a.project:hover .go svg { transform: translate(2px, -2px); }
@media (max-width: 900px) { .project, .project.lead, .project.half { grid-column: span 12; } }

/* Skills */
.skills { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(32px, 5vw, 64px); }
.skills > div { padding: 24px 0; border-top: 1px solid var(--line); }
.skills h3 { font-size: 17px; font-weight: 600; }
.skills p { margin-top: 6px; color: var(--muted); font-size: 16px; }
@media (max-width: 720px) { .skills { grid-template-columns: 1fr; } }

/* Contact */
.contact .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 64px); align-items: end; }
.contact .email {
  display: inline-block; margin-top: 24px; font-size: clamp(24px, 3.6vw, 44px); letter-spacing: -.025em; font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--accent);
  overflow-wrap: anywhere;
}
.contact .email:hover { color: var(--accent); }
.links { display: grid; gap: 2px; }
.links a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.links a span:last-child { font: 400 14px/1.6 var(--mono); color: var(--faint); }
.links a:hover span:first-child { color: var(--accent); }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: 1fr; } }

.site-footer { padding: 32px 0 48px; color: var(--faint); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Entrance (CSS only, reduced-motion safe) */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: movement only, so content is never invisible if animations stall. */
  .rise { animation: lift .7s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes lift { from { transform: translateY(12px); } to { transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}

/* ---------- Resume page ---------- */
.resume-bar { padding: 40px 0 0; }
.resume-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.formats { display: flex; flex-wrap: wrap; gap: 8px; }
.formats .btn { height: 38px; padding: 0 14px; font-size: 14px; }
.formats .btn small { font: 400 12px/1 var(--mono); color: var(--faint); }
.formats .btn-primary small { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }

.doc {
  max-width: 860px; margin: 32px auto 80px; padding: clamp(28px, 6vw, 64px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.doc header h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.03em; line-height: 1.05; font-weight: 600; }
.doc header .title { margin-top: 6px; font-size: 19px; color: var(--muted); }
.doc header .contact-line { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 4px 18px; font: 400 14px/1.6 var(--mono); color: var(--muted); }
.doc header .contact-line a { text-decoration: none; }
.doc header .contact-line a:hover { color: var(--accent); }
.doc h2 { margin-top: 44px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; letter-spacing: .01em; color: var(--accent); }
.doc p, .doc li { font-size: 16px; line-height: 1.6; }
.doc > section > p { margin-top: 14px; }
.doc .job { margin-top: 26px; }
.doc .job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; align-items: baseline; }
.doc .job-head h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.doc .job-head .where { color: var(--faint); font-weight: 400; }
.doc .job-head .when { font: 400 13.5px/1.5 var(--mono); color: var(--faint); white-space: nowrap; }
.doc .job .pos { color: var(--muted); }
.doc ul { margin-top: 10px; display: grid; gap: 8px; }
.doc ul li { padding-left: 18px; position: relative; color: var(--ink); }
.doc ul li::before { content: ""; position: absolute; left: 0; top: .8em; width: 7px; height: 1px; background: var(--faint); }
.doc .tech { display: block; margin-top: 2px; font: 400 13px/1.5 var(--mono); color: var(--faint); }
.doc dl { margin: 14px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; }
.doc dt { font-weight: 600; font-size: 15px; }
.doc dd { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 640px) { .doc dl { grid-template-columns: 1fr; gap: 2px; } .doc dd { margin-bottom: 10px; } .doc { border-left: 0; border-right: 0; border-radius: 0; } }

@media print {
  @page { margin: 14mm 14mm; }
  :root, :root[data-theme] { --bg: #fff; --surface: #fff; --ink: #111; --muted: #333; --faint: #555; --line: #ccc; --accent: #1f3fae; }
  body { font-size: 10.5pt; background: #fff; }
  .site-header, .resume-bar, .site-footer, .skip { display: none !important; }
  .doc { margin: 0; padding: 0; border: 0; max-width: none; }
  .doc h2 { margin-top: 18pt; }
  .doc .job { break-inside: avoid; }
  a { text-decoration: none; }
}
