/* ============================================================
   COLOR + FONT TOKENS (matched to Google Sites "Simple" theme)
   ============================================================ */
:root {
  --color-text: #212121;
  --color-muted: #5a5a5a;
  --color-accent: #226e93;
  --color-accent-deep: #1e6c93;
  --color-link: #006580;
  --color-link-hover: #007a93;
  --color-bg: #ffffff;
  --color-soft: #f2f2f2;
  --color-border: #e3e3e3;
  --color-iu-crimson: #990000;
  --font-body: 'Gentium Basic', 'Gentium Plus', Georgia, 'Times New Roman', serif;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --measure: 100%;
  --shell-max: 96rem;
}

* { box-sizing: border-box; }

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 14.67px;
  line-height: 1.6667;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   STICKY HEADER
   ============================================================ */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0.7rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.site-nav {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.site-brand-mark {
  display: block;
  height: 36px;
  width: auto;
  flex-shrink: 0;
}
.site-brand-text {
  font-family: var(--font-heading);
  font-size: 19pt;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.005em;
}
.site-nav ul {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav ul a {
  font-family: var(--font-body);
  font-size: 12pt;
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 400;
}
.site-nav ul a:hover { color: var(--color-accent); }
.site-nav ul a.active {
  color: var(--color-text);
  font-weight: 600;
}

/* ============================================================
   PAGE BANNER
   ============================================================ */
.page-banner {
  position: relative;
  width: 100%;
  height: 340px;
  background: linear-gradient(135deg, #c8d6e0 0%, #e8e3d8 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.page-banner.has-image.has-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
}
.page-banner h1 {
  position: relative;
  font-family: var(--font-heading);
  font-size: 64pt;
  font-weight: 400;
  color: var(--color-text);
  margin: 40px 0 0;
  padding: 0;
  border: none;
  letter-spacing: -1px;
  line-height: 1;
  font-style: normal;
}
@media (max-width: 767px) {
  .page-banner { height: 280px; }
  .page-banner h1 { font-size: 53pt; }
}
@media (max-width: 479px) {
  .page-banner { height: 250px; }
  .page-banner h1 { font-size: 40pt; }
}

/* ============================================================
   MAIN + FOOTER
   ============================================================ */
.site-main {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}
.site-footer {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 1.8rem 2rem 3rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 9pt;
  font-style: italic;
  text-align: center;
}

/* ============================================================
   HEADINGS — matched to Google Sites Simple theme exactly
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.4;
  font-style: normal;
}
h1 {
  font-size: 34pt;
  color: var(--color-accent);
  line-height: 1.2;
  margin: 30px 0 16px;
}
h2 {
  font-size: 19pt;
  color: var(--color-accent);
  line-height: 1.4;
  margin: 20px 0 12px;
}
h3 {
  font-size: 15pt;
  color: var(--color-text);
  font-style: italic;
  line-height: 1.25;
  margin: 16px 0 8px;
}
h4 {
  font-size: 12pt;
  color: var(--color-text);
  font-weight: 600;
  margin: 14px 0 6px;
}

/* ============================================================
   BODY TEXT — fills container width (no measure cap)
   ============================================================ */
p {
  font-family: var(--font-body);
  font-size: 11pt;
  line-height: 1.6667;
  color: var(--color-text);
  margin: 12px 0;
  max-width: none;
}

ul, ol {
  padding-left: 1.5em;
  margin: 12px 0;
  font-size: 11pt;
}
ul li {
  list-style-type: square;
  margin: 0.4em 0;
  line-height: 1.6;
}
ul li::marker { color: var(--color-muted); font-size: 0.85em; }
ol li { margin: 0.5em 0; line-height: 1.6; }

/* Nested lists (e.g., award sub-bullets) */
li > ul, li > ol { margin: 0.4em 0; }

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--color-link-hover); }
a:visited { color: var(--color-link); }

blockquote {
  border-left: 3px solid var(--color-accent);
  margin-left: 0;
  padding: 0.1em 0 0.1em 1.25em;
  color: #444;
  font-style: italic;
}

code {
  background: var(--color-soft);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}
pre { background: var(--color-soft); padding: 1em; overflow-x: auto; border-radius: 4px; }
pre code { background: transparent; padding: 0; }

/* Standard markdown tables */
table { border-collapse: collapse; margin: 16px 0; font-size: 11pt; }
th, td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.6em 1em 0.6em 0;
  text-align: left;
  vertical-align: top;
}
th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11pt;
  color: var(--color-accent);
}

