/*
Theme Name:  CCAT FYST
Theme URI:   https://ccat.uni-koeln.de
Description: Child theme of Inspiro for the CCAT German Consortium site. "High-desert daylight" design system: warm paper, FYST navy, Atacama terracotta. Bootstrap 5 grid + components, self-hosted fonts (Spectral, Archivo, Martian Mono).
Author:      CCAT German Consortium
Template:    inspiro
Version:     1.0.1
License:     GNU General Public License v2 or later
Text Domain: ccat-fyst
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  --paper: #f6f1e8;
  --paper-2: #ede6d8;
  --card: #fffdf7;
  --ink: #1a2530;
  --ink-2: #4b5a68;
  --navy: #23374a;
  --navy-deep: #14212d;
  --navy-ink: #0d161e;
  --terra: #b04e1e;
  --terra-bright: #d05e24;
  --sky: #8fb2cc;
  --line: #d9cfbc;
  --line-dark: rgba(246, 241, 232, 0.14);

  --font-display: "Spectral", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
  --font-mono: "Martian Mono", "Courier New", monospace;

  --shadow-soft: 0 1px 2px rgba(26, 37, 48, 0.05), 0 12px 32px -12px rgba(26, 37, 48, 0.18);
  --shadow-lift: 0 2px 4px rgba(26, 37, 48, 0.06), 0 24px 48px -16px rgba(26, 37, 48, 0.28);
}

html { scroll-behavior: smooth; }

body {
  overflow-x: clip;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.42 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--terra); color: var(--paper); }

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--terra-bright); }

/* fixed navbar offset for the WP admin bar */
body.admin-bar .fixed-top { top: 32px; }
@media (max-width: 782px) { body.admin-bar .fixed-top { top: 46px; } }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.screen-reader-text {
  position: absolute !important;
  clip-path: inset(50%);
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-terra, .btn-ghost {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.72rem 1.5rem;
  border-radius: 2px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-terra {
  background: var(--terra);
  border: 1px solid var(--terra);
  color: #fdf8ef;
}
.btn-terra:hover {
  background: var(--terra-bright);
  border-color: var(--terra-bright);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(176, 78, 30, 0.7);
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(253, 248, 239, 0.55);
  color: #fdf8ef;
}
.btn-ghost:hover { background: rgba(253, 248, 239, 0.12); color: #fff; border-color: #fdf8ef; }
.btn-ghost.on-paper { border-color: var(--navy); color: var(--navy); }
.btn-ghost.on-paper:hover { background: var(--navy); color: var(--paper); }

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar-ccat {
  padding: 0.9rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.navbar-ccat .nav-link {
  color: rgba(253, 248, 239, 0.88);
  font-weight: 500;
  font-size: 0.93rem;
  margin-inline: 0.35rem;
  position: relative;
}
.navbar-ccat .nav-link::after {
  content: "";
  position: absolute;
  left: 0.5rem; right: 0.5rem; bottom: 0.25rem;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.navbar-ccat .nav-link:hover::after,
.navbar-ccat .current-menu-item > .nav-link::after,
.navbar-ccat .current_page_item > .nav-link::after { transform: scaleX(1); }
.navbar-ccat .nav-link:hover { color: #fff; }

.brand-mark { height: 40px; width: 40px; object-fit: contain; }
.brand-word { line-height: 1.05; }
.brand-word .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  color: #fdf8ef;
  white-space: nowrap;
}
.brand-word .brand-sub {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253, 248, 239, 0.66);
  white-space: nowrap;
}

/* external links in the primary menu become the outlined CTA chip (e.g. Data Center) */
.navbar-ccat .nav-cta { margin-left: 0.75rem; }
.navbar-ccat .nav-cta > .nav-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid rgba(253, 248, 239, 0.4);
  border-radius: 2px;
  padding: 0.42rem 0.9rem;
}
.navbar-ccat .nav-cta > .nav-link::before { content: none; }
.navbar-ccat .nav-cta > .nav-link::after {
  content: " ↗";
  position: static;
  background: none;
  transform: none;
  height: auto;
}
.navbar-ccat .nav-cta > .nav-link:hover { background: #fdf8ef; color: var(--navy-ink); border-color: #fdf8ef; }

.navbar-ccat.solid, .navbar-ccat.scrolled {
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
  padding: 0.45rem 0;
}
.navbar-ccat.solid .nav-link, .navbar-ccat.scrolled .nav-link { color: var(--ink); }
.navbar-ccat.solid .nav-link:hover, .navbar-ccat.scrolled .nav-link:hover { color: var(--terra); }
.navbar-ccat.solid .brand-name, .navbar-ccat.scrolled .brand-name { color: var(--navy); }
.navbar-ccat.solid .brand-sub, .navbar-ccat.scrolled .brand-sub { color: var(--ink-2); }
.navbar-ccat.solid .nav-cta > .nav-link, .navbar-ccat.scrolled .nav-cta > .nav-link { color: var(--navy); border-color: var(--navy); }
.navbar-ccat.solid .nav-cta > .nav-link:hover, .navbar-ccat.scrolled .nav-cta > .nav-link:hover { background: var(--navy); color: var(--paper); }
.navbar-ccat.solid .navbar-toggler-icon, .navbar-ccat.scrolled .navbar-toggler-icon { filter: invert(1); }

/* collapsed mobile menu gets a readable panel regardless of nav state */
@media (max-width: 991px) {
  .navbar-ccat .navbar-collapse {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
  }
  .navbar-ccat .navbar-collapse .nav-link { color: var(--ink); }
  .navbar-ccat .navbar-collapse .nav-link::after { content: none; }
  .navbar-ccat .navbar-collapse .nav-cta > .nav-link::after { content: " ↗"; }
  .navbar-ccat .navbar-collapse .brand-sub { color: var(--ink-2); }
  .navbar-ccat .navbar-collapse .nav-cta { margin: 0.5rem 0 0.25rem; }
  .navbar-ccat .navbar-collapse .nav-cta > .nav-link { color: var(--navy); border-color: var(--navy); display: inline-block; }
}

/* ==========================================================================
   Front-page hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: flex-end;
  color: #fdf8ef;
  background-color: var(--navy-deep);
  background-position: center 32%;
  background-size: cover;
  background-repeat: no-repeat;
  padding-bottom: 9rem;
}
.hero::before { /* darkening gradient over the header image */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 22, 30, 0.5) 0%, rgba(13, 22, 30, 0.12) 38%, rgba(13, 22, 30, 0.62) 88%);
}
.hero::after { /* left vignette for text legibility */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(13, 22, 30, 0.55) 0%, rgba(13, 22, 30, 0) 55%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 18px rgba(13, 22, 30, 0.45);
}

.hero-overline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sky);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.hero-overline::before {
  content: "";
  width: 42px;
  height: 1px;
  flex-shrink: 0;
  background: var(--terra-bright);
}

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.5rem);
  line-height: 1.06;
  max-width: 16ch;
  margin: 1.1rem 0 1.2rem;
  text-wrap: balance;
  color: #fdf8ef;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--sky);
}
.hero .lede {
  font-size: 1.12rem;
  line-height: 1.6;
  max-width: 54ch;
  color: rgba(253, 248, 239, 0.85);
}

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
[data-rise] { opacity: 0; animation: rise 0.9s cubic-bezier(0.2, 0.65, 0.25, 1) forwards; }
[data-rise="1"] { animation-delay: 0.05s; }
[data-rise="2"] { animation-delay: 0.18s; }
[data-rise="3"] { animation-delay: 0.32s; }
[data-rise="4"] { animation-delay: 0.46s; }
[data-rise="5"] { animation-delay: 0.62s; }

