/* ============================================
   Laurence van Lent — Academic Website
   ============================================ */

:root {
  --color-primary: #1a5276;
  --color-primary-light: #2980b9;
  --color-text: #1a1a1a;
  --color-text-secondary: #555;
  --color-bg: #fafafa;
  --color-white: #fff;
  --color-border: #e0e0e0;
  --color-border-light: #f0f0f0;
  --color-accent-bg: #f5f7fa;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 760px;
  --nav-height: 60px;
}

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

/* Base */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--color-primary);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s;
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links.open {
    display: flex;
  }
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero / Landing */
.hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
}

.hero-content {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.hero-text {
  flex: 1;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.hero-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.1rem;
}

.hero-affiliation {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.hero-bio {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-links a {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.hero-links a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

@media (max-width: 600px) {
  .hero-content {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .hero-links {
    justify-content: center;
  }

  .hero-photo img {
    width: 110px;
    height: 110px;
  }
}

/* Home sections */
.home-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.home-section:last-child {
  border-bottom: none;
}

.home-section h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.section-more {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.section-more a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.section-more a:hover {
  text-decoration: underline;
}

/* News list */
.news-list {
  list-style: none;
}

.news-list li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.news-date {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  min-width: 90px;
}

.news-text {
  color: var(--color-text);
}

/* Paper lists */
.paper-list {
  list-style: none;
  counter-reset: paper-counter;
}

.paper-list-full {
  /* Full page lists get numbers */
}

.paper-item {
  position: relative;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.paper-item:last-child {
  border-bottom: none;
}

.paper-citation {
  font-size: 0.9rem;
  line-height: 1.6;
  padding-right: 2rem;
}

.paper-authors {
  font-weight: 500;
}

.paper-status {
  font-style: italic;
  color: var(--color-text-secondary);
}

.paper-note {
  display: block;
  font-size: 0.8rem;
  color: var(--color-primary);
  margin-top: 0.25rem;
  font-style: italic;
}

/* Expand toggle */
.expand-toggle {
  position: absolute;
  top: 0.75rem;
  right: 0;
  width: 24px;
  height: 24px;
  background: var(--color-accent-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.expand-toggle:hover {
  background: var(--color-border);
}

.expand-toggle.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* Paper details (collapsed by default) */
.paper-details {
  display: none;
  padding-top: 0.5rem;
}

.paper-details.open {
  display: block;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.paper-links a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-accent-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: background 0.15s;
}

.paper-links a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* On home page, show links inline (no expand toggle needed for 3-4 items) */
.home-section .paper-links {
  margin-top: 0.4rem;
}

.home-section .paper-details {
  display: block;
}

.home-section .expand-toggle {
  display: none;
}

/* Page headers */
.page-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Page content */
.page-content {
  padding: 1.5rem 0 3rem;
}

.page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border-light);
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Student lists */
.student-list {
  padding-left: 1.25rem;
}

.student-list li {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.list-note {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* Experience lists */
.experience-list {
  list-style: none;
  padding-left: 0;
}

.experience-list li {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.position-current {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Honors lists */
.honors-list {
  list-style: none;
  padding-left: 0;
}

.honors-list li {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

.honors-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.coinvestigators {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* About page */
.about-content {
  font-size: 0.95rem;
  line-height: 1.75;
}

.about-content p {
  margin-bottom: 1.25rem;
}

/* Read more link */
.read-more {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Print */
@media print {
  .site-nav, .site-footer, .expand-toggle {
    display: none;
  }

  .paper-details {
    display: block;
  }

  body {
    font-size: 11pt;
  }
}
