/* ── Theses page ── */

.theses-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.theses-section:last-child {
  border-bottom: none;
  padding-bottom: 3rem;
}

/* ── Section header with filters inline ── */
.theses-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  padding: 4px 12px;
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  background: #fff;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: var(--font-sans);
}

.filter-btn:hover { border-color: var(--blue); color: var(--blue); }

.filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.filter-btn.active .filter-dot { opacity: 0.8; }

/* ── Category dots ── */
.filter-dot, .thesis-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.filter-dot-imaging,  .thesis-dot-imaging  { background: #185FA5; }
.filter-dot-modelling,.thesis-dot-modelling { background: #1D9E75; }
.filter-dot-physics,  .thesis-dot-physics   { background: #9a7a14; }

/* ── Thesis list ── */
.thesis-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.thesis-row {
  border-bottom: 1px solid var(--border);
  background: #fff;
  transition: background 0.15s;
}

.thesis-row:last-child { border-bottom: none; }
.thesis-row:hover { background: var(--gray-50); }

.thesis-row-main {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.1rem;
}

.thesis-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 20px;
  flex-shrink: 0;
}

.thesis-info { min-width: 0; }

.thesis-title {
  font-size: 0.9rem;
  color: var(--gray-900);
  line-height: 1.5;
  margin-bottom: 3px;
}

.thesis-meta {
  font-size: 0.78rem;
  color: var(--gray-400);
  line-height: 1.5;
}

.thesis-meta a {
  color: var(--blue);
  text-decoration: none;
}

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

.expand-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  background: #fff;
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
  font-family: var(--font-sans);
}

.expand-btn:hover { border-color: var(--blue); color: var(--blue); }

/* ── Expanded detail ── */
.thesis-detail {
  display: none;
  padding: 0 1.1rem 0.9rem calc(16px + 12px + 1.1rem);
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.thesis-detail.open { display: block; }

.thesis-detail a { color: var(--blue); text-decoration: none; }
.thesis-detail a:hover { text-decoration: underline; }

/* ── Year groups (past) ── */
.thesis-year-group {
  margin-bottom: 1.5rem;
}

.thesis-year-group:last-child { margin-bottom: 0; }

.thesis-year {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-400);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .theses-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .thesis-row-main {
    grid-template-columns: 20px 1fr auto;
    gap: 8px;
  }
}
