/* ==========================================================================
   plazasmalagon.com — Rubin edition
   Fixed full-bleed Rubin imagery behind a centred content column.
   One stylesheet for every page. No build step, no dependencies.
   ========================================================================== */

:root {
  --cardinal:    #8C1515;
  --cardinal-dk: #6d1010;
  --ink:         #1b1d21;
  --ink-soft:    #4c525c;
  --ink-faint:   #767d88;
  --paper:       #ffffff;
  --paper-sunk:  #f5f3f1;
  --rule:        #e4e0dc;
  --col:         1080px;  /* content column */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink);

  /* A fixed image sits behind the content column. Each page picks one with a
     body class below; the dark gradient keeps the white heading text legible. */
  background-color: #05060a;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: center;
}

/* --- per-page backgrounds ---------------------------------------------
   Rubin First Look imagery: NSF-DOE Vera C. Rubin Observatory/NOIRLab/SLAC/AURA
   (CC BY 4.0). Each page sets one of these classes on <body>.            */

body.bg-virgo {            /* Virgo Cluster, Rubin First Look */
  background-image: linear-gradient(rgba(3,4,10,.52), rgba(3,4,10,.52)),
                    url('photos/rubin/rubin_virgo_cluster.jpg');
}
body.bg-virgo-left {
  background-image: linear-gradient(rgba(3,4,10,.52), rgba(3,4,10,.52)),
                    url('photos/rubin/rubin_virgo_cluster.jpg');
  background-position: left center;
}
body.bg-trifid {           /* Trifid and Lagoon Nebulae, Rubin First Look */
  background-image: linear-gradient(rgba(6,4,10,.66), rgba(6,4,10,.66)),
                    url('photos/rubin/rubin_trifid_lagoon.jpg');
}
body.bg-trifid-right {
  background-image: linear-gradient(rgba(6,4,10,.66), rgba(6,4,10,.66)),
                    url('photos/rubin/rubin_trifid_lagoon.jpg');
  background-position: right center;
}
body.bg-deepfield {        /* Rubin COSMOS field */
  background-image: linear-gradient(rgba(4,6,12,.55), rgba(4,6,12,.55)),
                    url('photos/rubin/rubin_cosmos_field.jpg');
}
body.bg-camera {           /* the LSST Camera focal plane */
  background-image: linear-gradient(rgba(4,6,12,.74), rgba(4,6,12,.74)),
                    url('photos/rubin/lsstcam_focal_plane.jpg');
}
body.bg-domes {            /* Maunakea at dusk */
  background-image: linear-gradient(rgba(4,6,12,.62), rgba(4,6,12,.62)),
                    url('photos/mauna_pano.JPG');
}
body.bg-aurora {           /* aurora over Iceland */
  background-image: linear-gradient(rgba(4,6,12,.58), rgba(4,6,12,.58)),
                    url('photos/aurora_iceland.png');
}

