/*
Theme Name: Marco Academic
Theme URI: https://marcodamele.blog/
Author: Marco Damele + ChatGPT
Description: Minimal academic theme for a personal mathematics website: CV, research, publications, preprints, talks and conferences.
Version: 0.6.6
Text Domain: marco-academic
*/

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #181818;
  --muted: #6b6b67;
  --line: #e4e1da;
  --accent: #173f5f;
  --accent-soft: #eef3f6;
  --max: 1080px;
  --reading: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }

.site-shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 760;
  letter-spacing: -.025em;
}
.brand:hover { text-decoration: none; }
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 0;
  padding: 0;
}
.main-nav a { color: #30302d; font-size: .94rem; }

.hero { padding: 88px 0 78px; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .72fr);
  gap: 64px;
  align-items: center;
}
.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.025em;
}
h1 { margin: 0 0 18px; font-size: clamp(3rem, 7vw, 5.5rem); }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { margin: 0 0 6px; font-size: 1.18rem; }
.hero-copy { max-width: 690px; font-size: 1.12rem; color: #393936; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-photo-wrap { justify-self: end; width: min(100%, 340px); }
.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #eee;
}
.photo-caption { margin: 8px 2px 0; color: var(--muted); font-size: .78rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
}
.button:hover { opacity: .92; text-decoration: none; }
.button-secondary { background: transparent; color: var(--accent); border-color: var(--line); }

.section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.section-sm { padding: 54px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.section-head a { font-size: .92rem; }
.section-intro { max-width: 720px; color: var(--muted); }
.about-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 64px; align-items: start; }
.about-label { color: var(--muted); font-size: .9rem; }
.about-copy { max-width: var(--reading); font-size: 1.08rem; }
.about-copy p:first-child { margin-top: 0; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card p { margin: 8px 0 0; color: #494946; }
.card h3 a { color: var(--text); }
.meta { color: var(--muted); font-size: .9rem; }
.tag {
  display: inline-block;
  margin: 0 7px 9px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .73rem;
  font-weight: 720;
  letter-spacing: .02em;
}

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 22px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.item-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 26px; }
.item-year { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .92rem; }
.item-title a { color: var(--text); }
.item-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: .9rem; }

.page-header { padding: 66px 0 40px; border-bottom: 1px solid var(--line); }
.page-header h1 { margin-bottom: 14px; font-size: clamp(2.6rem, 6vw, 4.6rem); }
.page-header .section-intro { margin-bottom: 0; }
.entry-section { padding: 56px 0 80px; }
.entry-content { max-width: var(--reading); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.9em; }
.entry-content img { border-radius: 12px; }
.entry-content .wp-block-file { padding: 12px 0; border-bottom: 1px solid var(--line); }

.archive-block + .archive-block { margin-top: 62px; }
.archive-block-title { margin: 0 0 22px; font-size: 1.7rem; }
.empty-note { color: var(--muted); font-style: italic; }

.site-footer { padding: 38px 0 46px; color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.social-links { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 800px) {
  .site-shell { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { min-height: auto; padding: 14px 0; align-items: flex-start; flex-direction: column; gap: 10px; }
  .main-nav ul { gap: 8px 15px; }
  .hero { padding: 58px 0 54px; }
  .hero-grid, .about-grid, .grid, .item-row { grid-template-columns: 1fr; }
  .hero-grid, .about-grid { gap: 30px; }
  .hero-photo-wrap { justify-self: start; width: min(70vw, 300px); }
  .item-row { gap: 5px; }
  .section { padding: 54px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 7px; }
}

/* External academic links */
.link-card { max-width: 760px; }
.link-preprint { margin-top: 12px; }
.link-preprint a { color: var(--accent); }
