/* ===========================================
 * TABLE OF CONTENTS
 * ===========================================
 * 1. Variables & Base Styles
 * 2. Layout & Container Styles
 * 3. Header & Navigation
 * 4. Typography
 * 5. Components (Cards, Buttons)
 * 6. Code & Syntax Highlighting
 * 7. Notebook Styles
 * 8. Table of Contents
 * 9. Media Queries
 * 10. Interactive Effects
 * =========================================== */

/* 1. Variables & Base Styles
   ========================================= */
:root {
  /* Theme Colors */
  --bg-color: #22201c;
  --surface-color: #2a2825;
  --card-bg-color: #312e2a;
  --header-color: #1a1815;

  /* Brand Colors */
  --primary-color: #a78bfa; /* Soft purple */
  --secondary-color: #38b2ac; /* Teal */
  --accent-color: #f9d417; /* Bright yellow for highlights */
  --pdf-color: #ef4444; /* Red color for PDF presentation button */

  /* Text colors */
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;

  /* Functional colors */
  --border-color: #48443e;
  --code-bg-color: #312e2a;
  --button-bg: var(--primary-color);
  --button-text: #1a1815;

  /* Elevation shadows */
  --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-2: 0 3px 6px rgba(0, 0, 0, 0.22), 0 3px 6px rgba(0, 0, 0, 0.32);
  --shadow-3: 0 10px 20px rgba(0, 0, 0, 0.25), 0 6px 6px rgba(0, 0, 0, 0.3);

  /* Animation */
  --transition-speed: 0.3s;
}

body {
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

/* Dark scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* 2. Layout & Container Styles
   ========================================= */
.container {
  max-width: 1400px; /* Increased from 1300px for non-notebook pages */
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* Content container for regular pages - to match notebook style */
.content-container {
  position: relative;
  z-index: 1;
  background-color: var(--card-bg-color);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  margin-bottom: 2rem;
  width: auto;
  max-width: 1400px; /* Slightly wider than notebook container */
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
}

main {
  padding: 40px 0;
  min-height: calc(100vh - 160px); /* account for header and footer */
}

main.container {
  position: relative;
  z-index: 1; /* Place above animation */
  background-color: transparent;
}

/* Main container with wave animation
   ========================================= */
.main-container {
  position: relative;
  min-height: calc(100vh - 160px); /* Account for header and footer */
  z-index: 0; /* Ensure proper stacking context */
  background-color: transparent; /* Changed from bg-color to transparent */
}

/* 3. Header & Navigation
   ========================================= */
header {
  background-color: var(--header-color);
  padding: 16px 0;
  box-shadow: var(--shadow-1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--transition-speed);
}

header:hover {
  box-shadow: var(--shadow-2);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
}

.logo h1 {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.5rem;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin-left: 24px;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed);
  position: relative;
  padding-bottom: 4px;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  font-family: "IBM Plex Sans", sans-serif;
}

nav a:after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-speed);
}

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

nav a:hover:after {
  width: 100%;
  background-color: var(--accent-color);
}

nav a.active {
  color: var(--primary-color);
}

nav a.active:after {
  width: 100%;
}

/* Footer styles */
footer {
  background-color: var(--header-color);
  color: var(--text-muted);
  padding: 24px 0;
  text-align: left;
  border-top: 1px solid var(--border-color);
}

/* 4. Typography
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text-primary);
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

h1 {
  font-size: 2.2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

h2 {
  font-size: 1.6rem;
  color: var(--primary-color);
}

h3 {
  font-size: 1.4rem;
  color: var(--secondary-color);
}

h4 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 16px;
  line-height: 1.7;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

blockquote {
  border-left: 4px solid var(--accent-color);
  margin-left: 0;
  padding: 8px 16px;
  color: var(--text-secondary);
  background-color: var(--surface-color);
  border-radius: 0 4px 4px 0;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

/* 5. Components (Cards, Buttons, Tables)
   ========================================= */
