/* ============================================================
   CSIC Predoctoral Network — Infrastructures Talk
   Design system
   ============================================================ */

:root {
  /* Base palette — white surface + site blue, system fonts (matches the website) */
  --ink-900: #ffffff;        /* stage / letterbox */
  --ink-800: #ffffff;        /* slide background */
  --ink-700: #0d2034;
  --ink-600: #14304a;
  --teal-700: #1c64c4;       /* accent blue — hover/darker */
  --teal-600: #2780e3;       /* accent blue — your site's cosmo blue */
  --teal-500: #4a9bf0;       /* accent blue — lighter */

  --emerald: #0d9488;
  --emerald-soft: #34d399;
  --emerald-glow: rgba(16, 185, 129, 0.45);

  --amber: #b45309;
  --amber-soft: #d97706;
  --amber-glow: rgba(180, 83, 9, 0.40);

  --paper: #ffffff;          /* slide surface */
  --paper-soft: #f6f8fa;     /* map panel background */
  --paper-dim: #eaeef3;

  --text-on-dark: #f0e9da;
  --text-on-dark-muted: rgba(240, 233, 218, 0.62);
  --text-on-dark-faint: rgba(240, 233, 218, 0.32);
  --rule-dark: rgba(240, 233, 218, 0.14);

  --text-on-light: #1a2433;
  --text-on-light-muted: rgba(26, 36, 51, 0.68);
  --rule-light: rgba(26, 36, 51, 0.13);

  /* Type — system stack, matching the website (no web fonts loaded) */
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ----- Stage ---------------------------------------------- */
deck-stage {
  background: var(--ink-900);
  color: var(--text-on-dark);
  font-family: var(--font-body);
}

deck-stage > section {
  width: 1920px;
  height: 1080px;
  background: var(--ink-800);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

/* ----- Slide variants ------------------------------------- */
deck-stage > section.slide-paper {
  background: var(--paper);
  color: var(--text-on-light);
}



/* ----- Reusable scaffolds --------------------------------- */
.slide-pad {
  position: absolute;
  inset: 0;
  padding: 96px 120px;
  display: flex;
  flex-direction: column;
}

.slide-tag {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--emerald-soft);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.slide-tag::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  background: currentColor;
}
.slide-paper .slide-tag { color: var(--teal-600); }

/* ----- Type ----------------------------------------------- */
h1.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 144px;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 144;
  margin: 0;
  text-wrap: balance;
}
h1.title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 96px;
  line-height: 1.0;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 50, "opsz" 96;
  margin: 0;
  text-wrap: balance;
}
h2.kicker {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 50, "opsz" 60;
  margin: 0;
}
.lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 32px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--text-on-dark-muted);
  text-wrap: pretty;
  max-width: 1100px;
}
.slide-paper .lede { color: var(--text-on-light-muted); }

.body {
  font-size: 26px;
  line-height: 1.5;
  font-weight: 400;
}

.mono { font-family: var(--font-mono); }

.pull {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 88px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100, "opsz" 88;
  text-wrap: balance;
}

.attrib {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-faint);
  margin-top: 40px;
}

/* ----- Decorative rules ----------------------------------- */
.rule {
  width: 100%;
  height: 1px;
  background: var(--rule-dark);
}
.slide-paper .rule { background: var(--rule-light); }

/* ----- Generic dot ---------------------------------------- */
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  vertical-align: middle;
}
.dot.amber { background: var(--amber); }

/* ----- Header band on slides ------------------------------ */
.header-band {
  position: absolute;
  top: 56px;
  left: 120px;
  right: 120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-dark-faint);
}
.slide-paper .header-band { color: rgba(10, 22, 40, 0.42); }

/* ----- Buttons / chips ------------------------------------ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.05em;
  color: var(--text-on-dark-muted);
  background: rgba(255, 255, 255, 0.02);
}
.chip.amber {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(245, 158, 11, 0.06);
}

/* ----- Staggered entrance for .rise containers ------------ */
@keyframes slideRise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rise > * { opacity: 0; }

section[data-deck-active] .rise > *:nth-child(1) {
  animation: slideRise 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}
section[data-deck-active] .rise > *:nth-child(2) {
  animation: slideRise 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}
section[data-deck-active] .rise > *:nth-child(3) {
  animation: slideRise 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}
section[data-deck-active] .rise > *:nth-child(4) {
  animation: slideRise 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.60s forwards;
}

/* Subtle paper grain on light slides */
.slide-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(10,22,40,0.04) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.5;
  mix-blend-mode: multiply;
}

/* Sidebar content fade transition */
#sidebar-content {
  transition: opacity 0.18s ease;
}
#sidebar-content.fading {
  opacity: 0;
}

/* Consistent link styling inside the sidebar (set once, not inline) */
#sidebar-content a {
  color: var(--teal-600);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
#sidebar-content a:hover { color: var(--teal-700); }
