/* ==========================================================================
   Eric Wengert — personal site
   Minimal academic aesthetic, Geisinger-inspired light blue palette
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Cool off-white palette (Geisinger-adjacent) */
  --bg:            #f5f9fd;
  --bg-alt:        #e6eff8;
  --surface:       #ffffff;

  /* Text — cool charcoal that pairs with blue */
  --text:          #1f2a38;
  --text-muted:    #556273;
  --text-subtle:   #8695a8;

  /* Accent — a clear, Geisinger-reminiscent light blue */
  --accent:        #4a90c2;
  --accent-hover:  #2e6ca0;
  --accent-soft:   #d6e5f2;

  /* Borders / lines */
  --border:        #dbe6f1;
  --border-strong: #b7ccde;

  /* Type — Ubuntu used for headings and body for a unified, humanist voice */
  --font-serif:    'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                   system-ui, sans-serif;
  --font-sans:     'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                   system-ui, sans-serif;

  /* Layout */
  --content-max:   780px;
  --wide-max:      1080px;
  --radius:        8px;
  --radius-lg:     14px;

  /* Motion */
  --ease:          cubic-bezier(.2, .7, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* sticky nav compensation */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: currentColor;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

p {
  margin: 0 0 1em;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(245, 249, 253, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.nav-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  border: none;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  border: none;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 24px;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
  border-radius: 2px;
}

.section-lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 72px;
}

.hero-grid {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: center;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 40px rgba(31, 60, 100, 0.08);
  border: 6px solid var(--surface);
}

.hero-text .eyebrow {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-text h1 {
  font-size: 56px;
  line-height: 1.05;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-lede {
  font-size: 18px;
  color: var(--text);
  max-width: 560px;
  margin-bottom: 28px;
}

.hero-lede strong {
  color: var(--accent-hover);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform .15s var(--ease),
              background-color .18s var(--ease),
              color .18s var(--ease),
              border-color .18s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  border-bottom-color: transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-small {
  padding: 8px 14px;
  font-size: 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-small:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Prose (About) ---------- */
.prose p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.25em;
}

.prose a {
  border-bottom: 1px solid var(--accent-soft);
}

.prose a:hover {
  border-bottom-color: var(--accent);
}

/* Callout block — for "Current work" / AI leadership highlight */
.callout {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
  margin: 28px 0;
  box-shadow: 0 2px 12px rgba(31, 60, 100, 0.04);
}

.callout-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.callout-body {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- Publications ---------- */
.pub-group {
  margin-top: 40px;
}

.pub-year {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-bottom: 20px;
}

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pub-item {
  padding: 0;
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.35;
}

.pub-authors {
  color: var(--text);
  font-size: 15px;
  margin: 0 0 4px;
}

.pub-venue {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 8px;
}

.pub-venue em {
  font-style: italic;
}

.pub-links {
  font-size: 14px;
  color: var(--text-subtle);
  margin: 0;
}

.pub-links a {
  font-weight: 500;
}

/* ---------- Subsection headings (Courses / Research / Mentorship) ---------- */
.subsection-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

/* First subsection sits below .section-lede; later ones need air */
.cards + .subsection-title,
.prose-inline + .subsection-title {
  margin-top: 56px;
}

.prose-inline {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  max-width: 640px;
  margin: 0;
}

.prose-inline a {
  border-bottom: 1px solid var(--accent-soft);
}

.prose-inline a:hover {
  border-bottom-color: var(--accent);
}

/* ---------- Teaching cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 24px 22px;
  transition: border-color .18s var(--ease), transform .18s var(--ease),
              box-shadow .18s var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(31, 60, 100, 0.05);
}

.card-title {
  font-size: 20px;
  margin-bottom: 6px;
}

.card-meta {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 500;
}

.card-body {
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}

/* ---------- Talks ---------- */
.talk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.talk-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.talk-item:last-child {
  border-bottom: none;
}

.talk-date {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--accent);
  font-size: 16px;
  padding-top: 2px;
}

.talk-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.35;
}

.talk-venue {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-text p {
  font-size: 17px;
  color: var(--text);
}

.contact-email {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

.contact-email:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}

.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-links li {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s var(--ease);
}

.contact-links li:hover {
  border-color: var(--accent);
}

.contact-links a {
  display: block;
  color: var(--text);
  font-weight: 500;
  border: none;
}

.contact-links a:hover {
  color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-inner a {
  color: var(--text-muted);
  border: none;
}

.footer-inner a:hover {
  color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  body { font-size: 16px; }

  .nav-links { gap: 18px; }
  .nav-links a { font-size: 14px; }

  .hero { padding: 56px 0 48px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .hero-photo {
    max-width: 220px;
    margin: 0 auto;
  }
  .hero-text h1 { font-size: 44px; }
  .hero-title { font-size: 19px; }
  .hero-lede { font-size: 17px; margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }

  .section { padding: 64px 0; }
  .section-title { font-size: 28px; }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .talk-item {
    grid-template-columns: 60px 1fr;
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .nav-brand { font-size: 16px; }
  .nav-links { gap: 14px; }
  .nav-inner { padding: 12px 18px; }

  .hero-text h1 { font-size: 36px; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; }

  .section-header-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
