/* Francisco Madaleno — personal academic site */

:root {
  --bg: #fafcfc;
  --cream: #e9f3f1;
  --ink: #0f1a19;
  --body: #24332f;
  --body-2: #34443f;
  --muted: #5b6c68;
  --faint: #788884;
  --ghost: #9fadaa;
  --hairline: #d6e4e1;
  --accent: #2a7c6f;
  --hover: #e2eeeb;
  --selection: #c9e1dc;
  --card-border: #dfebe8;
  --graph-edge: #a2bbb6;
  --graph-node: #66897f;
  --serif: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  min-height: 100vh;
}

a {
  color: inherit;
}

::selection {
  background: var(--selection);
}

/* Header */
.site-header {
  max-width: 1064px;
  margin: 0 auto;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
}

.site-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a.active {
  color: inherit;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

/* Layout */
main {
  max-width: 1064px;
  margin: 0 auto;
  padding: 0 32px;
}

main > section {
  border-bottom: 1px solid var(--hairline);
}

/* Kickers (mono section labels) */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 30px;
}

.kicker--accent {
  font-size: 12.5px;
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 64px 0 54px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 54px;
  align-items: center;
}

.hero .kicker--accent {
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.012em;
  max-width: 18ch;
}

.hero-lede {
  margin-top: 24px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--body-2);
  max-width: 56ch;
  font-weight: 300;
}

.headshot {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  filter: grayscale(0.08);
}

/* About */
.about {
  padding: 66px 0;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 54px;
  align-items: start;
}

.about .kicker {
  margin-bottom: 22px;
}

.about-text {
  font-size: 18.5px;
  line-height: 1.72;
  color: var(--body);
  font-weight: 300;
}

.about-text p {
  margin-bottom: 18px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text strong {
  font-weight: 500;
}

.about-text a,
.about-side a {
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

.about-side {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* Research interests */
.interests {
  padding: 66px 0;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 54px;
}

.interest {
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}

.interest-title {
  font-size: 18px;
  font-weight: 500;
}

.interest-desc {
  font-size: 15.5px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.5;
  margin-top: 3px;
}

/* Selected publications (home) */
.selected-pubs {
  padding: 66px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-head .kicker {
  margin-bottom: 0;
}

.all-pubs-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
}

/* News */
.news {
  padding: 66px 0;
}

.news-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px 30px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--body);
  font-weight: 300;
}

.news-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  padding-top: 4px;
}

/* Footer */
.site-footer {
  max-width: 1064px;
  margin: 0 auto;
  padding: 56px 32px 70px;
}

.site-footer .kicker {
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

.footer-links a {
  text-decoration: none;
  color: var(--body);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

.copyright {
  margin-top: 42px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ghost);
  letter-spacing: 0.03em;
}

.site-footer--compact {
  padding: 50px 32px 70px;
}

.site-footer--compact .copyright {
  margin-top: 0;
}

.copyright a {
  color: var(--accent);
  text-decoration: none;
}

/* Publications page */
.page-intro {
  padding: 80px 0 50px;
}

.page-intro .kicker--accent {
  margin-bottom: 22px;
}

.page-intro h1 {
  font-size: 46px;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.page-intro-lede {
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--body-2);
  max-width: 52ch;
  font-weight: 300;
}

.pub-section {
  padding: 56px 0;
}

.pub-year {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  padding-top: 6px;
}

/* Talks */
.talk-entry {
  border-top: 1px solid var(--hairline);
  padding: 22px 0;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 20px;
}

.talk-entry .pub-year {
  padding-top: 5px;
}

.talk-title {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
}

.talk-desc {
  font-size: 15.5px;
  color: var(--muted);
  font-weight: 300;
  margin-top: 5px;
  line-height: 1.5;
}

/* 404 */
.not-found {
  padding: 80px 0;
  border-bottom: none;
}

/* Large paper figures on white, set into the site's original cream. */
.section-title {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.pub-section > .section-title { margin-bottom: 28px; }

.publication-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  padding: 14px;
  margin-top: 14px;
  background: var(--cream);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.publication-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 9px;
}

.publication-figure img {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: contain;
}

.publication-copy { display: flex; flex-direction: column; padding: 2px 0; }
.publication-title { font-size: 21px; line-height: 1.25; font-weight: 500; letter-spacing: -0.018em; }
.publication-title a { text-decoration: none; }
.publication-title a:hover { color: var(--accent); }
.publication-authors { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.publication-authors strong { font-weight: 500; color: var(--body); }
.publication-summary { margin: 8px 0 12px; font-size: 15.5px; line-height: 1.5; color: var(--body); }
.publication-summary strong { font-weight: 600; }
.publication-meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); }
.publication-meta a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.publication-meta a:hover { text-decoration: underline; }
.meta-divider { padding: 0 5px; color: var(--ghost); }
.award { color: var(--accent); font-weight: 600; white-space: nowrap; }
.publication-topic { border: 1px solid var(--hairline); border-radius: 20px; padding: 4px 10px; font-family: var(--mono); font-size: 10px; line-height: 1.5; }

/* Micro-level data condenses into a cyclic causal graph, whose cycles merge into single nodes. */
main > .hero { border-bottom: none; padding-bottom: 24px; }
.research-graph { margin: 4px 0 0; padding: 0 28px 36px; border-bottom: 1px solid var(--hairline); }
.research-graph svg { display: block; width: 100%; height: clamp(150px, 25vw, 250px); overflow: visible; }
.graph-edges { fill: none; stroke: var(--graph-edge); stroke-width: 1.5; }
#graph-arrow path { fill: none; stroke: var(--graph-edge); stroke-width: 1.1; }
.graph-particles circle { fill: var(--graph-node); }
.graph-nodes circle { fill: var(--cream); stroke: var(--graph-node); stroke-width: 1.6; }
.graph-nodes circle.graph-merged { fill: var(--cream); stroke: var(--accent); stroke-width: 2.2; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }

@media (max-width: 800px) {
  .hero { gap: 32px; }
  .about { grid-template-columns: 1fr 180px; gap: 32px; }
  .publication-card { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; }
  .publication-title { font-size: 20px; }
}

@media (max-width: 600px) {
  .site-header { padding: 22px 22px; flex-wrap: wrap; gap: 18px; }
  .site-nav { gap: 22px; font-size: 11px; }
  main { padding: 0 22px; }
  .hero { grid-template-columns: 1fr; padding-top: 42px; gap: 28px; }
  .hero h1 { font-size: 38px; }
  .hero .kicker { font-size: 10.5px; line-height: 1.7; }
  .hero-lede { font-size: 18px; }
  .headshot { width: 150px; height: 150px; }
  .research-graph { padding: 0 0 24px; }
  .about, .interests-grid { grid-template-columns: 1fr; }
  .about { gap: 24px; }
  .about, .interests, .selected-pubs, .news, .pub-section { padding: 42px 0; }
  .section-head { flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
  .section-title { font-size: 28px; }
  .publication-card { grid-template-columns: 1fr; gap: 14px; }
  .publication-figure img { height: 150px; }
  .publication-meta { gap: 12px; }
  .news-grid { grid-template-columns: 75px 1fr; gap: 16px; }
  .news-date { font-size: 11px; }
  .site-footer { padding: 42px 22px; }
  .page-intro { padding: 50px 0 36px; }
  .page-intro h1 { font-size: 38px; }
}
