/* kevinjpatton.com — site styles (used by _layouts/test.html) */

:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --surface-muted: #F5F3EE;
  --ink: #1C1917;
  --ink-2: #44403C;
  --muted: #57534E;
  --line: #E7E5E4;
  --line-strong: #D6D3D1;
  --accent: #1D4ED8;
  --accent-dark: #1E3A8A;
  --dark: #1C1917;
  --dark-2: #292524;
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;

  /* Course colors, matching each course site */
  --c1010: #5F6E62;  --c1010-dot: #849286;
  --c2030: #A3472A;  --c2030-bar: #D97757;
  --c2300: #57534E;  --c2300-dot: #A8A29E;
  --c3050: #064E3B;
  --c3230: #2A475E;
  --c3700: #6D28D9;  --c3700-dot: #8B5CF6;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }

.skip-link {
  position: absolute; left: 16px; top: -48px;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
  z-index: 100; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--accent); }

.nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.menu-btn {
  display: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn:hover { background: var(--surface-muted); }

@media (max-width: 760px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .site-header .wrap { padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; gap: 0; padding: 4px 0 8px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); font-weight: 700; }
}

/* ---------- Common pieces ---------- */
main { flex: 1 0 auto; }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--muted); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-strong { font-weight: 600; text-decoration: none; }
.link-strong:hover { text-decoration: underline; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.section { padding-top: 80px; padding-bottom: 80px; }
.section-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 32px; }
.section-head h2 { font-size: 32px; font-weight: 700; }