/* ==========================================================================
   Frequency ruler (signature motif) + section kickers
   ========================================================================== */

.freq-ruler {
  position: relative;
  height: 34px;
  background-image:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(90deg, rgba(26, 37, 48, 0.45) 0 1px, transparent 1px 100px);
  background-size: 100% 9px, 100% 17px;
  background-position: bottom left;
  background-repeat: repeat-x;
}
.freq-ruler .band {
  position: absolute;
  bottom: 0;
  height: 17px;
  background: rgba(176, 78, 30, 0.26);
  border-inline: 1px solid var(--terra);
}
.freq-ruler .band > span {
  position: absolute;
  top: -15px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--terra);
  white-space: nowrap;
}
.freq-ruler .end-label {
  position: absolute;
  top: -2px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}
.freq-ruler .end-label.start { left: 0; }
.freq-ruler .end-label.end { right: 0; }

.sec-kicker {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 2.6rem;
}
.sec-kicker .idx { color: var(--terra); font-weight: 500; }
.sec-kicker::after {
  content: "";
  flex: 1;
  align-self: center;
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 9px) bottom/100% 7px repeat-x;
}
.on-dark .sec-kicker, .band-navy .sec-kicker { color: var(--sky); }
.on-dark .sec-kicker .idx, .band-navy .sec-kicker .idx { color: var(--terra-bright); }
.on-dark .sec-kicker::after, .band-navy .sec-kicker::after {
  background: repeating-linear-gradient(90deg, var(--line-dark) 0 1px, transparent 1px 9px) bottom/100% 7px repeat-x;
}

