@import "reset.css";
@import "variables.css";

/* ── Base ──────────────────────────────────────────────────────────────── */

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
}

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

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

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ── Navigation ────────────────────────────────────────────────────────── */

nav {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 10;
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  gap: var(--space-6);
}

.nav-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
  margin-right: auto;
}

.nav-name:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.nav-links a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-text);
  text-decoration: none;
}

/* ── Main content ──────────────────────────────────────────────────────── */

main {
  padding: var(--space-12) 0 var(--space-16);
}

/* ── Profile section ───────────────────────────────────────────────────── */

.profile {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
  width: 380px;
  text-align: center;
}

.profile-photo {
  width: 200px;
  height: 240px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.profile-photo-placeholder {
  width: 200px;
  height: 240px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.profile-bio {
  font-size: 0.95rem;
  line-height: 1.8;
}

.profile-name {
  font-family: var(--font-ui);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-1);
}

.profile-pronouns {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-muted);
}

.profile-pronouns-line {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-family: var(--font-ui);
}

.profile-role {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

.profile-institution {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.profile-links a {
  color: var(--color-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.profile-links a:hover {
  text-decoration: underline;
}

.profile-links .sep {
  color: var(--color-border);
  user-select: none;
}

.profile-bio {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text);
}

/* ── Section headings ──────────────────────────────────────────────────── */

.section {
  margin-bottom: var(--space-12);
}

.section-title {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

/* ── About ─────────────────────────────────────────────────────────────── */

.about-text p + p {
  margin-top: var(--space-3);
}

/* ── News ──────────────────────────────────────────────────────────────── */

.news-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.news-list::-webkit-scrollbar {
  width: 4px;
}

.news-list::-webkit-scrollbar-track {
  background: transparent;
}

.news-list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.news-item {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.news-date {
  flex-shrink: 0;
  width: 7rem;
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  padding-top: 0.1em;
}

.news-text {
  flex: 1;
}

/* ── Publication entries ───────────────────────────────────────────────── */

.pub-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.pub-entry {
  display: flex;
  gap: var(--space-4);
}

.pub-id {
  flex-shrink: 0;
  width: 2.5rem;
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  padding-top: 0.15em;
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-weight: bold;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: var(--space-1);
}

.pub-title-link {
  font-weight: bold;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text);
  text-decoration: none;
}

.pub-title-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.pub-authors {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: var(--space-1);
}

.pub-authors .self {
  color: var(--color-text);
  font-weight: bold;
}

.pub-venue {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-muted);
  margin-bottom: var(--space-2);
}

.pub-venue .venue-name {
  font-weight: 600;
  color: var(--color-text);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.pub-link {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-accent);
  text-decoration: none;
  line-height: 1.4;
  transition: border-color 0.15s, background 0.15s;
}

.pub-link:hover {
  background: var(--color-surface);
  border-color: var(--color-accent);
  text-decoration: none;
}

/* ── Publications page: type groups ───────────────────────────────────── */

.pub-group {
  margin-bottom: var(--space-12);
}

.pub-group-title {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: var(--space-6);
}

/* ── "See all" link ────────────────────────────────────────────────────── */

.see-all {
  display: inline-block;
  margin-top: var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

/* ── Footer ────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ── Responsive ────────────────────────────────────────────────────────── */

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

  .profile-card {
    width: 100%;
  }

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

  .news-item {
    flex-direction: column;
    gap: var(--space-1);
  }

  .news-date {
    width: auto;
  }

  .pub-entry {
    flex-direction: column;
    gap: var(--space-1);
  }

  .pub-id {
    width: auto;
  }
}