.page-head { padding-top: 72px; padding-bottom: 8px; max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.page-head p { font-size: 19px; color: var(--ink-2); }

.stack { display: flex; flex-direction: column; }

/* ---------- Home: hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; padding-top: 88px; padding-bottom: 72px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero h1 { font-size: 64px; line-height: 1.04; font-weight: 800; letter-spacing: -0.03em; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { font-size: 20px; color: var(--ink-2); max-width: 560px; }
.hero .btn-row { padding-top: 8px; }
.hero-photo { flex: 1 1 280px; margin: 0; display: flex; justify-content: center; }
.hero-photo img {
  width: 320px; height: auto; aspect-ratio: 1 / 1; border-radius: 50%; object-fit: cover;
  border: 8px solid #fff; box-shadow: 0 20px 40px rgba(28, 25, 23, 0.12);
}

/* ---------- Course cards ---------- */
.course-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.course-card { flex: 1 1 300px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.course-card .bar { height: 8px; }
.course-card .body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.course-card .code { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.course-card h3 { font-size: 22px; font-weight: 700; }
.course-card .desc { color: var(--muted); flex-grow: 1; }
.course-card .links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 15px; font-weight: 600; padding-top: 8px; }
.course-card .links a { color: var(--muted); }
.course-card .links a.primary { text-decoration: none; }

/* Wide (teaching page) variant: color stripe on the left */
.course-card.wide { flex: 1 1 380px; flex-direction: row; }
.course-card.wide .bar { width: 8px; height: auto; flex-shrink: 0; }
.course-card.wide .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-card.wide h3 { font-size: 24px; }

.pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; color: #166534; background: #DCFCE7; white-space: nowrap; }

.c1010 .code, .c1010 .links a.primary { color: var(--c1010); } .c1010 .bar, .dot.c1010 { background: var(--c1010-dot); }
.c2030 .code, .c2030 .links a.primary { color: var(--c2030); } .c2030 .bar { background: var(--c2030-bar); } .dot.c2030 { background: var(--c2030-bar); }
.c2300 .code { color: var(--c2300); } .dot.c2300 { background: var(--c2300-dot); }
.c3050 .code, .c3050 .links a.primary { color: var(--c3050); } .c3050 .bar, .dot.c3050 { background: var(--c3050); }
.c3230 .code, .c3230 .links a.primary { color: var(--c3230); } .c3230 .bar, .dot.c3230 { background: var(--c3230); }
.c3700 .code, .c3700 .links a.primary { color: var(--c3700); } .c3700 .bar, .dot.c3700 { background: var(--c3700-dot); }

.btn-course { color: #fff; }
.btn-course:hover { color: #fff; filter: brightness(1.15); }
.c2030 .btn-course { background: var(--c2030); }
.c3230 .btn-course { background: var(--c3230); }
.c3050 .btn-course { background: var(--c3050); }
.c3700 .btn-course { background: var(--c3700); }
.c1010 .btn-course { background: var(--c1010); }

.hours-card { flex: 1 1 240px; min-width: 0; border-radius: var(--radius); background: var(--surface-muted); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.hours-card .when { font-size: 18px; font-weight: 600; line-height: 1.5; }
.hours-card .where { font-size: 15px; color: var(--muted); }

/* ---------- Recent work ---------- */
.work { display: flex; flex-wrap: wrap; gap: 48px; }
.work-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.work-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.work h2 { font-size: 32px; font-weight: 700; }
.work-side h2 { font-size: 20px; padding-top: 10px; }

.pub { padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.pub .eyebrow { color: var(--accent); }
.pub h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.pub .cite { font-size: 15px; color: var(--muted); }
.pub .abstract { font-size: 17px; line-height: 1.65; color: var(--ink-2); }

.rule-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rule-list li { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.rule-list .title { font-size: 17px; font-weight: 600; }
.rule-list .meta { font-size: 14px; color: var(--muted); }

/* ---------- Podcasts band ---------- */
.dark-band { background: var(--dark); color: #F5F5F4; }
.dark-band .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 72px; }
.dark-band .intro { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.dark-band .eyebrow { color: #A8A29E; }
.dark-band h2 { font-size: 32px; font-weight: 700; color: #fff; }
.dark-band p { font-size: 17px; line-height: 1.65; color: #D6D3D1; }
.dark-band .list { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.dark-link {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 20px; border-radius: 12px;
  background: var(--dark-2); color: #fff; text-decoration: none; font-weight: 600;
}
.dark-link:hover { background: #3A3532; color: #fff; }

/* ---------- Teaching page ---------- */
.teaching-sections { display: flex; flex-direction: column; gap: 64px; padding-top: 56px; padding-bottom: 96px; }
.teaching-sections h2 { font-size: 26px; font-weight: 700; margin-bottom: 24px; }

.upcoming { border: 1px dashed #A8A29E; border-radius: var(--radius); background: var(--surface-muted); padding: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.upcoming h3 { font-size: 22px; font-weight: 700; margin-top: 8px; }
.upcoming .soon { font-size: 15px; font-weight: 600; color: var(--muted); }

.past-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.past-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.past-list .code { font-size: 14px; font-weight: 700; color: var(--muted); width: 96px; }
.past-list .name { font-size: 17px; font-weight: 600; flex: 1 1 240px; }
.past-list a { font-size: 15px; font-weight: 600; }
.past-list a.site { text-decoration: none; }
.past-list a.syl { color: var(--muted); }

.callout { padding: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.callout .text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.callout h2 { font-size: 20px; margin: 0; }
.callout p { color: var(--muted); }

/* ---------- Research page ---------- */
.research-sections { display: flex; flex-direction: column; gap: 56px; padding-top: 56px; padding-bottom: 96px; max-width: 880px; }
.research-sections h2 { font-size: 26px; font-weight: 700; margin-bottom: 20px; }
.rule-list a { font-size: 15px; font-weight: 600; text-decoration: none; }
.rule-list a:hover { text-decoration: underline; }

/* ---------- Handouts page ---------- */
.handout-groups { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 48px; padding-bottom: 96px; }
.handout-group { flex: 1 1 440px; min-width: 0; padding: 28px; }
.handout-group h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.handout-group ul { margin: 0; padding: 0; list-style: none; }
.handout-group li { border-bottom: 1px solid var(--line); }
.handout-group li:last-child { border-bottom: 0; }
.handout-group a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; font-weight: 600; color: var(--ink); text-decoration: none; }
.handout-group a:hover { color: var(--accent); }
.handout-group .ext { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; }

/* ---------- Podcasts page ---------- */
.pod-grid { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 48px; padding-bottom: 96px; }
.pod-card { flex: 1 1 440px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.pod-card .body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.pod-card .code { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.pod-card h2 { font-size: 22px; font-weight: 700; }
.pod-card .desc { color: var(--muted); }
.pod-card iframe { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; margin-top: 8px; }
.pod-card .more { font-size: 15px; font-weight: 600; text-decoration: none; padding-top: 4px; }
.pod-card .bar { height: 8px; }

/* ---------- CV page ---------- */
.cv { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 56px; padding-bottom: 96px; }
.cv-side { flex: 1 1 260px; max-width: 320px; display: flex; flex-direction: column; gap: 16px; }
.cv-side img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.cv-main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.cv-main .bio { display: flex; flex-direction: column; gap: 16px; font-size: 18px; color: var(--ink-2); }
.cv-main h2 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { font-size: 14px; font-weight: 600; color: var(--accent-dark); background: #E8EEFC; border-radius: 999px; padding: 6px 14px; }

/* ---------- Contact page ---------- */
.contact-grid { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 48px; padding-bottom: 96px; }
.contact-card { flex: 1 1 260px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.contact-card .icon { width: 44px; height: 44px; border-radius: 12px; background: #E8EEFC; color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.contact-card h2 { font-size: 18px; font-weight: 700; }
.contact-card p { color: var(--ink-2); }
.contact-card .note { font-size: 15px; color: var(--muted); }
.contact-card a { font-weight: 600; text-decoration: none; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; font-size: 14px; color: var(--muted); }
.site-footer .col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.site-footer .name { font-weight: 700; color: var(--ink); font-size: 16px; }
.site-footer a { font-weight: 600; text-decoration: none; }

/* ---------- Phone sizes ---------- */
@media (max-width: 760px) {
  .hero { padding-top: 40px; padding-bottom: 48px; gap: 20px; flex-direction: column-reverse; align-items: flex-start; }
  .hero-text { flex-basis: auto; gap: 20px; }
  .hero h1 { font-size: 40px; line-height: 1.06; }
  .hero .lede { font-size: 17px; }
  .hero .btn-row { flex-direction: column; align-self: stretch; }
  .hero-photo { flex-basis: auto; justify-content: flex-start; }
  .hero-photo img { width: 128px; border-width: 5px; }
  .section { padding-top: 40px; padding-bottom: 40px; }
  .section-head h2, .work h2, .dark-band h2 { font-size: 24px; }
  .section-head { margin-bottom: 20px; }
  .course-card .body, .hours-card, .pub, .callout, .upcoming, .pod-card .body, .contact-card { padding: 20px; }
  .course-card.wide { flex-direction: column; }
  .course-card.wide .bar { width: auto; height: 6px; }
  .pub h3 { font-size: 21px; }
  .pub .abstract { font-size: 15px; }
  .dark-band .wrap { padding-top: 40px; padding-bottom: 40px; gap: 24px; }
  .page-head { padding-top: 40px; }
  .page-head h1 { font-size: 38px; }
  .page-head p { font-size: 17px; }
  .teaching-sections, .research-sections { padding-top: 32px; gap: 40px; }
  .past-list .code { width: auto; }
  .cv-side { max-width: 220px; }
  .cv-main .bio { font-size: 16px; }
}
