/* JuDJIS — shared stylesheet */

:root {
  --navy: #1c2f5e;
  --navy-deep: #131f42;
  --navy-tint: #eeead6;
  --gold: #a97f2e;
  --ink: #1f2430;
  --ink-soft: #4b5266;
  --line: #cec8a8;
  --paper: #fffdf6;
  --bg: #ddd9bf;
  --radius: 10px;
  --maxw: 760px;
  --wide: 1120px;
}

/* ---------- Homepage dark theme (below the hero) ---------- */

body.home {
  background: #0c1930;
  --ink: #eef1f7;
  --ink-soft: rgba(255,255,255,0.68);
  --line: rgba(255,255,255,0.14);
  --paper: #101f3d;
  --navy-tint: rgba(255,255,255,0.06);
}

.home h1, .home h2, .home h3, .home h4 {
  color: #ffffff;
}

.home .hero {
  border-bottom-color: rgba(255,255,255,0.12);
}

.home .card:hover {
  box-shadow: 0 10px 28px rgba(255,255,255,0.08);
}

.home .card-body {
  background: var(--bg);
}

.home .card-body p {
  color: #4b5266;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: var(--navy-deep);
  line-height: 1.22;
  font-weight: 600;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); }

p { margin: 0 0 1.1em; color: var(--ink); }

a { color: var(--navy); text-decoration-color: rgba(28,47,94,0.35); }
a:hover { text-decoration-color: currentColor; }

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.6em; }

strong { color: var(--navy-deep); }

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

.container {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 24px;
}

.prose {
  max-width: var(--maxw);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,253,246,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  color: var(--navy-deep);
  flex: none;
}

.brand-logo {
  display: block;
  height: 120px;
  width: auto;
}

@media (max-width: 640px) {
  .brand-logo { height: 64px; }
}

nav.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  justify-content: flex-end;
}

nav.main-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}

nav.main-nav a:hover {
  background: var(--navy-tint);
  color: var(--navy-deep);
}

nav.main-nav a.active {
  color: var(--navy-deep);
  font-weight: 600;
  background: var(--navy-tint);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 520px;
  background:
    linear-gradient(90deg, rgba(8,16,32,0.9) 0%, rgba(8,16,32,0.72) 38%, rgba(8,16,32,0.25) 62%, rgba(8,16,32,0) 82%),
    var(--hero-bg-image, url("../images/hero-ideology-wave.png")) right center / cover no-repeat;
  background-color: #0c1930;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.hero .site-header {
  position: static;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
}


.hero nav.main-nav a {
  color: #f4f2e6;
}

.hero nav.main-nav a:hover,
.hero nav.main-nav a.active {
  background: rgba(255,255,255,0.16);
  color: #ffffff;
}

.hero-copy-row {
  flex: 1;
  display: flex;
  align-items: center;
}

.hero-copy {
  padding: 48px 24px 72px;
  max-width: 620px;
}

@media (min-width: 640px) {
  .hero-copy { padding-left: 48px; }
}

.hero-copy h1 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: 0.35em;
}

.hero-copy .lede {
  font-size: 1.12rem;
  color: rgba(255,255,255,0.9);
  max-width: 54ch;
}

.hero .btn-ghost {
  border-color: rgba(255,255,255,0.85);
  color: #ffffff;
}

.hero .btn-ghost:hover {
  background: rgba(255,255,255,0.14);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.4em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.08s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--navy-deep);
  color: #fff;
}
.btn-primary:hover { background: var(--navy); }

.btn-ghost {
  background: transparent;
  border-color: var(--navy-deep);
  color: var(--navy-deep);
}
.btn-ghost:hover { background: var(--navy-tint); }

/* ---------- Cards / grid ---------- */

.section {
  padding: 56px 0;
}

.section-head {
  max-width: var(--maxw);
  margin-bottom: 32px;
}

.section-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
}

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1020px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 10px 28px rgba(19,31,66,0.10);
  transform: translateY(-2px);
}

.card-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--navy-tint);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media-contain {
  background: #ffffff;
}

.card-media-contain img {
  object-fit: contain;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,16,32,0.45) 0%, rgba(8,16,32,0.7) 55%, rgba(8,16,32,0.96) 100%);
}

.card-media-title {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: #ffffff;
  font-size: 1.12rem;
  line-height: 1.28;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}

.card-body {
  padding: 18px 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  margin-top: 0;
  font-size: 1.12rem;
  color: var(--navy-deep);
}

.card-body p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
}

.card-cta {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Page header (interior pages) ---------- */

.page-head {
  background: var(--navy-tint);
  border-bottom: 1px solid var(--line);
}

.page-head .container {
  padding: 40px 24px 36px;
}

.page-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.6em;
}

.page-head h1 { margin-bottom: 0.3em; }
.page-head .lede { color: var(--ink-soft); max-width: 62ch; font-size: 1.05rem; }

/* ---------- Content blocks ---------- */

.content-wrap {
  padding: 48px 0 72px;
}

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pub-list li:first-child { padding-top: 0; }

.cite-box {
  background: var(--navy-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.95rem;
  margin: 1.4em 0;
}

.cite-box strong { display: block; margin-bottom: 0.3em; color: var(--navy-deep); }

.figure {
  margin: 1.6em 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.press-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 22px;
}

.press-source {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.4em;
}

.press-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.press-byline {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.8em;
}

.press-date { color: var(--navy); font-weight: 700; }

.file-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.94rem;
}

.file-table th, .file-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.file-table th {
  background: var(--navy-tint);
  color: var(--navy-deep);
  font-family: "Source Serif 4", serif;
  font-weight: 600;
}

.file-table tr:last-child td { border-bottom: none; }

.file-table a {
  font-weight: 600;
  text-decoration: none;
}
.file-table a:hover { text-decoration: underline; }

.viz-embed {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 1.6em 0;
}

.viz-embed h3 { margin-top: 0; }

.note-box {
  border-left: 3px solid var(--gold);
  background: var(--navy-tint);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 1.6em 0;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--navy-deep);
  color: #c7cee3;
  padding: 40px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .site-footer .container {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
  }
}

.site-footer h4 {
  color: #8fa0cf;
  margin-bottom: 0.6em;
}

.site-footer a { color: #e7ebf7; }
.site-footer p { color: #aab4d4; font-size: 0.92rem; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-nav a { font-size: 0.92rem; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

.footer-fine {
  font-size: 0.82rem;
  color: #7d89ac;
  margin-top: 18px;
}