/* ==========================================================================
   Stat bar (front page, overlaps hero)
   ========================================================================== */

.statbar-wrap { margin-top: -5.4rem; position: relative; z-index: 2; }
.statbar {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  padding: 1.5rem 2rem 1.6rem;
}
.statbar .freq-ruler { margin-bottom: 1.4rem; }
.stat .value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2.05rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}
.stat .value small { font-size: 0.6em; font-weight: 500; color: var(--ink-2); }
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 0.4rem;
}

/* ==========================================================================
   Sections & editorial typography
   ========================================================================== */

.sec { padding: 6.5rem 0; }

.lede-serif, .entry-content .lede-serif {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.42;
  font-weight: 500;
  color: var(--navy);
  text-wrap: balance;
}
.lede-serif em { font-style: italic; color: var(--terra); }
.body-copy { color: var(--ink-2); font-size: 1.02rem; }
.body-copy strong { color: var(--ink); font-weight: 600; }

.link-arrow {
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.link-arrow .arr { transition: transform 0.2s ease; }
.link-arrow:hover .arr { transform: translateX(5px); }

/* Consortium partner logos, rendered by the [ccat_partners] shortcode as one
   band: the three consortium groups sit side by side, their labels sharing a
   single ruler line, logos below. The Canadian group (10 logos, "wide") folds
   into a 5-column grid of two rows so no group dwarfs the others — group
   sizes are 1/3/10. Grayscale folds 14 brand palettes into the paper;
   multiply blending sinks any leftover white logo boxes into the background
   — no framed white strip. */
.partners {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 1.1rem 2rem;
  margin-top: 3rem;
}
/* Labels join the shared ruler row, logo blocks the row below. */
.partner-group { display: contents; }
.partners .plabel {
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.partners .plabel::before,
.partners .plabel::after { /* ruler lines flanking each consortium label */
  content: "";
  flex: 1;
  height: 1px;
  min-width: 20px;
  background: var(--line);
}
.partners .logos {
  grid-row: 2;
  align-self: center; /* one-row groups center against the two-row wide block */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 1.2rem;
}
.partner-group.wide .logos {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-items: center;
}
.partners a { display: block; }
.partners img {
  height: 28px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.72;
  mix-blend-mode: multiply;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.partners a:hover img,
.partners a:focus-visible img { filter: none; opacity: 1; }
@media (max-width: 1199px) { /* not enough width for one band: groups stack */
  .partners { display: flex; flex-direction: column; gap: 1.8rem; }
  .partner-group { display: block; }
  .partners .plabel { margin-bottom: 1rem; }
}
@media (max-width: 767px) {
  .partner-group.wide .logos { display: flex; } /* 5-col grid overflows phones */
  .partners img { height: 24px; max-width: 100px; }
}

/* ==========================================================================
   Contribution cards + terminal visual
   ========================================================================== */

.contrib-card {
  background: var(--card);
  border: 1px solid var(--line);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.contrib-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.contrib-card .visual {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.contrib-card .visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.contrib-card:hover .visual img { transform: scale(1.045); }
.contrib-card .card-body-x { padding: 1.6rem 1.7rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.contrib-card .card-body-x > p:last-child { margin-top: auto; margin-bottom: 0; }
.contrib-card .tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.7rem;
}
.contrib-card h3 { font-size: 1.45rem; margin-bottom: 0.65rem; color: var(--navy); }
.contrib-card p { color: var(--ink-2); font-size: 0.95rem; flex: 1; }

.terminal {
  aspect-ratio: 3 / 2;
  background: var(--navy-ink);
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 1.3rem;
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 0.95vw, 0.68rem);
  line-height: 2.05;
  color: #9db4c6;
  overflow: hidden;
}
.terminal .dots { display: flex; gap: 6px; margin-bottom: 0.7rem; }
.terminal .dots i { width: 9px; height: 9px; border-radius: 50%; background: #2c4256; }
.terminal .cmd { color: #e8ded0; }
.terminal .cmd::before { content: "$ "; color: var(--terra-bright); }
.terminal .ok { color: #7fb069; }
.terminal .dim { color: #567089; }

/* ==========================================================================
   Navy band (timeline) — used as an alignfull group inside page content
   ========================================================================== */

.band-navy {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(143, 178, 204, 0.14), transparent 60%),
    var(--navy-deep);
  color: #e8ded0;
  position: relative;
  overflow: hidden;
  padding: 6.5rem 0;
}
.band-navy h2, .band-navy h3 { color: #f6f1e8; }
.band-navy .lede-serif { color: #f6f1e8; }

.timeline { list-style: none; padding: 0; margin: 3.2rem 0 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-dark);
}
.timeline li, .timeline .wp-block-column { position: relative; padding-top: 2rem; }
.timeline li::before, .timeline .wp-block-column::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--navy-deep);
  border: 2px solid var(--sky);
}
.timeline .milestone::before {
  background: var(--terra-bright) !important;
  border-color: var(--terra-bright) !important;
  box-shadow: 0 0 0 5px rgba(208, 94, 36, 0.25);
}
.timeline .when {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 0;
}
.timeline .milestone .when { color: var(--terra-bright); }
.timeline .what {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 500;
  color: #f6f1e8;
  margin: 0.35rem 0 0.3rem;
}
.timeline p:not(.when):not(.what) { font-size: 0.88rem; color: #9db4c6; margin: 0; max-width: 30ch; }

/* ==========================================================================
   News list + posts
   ========================================================================== */

.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.news-card .thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.news-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.news-card:hover .thumb img { transform: scale(1.045); }
/* Source-labelled tile when no preview image could be recovered. */
.news-card.no-thumb .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}
.news-card .thumb-fallback {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  text-align: center;
  padding: 0 1rem;
}
.news-card .ext-mark {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: var(--navy);
  background: rgba(246, 241, 232, 0.92);
  border-radius: 2px;
}
.news-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.35rem;
}
.news-card-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.news-card-meta .source { color: var(--terra); font-weight: 600; }
.news-card-meta .date { color: var(--ink-2); }
.news-card-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 0.55rem;
  text-wrap: balance;
  transition: color 0.18s ease;
}
.news-card:hover .news-card-title { color: var(--terra); }
.news-card-excerpt {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 0.9rem;
}
.news-card-go {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.news-card-go .arr { transition: transform 0.18s ease; }
.news-card:hover .news-card-go .arr { transform: translateX(4px); }

/* search form (404 / empty archives) */
.search-form { display: flex; gap: 0.5rem; max-width: 460px; }
.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
}
.search-form input[type="search"]:focus { outline: 2px solid var(--terra); outline-offset: 1px; }
.search-form input[type="submit"], .search-form button {
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--paper);
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  border-radius: 2px;
}

.pagination-ccat { font-family: var(--font-mono); font-size: 0.75rem; }
.pagination-ccat .page-numbers {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  margin-right: 0.3rem;
  color: var(--ink-2);
}
.pagination-ccat .page-numbers.current { background: var(--navy); color: var(--paper); border-color: var(--navy); }

/* ==========================================================================
   Page & article layout
   ========================================================================== */

.page-hero {
  background:
    radial-gradient(900px 400px at 80% -20%, rgba(143, 178, 204, 0.16), transparent 60%),
    var(--navy-deep);
  color: #f6f1e8;
  padding: 9.5rem 0 3.4rem;
  position: relative;
}
.page-hero::after { /* thin ruler foot */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 7px;
  background: repeating-linear-gradient(90deg, rgba(246, 241, 232, 0.22) 0 1px, transparent 1px 9px);
}
.page-hero .kicker {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.page-hero .kicker::before {
  content: "";
  width: 42px;
  height: 1px;
  flex-shrink: 0;
  background: var(--terra-bright);
}
.page-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.1;
  color: #f6f1e8;
  max-width: 24ch;
  text-wrap: balance;
  margin: 0;
}
.page-hero .meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-top: 1.1rem;
}

.entry-wrap { padding: 4.5rem 0 6rem; }

/* Constrained content column with wide/full breakouts (standard WP pattern) */
.entry-content > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: 1172px; }
.entry-content > .alignfull { max-width: none; }
.entry-content > :not(.alignfull) { padding-left: 1rem; padding-right: 1rem; }

.entry-content { font-size: 1.05rem; color: var(--ink); }
.entry-content > p:first-child { font-size: 1.15rem; color: var(--ink-2); }
.entry-content .contrib-card p { flex: initial; }
.entry-content h2 {
  font-size: 1.9rem;
  color: var(--navy);
  margin: 3rem auto 1.1rem;
  padding-top: 2.4rem;
  position: relative;
}
.entry-content h2::before { /* mini ruler above each h2 */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 9px);
}
.entry-content h3 { font-size: 1.4rem; color: var(--navy); margin: 2.2rem auto 0.8rem; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(176, 78, 30, 0.35); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--terra); }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: 0.35rem; }
.entry-content blockquote {
  border-left: 2px solid var(--terra);
  padding-left: 1.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
}