/* Card styling */
.card {
  background-color: var(--card-bg-color);
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-1);
  transition: all var(--transition-speed);
  border-left: 3px solid var(--primary-color);
  text-align: left;
}

.card:hover {
  box-shadow: var(--shadow-2);
}

/* Chip component */
.chip {
  display: inline-block;
  padding: 4px 12px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-right: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--accent-color);
  font-family: "IBM Plex Mono", monospace;
}

/* Table styles */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  text-align: left;
}

th, td {
  padding: 12px 16px;
  border: none;
  text-align: left;
}

th {
  background-color: var(--header-color);
  color: var(--primary-color);
  font-weight: 600;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

tr:nth-child(even) {
  background-color: var(--surface-color);
}

tr {
  border-bottom: 1px solid var(--border-color);
}

tr:last-child {
  border-bottom: none;
}

/* Button styling */
.colab-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: var(--button-text);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  margin: 16px 0;
  transition: all var(--transition-speed);
  box-shadow: var(--shadow-1);
  border: none;
  cursor: pointer;
  font-family: "IBM Plex Sans", sans-serif;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.colab-button:hover {
  box-shadow: var(--shadow-2);
  background-color: var(--accent-color);
  text-decoration: none;
  transform: translateY(-2px);
  color: var(--button-text);
}

.colab-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-1);
}

.colab-button img {
  vertical-align: middle;
  margin-right: 8px;
  height: 20px;
  display: inline;
}

/* Presentation button styling */
.presentation-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--pdf-color);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  margin: 0;
  transition: all var(--transition-speed);
  box-shadow: var(--shadow-1);
  border: none;
  cursor: pointer;
  font-family: "IBM Plex Sans", sans-serif;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.presentation-button:hover {
  box-shadow: var(--shadow-2);
  background-color: var(--accent-color);
  text-decoration: none;
  transform: translateY(-2px);
  color: var(--button-text);
}

.presentation-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-1);
}

.presentation-button i {
  margin-right: 6px;
}

/* Info and warning boxes */
.info-box {
  padding: 16px;
  background-color: rgba(167, 139, 250, 0.1);
  border-left: 4px solid var(--primary-color);
  margin: 16px 0;
  border-radius: 0 4px 4px 0;
  text-align: left;
}

.warning-box {
  padding: 16px;
  background-color: rgba(249, 115, 22, 0.1);
  border-left: 4px solid var(--accent-color);
  margin: 16px 0;
  border-radius: 0 4px 4px 0;
  text-align: left;
}

/* Progress indicators */
.progress-container {
  width: 100%;
  height: 4px;
  background-color: var(--surface-color);
  margin: 16px 0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--secondary-color);
  width: 0;
  transition: width 0.6s ease;
}

/* Colab Buttons Container */
.colab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Code Along button styling */
.colab-button.code-along {
  background-color: var(--primary-color);
  margin: 0;
}

.colab-button.code-along:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

/* Solution button styling */
.colab-button.solution {
  background-color: var(--secondary-color);
  margin: 0;
}

.colab-button.solution:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

/* Notebook Footer Responsiveness */
.notebook-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  gap: 10px;
}

@media (max-width: 600px) {
  .notebook-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .colab-buttons {
    width: 100%;
    justify-content: space-between;
  }
}

/* 6. Code & Syntax Highlighting
   ========================================= */
/* Base code styling */
code, pre {
  font-family: "IBM Plex Mono", monospace;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

pre {
  padding: 16px;
  overflow: auto;
  line-height: 1.45;
  box-shadow: var(--shadow-1);
  margin: 16px 0;
  border: 1px solid var(--border-color);
  background-color: #1e1e1e;
  border-radius: 6px;
  margin: 1.2rem 0;
  padding: 1rem;
  box-shadow: var(--shadow-2);
  border-left: 3px solid var(--accent-color);
  overflow-x: auto;
}

code {
  padding: 0.2em 0.4em;
  font-size: 0.9em;
  font-family: "IBM Plex Mono", Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  line-height: 1.6;
}

/* Inline code styling */
p code,
li code,
td code {
  background-color: #2b2d3a;
  color: #b0b7c3;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
  border: 1px solid #444;
}

/* Code terminal styling */
pre.code-terminal {
  position: relative;
  padding-top: 2.5rem;
  margin-top: 2rem;
}

pre.code-terminal:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2rem;
  background-color: #333333;
  border-radius: 6px 6px 0 0;
  border-bottom: 1px solid #444;
}

