/* ConStRAINeD project site — minimal CSS inspired by WordPress Twenty Twenty-One */

:root {
  --bg: #D1E4DD;
  --text: #28303D;
  --border: #28303D;
  --muted: #5d6571;
  --content-width: 720px;
  --wide-width: 960px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a { color: var(--text); }
a:hover { opacity: 0.7; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Skip link — visible only when keyboard-focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1rem;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

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

/* Site header */
.site-header {
  padding: 2.5rem 1.5rem 1rem;
  max-width: var(--wide-width);
  margin: 0 auto;
}
.site-header h1.site-title {
  margin: 0 0 0.4rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}
.site-header h1.site-title a {
  text-decoration: none;
}
.site-header .tagline {
  margin: 0;
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
}

/* Site nav */
.site-nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: var(--wide-width);
  margin: 0 auto;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0.6rem 1.5rem;
  gap: 1.5rem;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a.current { text-decoration: underline; }
.site-nav a.current { font-weight: 600; }

/* Main content */
main {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
main.narrow {
  max-width: var(--content-width);
}

main h1.entry-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
}
.event-tagline {
  font-style: italic;
  color: var(--muted);
  margin: -0.8rem 0 2rem;
  line-height: 1.5;
}

/* Home page (alignwide title + centered lead paragraph) */
main h1.home-title {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  text-align: left;
  line-height: 1.1;
  max-width: var(--wide-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  padding: 0 1.5rem;
}
.home-lead {
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
  max-width: 850px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
main h2 {
  font-size: 1.6rem;
  font-weight: 400;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
}
main h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
main p { margin: 0.8rem 0; }

/* Hero / banner image */
.hero {
  margin: 1.5rem 0 2.5rem;
  width: 100%;
}

/* Full-width hero image (homepage) — sits between nav and main, edge to edge */
.hero-fullwidth {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

/* Caption */
figure {
  margin: 1.5rem 0;
}
figcaption {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid var(--text);
}
.btn:hover { background: var(--bg); color: var(--text); opacity: 1; }

/* People cards (the "is-style-twentytwentyone-border" look) */
.people-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.person-card {
  border: 1px solid var(--border);
  padding: 1.8rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}
.person-card .photo {
  width: 240px;
  height: 240px;
  object-fit: cover;
  background: rgba(40,48,61,0.08);
}
.person-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.6rem;
  font-weight: 400;
}
.person-card p {
  margin: 0.25rem 0;
  font-size: 1.05rem;
}
.person-card .email {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}
.person-card .btn { margin-top: 1rem; }

@media (max-width: 700px) {
  .person-card {
    grid-template-columns: 1fr;
  }
  .person-card .photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* News */
.news-item {
  border-top: 1px solid var(--border);
  padding: 1.8rem 0;
}
.news-item:first-of-type { border-top: none; padding-top: 0; }
.news-item h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 600;
}
.news-item .date {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.news-item p { margin: 0.4rem 0; }

/* News year heading */
.year-heading {
  font-size: 1.8rem;
  font-weight: 300;
  margin: 3rem 0 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
}
.year-heading:first-of-type { margin-top: 1rem; }

/* Sub-nav (used on the 3 "project" sub-pages) */
.subnav {
  border-bottom: 1px solid var(--border);
  max-width: var(--wide-width);
  margin: 0 auto;
  background: rgba(40,48,61,0.04);
}
.subnav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0.55rem 1.5rem;
  gap: 1.5rem;
  font-size: 0.9rem;
}
.subnav a {
  color: var(--text);
  text-decoration: none;
}
.subnav a:hover { text-decoration: underline; }
.subnav a.current {
  font-weight: 600;
  text-decoration: underline;
}

/* Publications */
.pub-section { margin-top: 2rem; }
.pub-list {
  padding-left: 1.6rem;
  margin: 1rem 0;
}
.pub-list li {
  margin-bottom: 0.9rem;
  line-height: 1.5;
}
.pub-list strong { font-weight: 700; }
.pub-list em { font-style: italic; }

/* Schedule table (workshop / summer school) */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 2.5rem;
}
.schedule {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.schedule th, .schedule td {
  border: 1px solid var(--border);
  padding: 0.6rem;
  text-align: left;
  vertical-align: top;
}
.schedule th {
  background: rgba(40,48,61,0.06);
  font-weight: 600;
}
.schedule .meal td, .schedule .meal th {
  background: rgba(40,48,61,0.04);
  font-style: italic;
}

/* Speakers table */
.speakers {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.speakers th, .speakers td {
  border: 1px solid var(--border);
  padding: 0.6rem;
  text-align: left;
  vertical-align: top;
}
.speakers th { font-weight: 600; }

/* Address blocks on contacts page */
.address {
  margin: 1.2rem 0;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--border);
  font-style: normal;
}
.address strong { display: block; margin-bottom: 0.2rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: var(--wide-width);
  margin: 0 auto;
}
.site-footer a { color: var(--muted); }

/* Project banner */
.project-banner {
  text-align: center;
  margin: 1rem 0 2rem;
}
.project-banner img { display: inline-block; max-width: 100%; }

/* Print stylesheet */
@media print {
  body {
    background: white;
    color: black;
    font-size: 11pt;
    line-height: 1.4;
  }
  .site-nav { display: none; }
  .site-header { padding: 0 0 0.5rem; border-bottom: 2px solid black; margin-bottom: 1rem; }
  main { padding: 0; max-width: none; }
  a { color: black; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  a[href^="../"]::after, a[href^="/"]::after, a[href^="#"]::after { content: ""; }
  .btn { background: white !important; color: black !important; border: 1px solid black !important; }
  .person-card { break-inside: avoid; border: 1px solid black; }
  .news-item { break-inside: avoid; border-top: 1px solid #999; }
  .schedule, .speakers { font-size: 9pt; page-break-inside: avoid; }
  .schedule th, .speakers th { background: #eee !important; }
  .hero, .funding-logos, .project-banner img { max-height: 4cm; width: auto; }
  .site-footer { border-top: 1px solid black; }
}
