:root {
  --bg: #f7f4ef;
  --paper: #ffffff;
  --ink: #1c1b19;
  --muted: #595653;
  --accent: #0f6b6b;
  --accent-soft: #d7efed;
  --rule: #e3ddd4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Serif Pro", "Georgia", serif;
  color: var(--ink);
  background: #cf0a2c;
  line-height: 1.6;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem 8vw 0;
  font-family: "IBM Plex Sans", "Helvetica", sans-serif;
  font-size: 0.95rem;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
}

nav a:hover,
nav a:focus {
  border-color: var(--accent);
  color: var(--accent);
}

.notebook-embed {
  margin: 1.5rem 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}

.notebook-embed iframe {
  width: 100%;
  height: 640px;
  border: 0;
}

.notebook-links {
  padding: 0.75rem 1rem;
  background: #f6f3ee;
  font-size: 0.95rem;
}

.resources-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-family: "IBM Plex Sans", "Helvetica", sans-serif;
  font-size: 0.95rem;
}

.resources-table th,
.resources-table td {
  border: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.resources-table th {
  background: #f0ebe2;
}

h1, h2, h3, h4 {
  font-family: "IBM Plex Sans", "Helvetica", sans-serif;
  letter-spacing: -0.01em;
}

h1 {
  margin: 1.5rem 0 0.75rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

section {
  max-width: 900px;
  margin: 1.5rem auto 3rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 2rem clamp(1.5rem, 3vw, 3rem);
  box-shadow: 0 12px 24px rgba(15, 20, 20, 0.06);
}

section p {
  color: var(--ink);
}

section ul {
  padding-left: 1.25rem;
}

code, pre {
  font-family: "IBM Plex Mono", "Menlo", monospace;
}

pre {
  position: relative;
  background: #111411;
  color: #f4f0e8;
  padding: 1rem 3rem 1rem 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid #1f2320;
}

pre code {
  background: transparent;
  color: inherit;
}

.episode-nav {
  display: block;
  margin: 0.75rem 0 1rem;
  font-family: "IBM Plex Sans", "Helvetica", sans-serif;
  font-size: 0.92rem;
}

.episode-nav a {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
  margin-right: 1.5rem;
  margin-bottom: 0.75rem;
}

.episode-nav a:hover,
.episode-nav a:focus {
  border-color: var(--accent);
}

.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid #2b322c;
  background: rgba(17, 20, 17, 0.85);
  color: #f4f0e8;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.copy-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.copy-button:hover,
.copy-button:focus {
  background: rgba(15, 107, 107, 0.2);
  border-color: #2b6c63;
  transform: translateY(-1px);
}

.copy-button--done {
  background: rgba(46, 130, 89, 0.35);
  border-color: #2e8259;
}

.copy-button--error {
  background: rgba(152, 58, 58, 0.35);
  border-color: #983a3a;
}

blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  background: var(--accent-soft);
}

footer {
  padding: 1rem 8vw 2rem;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica", sans-serif;
  font-size: 0.9rem;
}

.footer__logos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.footer__logos img {
  height: 38px;
  width: auto;
  filter: grayscale(10%);
}

.footer__links {
  margin-bottom: 0.35rem;
}

.footer__links a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer__links a:hover,
.footer__links a:focus {
  border-color: var(--accent);
}

.footer__copy {
  color: var(--muted);
}

@media (max-width: 720px) {
  nav {
    padding: 1rem 5vw 0;
  }

  section {
    margin: 1rem 5vw 2rem;
    padding: 1.5rem;
  }
}