pre.code-terminal:after {
  content: "● ● ●";
  position: absolute;
  top: 0.6rem;
  left: 1rem;
  font-size: 0.7rem;
  color: #ff5f56;
  letter-spacing: 0.5rem;
}

pre.code-terminal code {
  padding-top: 0.5rem;
}

/* Python terminal specific */
pre.python-terminal:after {
  content: "● ● ●   Executable python";
  position: absolute;
  color: #ff5f56;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  top: 0.6rem;
  left: 1rem;
  letter-spacing: 0.25rem;
}

/* Executable code label */
.code-terminal:before {
  content: "Executable Code";
  display: block;
  position: absolute;
  top: 0.6rem;
  right: 1rem;
  font-size: 0.7rem;
  color: #569cd6;
  font-family: "IBM Plex Sans", sans-serif;
  font-style: italic;
}

/* Line numbers effect */
pre.line-numbers {
  position: relative;
  padding-left: 3.8em;
  counter-reset: linenumber;
}

pre.line-numbers > code {
  position: relative;
}

.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -3.8em;
  width: 3em;
  letter-spacing: -1px;
  border-right: 1px solid #999;
  user-select: none;
}

.line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
}

.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: #999;
  display: block;
  padding-right: 0.8em;
  text-align: right;
}

/* Code snippets in markdown */
.snippet-code {
  background-color: #282c34;
  border-left: 3px solid #61afef;
  border-radius: 4px;
  padding: 12px;
  margin: 1rem 0;
  overflow-x: auto;
}

.snippet-code code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9em;
  line-height: 1.5;
}

.snippet-code:before {
  content: "Code Snippet";
  display: block;
  font-size: 0.8em;
  color: #61afef;
  margin-bottom: 8px;
  font-family: "IBM Plex Sans", sans-serif;
  font-style: italic;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

/* Markdown code styling */
.notebook-content p code,
.notebook-content li code,
.notebook-content blockquote code,
.notebook-content h1 code,
.notebook-content h2 code,
.notebook-content h3 code,
.notebook-content h4 code {
  background-color: #2b2b2b;
  color: #e6e6e6;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
  border: 1px solid #444;
  box-shadow: none;
}

.notebook-content pre:not(.code-terminal) {
  background-color: #2b2b2b;
  border-left: 3px solid var(--primary-color);
  border-radius: 4px;
  padding: 12px;
  margin: 1rem 0;
  overflow-x: auto;
}

.notebook-content pre:not(.code-terminal) code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9em;
  line-height: 1.5;
  color: #e6e6e6;
}

.notebook-content pre:not(.code-terminal):before {
  content: "Example / Snippet";
  display: block;
  font-size: 0.8em;
  color: #888;
  margin-bottom: 8px;
  font-family: "IBM Plex Sans", sans-serif;
  font-style: italic;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

/* Syntax highlighting */
.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-name,
.hljs-tag {
  color: #569cd6;
}

.hljs-string,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-literal,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-addition {
  color: #ce9178;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
  color: #6a9955;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
  color: #b5cea8;
}

.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-regexp {
  color: #d16969;
}

.hljs-variable,
.hljs-template-variable {
  color: #9cdcfe;
}

.hljs-function {
  color: #dcdcaa;
}

/* Different highlighting for snippets */
.snippet-code .hljs-keyword,
.snippet-code .hljs-built_in {
  color: #c678dd;
}

.snippet-code .hljs-string {
  color: #98c379;
}

.snippet-code .hljs-comment {
  color: #7f848e;
}

.snippet-code .hljs-number {
  color: #d19a66;
}

/* Terminal code highlighting */
.code-terminal .hljs-keyword,
.code-terminal .hljs-built_in {
  color: #569cd6;
}

.code-terminal .hljs-string {
  color: #ce9178;
}

/* 7. Notebook Styles
   ========================================= */
.notebook-container {
  width: auto;
  max-width: 1300px; /* Keeping notebooks at this width */
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--card-bg-color);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  box-sizing: border-box;
}

