/* ==========================================================
   Basic settings — change these to restyle the whole site
   Clean, near-white with a hint of warmth
   ========================================================== */
:root {
  --text: #1b1a18;          /* warm black */
  --muted: #8a857d;         /* warm grey */
  --bg: #ffffff;            /* white; warmth comes from text + lines */
  --line: #e4e0d8;
  --accent: #7d6e5d;        /* warm taupe, used sparingly */
  --max-width: 1180px;    /* same width on every page */

  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ece8e1;
    --muted: #8f8a82;
    --bg: #181716;
    --line: #2c2a27;
    --accent: #b8a68f;
  }
}

/* ==========================================================
   Base
   ========================================================== */
* { box-sizing: border-box; }

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

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }

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

h1, h2, h3 { line-height: 1.3; }

/* Section labels: small, uppercase, quiet */
h2 {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4rem 0 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

/* Section header with a link on the right (e.g. Selected Publications / View all) */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 4rem 0 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
}
.section-head a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.section-head a:hover { color: var(--text); }

/* ==========================================================
   Navigation
   ========================================================== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 0 56px;
}
nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
nav ul a {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  text-decoration: none;
}
nav ul a:hover, nav ul a.active { color: var(--text); }
nav ul a.active {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.social { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; }

/* Narrow centered column for Publications and CV */
.narrow { max-width: 760px; margin: 1.5rem auto 0; }
.narrow p { max-width: 68ch; }
.narrow + footer { max-width: 760px; margin-left: auto; margin-right: auto; }

.emoji {
  font-size: 1.5em;
  vertical-align: -0.1em;
  line-height: 1;
}

/* ==========================================================
   Page frame — shared by every page:
   left column (name, + photo/links on About), right column (content)
   ========================================================== */

.hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0 96px;
  margin-top: 0.5rem;
}

.hero > .name {
  grid-column: 1 / -1;  
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 1.5rem;
}
.hero > .name a { color: inherit; text-decoration: none; }
.hero-side .photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.9);
}

.hero-side .social {
  flex-direction: column;
  gap: 2px;
  margin-top: 1.5rem;
}
.hero-side .social a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-side .social a:hover { color: var(--text); }

.headline {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 2rem;
  max-width: 28ch;
}
.headline .soft { color: var(--muted); font-weight: 400; }
.headline + h2 { margin-top: 0; }   /* first section right under a page title */

.bio p { margin: 0 0 1.3rem; max-width: 68ch; }
.bio b { font-weight: 600; }
.bio > p a {
  font-weight: 600;
  text-decoration-color: var(--muted);
}
.bio > p a:hover { text-decoration-color: var(--text); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0.25rem 0 1.75rem; }
.tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  background: color-mix(in srgb, var(--muted) 15%, transparent);
  color: var(--text);
}

/* Simple dated list (news, education, etc.) */
.dated { list-style: none; padding: 0; margin: 0; }
.dated li { display: flex; gap: 24px; margin-bottom: 0.6rem; }
.dated .date { color: var(--muted); min-width: 80px; flex-shrink: 0; font-size: 0.85rem; padding-top: 1px; }

/* ==========================================================
   Publications
   ========================================================== */
.pub {
  display: flex;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.pub:last-child,
.pub:has(+ h2),
.pub:has(+ footer),
.pub:has(+ p) { border-bottom: none; }   /* avoid doubled lines */

.pub img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  flex-shrink: 0;
  filter: saturate(0.8);
  opacity: 0.8;
  transition: filter 0.3s, opacity 0.3s;
}
.pub:hover img {
  filter: none;
  opacity: 1;
}

.pub h3 { margin: 0.3rem 0 0.2rem; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.pub p  { margin: 0.1rem 0; }
.pub .authors { color: var(--muted); font-size: 0.9rem; }
.pub .authors b { color: var(--text); font-weight: 600; }   /* your name */
.pub .note { font-size: 0.85rem; color: var(--accent); }

.venue {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.links { margin-top: 0.5rem !important; }
.links a {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 16px 4px 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text);
}
.links a:hover { color: var(--muted); border-color: var(--muted); }

/* ==========================================================
   CV
   ========================================================== */
.cv-entry { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 1.1rem; }
.cv-entry .what b { display: block; font-weight: 600; }
.cv-entry .what span { color: var(--muted); font-size: 0.9rem; }
.cv-entry .when { color: var(--muted); white-space: nowrap; font-size: 0.85rem; }

/* ==========================================================
   Footer
   ========================================================== */
footer {
  margin: 5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================================
   Mobile
   ========================================================== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-side { max-width: 320px; margin-bottom: 36px; }
  .hero-side .social { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .headline { font-size: 1.75rem; }
}

@media (max-width: 600px) {
  .pub { flex-direction: column; }
  .pub img { width: 100%; height: 170px; }
  .cv-entry { flex-direction: column; gap: 2px; }
  nav ul { gap: 18px; }
  nav .site-name { font-size: 1.6rem; }
}
