/* Particle Physics Division of the Finnish Physical Society
   Stylesheet for partdiv_new.html (plain CSS, no build step, no external fonts).
   Layout loosely inspired by HTML5 UP-style one-page templates. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1d2330;
  --muted: #5b6475;
  --line: #dfe3ea;
  --accent: #1f6feb;
  --accent-2: #e8833a;
  --hero-ink: #ffffff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 10px;
  --maxw: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #181d26;
    --text: #e6e9ef;
    --muted: #9aa3b2;
    --line: #2a3140;
    --accent: #6ea8ff;
    --accent-2: #f0a35e;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.75rem; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }

/* ---------- Header / navigation ---------- */
.topnav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 20, 30, .92);
  backdrop-filter: blur(6px);
}
.topnav ul {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  list-style: none; display: flex; gap: .25rem; overflow-x: auto;
}
.topnav a {
  display: block; padding: .8rem .75rem; white-space: nowrap;
  color: #dfe6f3; text-decoration: none; font-size: .9rem; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase;
}
.topnav a:hover { color: #fff; box-shadow: inset 0 -3px 0 var(--accent-2); }

.hero {
  position: relative; color: var(--hero-ink);
  min-height: 62vh; display: grid; place-items: end start;
  background: #0f141e url("../ppdGroupPictures/thumbs/hero_2025_hyytiala.jpg") center 40% / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,14,22,.15) 0%, rgba(10,14,22,.55) 55%, rgba(10,14,22,.9) 100%);
}
.hero .inner { position: relative; max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 3rem 16px 2.5rem; }
.hero .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: #ffd2ae; margin: 0 0 .5rem; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); margin: 0 0 .75rem; max-width: 20ch; }
.hero p { max-width: 60ch; margin: 0 0 1.25rem; color: #e5e9f0; }
.btn {
  display: inline-block; padding: .65rem 1.1rem; border-radius: 999px;
  background: var(--accent-2); color: #1b1206; font-weight: 700; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); margin-left: .5rem; }

/* ---------- Generic sections ---------- */
main section.block { padding: 3.5rem 16px; border-bottom: 1px solid var(--line); }
main section.block:nth-of-type(even) { background: var(--surface); }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 70ch; }
.cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow);
}
section.block:nth-of-type(even) .card { background: var(--bg); }

/* Upcoming / highlight box */
.highlight {
  border-left: 5px solid var(--accent-2); background: var(--surface);
  padding: 1.1rem 1.4rem; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow);
  margin: 0 0 2rem;
}
.highlight h3 { margin-bottom: .3rem; }

/* Board list */
.board { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.board li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; }
section.block:nth-of-type(even) .board li { background: var(--bg); }
.board .role { display: block; font-size: .8rem; color: var(--accent-2); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.board .aff { color: var(--muted); font-size: .9rem; }

/* ---------- Events: one <section class="year"> per year ---------- */
.year { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.year > h3 { font-size: 1.6rem; color: var(--accent); margin: 0; font-variant-numeric: tabular-nums; }
.year ul { margin: 0; padding-left: 1.1rem; }
.year li { margin: .15rem 0 .55rem; }
.year li ul { margin-top: .25rem; padding-left: 1rem; list-style: circle; color: var(--muted); font-size: .95rem; }
.year li ul li { margin: .1rem 0; }
.year .where { color: var(--muted); }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .05rem .45rem; border-radius: 4px; background: var(--accent-2); color: #1b1206; vertical-align: .1em;
}
.older { margin-top: 1rem; }
.older > summary {
  cursor: pointer; font-weight: 700; padding: .75rem 1rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); list-style: none;
}
.older > summary::-webkit-details-marker { display: none; }
.older > summary::before { content: "▸ "; color: var(--accent-2); }
.older[open] > summary::before { content: "▾ "; }

/* Link status markers (see legend on the page) */
a.archived::after { content: " (archived)"; font-size: .78em; color: var(--muted); }
a[hreflang="fi"]::after, a.fi::after { content: " (in Finnish)"; font-size: .78em; color: var(--muted); }
a.archived[hreflang="fi"]::after { content: " (archived, in Finnish)"; }
.lost { color: var(--muted); text-decoration: line-through dotted; text-decoration-thickness: 1px; }
.lost::after { content: " (page lost)"; font-size: .78em; text-decoration: none; display: inline-block; }
.legend { font-size: .88rem; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0; padding: 0; }
.gallery figure { margin: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.gallery a { display: block; overflow: hidden; }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { padding: .65rem .9rem .8rem; font-size: .92rem; }
.gallery figcaption strong { display: block; }
.gallery figcaption span { color: var(--muted); }

/* ---------- History ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.25rem; border-left: 3px solid var(--line); }
.timeline li { position: relative; margin: 0 0 1.1rem; padding-left: .75rem; }
.timeline li::before {
  content: ""; position: absolute; left: -1.72rem; top: .45rem; width: .8rem; height: .8rem;
  border-radius: 50%; background: var(--accent-2); border: 3px solid var(--bg);
}
.timeline .when { font-weight: 700; color: var(--accent); margin-right: .4rem; }
table.boards { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.boards th, table.boards td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.boards th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.archive-list { columns: 2 320px; column-gap: 2rem; padding-left: 1.1rem; }
.archive-list li { break-inside: avoid; margin-bottom: .35rem; }

/* ---------- Links / research ---------- */
.linkgrid { list-style: none; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.linkgrid li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; }
section.block:nth-of-type(even) .linkgrid li { background: var(--bg); }
.linkgrid strong { display: block; }

code { background: var(--line); padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }

footer { padding: 2rem 16px 3rem; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }

@media (max-width: 600px) {
  .year { grid-template-columns: 1fr; gap: .25rem; }
  .hero { min-height: 70vh; }
  .btn.ghost { margin: .5rem 0 0; }
}