a { color: var(--cardinal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--cardinal-dk); }
a:focus-visible { outline: 2px solid var(--cardinal); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #000; color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 0; }

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

.hero { text-align: center; padding: 54px 20px 0; }

.hero img.portrait {
  width: 265px; height: 265px; border-radius: 50%; object-fit: cover;
  border: 6px solid rgba(255,255,255,.94);
  box-shadow: 0 10px 40px rgba(0,0,0,.55);
}

.hero h1 {
  margin: 22px 0 2px;
  font-size: clamp(2.2rem, 6vw, 4.3rem);
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 22px rgba(0,0,0,.8);
  line-height: 1.08;
}
.hero p.role {
  margin: 0 0 30px;
  font-size: clamp(1.12rem, 2.6vw, 1.62rem);
  font-weight: 300;
  color: rgba(255,255,255,.95);
  text-shadow: 0 2px 16px rgba(0,0,0,.85);
}

/* ---------- navigation strip ------------------------------------------ */

.navbar {
  max-width: var(--col); margin: 0 auto;
  background: rgba(20,22,28,.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding: 0 6px;
}
.navbar nav { display: flex; flex-wrap: wrap; }
.navbar nav a {
  display: block; padding: 15px 17px;
  font-size: .85rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: rgba(255,255,255,.82); text-decoration: none;
}
.navbar nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.navbar nav a.current { background: var(--paper); color: var(--ink); }
.navbar .ids { display: flex; gap: 2px; padding-right: 8px; }
.navbar .ids a {
  padding: 14px 10px; font-size: .8rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.8); text-decoration: none;
}
.navbar .ids a:hover { color: #fff; text-decoration: underline; }

/* ---------- content column -------------------------------------------- */

.sheet {
  max-width: var(--col); margin: 0 auto 60px;
  background: var(--paper);
  padding: 46px clamp(20px, 6vw, 86px) 56px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
}

.sheet h2 {
  margin: 54px 0 26px;
  text-align: center;
  font-size: clamp(1.55rem, 3.7vw, 2.3rem);
  font-weight: 800; letter-spacing: .085em; text-transform: uppercase;
  color: var(--ink);
}
.sheet h2:first-child { margin-top: 6px; }
.sheet h3 {
  margin: 34px 0 10px;
  font-size: 1.3rem; font-weight: 700; color: var(--cardinal); letter-spacing: .01em;
}
.sheet p { margin: 0 0 1.15em; text-align: justify; hyphens: auto; }
.sheet ul, .sheet ol { margin: 0 0 1.2em; padding-left: 1.35em; }
.sheet li { margin-bottom: .6em; }

/* callout */
.callout {
  background: #eceaff; border-left: 5px solid var(--cardinal);
  padding: 16px 22px; margin: 0 0 30px; font-weight: 600; text-align: center;
}
.callout p { margin: 0; text-align: center; }

/* inline figure */
.sheet figure { margin: 30px 0; }
.sheet figure img { display: block; width: 100%; }
.sheet figcaption {
  margin-top: 10px; font-size: .97rem; color: var(--ink-faint); text-align: center;
}

/* a centred figure that does not span the full column */
.sheet figure.inline { max-width: 640px; margin: 34px auto; }
.sheet figure.inline img { display: block; width: 100%; }

/* a full-bleed Rubin image band inside the sheet */
.sheet figure.band { margin: 44px calc(clamp(20px, 6vw, 86px) * -1); }
.sheet figure.band img { display: block; width: 100%; }
.sheet figure.band figcaption {
  padding: 9px clamp(20px, 6vw, 86px) 0;
  font-size: .97rem; color: var(--ink-faint); text-align: center;
}

/* in-page table of contents */
.toc { margin: 4px 0 34px; padding: 18px 22px; background: var(--paper-sunk);
       border: 1px solid var(--rule); text-align: center; }
.toc span { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
            text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.toc a { display: inline-block; margin: 4px 10px; font-weight: 600; }

/* link row */
.linkrow { text-align: center; margin: 0 0 8px; }
.linkrow a {
  display: inline-block; margin: 4px 5px; padding: 9px 18px;
  border: 1.5px solid var(--cardinal); border-radius: 100px;
  font-size: .88rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none;
}
.linkrow a.solid { background: var(--cardinal); color: #fff; }
.linkrow a:hover { background: var(--cardinal); color: #fff; }

/* key/value rows */
.rows { list-style: none; margin: 0 0 1.2em; padding: 0; }
.rows li { display: grid; grid-template-columns: 118px 1fr; gap: 16px;
  padding: 11px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.rows li:first-child { border-top: 0; }
.rows .when { font-size: .84rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-faint); }
.rows .what { text-align: left; }
@media (max-width: 620px) { .rows li { grid-template-columns: 1fr; gap: 2px; } }

/* cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 1.2em; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.cards .card { background: var(--paper-sunk); border: 1px solid var(--rule); padding: 20px 22px; }
.cards .card h3 { margin: 0 0 .3em; font-size: 1.12rem; }
.cards .card p { margin: 0; font-size: 1rem; color: var(--ink-soft); text-align: left; }

.note { font-size: 1rem; color: var(--ink-faint); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
  background: var(--paper-sunk); border: 1px solid var(--rule); padding: 1px 5px; }

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

.sitefoot {
  max-width: var(--col); margin: 0 auto; padding: 0 clamp(20px,6vw,86px) 54px;
  color: rgba(255,255,255,.72); font-size: .95rem; text-align: center;
}
.sitefoot a { color: rgba(255,255,255,.95); }
.sitefoot .credit { display: block; margin-top: 10px; font-size: .78rem; color: rgba(255,255,255,.5); }

@media (max-width: 620px) {
  body { font-size: 18px; }
  .hero { padding-top: 34px; }
  .hero img.portrait { width: 190px; height: 190px; }
  .navbar { justify-content: center; }
  .navbar nav a { padding: 12px 11px; font-size: .72rem; }
  .sheet p { text-align: left; }
}

@media print {
  body { background: #fff; color: #000; }
  .navbar, .hero img.portrait, .linkrow { display: none; }
  .sheet { box-shadow: none; max-width: none; padding: 0; }
}
