/* ---------------------------------------------------------
   Brad Chattergoon — personal site
   Clean academic style
--------------------------------------------------------- */

:root {
  --ink: #1c1c1c;
  --muted: #5a5a5a;
  --rule: #e2e2e2;
  --bg: #fdfdfb;
  --accent: #003262;   /* Berkeley blue */
  --accent-2: #b98a1f;  /* muted gold */
  --max-width: 760px;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Header / nav */
header.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 28px 0 18px;
}

header.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.site-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.2px;
}

.site-title small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-top: 2px;
}

nav.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

nav.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent-2);
}

/* Main content */
main {
  padding: 48px 0 40px;
}

main .wrap > *:first-child { margin-top: 0; }

h1 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 6px;
  color: var(--ink);
}

h2 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 40px 0 14px;
  color: var(--ink);
}

h2:first-of-type { margin-top: 0; }

h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  margin: 22px 0 4px;
  color: var(--ink);
}

p { margin: 0 0 16px; color: var(--ink); }

.lede {
  font-family: var(--serif);
  font-size: 18.5px;
  color: var(--muted);
  margin: 0 0 32px;
}

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

.muted { color: var(--muted); }

hr.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 36px 0;
}

/* Hero (home page) */
.hero {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hero img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
  flex-shrink: 0;
}

.hero-text h1 { margin-bottom: 8px; }

.role {
  font-size: 15.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.affil {
  font-size: 14.5px;
  color: var(--muted);
}

/* Links row */
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 22px 0 4px;
  font-size: 14.5px;
}

.link-row a {
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 7px 14px;
  border-radius: 20px;
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.link-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Lists */
ul.plain { list-style: none; margin: 0 0 16px; padding: 0; }
ul.plain li { margin-bottom: 8px; }

ul.bullets { margin: 0 0 16px; padding-left: 20px; }
ul.bullets li { margin-bottom: 6px; }

/* CV — plain academic hanging-indent rows */
.cv-row {
  display: flex;
  gap: 20px;
  margin-bottom: 13px;
}

.cv-date {
  flex: 0 0 92px;
  font-size: 14px;
  color: var(--muted);
  padding-top: 1px;
}

.cv-body { flex: 1; min-width: 0; }

.cv-title {
  font-size: 15.5px;
  color: var(--ink);
  line-height: 1.5;
}

.cv-sub {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
  line-height: 1.5;
}

.cv-note {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
  margin: -6px 0 16px 112px;
}

/* CV / entry blocks (legacy, still used on Research page) */
.entry {
  margin-bottom: 22px;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.entry-title {
  font-weight: 600;
  font-size: 16px;
}

.entry-meta {
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
}

.entry-sub {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 14.5px;
  letter-spacing: 0.2px;
}

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

/* Notes / callout card */
.card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 22px;
  margin-bottom: 20px;
  background: #fff;
}

.card h3 { margin-top: 0; }

.badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 12px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

/* Contact */
.contact-list { margin-top: 8px; }
.contact-list .entry-title { font-size: 14.5px; font-weight: 600; }
.contact-list a { word-break: break-word; }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 560px) {
  h1 { font-size: 27px; }
  .hero { flex-direction: column; align-items: flex-start; }
  header.site-header .wrap { flex-direction: column; align-items: flex-start; }
}
