/* ---------------------------------------------------------
   Alessandro Danelon — personal site
   Clean modern academic theme
--------------------------------------------------------- */

:root {
  --paper: #faf9f6;
  --ink: #1b1b1f;
  --muted: #5a5a62;
  --accent: #1d3557;
  --accent-soft: #eef1f6;
  --border: #e3e1da;
  --max-width: 46rem;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: currentColor;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.site-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  border: none;
}

.site-name:hover {
  border: none;
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

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

.site-nav a:hover {
  color: var(--accent);
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 3.2rem 0 2.2rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 0.3rem;
}

.hero .role {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.3rem;
}

.hero .role strong {
  color: var(--ink);
}

.hero p {
  margin: 0 0 1rem;
}

.highlight {
  margin-top: 1.4rem;
  padding: 0.9rem 1.1rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  font-size: 0.98rem;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.news-list li + li {
  padding-top: 0.7rem;
  border-top: 1px solid rgba(29, 53, 87, 0.12);
}

/* Quick document links (CV / statements) */

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.doc-links a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--ink);
  background: #fff;
}

.doc-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Profile / external links */

.profile-links {
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.profile-links a {
  color: var(--muted);
}

.profile-links a:hover {
  color: var(--accent);
}

.profile-links .sep {
  margin: 0 0.5em;
  color: var(--border);
}

p.profile-links-lg {
  margin-top: 1.7rem;
  font-size: 1rem;
}

.profile-links-lg a {
  color: var(--accent);
  font-weight: 600;
}

.profile-links-lg a:hover {
  border-bottom-color: currentColor;
}

.profile-links-lg .sep {
  color: var(--border);
}

/* ---------------- Sections ---------------- */

section {
  padding: 2.6rem 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 4.2rem;
}

section h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0 0 1.2rem;
}

audio {
  width: 100%;
  margin-top: 0.4rem;
}

section h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 1.6rem 0 0.8rem;
}

section h3:first-of-type {
  margin-top: 0;
}

/* ---------------- Timeline (CV / Teaching) ---------------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.3rem 1.2rem;
}

.timeline-date {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .timeline-date {
    font-size: 0.82rem;
  }
}

/* ---------------- Publications ---------------- */

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-list li {
  padding-left: 1.6rem;
  position: relative;
}

.pub-list li::before {
  content: attr(data-index);
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.pub-venue {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.2rem 0 3rem;
  color: var(--ink);
  font-size: 0.98rem;
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .addr {
  margin: 0 0 1rem;
  line-height: 1.8;
}

@media (max-width: 560px) {
  .hero h1 { font-size: 1.9rem; }
  body { font-size: 16px; }
}

.pub-summary {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 0.6rem;
}

.pub-year {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.2rem 0 0.5rem;
  color: var(--muted);
}
