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

:root {
  --text: #1a1a1a;
  --text-secondary: #555;
  --bg: #fff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e5e5;
  --section-gap: 2.5rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

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

a:hover {
  text-decoration: underline;
}

/* ── Page layout (sidebar + content) ── */

.page {
  display: flex;
  gap: 3rem;
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  align-items: flex-start;
}

/* ── Sidebar (sticky on scroll) ── */

.sidebar {
  position: sticky;
  top: 2rem;
  flex-shrink: 0;
  width: 210px;
  text-align: center;
}

.sidebar img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.sidebar h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.sidebar .affiliation {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.sidebar .contact {
  font-size: 0.88rem;
  margin-top: 0.6rem;
}

.sidebar .contact a {
  color: var(--accent);
}

/* ── Social icons ── */

.social-icons {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.7rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

.social-icons a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* ── Navigation (sidebar) ── */

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

.sidebar nav a {
  color: var(--text-secondary);
  font-weight: 500;
}

.sidebar nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── Main content ── */

.content {
  flex: 1;
  min-width: 0;
}

/* ── Bio ── */

.bio {
  margin-bottom: var(--section-gap);
  font-size: 0.98rem;
  line-height: 1.7;
}

.bio p + p {
  margin-top: 0.8rem;
}

/* ── Sections ── */

section {
  margin-bottom: var(--section-gap);
}

section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
  color: var(--text);
}

/* ── Paper entries ── */

.paper {
  margin-bottom: 1.3rem;
}

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

.paper .title a {
  color: var(--text);
}

.paper .title a:hover {
  color: var(--accent);
}

.paper .authors {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.paper .journal {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.paper .meta {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.paper .presentations {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ── Experience entries ── */

.experience-item {
  margin-bottom: 1.1rem;
}

.experience-item .role {
  font-size: 0.95rem;
}

.experience-item .institution {
  font-weight: 600;
  font-size: 0.98rem;
  margin-top: 0.6rem;
  margin-bottom: 0.3rem;
}

.experience-item .dates {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Grants ── */

.grant-item {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.grant-item .years {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── CV button ── */

.cv-request {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.cv-request:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ── Laguna photo ── */

.laguna {
  margin-top: 2.5rem;
}

.laguna img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

/* ── Footer ── */

footer {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Responsive ── */

@media (max-width: 700px) {
  .page {
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.2rem 1.5rem;
  }

  .sidebar {
    position: static;
    width: auto;
    margin-bottom: 1.5rem;
  }

  .sidebar img {
    width: 150px;
    height: 150px;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
}
