/* Bryan Schreiner: site styles */

:root {
  --ink: #1c2b39;
  --muted: #586775;
  --slate: #1f3a56;
  --steel: #2c5f8d;
  --steel-dark: #234d73;
  --teal: #3a7d72;
  --rule: #dbe1e7;
  --tint: #f3f6f8;
  --paper: #ffffff;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --head-col: 230px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--steel); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--steel-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #e0a43a; outline-offset: 3px; border-radius: 2px; }

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

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 4px;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(1.4) blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand {
  font-family: var(--serif); font-weight: 600; font-size: 1.2rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.site-header nav { display: flex; gap: 22px; }
.site-header nav a {
  color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-header nav a:hover { color: var(--ink); border-bottom-color: var(--steel); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  /* the slate panel behind the portrait */
  content: ""; position: absolute; top: 0; bottom: 0; right: 0;
  width: calc(50% - var(--wrap) / 2 + 170px);
  min-width: 22%;
  background: var(--slate);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) 220px;
  gap: 64px; align-items: center;
  padding-top: 80px; padding-bottom: 88px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 5.2vw, 4.1rem); line-height: 1.04;
  letter-spacing: -0.015em; margin: 0 0 18px;
}
.headline {
  font-size: clamp(1.2rem, 2vw, 1.42rem); line-height: 1.4;
  color: var(--steel-dark); font-weight: 500; max-width: 40ch; margin-bottom: 28px;
}
.about { max-width: 62ch; }
.about p { color: #33424f; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin: 30px 0 22px; }
.location { color: var(--muted); font-size: 0.94rem; margin: 0; }

.button {
  display: inline-block; background: var(--steel); color: #fff;
  font-weight: 600; font-size: 0.98rem; text-decoration: none;
  padding: 12px 22px; border-radius: 4px;
}
.button:hover { background: var(--steel-dark); color: #fff; }
.button.light { background: #fff; color: var(--slate); }
.button.light:hover { background: #e7eef5; color: var(--slate); }
.text-link { font-weight: 600; font-size: 0.98rem; }

.portrait { margin: 0; justify-self: end; width: 100%; max-width: 220px; }
.portrait img {
  width: 100%; height: auto;
  border-radius: 3px;
  box-shadow: 0 24px 48px -24px rgba(10, 25, 40, 0.55);
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; border-top: 1px solid var(--rule); }
.section.tint { background: var(--tint); }
.section-grid { display: grid; grid-template-columns: var(--head-col) minmax(0, 1fr); gap: 48px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.85rem; line-height: 1.15;
  margin: 0 0 12px;
}
.section-head p { color: var(--muted); font-size: 0.96rem; }
.section-head { position: sticky; top: 100px; align-self: start; }

.subhead {
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem;
  margin: 56px 0 20px;
}
.subhead.first { margin-top: 0; }

.years, .org, .role { margin: 0; }
.details { list-style: disc; padding-left: 1.15em; margin: 0 0 14px; }
.details li { margin-bottom: 6px; }
.details li::marker { color: var(--steel); }

/* ---------- Projects ---------- */
.project {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px;
  padding: 36px 0; border-top: 1px solid var(--rule);
}
.project:first-child { padding-top: 0; border-top: 0; }
.project-meta .years { font-weight: 600; color: var(--ink); font-size: 0.95rem; margin-bottom: 6px; }
.project-meta .role { color: var(--steel-dark); font-weight: 500; font-size: 0.95rem; margin-bottom: 6px; }
.project-meta .org { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.project h3 {
  font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.25;
  margin: 0 0 10px;
}
.project .summary { font-size: 1.06rem; color: #2c3b48; max-width: 64ch; }
.project .details { max-width: 64ch; }
.outcome {
  border-left: 3px solid var(--teal); padding: 2px 0 2px 16px; margin: 18px 0;
  max-width: 64ch; color: #2c3b48;
}
.outcome p { margin: 0 0 6px; }
.outcome p:last-child { margin-bottom: 0; }
.outcome-link a { font-weight: 600; font-size: 0.95rem; margin-right: 22px; display: inline-block; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags li {
  font-size: 0.82rem; color: var(--steel-dark); background: #e9f0f6;
  padding: 3px 10px; border-radius: 3px;
}

/* ---------- Experience timeline ---------- */
.timeline { list-style: none; position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px;
  width: 2px; background: #c9d3dc;
}
.job { position: relative; padding-bottom: 34px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: -30px; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tint); border: 3px solid var(--steel);
}
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.job h3, .school h3 { font-size: 1.15rem; font-weight: 600; margin: 0; }
.job-head .years { color: var(--muted); font-size: 0.94rem; white-space: nowrap; }
.job > .org { color: var(--steel-dark); font-weight: 500; margin-bottom: 10px; }

.teach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
.teach h4 { margin: 0 0 2px; font-size: 1.04rem; font-weight: 600; }
.teach .org { color: var(--steel-dark); font-size: 0.92rem; margin-bottom: 6px; }
.teach p:last-child { color: #3a4956; font-size: 0.98rem; margin: 0; }

/* ---------- Publications ---------- */
.pubs { list-style: none; }
.pubs li { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); max-width: 72ch; }
.pubs li:last-child { border-bottom: 0; }
.pubs a { font-weight: 600; white-space: nowrap; }

.talks { list-style: none; }
.talks li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; margin-bottom: 18px; }
.talk-year { font-weight: 600; color: var(--steel-dark); }
.talk-title { margin: 0; font-weight: 500; }
.talk-where { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- Recognition ---------- */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.plain-list { list-style: none; }
.plain-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--rule);
}
.plain-list li:first-child { padding-top: 0; }
.item-title { margin: 0; font-weight: 500; }
.item-org { margin: 0; color: var(--muted); font-size: 0.92rem; }
.item-year { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }

/* ---------- Education ---------- */
.school { padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--rule); }
.school:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.school .degree { color: var(--steel-dark); margin: 2px 0 8px; }

/* ---------- Contact & footer ---------- */
.contact { background: var(--slate); color: #e6edf3; padding: 84px 0; }
.contact-inner { max-width: 680px; }
.contact h2 { font-family: var(--serif); font-weight: 600; font-size: 2.2rem; color: #fff; margin: 0 0 14px; }
.contact p { font-size: 1.08rem; max-width: 56ch; margin-bottom: 28px; }

.site-footer { background: #182e44; color: #b9c6d2; font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.site-footer p { margin: 0; }
.site-footer a { color: #dce6ef; margin-left: 18px; }

.noscript { padding: 24px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: 0.88rem; }
  .section-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-head { position: static; }
  .section-head p { margin-bottom: 0; }
}

@media (max-width: 820px) {
  .header-inner { flex-direction: column; align-items: flex-start; height: auto; padding-top: 12px; padding-bottom: 6px; gap: 4px; }
  .site-header nav { overflow-x: auto; max-width: 100%; gap: 18px; padding-bottom: 4px; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a { white-space: nowrap; }
  html { scroll-padding-top: 104px; }

  .hero::before { width: 100%; min-width: 0; bottom: auto; height: 150px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; padding-bottom: 64px; }
  .portrait { order: -1; justify-self: start; max-width: 130px; }

  .project { grid-template-columns: 1fr; gap: 10px; }
  .project-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .project-meta p { margin: 0 !important; }
  .teach-grid, .two-col { grid-template-columns: 1fr; }
  .two-col { gap: 40px; }
  .section { padding: 60px 0; }
}

@media (max-width: 480px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  body { font-size: 1rem; }
  .footer-inner { flex-direction: column; }
  .site-footer a { margin: 0 18px 0 0; }
}

/* ---------- Full citation list ---------- */
.record { margin-top: 40px; border-top: 1px solid var(--rule); padding-top: 24px; }
.record summary {
  cursor: pointer; font-weight: 600; color: var(--steel); font-size: 1.02rem;
  list-style-position: outside; padding: 4px 0;
}
.record summary:hover { color: var(--steel-dark); }
.record[open] summary { margin-bottom: 24px; }

.project-image { margin: 18px 0; max-width: 64ch; }
.project-image img { width: 100%; height: auto; border-radius: 3px; }
.project-image figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }
.talk-where a { font-weight: 600; }

/* ================= Build Log ================= */
.site-header nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--steel); }

.log-intro { padding: 64px 0 88px; }
.log-intro h1, .post-header h1 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(2.2rem, 4.4vw, 3.2rem); line-height: 1.08; margin: 0 0 14px;
}
.log-lede { color: var(--muted); font-size: 1.12rem; max-width: 60ch; margin-bottom: 44px; }
.log-list { display: grid; gap: 28px; }
.log-card {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start;
  color: inherit; text-decoration: none;
  padding: 0 0 28px; border-bottom: 1px solid var(--rule);
}
.log-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; }
.log-card h2 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.25; margin: 4px 0 10px; color: var(--ink); }
.log-card:hover h2 { color: var(--steel-dark); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.log-card-text { color: #33424f; max-width: 62ch; margin-bottom: 0; }
.log-card .tags { margin-top: 14px; }
.post-date { color: var(--muted); font-size: 0.92rem; font-weight: 500; margin: 0; }
.log-empty { color: var(--muted); }

.post { padding: 40px 0 88px; }
.post-wrap { max-width: 820px; }
.post-back { margin: 0 0 28px; font-size: 0.95rem; }
.post-back a { font-weight: 600; text-decoration: none; }
.post-back a::before { content: "\2190\00a0"; }
.post-back a:hover { text-decoration: underline; }
.post-back.bottom { margin: 48px 0 0; }
.post-header .post-date { margin-bottom: 8px; }
.post-cover { margin: 26px 0 0; }
.post-cover img { width: 100%; height: auto; border-radius: 3px; }

.abstract {
  margin: 32px 0 8px; padding: 26px 28px;
  background: var(--tint); border-left: 4px solid var(--steel); border-radius: 0 3px 3px 0;
}
.abstract h2 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin: 0 0 16px; }
.abstract-grid { margin: 0; display: grid; gap: 14px; }
.abstract-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.abstract-row dt { font-weight: 600; color: var(--steel-dark); }
.abstract-row dd { margin: 0; color: #2c3b48; }
.post-stats {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--rule);
}
.post-stats li { display: flex; flex-direction: column; }
.stat-label { font-size: 0.82rem; color: var(--muted); }
.stat-value { font-weight: 600; }

.post-video { margin: 32px 0 0; position: relative; aspect-ratio: 16 / 9; }
.post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 3px; }

.post-section { margin-top: 44px; }
.post-section h2 { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; line-height: 1.2; margin: 0 0 14px; }
.post-section p { max-width: 68ch; color: #26343f; line-height: 1.68; }
.post-gallery { display: grid; gap: 18px; margin: 22px 0 6px; }
.post-gallery.two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.post-figure { margin: 0; }
.post-figure img { width: 100%; height: auto; border-radius: 3px; background: var(--tint); }
.post-gallery:not(.two) .post-figure img { max-height: 560px; width: auto; max-width: 100%; }
.post-figure figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 8px; line-height: 1.45; }

.post-tools { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule); }
.post-tools h2 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin: 0 0 12px; }
.post-tools ul { padding-left: 1.15em; }
.post-tools li { margin-bottom: 6px; }
.post-tools li::marker { color: var(--steel); }

@media (max-width: 820px) {
  .log-card { grid-template-columns: 1fr; gap: 14px; }
  .abstract { padding: 22px 20px; }
  .abstract-row { grid-template-columns: 1fr; gap: 2px; }
  .post-gallery.two { grid-template-columns: 1fr; }
  .post-gallery:not(.two) .post-figure img { max-height: none; width: 100%; }
}
