/* Alasdair Newson — academic site */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650;9..144,700&family=Sora:wght@300;400;500;600&display=swap");

:root {
  --ink: #0e2433;
  --ink-mid: #1c3a4f;
  --ink-soft: #3d5a6c;
  --accent: #1f7a6c;
  --accent-bright: #2a9d8f;
  --accent-glow: rgba(42, 157, 143, 0.18);
  --paper: #fbfcfd;
  --mist: #eef3f6;
  --line: #d4e0e7;
  --text: #243b4a;
  --muted: #5a7383;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(14, 36, 51, 0.08);
  --radius: 14px;
  --nav-h: 4.25rem;
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(42, 157, 143, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(28, 58, 79, 0.08), transparent 50%),
    linear-gradient(180deg, #f5f8fa 0%, var(--paper) 35%, var(--paper) 100%);
  min-height: 100vh;
}

/* Soft scenic wash on the home page only */
body.home {
  background-color: var(--paper);
  background-image:
    linear-gradient(
      180deg,
      rgba(251, 252, 253, 0.38) 0%,
      rgba(251, 252, 253, 0.55) 20%,
      rgba(251, 252, 253, 0.82) 52%,
      var(--paper) 100%
    ),
    url("/assets/images/garibaldi.jpg");
  background-size: cover, cover;
  background-position: center, center 88%;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.home .hero {
  padding: 2.75rem 0 1.25rem;
}

.home .hero h1,
.home .hero .subtitle {
  text-shadow: 0 1px 24px rgba(251, 252, 253, 0.95), 0 0 40px rgba(251, 252, 253, 0.7);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--ink);
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink);
  line-height: 1.2;
  font-weight: 650;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin: 0 0 0.4rem; }
h2 { font-size: clamp(1.55rem, 2.5vw, 2rem); margin: 0 0 1rem; }
h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink);
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
  font-weight: 650;
}

p { margin: 0 0 1rem; }

ul, ol {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}

li { margin-bottom: 0.4rem; }

/* —— Header / Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(14, 40, 41, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 650;
  font-size: 1.2rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.brand:hover { color: var(--accent-bright); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  align-self: stretch;
  height: 100%;
  gap: 0.15rem;
}

.nav-list > li {
  position: relative;
  margin: 0;
  display: flex;
  align-items: center;
}

.nav-list a {
  display: block;
  padding: 0.55rem 0.7rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-list a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent-bright);
}

.has-dropdown > a::after {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-left: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.7;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 15rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  list-style: none;
  margin: 0;
  z-index: 200;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  display: block;
}

.dropdown a {
  color: var(--text);
  font-size: 0.84rem;
  padding: 0.55rem 0.75rem;
}

.dropdown a:hover {
  background: var(--mist);
  color: var(--accent);
}

/* —— Layout —— */
main { overflow-x: clip; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page {
  padding: 2.5rem 0 4rem;
}

.page-header {
  margin-bottom: 2rem;
  animation: rise 0.7s var(--ease) both;
}

.page-header p.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 40rem;
  margin: 0;
}

/* —— Hero (home) —— */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  animation: rise 0.8s var(--ease) both;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  font-weight: 400;
  margin: 0;
}

/* —— About band —— */
.about-band {
  background: #c5d5e0 url("../assets/images/paris_cropped.jpg") center / cover no-repeat;
  color: var(--ink);
  padding: 3.25rem 1.25rem;
  margin: 0 0 2.5rem;
  position: relative;
  overflow: hidden;
  animation: rise 0.9s var(--ease) 0.08s both;
}

.about-panel {
  max-width: 56rem;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem 2.25rem;
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(14, 36, 51, 0.2);
}

.about-band h2 {
  color: var(--ink);
  text-align: center;
  margin-bottom: 1.75rem;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
}

.about-grid p {
  color: var(--text);
  font-weight: 400;
}

.about-grid a {
  color: var(--accent);
}

.portrait-wrap {
  justify-self: center;
}

.portrait {
  width: min(100%, 280px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(14, 36, 51, 0.22);
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: var(--ink-mid);
}

.portrait-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* —— Sections —— */
.section {
  margin-bottom: 2.75rem;
  animation: rise 0.7s var(--ease) both;
}

.section:nth-child(2) { animation-delay: 0.05s; }
.section:nth-child(3) { animation-delay: 0.1s; }
.section:nth-child(4) { animation-delay: 0.15s; }

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.contact-block {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-block strong {
  color: var(--ink);
  font-weight: 600;
}

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

.news-list li {
  position: relative;
  padding: 1rem 1rem 1rem 1.35rem;
  margin-bottom: 0.65rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.news-list li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.news-list .links {
  display: inline-flex;
  gap: 0.75rem;
  margin-left: 0.35rem;
  font-size: 0.92rem;
}

.people-list {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  padding: 0;
}

.people-list-vertical {
  columns: 1;
}

.people-list li {
  break-inside: avoid;
  padding: 0.25rem 0;
  margin: 0;
}

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

.people-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-glow);
}

.poem {
  margin: 1.5rem 0 1rem;
  padding: 0;
  border: none;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.85;
  font-style: italic;
  color: var(--text);
}

.poem p {
  margin: 0.15rem 0;
}

.poem-prompt {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1.25rem;
}

/* —— Cards (research hub) —— */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.35rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent-bright);
  color: inherit;
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
}

.card .arrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.35rem;
}

/* —— Publications —— */
.year-block {
  margin-bottom: 2.25rem;
}

.year-block h3 {
  display: inline-block;
  font-family: "Sora", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--ink);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin: 0 0 1rem;
}

.pub {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.pub:last-child { border-bottom: none; }

.pub-title {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.pub-authors {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}

.pub-links {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.88rem;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-deep, var(--accent));
  background: var(--accent-glow);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin-left: 0.4rem;
  font-style: normal;
  vertical-align: middle;
}

/* —— Timeline / CV —— */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 1.35rem 1.4rem;
  margin: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.4rem;
  top: 0.45rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline .when {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.timeline .what {
  color: var(--ink);
  font-weight: 500;
}

.timeline .where {
  color: var(--muted);
  font-size: 0.95rem;
}

/* —— Figure / media —— */
.figure {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--mist);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.figure img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.figure.figure-compact {
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.figure-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
}

.figure-row img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

.figure-row figcaption {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.figure-row .figure {
  padding: 0.65rem;
}

.figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.media-slot {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, var(--mist), #dde8ee);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  border: 1px dashed var(--line);
}

.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0.85rem 0 1.25rem;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* —— Soft panels —— */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

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

.download-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.5);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

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

/* —— Motion —— */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }

  .nav-list {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--ink);
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.15rem;
  }

  .nav-list.open { display: flex; }

  .has-dropdown .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    margin: 0.25rem 0 0.5rem 0.5rem;
    padding: 0.25rem;
  }

  .has-dropdown.open .dropdown { display: block; }

  .dropdown a { color: rgba(255, 255, 255, 0.85); }
  .dropdown a:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-grid .about-text { text-align: left; }

  .about-panel {
    padding: 1.5rem 1.25rem;
  }

  .people-list { columns: 1; }
}

@media (max-width: 560px) {
  .hero { padding: 2.5rem 0 1.75rem; }
  .page { padding: 1.75rem 0 3rem; }
}
