/* ===========================================================================
   austinmoss.me — site styles
   One file controls the whole look. Safe things to tweak:
   --accent (main color), --maxw (page width), fonts below.
   =========================================================================== */

:root {
  --ink: #1a1a1a;          /* main text color            */
  --muted: #5a5f66;        /* secondary text             */
  --accent: #9a3324;       /* links & highlights (CU-ish red; change freely) */
  --accent-dark: #6f2419;
  --line: #e4e4e4;         /* hairline borders           */
  --bg: #ffffff;
  --maxw: 760px;           /* content width              */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---- Top navigation ---- */
.site-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 38px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 0;
  gap: 8px 18px;
}
.nav .brand {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.2px;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.97rem;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* ---- Headings & text ---- */
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.9rem; margin: 0 0 6px; }
h2 { font-size: 1.4rem; margin: 2.2em 0 0.6em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.1rem; margin: 1.6em 0 0.3em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ---- Home intro (photo + bio) ---- */
.intro { display: flex; gap: 28px; align-items: flex-start; }
.intro .photo {
  flex: 0 0 180px;
  width: 180px;
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0f0f0;
}
.intro .lede { flex: 1 1 auto; min-width: 0; }
.title-line { color: var(--muted); font-size: 1.02rem; margin: 0 0 14px; }

/* ---- Quick links row ---- */
.quicklinks { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.quicklinks a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.92rem;
  color: var(--muted);
}
.quicklinks a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---- Publication / research list ---- */
.pub { margin: 0 0 1.5em; }
.pub .pub-title { font-weight: 600; }
.pub .pub-meta { color: var(--muted); font-size: 0.95rem; }
.pub .pub-links { font-size: 0.92rem; margin-top: 3px; }

/* ---- Takeaway toggle (click to expand) ---- */
.pub .takeaway { margin: 5px 0 0; }
.pub .takeaway summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  font-size: 0.88rem;
  color: var(--accent);
  user-select: none;
}
.pub .takeaway summary::-webkit-details-marker { display: none; }
.pub .takeaway summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}
.pub .takeaway[open] summary::before { transform: rotate(90deg); }
.pub .takeaway summary:hover { color: var(--accent-dark); }
.pub .takeaway p {
  margin: 6px 0 0;
  font-size: 0.97rem;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---- Teaching list ---- */
.course { margin: 0 0 1.2em; }
.course .course-code { font-weight: 600; }

/* ---- In the News list ---- */
ul.news { list-style: none; margin: 0.2em 0 0; padding: 0; }
ul.news li { padding: 7px 0; border-bottom: 1px solid var(--line); }
ul.news li:last-child { border-bottom: none; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding: 22px 0 40px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---- Mobile ---- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .intro { flex-direction: column; align-items: center; text-align: center; }
  .intro .photo { flex-basis: 160px; width: 160px; height: 160px; }
  .quicklinks { justify-content: center; }
  .nav { justify-content: center; }
}
