/* ADRI — Applied Data Research Institute
   Shared stylesheet. Edit colors and fonts here and every page updates. */

:root {
  --ink: #232a2e;
  --ink-soft: #55606a;
  --paper: #ffffff;
  --paper-tint: #f1f5f3;
  --accent: #1d6a5a;
  --accent-deep: #124a3f;
  --rule: #d9e0dd;
  --max: 1100px;
  --font: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }
h5 { font-size: 1.1rem; color: var(--ink-soft); }
p { margin: 0 0 1em; }

.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }

/* Skip link */
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; min-height: 76px; }
.site-header .brand { justify-self: start; }
.site-header .site-nav { justify-self: center; }
.site-header .nav-toggle { justify-self: end; }
.brand img { width: 161px; height: auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 4px; padding: .4rem .7rem; font: inherit; color: var(--ink); cursor: pointer; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 1rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .site-nav ul { flex-direction: column; gap: 0; padding-bottom: .75rem; }
  .site-nav a { display: block; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--rule); }
}

/* Sections */
.section { padding: 3.5rem 0; }
.section.tint { background: var(--paper-tint); }
.section h2 { margin-bottom: 1rem; }
.lede { font-size: 1.2rem; max-width: 62ch; }
.prose { max-width: 68ch; }

/* Page banner (About / Projects / News / Contact) */
.banner { max-height: 440px; overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 7; }

/* Image strips */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 720px) { .strip { grid-template-columns: 1fr; } }

/* Two-column text + image */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

/* Team */
.team { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem 2rem; margin-top: 1.5rem; }
.team figure { margin: 0; text-align: center; flex: 0 1 280px; }
.team img { width: 244px; height: 244px; object-fit: cover; border-radius: 50%; margin: 0 auto 1rem; }
.team figcaption strong { display: block; font-size: 1.15rem; }
.team figcaption span { color: var(--ink-soft); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem; margin-top: 1.5rem; }
.projects figure { margin: 0; }
.projects img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.projects figcaption { padding-top: .9rem; font-size: 1.1rem; font-weight: 600; }

/* News list */
.post-card { display: grid; grid-template-columns: 1fr 265px; gap: 2rem; align-items: start; padding: 2rem 0; border-top: 1px solid var(--rule); }
.post-card:last-child { border-bottom: 1px solid var(--rule); }
.post-card time { color: var(--ink-soft); }
.post-card h2 { font-size: 1.6rem; margin: .25rem 0 .5rem; }
.post-card img { width: 100%; aspect-ratio: 265 / 137; object-fit: cover; }
@media (max-width: 720px) { .post-card { grid-template-columns: 1fr; } .post-card img { order: -1; } }

/* Article */
.article { max-width: 760px; }
.article .meta { color: var(--ink-soft); margin-bottom: 1.5rem; }
.article .meta span + span::before { content: " \00B7 "; }
.article figure { margin: 0 0 2rem; }
.article figure img { width: 100%; aspect-ratio: 980 / 478; object-fit: cover; }
.article h5 { margin-top: 2rem; border-bottom: 1px solid var(--rule); padding-bottom: .3rem; }
.article .event { margin: 1.25rem 0; }
.article .event strong { display: block; }
.article .updated { color: var(--ink-soft); font-size: .95rem; margin-top: 2.5rem; }
.back { display: inline-block; margin-bottom: 1.5rem; text-decoration: none; }

/* Forms */
form { max-width: 620px; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field input, .field textarea {
  width: 100%; font: inherit; padding: .65rem .8rem;
  border: 1px solid #b8c2be; border-radius: 3px; background: #fff; color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .two-up { grid-template-columns: 1fr; } }
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 3px;
  padding: .7rem 1.6rem; text-decoration: none;
}
.btn:hover { background: var(--accent-deep); color: #fff; }
.subscribe-block { text-align: center; }
.subscribe { display: flex; flex-wrap: wrap; gap: .75rem; max-width: 520px; margin-inline: auto; }
.subscribe .form-status { flex-basis: 100%; margin-top: .25rem; }
.subscribe input { flex: 1; }
.form-status { margin-top: 1rem; font-weight: 600; color: var(--accent-deep); }
.form-status:empty { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 2.5rem 0; text-align: center; color: var(--ink-soft); font-size: .95rem; }
.site-footer img { width: 94px; margin: 0 auto 1rem; }
.site-footer p { margin: .25rem 0; }
