/* ---------- Global styles ---------- */

:root {
  --bg: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --accent: #111827;
  --link: #1d4ed8;
  --max-width: 960px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff; /* plain white */
  color: var(--text-main);
  line-height: 1.6;
}

/* ---------- Layout shell ---------- */

.page-shell {
  max-width: var(--max-width);
  margin: 2.75rem auto 3.5rem;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb; /* line under top header */
  margin-bottom: 1.5rem;
}

.site-identity {
  display: flex;
  flex-direction: column;
}

/* Name in the header */
.site-identity h1 {
  font-family: "Merriweather", serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0;
}

/* ---------- Intro row: info + photo (index.html) ---------- */

.intro-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

/* Quick info on the left */

.quick-info {
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.2;   /* almost single-spaced */
}

.quick-info p {
  margin: 0;
}

/* Profile photo on the right */

.profile-photo {
  text-align: center;
}

.profile-photo img {
  max-width: 140px;
  height: auto;       /* no cropping, full image */
  border-radius: 18px;
  border: none;
  box-shadow: none;
  display: block;
  margin: 0 auto;
}

/* ---------- Navigation ---------- */

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem;
  margin: 0;
  background: #ffffff;
  border-radius: 999px;
  border: 1px solid #e5e7eb;   /* pill border around tabs */
}

.site-nav a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.site-nav a:hover {
  background: #f3f4f6;
  color: var(--accent);
  transform: translateY(-1px);
}

.site-nav a.active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 500;
}

/* ---------- Main content ---------- */

.main-card {
  margin-top: 0;   /* spacing handled by header + intro-row */
  padding: 0;
  background: none;
}

.main-card h2 {
  margin-top: 0;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb; /* line after section headers (Biography, Publications, etc.) */
}

.main-card p {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Lists on main content (used in Research) – no bullets, spaced entries */
.main-card ul {
  list-style: none;     /* remove bullets */
  padding-left: 0;      /* remove default indent */
  margin: 0;
}

.main-card li {
  margin-bottom: 1.1rem; /* extra space between papers */
}

/* Spacing between logical blocks */
.section-block + .section-block {
  margin-top: 1.5rem;
}

/* ---------- Contact layout (if used on other pages) ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.contact-item {
  margin-bottom: 0.5rem;
}

.contact-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

/* ---------- Responsive adjustments ---------- */

@media (max-width: 720px) {
  .intro-row {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .profile-photo {
    text-align: left;
    margin-bottom: 0.75rem;
  }

  .profile-photo img {
    max-width: 120px;
  }
}

/* ---------- Links ---------- */

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: none;
}