/* figures: framed like journal plates */
.entry-content figure.wp-block-image, .entry-content .wp-block-image {
  margin: 2.4rem auto;
}
.entry-content figure img {
  max-width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.entry-content figcaption {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--ink-2);
  margin-top: 0.7rem;
  text-align: left;
}

/* galleries */
.entry-content .wp-block-gallery { gap: 1.2rem; }
.entry-content .wp-block-gallery figure { margin: 0; }

/* responsive embeds (videos page) */
.entry-content .wp-block-embed { margin: 2.4rem auto; }
.entry-content .wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.entry-content iframe { max-width: 100%; }

/* tables */
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 0.5rem 0.75rem; }
.entry-content th { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; background: var(--paper-2); }

/* contribution cards built from blocks: neutralize editorial figure/heading
   margins that the entry-content rules above would leak into them */
.entry-content .contrib-card { height: auto; } /* let the columns flex row stretch them equal */
.entry-content .contrib-card .visual,
.entry-content .contrib-card .wp-block-html { margin: 0; }
.entry-content .contrib-card .visual img { border: 0; box-shadow: none; }
.entry-content .contrib-card h3 { margin: 0 0 0.65rem; }
.entry-content .contrib-card .tag { margin-bottom: 0.7rem; }

/* muted funding smallprint block (homepage) */
.funding-note { font-size: 0.82rem; line-height: 1.7; color: var(--ink-2); }
.funding-note a { color: var(--ink-2); text-decoration: underline; }