.notebook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 16px;
  background-color: var(--header-color);
  border-bottom: 1px solid var(--border-color);
}

.notebook-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.notebook-content {
  padding: 16px;
  margin-bottom: 2rem;
}

.notebook-content img {
  max-width: 100%;
  margin: 1rem 0;
}

.notebook-footer {
  padding: 12px 16px;
  background-color: var(--surface-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
  padding-top: 1rem;
}

.notebook-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  gap: 10px;
}

@media (max-width: 600px) {
  .notebook-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .colab-buttons {
    width: 100%;
    justify-content: space-between;
  }
}

/* Notebook typography */
.notebook-content h1,
.notebook-content h2,
.notebook-content h3,
.notebook-content h4,
.notebook-content h5,
.notebook-content h6 {
  margin-top: 1.5rem;
}

.notebook-content p,
.notebook-content li,
.notebook-content blockquote {
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.7;
}

.notebook-content pre {
  margin: 1rem 0;
}

/* Cell output styling */
.cell-output {
  background-color: var(--surface-color);
  border-left: 3px solid var(--secondary-color);
  padding: 0.5rem 1rem;
  margin: 0.5rem 0 1.5rem 0;
  overflow-x: auto;
  background-color: #2d2d2d;
  border-radius: 0 6px 6px 0;
}

.cell-output pre {
  margin: 0.5rem 0;
}

/* Colab badge and banner */
.notebook-container > p:first-of-type {
  margin-bottom: 2rem;
}

.notebook-container > p:first-of-type a {
  display: inline-block;
}

.notebook-container > p:first-of-type a img {
  vertical-align: middle;
}

.notebook-banner {
  margin-bottom: 2rem;
  max-width: 100%;
}

.notebook-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--shadow-1);
}

/* Notebook card in browser */
.notebook-browser {
  margin: 24px 0;
}

.notebook-card {
  background-color: var(--card-bg-color);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-1);
  transition: all var(--transition-speed);
  overflow: hidden;
  text-align: left;
}

.notebook-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-3px);
}

.notebook-browser .notebook-card {
  width: 100%;
  max-width: 100%;
}

/* 8. Table of Contents
   ========================================= */
.toc-container {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 250px;
  padding: 1rem;
  background-color: var(--card-bg-color);
  border-radius: 6px;
  border-left: 3px solid var(--accent-color);
  box-shadow: var(--shadow-2);
  font-family: 'IBM Plex Sans', sans-serif;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  z-index: 1000;
}

.toc-container h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.8rem;
}

.toc-list {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.85rem;
}

.toc-list ul {
  list-style-type: none;
  padding-left: 1rem;
  margin-top: 0.3rem;
  margin-bottom: 0.5rem;
}

