/* ============================================================
   Pascual-Caballo — personal academic page
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f3;
  --text: #1a1a1a;
  --text-muted: #58595b;
  --accent: #8a0303;
  --link: #006794;
  --link-visited: #551a8b;
  --border: #dcdcda;
  --rule: #1a1a1a;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --bg-alt: #1d2024;
    --text: #e6e4dd;
    --text-muted: #9a9890;
    --accent: #e0796f;
    --link: #7ec8e3;
    --link-visited: #c9a8f5;
    --border: #33353a;
    --rule: #e6e4dd;
  }
}
:root[data-theme="dark"] {
  --bg: #15171a;
  --bg-alt: #1d2024;
  --text: #e6e4dd;
  --text-muted: #9a9890;
  --accent: #e0796f;
  --link: #7ec8e3;
  --link-visited: #c9a8f5;
  --border: #33353a;
  --rule: #e6e4dd;
}

* { box-sizing: border-box; }
html { text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

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

img { max-width: 100%; }

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 20px;
  margin-bottom: 32px;
}

.masthead-text { flex: 1; min-width: 0; }

.masthead .name {
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.masthead .role {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.masthead-photo {
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.masthead-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 560px) {
  .masthead-photo { width: 88px; height: 88px; }
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
nav.site-nav li:not(:last-child)::after {
  content: "\00b7";
  margin: 0 10px;
  color: var(--text-muted);
}
nav.site-nav a {
  color: var(--text);
  text-decoration: none;
}
nav.site-nav a:visited { color: var(--text); }
nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Sections ---------- */

section { margin-bottom: 44px; }

h2.section-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 500;
}

h1, h2, h3 { font-family: var(--font-body); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.08rem; }

/* ---------- Entry list (research, positions, education) ---------- */

.entry-list { display: flex; flex-direction: column; gap: 22px; }

.entry {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 4px 20px;
}
.entry .when {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.entry .what h3 {
  margin: 0 0 3px;
  font-size: 1.05rem;
  font-weight: 600;
}
.entry .what p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

@media (max-width: 560px) {
  .entry { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Publications ---------- */

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 30px 0 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.pub-year:first-child { margin-top: 0; }

.pub {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.pub:last-child { border-bottom: none; }
.pub h3 { margin: 0 0 4px; font-size: 1.03rem; font-weight: 600; }
.pub .authors { color: var(--text-muted); font-size: 0.94rem; margin: 0 0 6px; }
.pub .links {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.pub .links a { margin-right: 14px; }
.pub .links span.tag {
  color: var(--text-muted);
}

/* ---------- CV button ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: 1px solid var(--rule);
  color: var(--text);
  padding: 9px 16px;
  text-decoration: none;
}
.btn:hover { background: var(--rule); color: var(--bg); }
.btn:visited { color: var(--text); }

/* ---------- Contact list ---------- */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}
.contact-list li {
  display: flex;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.contact-list .label {
  width: 8.5em;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 2px;
}

/* ---------- Footer ---------- */

footer.site-footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