/* ==========================================================================
   Team grid + working-group filter
   ========================================================================== */

.team-filter { margin-bottom: 2.8rem; }
.wg-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.38rem 0.9rem;
  margin: 0.22rem 0.14rem;
  background: var(--card);
  cursor: pointer;
  transition: all 0.18s ease;
}
button.wg-chip:hover { border-color: var(--navy); color: var(--navy); }
/* .active must also beat the :hover rule above, or the label turns navy-on-navy */
.wg-chip.active, button.wg-chip.active:hover { background: var(--navy); border-color: var(--navy); color: var(--paper); }

/* description of the selected working group, revealed by theme.js */
.wg-desc {
  max-width: 820px;
  margin: -1.4rem 0 2.8rem;
  padding: 1.2rem 1.5rem;
  background: var(--card);
  border-left: 3px solid var(--terra);
  box-shadow: var(--shadow-soft);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.wg-desc[hidden] { display: none; }
.wg-desc h2 { font-size: 1.15rem; color: var(--navy); margin: 0 0 0.6rem; }
.wg-desc p { margin: 0 0 0.9em; }
.wg-desc p:last-child { margin-bottom: 0; }
.wg-desc a { color: var(--terra); }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
@media (max-width: 991px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

.member-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}
.member-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.member-card.filtered-out { display: none; }
.member-card .photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.member-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.member-card .photo .placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--sky);
}
.member-card .info { padding: 1rem 1.1rem 1.15rem; }
.member-card h3 { font-size: 1.12rem; color: var(--navy); margin: 0 0 0.3rem; }
.member-card .orcid {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  display: block;
  margin-bottom: 0.45rem;
}
.member-card .orcid a { color: inherit; }
.member-card .orcid a:hover { color: var(--terra); }
.member-card .affil { font-size: 0.78rem; line-height: 1.5; color: var(--ink-2); margin: 0 0 0.5rem; }
.member-card .groups { margin-top: auto; }
.member-card .groups span {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra);
  border: 1px solid rgba(176, 78, 30, 0.3);
  border-radius: 100px;
  padding: 0.14rem 0.5rem;
  margin: 0.1rem 0.1rem 0 0;
}
.member-card .member-more { font-size: 0.8rem; color: var(--terra); margin-top: 0.7rem; }