.toc-list li {
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.toc-list a {
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  transition: all 0.2s ease;
}

.toc-list a:hover {
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.toc-list a.active {
  color: var(--primary-color);
  font-weight: 500;
  border-left-color: var(--primary-color);
}

/* 9. Media Queries
   ========================================= */
/* Medium screens */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
  }

  nav ul {
    margin-top: 16px;
    justify-content: flex-start;
  }

  nav li {
    margin: 0 16px 0 0;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .notebook-footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

/* Small screens - hide TOC */
@media (max-width: 1199px) {
  .toc-container {
    display: none;
  }

  .container,
  .notebook-container,
  .content-container {
    width: auto;
    max-width: 98%; /* Increased from 95% */
    margin-left: auto;
    margin-right: auto;
  }

  h1 {
    font-size: 1.8rem;
    padding-bottom: 8px;
  }
}

/* Large screens - accommodate TOC */
@media (min-width: 1200px) {
  .container {
    width: calc(100% - 250px); /* Reduced TOC space from 280px */
    max-width: calc(100% - 250px);
    margin-right: 250px;
    padding-right: 30px;
    box-sizing: border-box;
  }

  .notebook-container {
    width: calc(100% - 250px); /* Reduced TOC space from 280px */
    max-width: calc(100% - 250px);
    margin-right: 250px;
    margin-left: 0;
    box-sizing: border-box;
  }
  
  .content-container {
    width: calc(100% - 250px); /* Reduced TOC space from 280px */
    max-width: calc(100% - 250px);
    margin-right: 250px;
    margin-left: 0;
    box-sizing: border-box;
  }

  h1 {
    font-size: 1.8rem;
    padding-bottom: 8px;
    margin-top: 1rem;
    margin-bottom: 1.2rem;
  }

  .notebook-content h1 {
    font-size: 1.8rem;
  }

  .notebook-content h2 {
    font-size: 1.5rem;
  }

  .notebook-content h3 {
    font-size: 1.3rem;
  }
}

/* 10. Interactive Effects
   ========================================= */
/* Navigation pulse effect */
.nav-pulse {
  animation: nav-pulse 0.6s cubic-bezier(0.66, 0, 0, 1);
  color: var(--accent-color) !important;
}

@keyframes nav-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Heading indicator for link copying */
.heading-indicator {
  opacity: 0;
  margin-left: 8px;
  font-size: 0.8em;
  color: var(--accent-color);
  transition: opacity 0.2s ease;
}

h1:hover .heading-indicator,
h2:hover .heading-indicator,
h3:hover .heading-indicator,
h4:hover .heading-indicator {
  opacity: 1;
}

/* Copy feedback popup */
.copy-feedback {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background-color: var(--accent-color);
  color: var(--button-text);
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 500;
  box-shadow: var(--shadow-2);
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.copy-feedback.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Image zoom effect */
.notebook-content img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notebook-content img.zoomed {
  transform: scale(1.5);
  box-shadow: var(--shadow-3);
  z-index: 100;
  position: relative;
}

/* Code block highlight animation */
.pulse-highlight {
  animation: pulse-highlight 1s ease;
}

@keyframes pulse-highlight {
  0% { box-shadow: 0 0 0 0 rgba(249, 212, 23, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(249, 212, 23, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(249, 212, 23, 0); }
}

/* Button active state */
.button-active {
  transform: scale(0.95) !important;
  transition: transform 0.1s ease !important;
}

/* Code copy button */
.code-block-container {
  position: relative;
}

.copy-code-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--secondary-color);
  color: var(--button-text);
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  font-family: "IBM Plex Sans", sans-serif;
}

.code-block-container:hover .copy-code-button {
  opacity: 1;
}

.copy-code-button.copied {
  background-color: var(--accent-color);
}

/* Enhanced card effects */
.card, .notebook-card {
  will-change: transform, box-shadow;
}

/* Add subtle pop effect to colab buttons */
.colab-button:hover {
  animation: button-pop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes button-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: translateY(-2px); }
}

/* Enhanced notebook container effect */
.notebook-container {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.notebook-container:hover {
  box-shadow: var(--shadow-3);
}

/* Code block on hover effect */
pre.code-terminal, pre.snippet-code {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

pre.code-terminal:hover, pre.snippet-code:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}

/* Create ripple effect for table cells */
table td {
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

table td:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Enhanced TOC highlight */
.toc-list a:hover {
  transform: translateX(3px);
  transition: transform 0.2s ease;
}

/* Wave Animation
   ========================================= */
.wave-animation-container {
  position: fixed; /* Changed from absolute to fixed */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* Use viewport height instead of 100% */
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#waveCanvas {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
}

.visitor-counter {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.visitor-counter p {
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #555;
}