/* ------------------------------------------------------------
   Academic site stylesheet
   Edit the variables below to change colors and fonts site-wide.
   ------------------------------------------------------------ */

:root {
  --bg: #fdfcfa;
  --text: #222;
  --muted: #666;
  --accent: #8c1515;        /* link / highlight color */
  --rule: #e2ded6;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --width: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --text: #e6e3dd;
    --muted: #a09c95;
    --accent: #e8877d;
    --rule: #3a3733;
  }
}

* { box-sizing: border-box; }

html { font-size: 18px; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header / navigation ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 1.25rem 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}
.site-title:hover { text-decoration: none; }

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

nav a { color: var(--muted); }
nav a:hover { color: var(--accent); text-decoration: none; }
nav a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* ---------- Main content ---------- */

main {
  max-width: var(--width);
  margin: 0 auto;
  padding: 2.5rem 16px 3rem;
}

h1, h2, h3 { line-height: 1.25; font-weight: 600; }
h1 { font-size: 2rem; margin: 0 0 1rem; }
h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.25rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- Home page profile ---------- */

.profile {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.profile img {
  width: 100%;
  border-radius: 4px;
  display: block;
}

.profile .contact {
  font-family: var(--sans);
  font-size: 0.85rem;
  margin-top: 1rem;
  line-height: 1.8;
}

.profile .contact a { display: block; }

.position { color: var(--muted); margin: -0.5rem 0 1.25rem; }

@media (max-width: 600px) {
  .profile { grid-template-columns: 1fr; }
  .profile img { max-width: 180px; }
}

/* ---------- Lists of items (papers, courses, news) ---------- */

.entries { list-style: none; padding: 0; margin: 0; }

.entries li {
  margin-bottom: 1.25rem;
}

.entries .title { font-weight: 600; }

.entries .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.links {
  font-family: var(--sans);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}
.links a {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0 0.45rem;
  margin-right: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.links a:hover { border-color: var(--accent); text-decoration: none; }

.news li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; margin-bottom: 0.5rem; }
.news .date { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; padding-top: 0.15rem; }

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

.cv-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.cv-row .year { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; padding-top: 0.15rem; }

@media (max-width: 600px) {
  .cv-row, .news li { grid-template-columns: 1fr; gap: 0; }
}

.button {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
}
.button:hover { background: var(--accent); color: var(--bg); text-decoration: none; }

/* ---------- Abstracts (collapsible) ---------- */

details { margin-top: 0.35rem; }
details summary {
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  list-style: none;
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0 0.45rem;
}
details summary::-webkit-details-marker { display: none; }
details summary:hover { border-color: var(--accent); }
details p { font-size: 0.92rem; margin: 0.6rem 0 0; }

/* ---------- Course materials ---------- */

.materials { padding-left: 1.1rem; margin: 0.5rem 0 0; }
.materials li { margin-bottom: 0.35rem; }
.note { color: var(--muted); font-size: 0.88rem; }

/* ---------- Embedded CV ---------- */

.embed {
  width: 100%;
  height: 80vh;
  min-height: 500px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin-top: 1.5rem;
}

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

footer {
  border-top: 1px solid var(--rule);
  text-align: center;
  padding: 1.5rem 16px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
}
