/* QuakeFinder static site — shared styles. No external fonts or scripts. */

:root {
  --navy-950: #061423;
  --navy-900: #0a1f35;
  --navy-800: #11304f;
  --navy-600: #24578a;
  --amber: #f4a63b;
  --amber-hover: #ffbb5c;
  --amber-ink: #2a1a03;

  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --text: #1b2733;
  --text-muted: #556472;
  --rule: #dde4eb;
  --link: #1d5f9e;
  --link-hover: #0f3f6e;
  --card: #ffffff;
  --card-shadow: 0 1px 2px rgba(10, 31, 53, .06), 0 4px 16px rgba(10, 31, 53, .06);

  --measure: 44rem;
  --wide: 68rem;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1622;
    --bg-soft: #0f1e2e;
    --text: #e3e9ef;
    --text-muted: #9fb0c0;
    --rule: #22364a;
    --link: #7fb8ec;
    --link-hover: #b3d6f6;
    --card: #12233a;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--link-hover); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--amber); color: var(--amber-ink); padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
.prose { max-width: var(--measure); }

/* ---------- header ---------- */

.site-header {
  background: #fff;
  color: var(--navy-900);
  border-bottom: 1px solid #dde4eb;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; padding-top: .55rem; padding-bottom: .55rem;
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { width: 166px; height: 54px; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a { color: #3b4c5c; text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: var(--navy-900); }
.site-nav a[aria-current="page"] { color: var(--navy-900); font-weight: 600; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 999px;
  font-weight: 650; font-size: 1rem; text-decoration: none; line-height: 1.2;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-hover); color: var(--amber-ink); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.125rem; }
.site-nav .btn { padding: .5rem 1rem; font-size: .9rem; color: var(--amber-ink); }
.site-nav .btn:hover { color: var(--amber-ink); }
.arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- hero ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 90% at 85% 10%, rgba(36, 87, 138, .55), transparent 70%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900));
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 650;
  color: var(--amber); margin: 0 0 1rem;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.75rem, 7vw, 4.75rem); line-height: 1.02; margin: 0 0 1.25rem;
  letter-spacing: -.01em;
}
.hero .lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.6; color: #dbe5ef; max-width: 40rem; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ---------- stats ---------- */

.stats {
  background: var(--navy-900); color: #fff;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.stats ul {
  list-style: none; margin: 0 auto; padding: 1.75rem 1rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; max-width: var(--wide);
}
.stats li { display: flex; flex-direction: column; gap: .2rem; }
.stats b { font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 600; line-height: 1.1; color: var(--amber); }
.stats span { font-size: .9rem; color: #b9c7d5; line-height: 1.4; }

/* ---------- network map strip ---------- */

.map-strip { margin: 0; position: relative; }
.map-strip img {
  width: 100%; height: 252px; object-fit: cover; object-position: 48% center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.map-strip { background: linear-gradient(90deg, #a9d1f7 0%, #a9d1f7 50%, #e9e5dc 100%); }
.map-strip figcaption {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: .6rem;
  width: min(var(--wide), 100%); padding: 0 1rem; font-size: .8rem; color: #1b2733;
}
.map-strip figcaption span { background: rgba(255, 255, 255, .85); padding: .2rem .55rem; border-radius: 4px; }

/* ---------- sections ---------- */

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-soft { background: var(--bg-soft); }
.section h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 3.6vw, 2.35rem);
  line-height: 1.15; margin: 0 0 1.25rem;
}
.section p { margin: 0 0 1.1rem; }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.figure { margin: 0; }
.figure img { border-radius: var(--radius); box-shadow: var(--card-shadow); width: 100%; }
.figure figcaption { font-size: .875rem; color: var(--text-muted); margin-top: .6rem; }

/* ---------- featured publications ---------- */

.pubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 2rem 0 0; }
.pub {
  display: flex; flex-direction: column; gap: .6rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--card-shadow);
  text-decoration: none; color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.pub:hover { border-color: var(--link); transform: translateY(-2px); color: var(--text); }
.pub .tag { font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.pub .title { font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; font-weight: 600; color: var(--link); }
.pub:hover .title { color: var(--link-hover); }
.pub .venue { font-size: .9rem; color: var(--text-muted); margin-top: auto; }

/* ---------- papers CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  color: #fff; padding: clamp(3rem, 7vw, 4.5rem) 0;
}
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 3.6vw, 2.35rem); margin: 0 0 .5rem; line-height: 1.15; }
.cta-band p { margin: 0; color: #c9d6e3; max-width: 36rem; }

/* ---------- inner pages ---------- */

.page-head {
  background: var(--navy-900); color: #fff;
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
}
.page-head h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1; margin: 0 0 .75rem;
}
.page-head p { margin: 0; color: #c9d6e3; max-width: 44rem; }
.page-head .eyebrow { margin-bottom: .75rem; }

.doc { padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); }
.doc h2 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; margin: 2.25rem 0 .75rem; line-height: 1.25; }
.doc h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; }
.doc p, .doc li { margin: 0 0 1rem; }
.doc .legal p { font-size: .975rem; }
.doc .meta { color: var(--text-muted); font-size: .95rem; }

.pr-figure { float: right; width: min(14rem, 42%); margin: .3rem 0 1rem 1.75rem; }
.pr-figure img { border-radius: var(--radius); border: 1px solid var(--rule); }
.pr-figure figcaption { font-size: .85rem; color: var(--text-muted); margin-top: .5rem; line-height: 1.45; }

/* ---------- papers list ---------- */

.year-group { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1.5rem; padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.year-group:first-child { border-top: 0; padding-top: 0; }
.year-group h2 {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin: 0; line-height: 1.3;
  color: var(--text-muted); position: sticky; top: 1rem; align-self: start;
}
.paper-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.paper .ptitle { font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; font-weight: 600; display: inline; }
.paper .ptitle a { text-decoration: none; }
.paper .ptitle a:hover { text-decoration: underline; }
.paper .kind {
  display: inline-block; vertical-align: .15em; margin-left: .4rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: 4px; border: 1px solid var(--rule); color: var(--text-muted);
}
.paper .venue { font-size: .925rem; color: var(--text-muted); margin: .35rem 0 .2rem; overflow-wrap: anywhere; }
.paper .authors { font-size: .925rem; margin: 0; }

/* ---------- footer ---------- */

.site-footer { background: var(--navy-950); color: #9fb0c0; font-size: .9rem; padding: 2.5rem 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 2rem; }
.site-footer a { color: #c9d6e3; }
.site-footer a:hover { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer p { margin: 0; }

/* ---------- small screens ---------- */

@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .figure { max-width: 22rem; }
  .pubs { grid-template-columns: minmax(0, 1fr); }
  .stats ul { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 36rem) {
  .site-nav .hide-sm { display: none; }
  .year-group { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .year-group h2 { position: static; }
  .pr-figure { float: none; width: min(14rem, 100%); margin: 0 0 1.5rem; }
  .btn-lg { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
