/* Reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #111827;
  background-color: #f9fafb;
}

/* Layout helpers */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

/* Links */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-title a {
  font-size: 1.3rem;
  font-weight: 600;
  color: inherit;
}

.site-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.site-nav a {
  margin-left: 1rem;
  font-size: 0.95rem;
}

.site-nav a:first-child {
  margin-left: 0;
}

.site-nav a.active {
  font-weight: 600;
}

/* Main content */
.site-main {
  padding: 1.5rem 0 2.5rem;
}

/* About section */
.about {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
}

.about-text {
  flex: 2 1 260px;
}

.about-text h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 2rem;
}

.about-text p {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  color: #374151;
}

.about-photo {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Generic sections */
.section {
  margin-bottom: 2.5rem;
}

.section h2,
.section h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.section p {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #374151;
}

/* Lists used on Presentations / Teaching pages */
.item-list {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 0;
}

.item-list li {
  margin-bottom: 1.25rem;
}

.item-list strong {
  font-weight: 600;
}

.item-meta {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Footer */
.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    margin-top: 0.5rem;
  }

  .about {
    padding-top: 1.5rem;
  }

  .about-text h1 {
    font-size: 1.6rem;
  }
}

.about-photo img {
  width: 160px;        /* smaller: change to 120px / 180px if you want */
  height: 160px;
  border-radius: 50%;  /* perfectly round */
  object-fit: cover;   /* crops nicely if the photo isn't square */
  display: block;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.2);
}

@media (max-width: 640px) {
  .about-photo img {
    width: 130px;
    height: 130px;
  }
}

:root {
  --header-offset: 96px; /* fallback before JS runs */
}

/* Make anchor jumps account for the sticky header */
section[id],
[id].anchor-target {
  scroll-margin-top: calc(var(--header-offset));
}