/* single member profile (/team/<slug>/): the photo card rises into the navy
   hero (stat-bar overlap move) above a sticky fact sheet; the bio reads in
   its own column beside it */
.member-hero { padding-bottom: 5.2rem; }
.member-hero .kicker a { color: inherit; }
.member-wrap { padding-top: 0; }
.member-profile {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 3.2rem;
  align-items: start;
  max-width: 1080px;
}
.member-profile .side {
  margin-top: -4.6rem; /* rises into the hero */
  position: relative;
  z-index: 2;
}
@media (min-width: 768px) {
  .member-profile .side { position: sticky; top: 90px; }
}
.member-profile .photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}
.member-profile .photo img { width: 100%; height: 100%; object-fit: cover; }
.member-profile .photo .placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 4rem; color: var(--sky);
}
/* fact sheet under the photo: mono labels over quiet values */
.member-profile .facts { margin: 1.5rem 0 0; }
.member-profile .facts > div { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.member-profile .facts dt {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.35rem;
}
.member-profile .facts dd { margin: 0; font-size: 0.86rem; line-height: 1.55; color: var(--ink-2); }
.member-profile .facts .orcid { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; }
.member-profile .facts .orcid a { color: inherit; }
.member-profile .facts .orcid a:hover { color: var(--terra); }
.member-profile .groups span {
  display: inline-block; font-family: var(--font-mono); font-size: 0.55rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--terra);
  border: 1px solid rgba(176, 78, 30, 0.3); border-radius: 100px;
  padding: 0.16rem 0.55rem; margin: 0.1rem 0.15rem 0 0;
}
.member-profile .side .back { margin-top: 1.3rem; font-size: 0.85rem; }
.member-profile .detail { padding-top: 3rem; min-width: 0; }
/* bio body sits in a normal reading column, not the centered entry-content one */
.member-profile .member-bio { font-size: 1rem; max-width: 62ch; }
.member-profile .member-bio > * { max-width: none; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.member-profile .member-bio .contact { /* opening email line (tagged by the theme filter) */
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--terra);
  padding-bottom: 1.1rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
/* career timeline (year-led bio paragraphs, reshaped by the theme filter) */
.member-bio .cv { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.member-bio .cv li {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 1.1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.member-bio .cv li:first-child { border-top: 1px solid var(--line); }
.member-bio .cv .when {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra);
  padding-top: 0.3rem;
  white-space: nowrap;
}
.member-bio .cv .what { font-size: 0.92rem; line-height: 1.55; color: var(--ink); }
@media (max-width: 479px) {
  .member-bio .cv li { grid-template-columns: 1fr; gap: 0.15rem; }
}
@media (max-width: 767px) {
  .member-profile { grid-template-columns: 1fr; gap: 1.8rem; }
  .member-profile .side { margin-top: -3.2rem; }
  .member-profile .photo { max-width: 300px; }
  .member-profile .detail { padding-top: 0; }
}

/* front-page team strip */
.avatar-row { display: flex; justify-content: center; flex-wrap: nowrap; }
.avatar-row img, .avatar-row .more {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--paper);
  box-shadow: var(--shadow-soft);
  margin-left: -16px;
  background: var(--paper-2);
  transition: transform 0.2s ease;
}
.avatar-row img:first-child { margin-left: 0; }
.avatar-row img:hover { transform: translateY(-6px) scale(1.06); z-index: 2; position: relative; }
.avatar-row .more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--navy);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--navy-ink);
  color: #9db4c6;
  padding: 4.5rem 0 2rem;
  font-size: 0.9rem;
}
.footer h6 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1rem;
}
.footer a { color: #c9d6e0; }
.footer a:hover { color: #fff; }
.footer .brand-name { color: #f6f1e8; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer .bottom {
  border-top: 1px solid var(--line-dark);
  margin-top: 3rem;
  padding-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #567089;
}

/* ==========================================================================
   Scroll reveal + responsive/motion guards
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.65, 0.25, 1), transform 0.8s cubic-bezier(0.2, 0.65, 0.25, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }

/* if JS never runs, never hide content */
.no-js .reveal, .no-js [data-rise] { opacity: 1; transform: none; animation: none; }

@media (max-width: 767px) {
  .freq-ruler .band > span { display: none; }
  .avatar-row img, .avatar-row .more { width: 54px; height: 54px; margin-left: -12px; }
  .sec { padding: 4rem 0; }
  .band-navy { padding: 4rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-rise], .reveal { animation: none; opacity: 1; transform: none; transition: none; }
}
