:root {
  --bg: #0a0b14;
  --surface: #121520;
  --panel: #181b2a;
  --panel-alt: #1e2235;
  --panel-glow: rgba(31, 184, 255, 0.2);
  --text-primary: #f8f9fc;
  --text-secondary: #8fa8f3;
  --text-muted: #bdbdbd;
  --accent: #1fb8ff;
  --accent-alt: #6be2ff;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 35px 65px rgba(0, 0, 0, 0.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Text selection styling to match design system */
::selection {
  background-color: var(--accent);
  color: var(--bg);
}

::-moz-selection {
  background-color: var(--accent);
  color: var(--bg);
}

body {
  background-color: var(--bg);
  font-family: "Stack Sans Notch", sans-serif;
  line-height: 1.6;
  color: var(--text-muted);
  padding: 2rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

div {
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  color: var(--text-primary);
  font-family: "Stack Sans Notch", sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

h2 {
  color: var(--text-primary);
  font-family: "Stack Sans Text", sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

h3 {
  color: var(--text-primary);
  font-family: "Stack Sans Notch", sans-serif;
  font-weight: 600;
  font-size: clamp(0.875rem, 1.75vw, 1rem);
  margin: 4rem auto 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  line-height: 1.5;
}

h3 em {
  font-style: italic;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: normal;
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  color: var(--text-muted);
}

p {
  margin-bottom: 1.5rem;
  font-size: clamp(0.875rem, 2.5vw, 1.0625rem);
  line-height: 1.75;
  color: var(--text-muted);
  font-family: "Stack Sans Text", sans-serif;
  letter-spacing: -0.01em;
  font-weight: 400;
}

ul {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
  max-width: 900px;
}

li {
  margin-bottom: 0.75rem;
  font-size: clamp(0.875rem, 2.5vw, 1.0625rem);
  color: var(--text-muted);
  line-height: 1.75;
  font-family: "Stack Sans Text", sans-serif;
  letter-spacing: -0.01em;
}

p.authors {
  color: var(--text-muted);
  font-family: "Stack Sans Text", sans-serif;
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  font-weight: 400;
  margin-top: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

a:visited {
  color: var(--text-secondary);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0 4rem 0;
  max-width: 900px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  max-width: 900px;
  color: var(--text-muted);
}

thead {
  background-color: var(--panel-alt);
  color: var(--text-primary);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

th:first-child,
td:first-child {
  min-width: 140px;
}

td {
  padding: 1rem;
  border: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-muted);
}

tr:last-child td {
  border-bottom: 1px solid var(--border);
}

.milestone {
  text-align: center;
  font-weight: bold;
  background-color: rgba(34, 211, 238, 0.1);
  color: var(--text-primary);
}

.milestone-2 {
  background-color: rgba(249, 115, 22, 0.1);
}

.milestone-final {
  background-color: rgba(168, 85, 247, 0.12);
}

img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.eda-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  margin-bottom: 2em;
  background-color: var(--panel);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.eda-grid figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
}

.eda-grid .eda-title {
  grid-column: 1 / span 2;
  justify-self: start;
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 0.8em;
  color: var(--text-primary);
}

.eda-grid figure.eda-full-width {
  grid-column: 1 / span 2;
}