:root {
  --color-moss: #7b886f;
  --color-sand: #c19a82;
  --color-slate: #5784ba;
  --color-text: rgba(0, 0, 0, 0.82);
  /* --color-text2: #df91f9; */
  --color-text2: #f4debf;
  --color-muted: rgba(0, 0, 0, 0.55);
  --border: rgba(0, 0, 0, 0.15);
  --bg: lch(82.76% 23.68 273.93);
  --transition: 0.3s ease;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  background: var(--bg);
  color: #f4debf;
  line-height: 1.8;

  background-attachment: fixed;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

/* Dark overlay to prevent bg image bleeding into text */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 20, 0.72);
  z-index: 0;
  pointer-events: none;
}

.layout {
  position: relative;
  z-index: 1;
}

.layout {
  display: grid;
  grid-template-columns: 45% 55%;
  height: 100vh;
}

/* ── THIN RULED LINK ROW ─────────────────────────────── */
.project-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(244, 222, 191, 0.2);
  border-bottom: 1px solid rgba(244, 222, 191, 0.2);
  text-decoration: none;
  color: #f4debf;
  transition: border-color var(--transition), color var(--transition);
  margin-top: 0.5rem;
}

a.project-link:hover {
  border-color: rgba(244, 222, 191, 0.6);
  color: #fff;
}

a.project-link:hover .project-link-source {
  color: var(--color-moss);
}

.project-link--soon {
  opacity: 0.4;
  cursor: default;
}

.project-link-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.project-link-source {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-sand);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--transition);
}

/* --- Left Column --- */
.left-column {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 45%;
  padding: 4rem 3rem 6rem;
  box-sizing: border-box;

  overflow-y: auto;

  font-size: 1.05rem;
  line-height: 1.75;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text2);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.back-link:hover {
  opacity: 1;
  color: var(--color-text2);
}

.left-column .intro {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 32ch;
}

.left-column h1 {
  color: var(--color-slate);
  font-size: 3rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.intro {
  font-weight: 300;
  font-size: 1.1rem;
}

.section-group {
  margin-top: 2.25rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--border);
}

.section-group h2 {
  color: var(--color-slate);
  font-size: 2.35rem;
  font-weight: 600;
  margin-bottom: 0.01em;
}

ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
li {
  margin: 0.6rem 0;
}
a {
  color: #f4debf;
  text-decoration: none;
  transition: color var(--transition);
}
a:hover,
a.active {
  color: var(--color-moss);
}

.left-column li {
  /* margin: 0.45rem 0;  */
  margin: 0.06rem 0;
}

/* --- Right Panel  --- */
.right-pane {
  grid-column: 2;
  height: 100vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 4rem 5rem;
  box-sizing: border-box;
}

/* Project Header */
.project-header {
  margin-bottom: 1rem;
}

.project-number {
  color: var(--color-slate);
  font-weight: 700;
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.project-header h3 {
  display: inline;
  font-weight: 700;
  font-size: 3rem;
  /* color: var(--color-text); */
  color: var(--color-text2);
}

.metadata {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 1.2rem;
  /* color: var(--color-muted); */
  color: var(--color-text2);
  margin-top: 0.3rem;
}

.divider {
  border-bottom: 1px solid var(--border);
  margin: 1rem 0 2rem;
}

/* Content Body */
.content-block {
  margin-bottom: 6rem;
  max-width: 750px;
}

.content-block h4 {
  margin-top: 2rem;
  color: var(--color-slate);
  font-weight: 600;
  font-size: 3rem;
}

/* ── MOBILE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  .layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .left-column {
    padding: 2rem 1.25rem;
    position: relative;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: auto;
    overflow: visible;
  }
  .right-pane {
    height: auto;
    overflow: visible;
    padding: 1.75rem 1.25rem;
    /* padding: 2rem 1.5rem; */
  }
  .data-story {
    flex-direction: column;
    align-items: center;
    height: auto;
    min-height: 180px;
  }
  .data-story blockquote {
    max-width: 100%;
    padding: 1.5rem;
    font-size: 1.1rem;
  }
  .microviz {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .microviz object,
  .microviz img,
  .microviz svg {
    max-width: 100%;
  }
}
