/* Base Layout & Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #212529;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: #ffffff;
  min-height: 100vh;
}

/* Header & Title */
h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111827;
}

p.intro {
  color: #4b5563;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Year Navigation (Pills) */
.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;

  /* sticky: the year pills (and the top button) stay visible while scrolling */
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  padding-top: 0.75rem;
  margin-top: -0.75rem;   /* cancels the extra padding: the unscrolled page looks as before */
}

/* Height of the pinned pills. These fallbacks work without JavaScript;
   a script can replace them with the exact value. */
:root { --top-h: 8rem; }
@media (max-width: 640px) {
  :root { --top-h: 16rem; }
}

/* a clicked year lands just below the pinned pills, not under them */
:root { --top-h: 8rem; }
@media (max-width: 640px) {
  :root { --top-h: 16rem; }
}

section[id] {
  scroll-margin-top: calc(var(--top-h) + 0.5rem);
}

.year-nav a {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background-color: #f3f4f6;
  color: #374151;
  text-decoration: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.year-nav a:hover {
  background-color: #2563eb;
  color: #ffffff;
}

.year-nav .top-link {
  margin-left: auto;   /* pushes the button to the right end of the last row */
background-color: #ffffff;
  color: #1d4ed8;              /* same blue as your thesis titles */
  border-radius: 0.375rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px #1d4ed8;   /* outline that doesn't change the button's size */
}

.year-nav .top-link:hover {
  box-shadow: inset 0 0 0 1.5px #2563eb;
}

/* Statistics formatting */
a.stat-link {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background-color: #ffffff;
  color: #1d4ed8;              /* same blue as your thesis titles */
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px #1d4ed8;  /* outline that doesn't change the button's size */
  transition: all 0.15s ease-in-out;
}

a.stat-link:hover {
  box-shadow: inset 0 0 0 1.5px #2563eb;
}

/* Year Headings */
h2.year-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid #e5e7eb;
  color: #1f2937;
}

/* Thesis List Items (Bulletless Cards) */
ul.thesis-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

ul.thesis-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid #f1f5f9;
}

ul.thesis-list li:last-child {
  border-bottom: none;
}

.thesis-author {
  font-size: 0.95rem;
  color: #374151;
  margin-bottom: 0.25rem;
}

.thesis-author strong {
  color: #111827;
}

.thesis-title a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
}

.thesis-title a:hover {
  text-decoration: underline;
}

.thesis-supervisor {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Footer Link */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}