/* CV-style table (employment, education) */
.cv-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  max-width: var(--measure);
  font-size: 11pt;
}
.cv-table td {
  padding: 0.55rem 1rem 0.55rem 0;
  vertical-align: top;
  border-bottom: 1px dotted var(--color-border);
}
.cv-table td:first-child {
  width: 13rem;
  font-family: var(--font-body);
  color: var(--color-text);
  white-space: nowrap;
}
.cv-table td:last-child {
  font-family: var(--font-body);
  color: var(--color-text);
}

/* ============================================================
   HOMEPAGE PROFILE HERO
   ============================================================ */
.profile-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2rem 0 1.5rem;
  max-width: none;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}
.profile-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}
.profile-text {
  text-align: center;
  max-width: none;
}
.profile-text h1 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  font-size: 19pt;
  font-weight: 400;
  font-style: normal;
  margin: 0 0 1rem;
  line-height: 1.4;
}
.profile-title,
.profile-role {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-text);
  font-size: 15pt;
  margin: 8px 0;
  max-width: none;
  line-height: 1.25;
}
.profile-affiliation {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 15pt;
  margin: 16px 0;
  max-width: none;
  line-height: 1.25;
}
.profile-affiliation a {
  color: var(--color-link);
  font-weight: 400;
}
.profile-links {
  font-family: var(--font-body);
  font-size: 11pt;
  margin-top: 12px;
  max-width: none;
}

@media (max-width: 720px) {
  .profile-hero {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 1.5rem 0;
  }
  .profile-photo { max-width: 220px; margin: 0 auto; }
  .profile-text h1 { font-size: 17pt; }
}

/* Welcome heading on home */
.welcome {
  margin: 2rem 0 2rem;
}
.welcome h2 {
  text-align: center;
  font-style: normal;
  color: var(--color-accent);
  font-size: 25pt;
  font-weight: 400;
  margin: 30px 0 16px;
}
.welcome p {
  text-align: left;
  margin: 12px 0;
}

/* ============================================================
   SIGNAL & NOISE — single page with inline pieces
   ============================================================ */
.section-label {
  font-size: 25pt;
  color: var(--color-accent);
  font-weight: 400;
  font-style: normal;
  margin-top: 2.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.6rem;
}
.section-blurb {
  font-style: italic;
  color: var(--color-muted);
  margin-top: -0.4rem;
  margin-bottom: 1.5rem;
}

.piece-summary {
  padding: 1.5rem 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.piece-summary:last-of-type { border-bottom: none; }
.piece-summary .piece-kicker {
  font-family: var(--font-body);
  font-size: 10pt;
  font-style: italic;
  color: var(--color-muted);
  margin: 0 0 0.4rem;
  font-weight: 400;
}
.piece-summary > h3 {
  font-size: 19pt;
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-weight: 400;
  font-style: normal;
}
.piece-summary > h3 a {
  color: var(--color-accent);
  text-decoration: none;
}
.piece-summary > h3 a:hover { text-decoration: underline; }
.piece-summary .piece-subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 12pt;
  color: var(--color-muted);
  margin: 0 0 0.8rem;
}
.piece-summary .piece-summary-body {
  margin: 0.4rem 0 0.7rem;
}
.piece-summary .piece-readmore {
  margin: 0;
  font-family: var(--font-body);
  font-size: 11pt;
}
.piece-summary .piece-readmore a {
  color: var(--color-link);
  text-decoration: none;
}
.piece-summary .piece-readmore a:hover { text-decoration: underline; }

