/* ==========================================================================
   Minimal, presentable defaults for the academic website template.
   The setup-site skill is expected to restyle this file from the user's
   design references — treat everything here as a starting point.
   ========================================================================== */

:root {
  --color-text: #1f2328;
  --color-text-muted: #59636e;
  --color-accent: #0b57d0;
  --color-bg: #ffffff;
  --color-bg-subtle: #f6f8fa;
  --color-border: #d9dee3;
  --max-width: 46rem;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e6edf3;
    --color-text-muted: #9198a1;
    --color-accent: #6ea8fe;
    --color-bg: #0d1117;
    --color-bg-subtle: #161b22;
    --color-border: #30363d;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a:hover {
  text-decoration: underline;
}

h2 {
  font-size: 1.4rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.35rem;
  margin: 0 0 1rem;
}

img {
  max-width: 100%;
}

/* --- Header / nav ------------------------------------------------------- */

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

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.nav-name {
  font-weight: 700;
  color: var(--color-text);
  margin-right: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  font-size: 1.1rem;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
}

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

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

@media (max-width: 700px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0;
  }

  .site-nav.nav-open .nav-links {
    display: flex;
  }
}

/* --- Layout ------------------------------------------------------------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 4rem;
}

/* --- Profile ------------------------------------------------------------ */

.profile {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.profile-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.profile-body {
  flex: 1;
  min-width: 15rem;
}

.profile-body h1 {
  margin: 0 0 0.2rem;
  font-size: 1.7rem;
}

.profile-role {
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.profile-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin: 0.75rem 0 0;
  padding: 0;
}

/* --- News ---------------------------------------------------------------- */

.news-year h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.news-year:first-child h3 {
  margin-top: 0;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list li {
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

.news-type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-accent);
  margin-right: 0.4rem;
}

/* --- Papers (publications + working papers) ------------------------------ */

.paper {
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.paper-title {
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.paper-authors {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
}

.paper-venue {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.paper-links {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* --- Generic item lists (talks, software, projects, teaching) ------------ */

.item {
  margin-bottom: 1rem;
}

.item-title {
  font-weight: 600;
  margin: 0;
}

.item-meta {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.item-description {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
