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

:root {
  --color-text: #333;
  --color-text-muted: #666;
  --color-link: #0066cc;
  --color-link-hover: #004499;
  --color-border: #e0e0e0;
  --color-bg: #fff;
  --color-bg-alt: #f8f9fa;
  --font-sans: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Source Serif Pro', Georgia, serif;
  --max-width: 800px;
  --spacing: 1.5rem;
}

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--spacing);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }

p {
  margin-bottom: 1rem;
}

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

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

/* Header and Navigation */
header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.site-title:hover {
  color: var(--color-text);
  text-decoration: none;
}

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

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

/* Profile section */
.profile {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.profile-photo img {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
}

.profile-info h1 {
  margin-bottom: 0.25rem;
}

.profile-info .title {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.profile-info .affiliation {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

/* Bio section */
.bio {
  margin-bottom: 2rem;
}

.bio ul {
  list-style-position: inside;
  padding-left: 0;
}

.bio li {
  margin-bottom: 0.5rem;
}

/* Research interests */
.research-interests ul {
  list-style: disc;
  margin-left: 1.5rem;
}

.research-interests li {
  margin-bottom: 0.5rem;
}

/* News section */
.news {
  margin-top: 2rem;
}

.news-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.news-date {
  color: var(--color-text-muted);
  flex-shrink: 0;
  width: 100px;
}

/* Publications */
.publication {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.publication:last-child {
  border-bottom: none;
}

.publication-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.publication-authors {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.publication-venue {
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.publication-links {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

/* Teaching */
.course {
  margin-bottom: 1.5rem;
}

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

.course-info {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* CV */
.cv-section {
  margin-bottom: 2rem;
}

.cv-entry {
  margin-bottom: 1rem;
}

.cv-entry-title {
  font-weight: 600;
}

.cv-entry-details {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Video embeds */
.video-embed {
  margin: 1rem 0;
}

.video-embed iframe {
  max-width: 100%;
  border-radius: 8px;
}

.video-grid {
  margin-top: 1.5rem;
}

.video-grid .video-embed {
  margin-bottom: 1.5rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

  nav {
    flex-direction: column;
    text-align: center;
  }

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

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

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