/* Filter bar on /signal/ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}
.filter-chip {
  font-family: var(--font-body);
  font-size: 10pt;
  padding: 0.4rem 0.95rem;
  background: var(--color-bg);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.filter-chip.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Tag pills (used on cards and at article footers) */
.piece-tags {
  display: inline-flex;
  gap: 0.4rem;
  margin-left: 1rem;
}
.tag-pill {
  font-family: var(--font-body);
  font-size: 9pt;
  padding: 0.15rem 0.55rem;
  background: var(--color-soft);
  color: var(--color-muted);
  border-radius: 999px;
  text-decoration: none;
  font-style: normal;
}
.tag-pill:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Tags footer at the bottom of individual article pages */
.article-tags {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 10pt;
}
.article-tags-label {
  color: var(--color-muted);
  font-style: italic;
  margin-right: 0.5rem;
}

.empty-state {
  text-align: center;
  color: var(--color-muted);
  font-style: italic;
  padding: 2rem 0;
}

/* TL;DR box at top of articles */
.tldr-box {
  background: var(--color-soft);
  border-left: 4px solid var(--color-accent);
  padding: 1.2rem 1.5rem 1.2rem 1.5rem;
  margin: 0 0 2.5rem;
  border-radius: 0 4px 4px 0;
  max-width: var(--measure);
}
.tldr-box .tldr-label {
  font-family: var(--font-body);
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.tldr-box p:not(.tldr-label) {
  margin: 0;
  font-size: 11pt;
  color: var(--color-text);
  line-height: 1.65;
}

/* Back link at top of essay/framework pages */
.back-link {
  font-family: var(--font-body);
  font-size: 11pt;
  margin: 0 0 1.5rem;
}
.back-link a {
  color: var(--color-muted);
  text-decoration: none;
}
.back-link a:hover {
  color: var(--color-accent);
}

/* ============================================================
   ESSAY (legacy, single-essay page support)
   ============================================================ */
.essay-header { margin-bottom: 2.5rem; }
.essay-header h1 {
  font-size: 34pt;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}
.essay-subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 15pt;
  color: var(--color-muted);
  margin: 0.6rem 0 0;
  max-width: var(--measure);
}
.essay-meta {
  font-family: var(--font-body);
  font-size: 10pt;
  color: var(--color-muted);
  margin: 0;
}
.essay-faq {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.essay-faq details { margin: 0.5em 0; padding: 0.3em 0; }
.essay-faq summary {
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  padding: 0.25em 0;
  color: var(--color-accent);
}
.essay-related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.essay-related h2 {
  font-size: 11pt;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  font-style: normal;
}

/* Framework / topic page */
.framework-header { margin-bottom: 2.5rem; }
.framework-header h1 {
  font-size: 34pt;
  margin-bottom: 0.4rem;
  color: var(--color-accent);
}
.topic-kicker {
  font-family: var(--font-body);
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-accent);
  font-style: normal;
  margin: 0 0 0.6em;
  font-weight: 600;
}
.topic-subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 15pt;
  color: var(--color-muted);
  margin: 0.4rem 0 0;
  max-width: var(--measure);
}
.topic-essays {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.topic-essays h2 {
  font-size: 11pt;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  font-style: normal;
}

/* ============================================================
   ARCHIVE LISTS (essays index)
   ============================================================ */
.archive-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.archive-list li {
  list-style: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
}
.archive-list li::marker { content: ""; }
.archive-list a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 13pt;
  font-family: var(--font-heading);
}
.archive-list a:hover { color: var(--color-accent-deep); text-decoration: underline; }
.archive-list .date {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 10pt;
  color: var(--color-muted);
  display: block;
  margin-top: 0.15em;
  font-weight: 400;
}
