@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap");
.highlight table td {
  padding: 5px;
}

.highlight table pre {
  margin: 0;
}

.highlight, .highlight .w {
  color: #24292f;
  background-color: #f6f8fa;
}

.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt, .highlight .kv {
  color: #cf222e;
}

.highlight .gr {
  color: #f6f8fa;
}

.highlight .gd {
  color: #82071e;
  background-color: #ffebe9;
}

.highlight .nb {
  color: #953800;
}

.highlight .nc {
  color: #953800;
}

.highlight .no {
  color: #953800;
}

.highlight .nn {
  color: #953800;
}

.highlight .sr {
  color: #116329;
}

.highlight .na {
  color: #116329;
}

.highlight .nt {
  color: #116329;
}

.highlight .gi {
  color: #116329;
  background-color: #dafbe1;
}

.highlight .ges {
  font-weight: bold;
  font-style: italic;
}

.highlight .kc {
  color: #0550ae;
}

.highlight .l, .highlight .ld, .highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mx {
  color: #0550ae;
}

.highlight .sb {
  color: #0550ae;
}

.highlight .bp {
  color: #0550ae;
}

.highlight .ne {
  color: #0550ae;
}

.highlight .nl {
  color: #0550ae;
}

.highlight .py {
  color: #0550ae;
}

.highlight .nv, .highlight .vc, .highlight .vg, .highlight .vi, .highlight .vm {
  color: #0550ae;
}

.highlight .o, .highlight .ow {
  color: #0550ae;
}

.highlight .gh {
  color: #0550ae;
  font-weight: bold;
}

.highlight .gu {
  color: #0550ae;
  font-weight: bold;
}

.highlight .s, .highlight .sa, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .se, .highlight .sh, .highlight .sx, .highlight .s1, .highlight .ss {
  color: #0a3069;
}

.highlight .nd {
  color: #8250df;
}

.highlight .nf, .highlight .fm {
  color: #8250df;
}

.highlight .err {
  color: #f6f8fa;
  background-color: #82071e;
}

.highlight .c, .highlight .ch, .highlight .cd, .highlight .cm, .highlight .cp, .highlight .cpf, .highlight .c1, .highlight .cs {
  color: #6e7781;
}

.highlight .gl {
  color: #6e7781;
}

.highlight .gt {
  color: #6e7781;
}

.highlight .ni {
  color: #24292f;
}

.highlight .si {
  color: #24292f;
}

.highlight .ge {
  color: #24292f;
  font-style: italic;
}

.highlight .gs {
  color: #24292f;
  font-weight: bold;
}

:root {
  /* Colors - Soft, educative palette */
  --body-bg: #fafafa;
  --text-color: #374151;
  --text-color-headings: #111827;
  --text-color-muted: #6b7280;
  --text-color-link: #2563eb;
  --text-color-link-hover: #1d4ed8;
  --header-bg: #ffffff;
  --header-text: #374151;
  --footer-bg: #ffffff;
  --footer-text: #6b7280;
  --border-color-light: #e5e7eb;
  --border-color-medium: #d1d5db;
  --border-color-blockquote: #2563eb;
  --code-bg: #f3f4f6;
  --code-text: #1f2937;
  --blockquote-bg: #eff6ff;
  --blockquote-text: #1e40af;
  --category-bg: #e0e7ff;
  --category-text: #3730a3;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-arabic: "Noto Sans Arabic", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

body.dark-mode {
  --body-bg: #111827;
  --text-color: #d1d5db;
  --text-color-headings: #f9fafb;
  --text-color-muted: #9ca3af;
  --text-color-link: #60a5fa;
  --text-color-link-hover: #93c5fd;
  --header-bg: #1f2937;
  --header-text: #d1d5db;
  --footer-bg: #1f2937;
  --footer-text: #9ca3af;
  --border-color-light: #374151;
  --border-color-medium: #4b5563;
  --border-color-blockquote: #60a5fa;
  --code-bg: #1f2937;
  --code-text: #e5e7eb;
  --blockquote-bg: #1e3a5f;
  --blockquote-text: #93c5fd;
  --category-bg: #312e81;
  --category-text: #c7d2fe;
  --accent: #60a5fa;
  --accent-light: #1e3a5f;
  /* Copy button styling for dark mode */
}
body.dark-mode .highlight, body.dark-mode .highlight .w {
  color: #c9d1d9;
  background-color: var(--code-bg);
}
body.dark-mode .highlight .err {
  color: #f85149;
  background-color: #3e1a19;
}
body.dark-mode .highlight .k, body.dark-mode .highlight .kd, body.dark-mode .highlight .kn, body.dark-mode .highlight .kp, body.dark-mode .highlight .kr, body.dark-mode .highlight .kt, body.dark-mode .highlight .kv {
  color: #ff7b72;
}
body.dark-mode .highlight .nc, body.dark-mode .highlight .no, body.dark-mode .highlight .nd, body.dark-mode .highlight .ne, body.dark-mode .highlight .nf, body.dark-mode .highlight .nl {
  color: #d2a8ff;
}
body.dark-mode .highlight .s, body.dark-mode .highlight .sa, body.dark-mode .highlight .sb, body.dark-mode .highlight .sc, body.dark-mode .highlight .dl, body.dark-mode .highlight .sd, body.dark-mode .highlight .s2, body.dark-mode .highlight .se, body.dark-mode .highlight .sh, body.dark-mode .highlight .si, body.dark-mode .highlight .sx, body.dark-mode .highlight .s1, body.dark-mode .highlight .ss {
  color: #a5d6ff;
}
body.dark-mode .highlight .m, body.dark-mode .highlight .mb, body.dark-mode .highlight .mf, body.dark-mode .highlight .mh, body.dark-mode .highlight .mi, body.dark-mode .highlight .il, body.dark-mode .highlight .mo, body.dark-mode .highlight .mx {
  color: #79c0ff;
}
body.dark-mode .highlight .c, body.dark-mode .highlight .ch, body.dark-mode .highlight .cd, body.dark-mode .highlight .cm, body.dark-mode .highlight .cp, body.dark-mode .highlight .cpf, body.dark-mode .highlight .c1, body.dark-mode .highlight .cs {
  color: #8b949e;
}
body.dark-mode .highlight .na, body.dark-mode .highlight .nv, body.dark-mode .highlight .vc, body.dark-mode .highlight .vg, body.dark-mode .highlight .vi, body.dark-mode .highlight .vm {
  color: #79c0ff;
}
body.dark-mode .highlight .o, body.dark-mode .highlight .ow {
  color: #ff7b72;
}
body.dark-mode .highlight .nt {
  color: #7ee787;
}
body.dark-mode .highlight .gi {
  color: #56d364;
  background-color: #1a3420;
}
body.dark-mode .highlight .gd {
  color: #ff9da4;
  background-color: #341a1d;
}
body.dark-mode .highlight .gh, body.dark-mode .highlight .gu {
  color: #1f6feb;
  font-weight: bold;
}
body.dark-mode body.dark-mode .copy-code-button {
  background-color: var(--code-bg);
  border-color: var(--border-color-medium);
  color: var(--text-color-muted);
}
body.dark-mode body.dark-mode .copy-code-button:hover,
body.dark-mode body.dark-mode .copy-code-button:focus {
  background-color: var(--header-bg);
  color: var(--text-color);
}

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

body {
  font-family: var(--font-sans);
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--body-bg);
  transition: background-color 0.2s ease, color 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[dir=rtl] {
  font-family: var(--font-arabic);
}

/* General link styles */
a {
  color: var(--text-color-link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--text-color-link-hover);
}

/* ==========================================================================
   Header & Navigation - Minimal Style
   ========================================================================== */
body > header {
  background-color: var(--header-bg);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color-light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
}

body.dark-mode > header {
  background-color: rgba(31, 41, 55, 0.9);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

nav h1 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

nav h1 a {
  color: var(--text-color-headings);
}

nav h1 a:hover {
  color: var(--text-color-link);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

nav ul a {
  text-decoration: none;
  color: var(--text-color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav ul a:hover,
nav ul a.active {
  color: var(--text-color-headings);
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.1rem;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

#theme-toggle:hover {
  opacity: 1;
}

main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  background-color: var(--body-bg);
  flex-grow: 1;
}

/* Keep article/page content at readable width */
article.post,
.page-content {
  max-width: 720px;
  margin: 0 auto;
}

/* ==========================================================================
   Homepage - Minimal Style
   ========================================================================== */
.hero {
  text-align: center;
  padding: 4rem 0;
  margin-bottom: 3rem;
}

.hero h1, .hero h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color-headings);
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-color-muted);
  font-weight: 400;
}

.recent-posts {
  margin-top: 2rem;
}

.recent-posts > h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-color-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color-light);
}

/* ==========================================================================
   Footer - Minimal Style
   ========================================================================== */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: auto;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--border-color-light);
  font-size: 0.875rem;
}

/* ==========================================================================
   Post Previews - Clean List Style
   ========================================================================== */
.post-preview {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color-light);
}
.post-preview:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-preview h3,
.post-preview h4 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.post-preview h3 a,
.post-preview h4 a {
  color: var(--text-color-headings);
  text-decoration: none;
  transition: color 0.15s ease;
}

.post-preview h3 a:hover,
.post-preview h4 a:hover {
  color: var(--text-color-link);
}

.post-meta {
  margin-bottom: 0.75rem;
}

.post-date {
  color: var(--text-color-muted);
  font-size: 0.875rem;
}

.post-categories {
  color: var(--text-color-muted);
  font-size: 0.875rem;
}

.post-excerpt {
  margin-bottom: 1rem;
  color: var(--text-color);
  line-height: 1.7;
}

.post-excerpt p {
  margin: 0;
}

.read-more-link {
  margin: 0;
}

.read-more-link a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color-link);
}

.read-more-link a:hover {
  text-decoration: underline;
}

.category {
  display: inline-block;
  background-color: var(--category-bg);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--category-text);
}

.translation-notice {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background-color: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--text-color);
}

body[dir=rtl] .translation-notice {
  border-left: none;
  border-right: 4px solid var(--accent);
  border-radius: 8px 0 0 8px;
}

.translation-notice p {
  margin: 0;
  line-height: 1.6;
}

.translation-notice strong {
  color: var(--text-color-headings);
  font-weight: 600;
}

.translation-notice a {
  color: var(--text-color-link);
  font-weight: 500;
}

/* Comments Section */
.comments {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color-light);
}

.comments h2 {
  color: var(--text-color-headings);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Giscus iframe container */
.giscus {
  background-color: var(--body-bg);
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

/* Override for Giscus specific elements when they load */
.giscus-frame {
  background-color: var(--body-bg) !important;
  color-scheme: light dark;
}

/* ==========================================================================
   Homepage Styles - Minimal & Clean
   ========================================================================== */
/* English Homepage - Minimal Style */
/* Shared home styles */
.home-en,
.home-ar {
  max-width: 100%;
  margin: 0 auto;
  padding: 2.5rem 0;
}

.home-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

.home-ar .home-layout {
  grid-template-columns: 1fr 340px;
  direction: rtl;
}

.home-main > h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-color-muted);
  margin: 0 0 1.25rem 0;
}

/* Clean list-style post items */
.post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color-light);
}
.post-item:first-of-type {
  padding-top: 0;
}
.post-item .post-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.post-item time {
  font-size: 0.8rem;
  color: var(--text-color-muted);
  white-space: nowrap;
}
.post-item .post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.post-item .post-categories span {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  background: var(--category-bg);
  color: var(--category-text);
}
.post-item h2 {
  margin: 0 0 0.3rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}
.post-item h2 a {
  color: var(--text-color-headings);
  text-decoration: none;
  transition: color 0.15s;
}
.post-item h2 a:hover {
  color: var(--text-color-link);
}
.post-item p {
  margin: 0;
  color: var(--text-color-muted);
  line-height: 1.6;
  font-size: 0.88rem;
}

.all-posts-link {
  margin-top: 1.25rem;
}
.all-posts-link a {
  color: var(--text-color-link);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}
.all-posts-link a:hover {
  text-decoration: underline;
}

/* Sidebar */
.home-sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-card {
  background: var(--header-bg);
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.sidebar-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}
.sidebar-card h3 a {
  color: var(--text-color-headings);
  text-decoration: none;
}
.sidebar-card h3 a:hover {
  color: var(--accent);
}
.sidebar-card h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-color-muted);
  margin: 0 0 0.75rem 0;
}
.sidebar-card p {
  font-size: 0.88rem;
  color: var(--text-color-muted);
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}
.sidebar-card p:last-child {
  margin-bottom: 0;
}
.sidebar-card .sidebar-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}
.sidebar-card .sidebar-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.sidebar-card .sidebar-link:hover {
  text-decoration: underline;
}

.sidebar-featured {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* EN: left-aligned */
.home-en .home-main {
  text-align: left;
}

.home-en .post-item-header {
  flex-direction: row;
}

/* AR: right-aligned */
.home-ar .home-main {
  text-align: right;
}

.home-ar .post-item-header {
  flex-direction: row-reverse;
}

.home-ar .post-categories {
  justify-content: flex-end;
}

.home-ar .all-posts-link {
  text-align: right;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
  .home-ar .home-layout {
    grid-template-columns: 1fr;
  }
  .home-sidebar {
    position: static;
  }
  .home-en,
  .home-ar {
    padding: 2rem 1rem;
  }
}
/* English Blog List */
.blog-list-en {
  max-width: 650px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.blog-list-en header {
  text-align: center;
  margin-bottom: 3rem;
}
.blog-list-en header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-color-headings);
  letter-spacing: -0.02em;
}
.blog-list-en .posts-list article {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color-light);
}
.blog-list-en .posts-list article:last-child {
  border-bottom: none;
}
.blog-list-en .posts-list article time {
  font-size: 0.85rem;
  color: var(--text-color-muted);
  display: block;
  margin-bottom: 0.5rem;
}
.blog-list-en .posts-list article h2 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}
.blog-list-en .posts-list article h2 a {
  color: var(--text-color-headings);
  text-decoration: none;
  transition: color 0.15s ease;
}
.blog-list-en .posts-list article h2 a:hover {
  color: var(--text-color-link);
}
.blog-list-en .posts-list article p {
  margin: 0;
  color: var(--text-color-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}
.blog-list-en > footer {
  text-align: center;
  margin-top: 3rem;
  padding: 0;
  background: none;
  border: none;
}
.blog-list-en > footer p {
  margin: 0;
}
.blog-list-en > footer p a {
  color: var(--text-color-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.blog-list-en > footer p a:hover {
  color: var(--text-color-link);
}

/* Arabic Blog List */
.blog-list-ar {
  max-width: 650px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.blog-list-ar header {
  text-align: center;
  margin-bottom: 3rem;
  background: none;
  border: none;
  padding: 0;
}
.blog-list-ar header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-color-headings);
  font-family: var(--font-arabic);
}
.blog-list-ar .posts-list {
  text-align: right;
}
.blog-list-ar .posts-list article {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color-light);
}
.blog-list-ar .posts-list article:last-child {
  border-bottom: none;
}
.blog-list-ar .posts-list article time {
  font-size: 0.85rem;
  color: var(--text-color-muted);
  display: block;
  margin-bottom: 0.5rem;
}
.blog-list-ar .posts-list article h2 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
}
.blog-list-ar .posts-list article h2 a {
  color: var(--text-color-headings);
  text-decoration: none;
  transition: color 0.15s ease;
}
.blog-list-ar .posts-list article h2 a:hover {
  color: var(--text-color-link);
}
.blog-list-ar .posts-list article p {
  margin: 0;
  color: var(--text-color-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}
.blog-list-ar > footer {
  text-align: center;
  margin-top: 3rem;
  padding: 0;
  background: none;
  border: none;
}
.blog-list-ar > footer p a {
  color: var(--text-color-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.blog-list-ar > footer p a:hover {
  color: var(--text-color-link);
}

/* ==========================================================================
   Post Header
   ========================================================================== */
.post-header {
  margin-bottom: 3rem;
  text-align: center;
  position: static;
  z-index: auto;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  padding: 0;
}

.post-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-color-headings);
}

.post-header .post-meta {
  color: var(--text-color-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Table of Contents (Outline) - Sticky Sidebar
   ========================================================================== */
/* Desktop: TOC as fixed sidebar on the left */
@media (min-width: 1200px) {
  .toc {
    display: block;
    position: fixed;
    top: 100px;
    left: calc((100vw - 720px) / 2 - 250px);
    width: 200px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
  /* RTL: TOC on the right side */
  body[dir=rtl] .toc {
    left: auto;
    right: calc((100vw - 720px) / 2 - 250px);
  }
  .toc-toggle {
    display: none;
  }
  .toc-header {
    margin-bottom: 1rem;
  }
  .toc-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-color-muted);
  }
  .toc-nav {
    display: block;
  }
  .toc-nav ul,
  nav.toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  .toc-nav li {
    display: block;
    margin-bottom: 0.4rem;
  }
  .toc-nav a {
    display: block;
    font-size: 0.8rem;
    color: var(--text-color-muted);
    text-decoration: none;
    padding: 0.3rem 0;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border-color-light);
    transition: color 0.15s ease, border-color 0.15s ease;
    line-height: 1.4;
  }
  .toc-nav a:hover {
    color: var(--text-color);
    border-left-color: var(--border-color-medium);
  }
  .toc-nav a.active {
    color: var(--text-color-link);
    border-left-color: var(--text-color-link);
    font-weight: 500;
  }
  .toc-h3 a {
    padding-left: 1.25rem;
    font-size: 0.75rem;
  }
  /* RTL styles for links */
  body[dir=rtl] .toc-nav a {
    border-left: none;
    border-right: 2px solid var(--border-color-light);
    padding-left: 0;
    padding-right: 0.75rem;
  }
  body[dir=rtl] .toc-nav a:hover {
    border-right-color: var(--border-color-medium);
  }
  body[dir=rtl] .toc-nav a.active {
    border-right-color: var(--text-color-link);
  }
  body[dir=rtl] .toc-h3 a {
    padding-left: 0;
    padding-right: 1.25rem;
  }
}
/* Tablet/Mobile: Floating button with popup */
@media (max-width: 1199px) {
  .toc {
    display: block;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
  }
  body[dir=rtl] .toc {
    right: auto;
    left: 1.5rem;
  }
  .toc-header {
    margin: 0;
  }
  .toc-title {
    display: none;
  }
  .toc-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--header-bg);
    border: 1px solid var(--border-color-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    cursor: pointer;
  }
  body.dark-mode .toc-toggle {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  .toc-nav {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 260px;
    max-height: 50vh;
    overflow-y: auto;
    background-color: var(--header-bg);
    border: 1px solid var(--border-color-light);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }
  body[dir=rtl] .toc-nav {
    right: auto;
    left: 0;
  }
  body.dark-mode .toc-nav {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
  .toc-nav ul,
  nav.toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  .toc-nav li {
    display: block;
    margin-bottom: 0.25rem;
  }
  .toc-nav a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-color-muted);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
    line-height: 1.4;
  }
  .toc-nav a:hover {
    background-color: var(--accent-light);
    color: var(--text-color);
  }
  .toc-nav a.active {
    background-color: var(--accent-light);
    color: var(--text-color-link);
    font-weight: 500;
  }
  .toc-h3 a {
    padding-left: 1.5rem;
    font-size: 0.8rem;
  }
  body[dir=rtl] .toc-h3 a {
    padding-left: 0.75rem;
    padding-right: 1.5rem;
  }
  .toc.toc-open .toc-nav {
    display: block;
  }
  .toc.toc-open .toc-toggle {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
  }
}
/* Hide TOC completely on very small screens */
@media (max-width: 480px) {
  .toc {
    bottom: 1rem;
    right: 1rem;
  }
  body[dir=rtl] .toc {
    left: 1rem;
  }
  .toc-nav {
    width: calc(100vw - 2rem);
    right: -0.5rem;
  }
  body[dir=rtl] .toc-nav {
    left: -0.5rem;
  }
}
/* ==========================================================================
   Post Content Styling
   ========================================================================== */
.post-content {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  order: 1;
}

/* --- Typography --- */
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--text-color-headings);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color-light);
}

.post-content h3 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content h4 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-color-headings);
}

/* For the numbered list of 10 applications */
.post-content ol {
  counter-reset: item;
}

.post-content ol > li {
  counter-increment: item;
  list-style: none;
  position: relative;
  padding-inline-start: 2.5rem;
  margin-bottom: 1.5rem;
}

.post-content ol > li::before {
  content: counter(item);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  background-color: var(--text-color-link);
  color: var(--body-bg);
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.9rem;
  line-height: 1.8rem;
  text-align: center;
  margin-inline-end: 1rem;
}

/* FIX: Reset nested lists to have normal bullets and spacing */
.post-content ol > li ul {
  list-style: disc;
  counter-reset: none;
  margin-top: 1rem;
  padding-inline-start: 1.5rem;
}

.post-content ol > li ul li {
  padding-inline-start: 0.5rem;
  list-style: disc;
}

/* Remove custom number style from nested list items */
.post-content ol > li ul li::before,
.post-content ol > li ol li::before {
  display: none;
}

/* Ensure nested ordered lists use standard numbers */
.post-content ol > li ol {
  list-style: decimal;
  counter-reset: none;
  margin-top: 1rem;
  padding-inline-start: 1.5rem;
}

.post-content li p {
  margin-bottom: 0.5rem;
}

.post-content li ul,
.post-content li ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.post-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.post-content a {
  text-decoration: underline;
  text-decoration-color: var(--border-color-medium);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.post-content a:hover {
  color: var(--text-color-link-hover);
  text-decoration-color: var(--text-color-link-hover);
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-inline-start: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

/* --- Block Elements --- */
.post-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background-color: var(--blockquote-bg);
  border-inline-start: 4px solid var(--border-color-blockquote);
  border-radius: 0 8px 8px 0;
  font-style: normal;
  color: var(--blockquote-text);
}

.post-content blockquote p {
  margin-bottom: 0;
}

.post-content hr {
  border: 0;
  height: 1px;
  background: var(--border-color-light);
  margin: 3rem 0;
}

/* --- Tables - Educative Style --- */
.post-content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color-light);
}

.post-content thead {
  background-color: var(--code-bg);
}

.post-content th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-color-headings);
  border-bottom: 2px solid var(--border-color-medium);
}

.post-content td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color-light);
  color: var(--text-color);
}

.post-content tbody tr:last-child td {
  border-bottom: none;
}

.post-content tbody tr:hover {
  background-color: var(--accent-light);
}

body[dir=rtl] .post-content th,
body[dir=rtl] .post-content td {
  text-align: right;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

body.dark-mode .post-content img {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* --- Code Styling --- */
.post-content code {
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 0.2em 0.45em;
  margin: 0;
  font-size: 0.875em;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
}

.post-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color-light);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-content .highlight {
  position: relative;
  margin: 1.5rem 0;
}

.post-content .highlight pre {
  margin: 0;
}

.post-content pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
  font-weight: normal;
}

/* ==========================================================================
   Code Copy Button
   ========================================================================== */
.copy-code-button {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.5rem;
  background-color: var(--code-bg);
  border: 1px solid var(--border-color-medium);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-color-muted);
  opacity: 0;
  transition: opacity 0.2s ease-in-out, background-color 0.2s;
  z-index: 10;
}

/* Show the button on hover */
.post-content .highlight:hover .copy-code-button {
  opacity: 1;
}

.copy-code-button:hover,
.copy-code-button:focus {
  background-color: var(--header-bg);
  color: var(--text-color);
}

.copy-code-button .copied-text {
  display: none;
  font-size: 0.85rem;
  font-weight: bold;
}

.copy-code-button.copied {
  border-color: #48bb78;
  color: #48bb78;
}

.copy-code-button.copied svg {
  display: none;
}

.copy-code-button.copied .copied-text {
  display: inline;
}

/* --- RESPONSIVE STYLES --- */
/* Make images and embedded content responsive */
.post-content img,
.post-content video,
.post-content iframe {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 404 Page Styles */
.not-found-page {
  text-align: center;
  padding: 50px 1rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* --- Header & Navigation --- */
.nav-toggle {
  display: none; /* Hidden by default */
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.5em;
  z-index: 1010; /* Above nav links */
}

.hamburger {
  display: block;
  position: relative;
  background: var(--header-text);
  width: 1.75em;
  height: 3px;
  border-radius: 2px;
  transition: transform 250ms ease-in-out, background-color 250ms ease-in-out;
}

.hamburger::before, .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  background: var(--header-text);
  height: 3px;
  border-radius: 2px;
  transition: transform 250ms ease-in-out;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  bottom: -7px;
}

.nav-open .hamburger {
  background-color: transparent;
}

.nav-open .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-open .hamburger::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */
@media (max-width: 768px) {
  body > header {
    backdrop-filter: none;
  }
  body.dark-mode > header {
    backdrop-filter: none;
  }
  nav {
    width: 100%;
    min-height: 3rem;
  }
  nav h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    margin: 0;
    width: auto;
    text-align: center;
  }
  .nav-toggle {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  html[dir=rtl] .nav-toggle {
    right: auto;
    left: 0;
  }
  .nav-links {
    position: fixed;
    background: var(--body-bg);
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 250ms cubic-bezier(0.5, 0, 0.5, 1);
  }
  body[dir=rtl] .nav-links {
    transform: translateX(-100%);
  }
  .nav-links.nav-open {
    transform: translateX(0);
  }
  .nav-links > ul {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .nav-links > ul a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color-headings);
  }
  .nav-links .language-switcher {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid var(--border-color-light);
    padding-top: 2rem;
    margin-top: 0.5rem;
  }
  .nav-links .language-switcher a {
    font-size: 1rem;
    color: var(--text-color-muted);
  }
  .nav-links .language-switcher a.active {
    color: var(--text-color-link);
  }
  .nav-links #theme-toggle {
    font-size: 1.25rem;
  }
  nav > .language-switcher,
  nav > #theme-toggle {
    display: none;
  }
  /* Layout adjustments */
  main {
    padding: 2rem 1rem;
  }
  .hero h1,
  .hero h2 {
    font-size: 1.75rem;
  }
  .post-title {
    font-size: 1.5rem;
  }
  .home-en,
  .home-ar {
    padding: 2rem 1rem;
  }
  .blog-list-ar,
  .blog-list-en {
    padding: 2rem 1rem;
  }
  .blog-list-ar header h1,
  .blog-list-en header h1 {
    font-size: 1.5rem;
  }
  .post-content h2 {
    font-size: 1.3rem;
  }
  .post-content h3 {
    font-size: 1.15rem;
  }
  .post-content pre {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
  }
  /* Tables scroll horizontally on mobile */
  .post-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
/* ==========================================================================
   Datasets Page — Arabic Dataset Browser
   ========================================================================== */
.datasets-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  text-align: right;
}
.datasets-page > header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.datasets-page > header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-color-headings);
  margin-bottom: 0.5rem;
}
.datasets-page > header p {
  color: var(--text-color-muted);
  font-size: 1rem;
}

/* Toolbar */
.datasets-toolbar {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.datasets-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color-light);
  border-radius: 8px;
  background: var(--body-bg);
  color: var(--text-color);
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.datasets-search input:focus {
  outline: none;
  border-color: var(--accent);
}
.datasets-search input::placeholder {
  color: var(--text-color-muted);
}

.datasets-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.datasets-filters select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color-light);
  border-radius: 6px;
  background: var(--body-bg);
  color: var(--text-color);
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 140px;
}
.datasets-filters select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Results count */
.datasets-results-count {
  font-size: 0.85rem;
  color: var(--text-color-muted);
  margin-bottom: 1rem;
}

/* Card grid */
.datasets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Card */
.dataset-card {
  background: var(--header-bg);
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.dataset-card:hover, .dataset-card:focus {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  outline: none;
}

body.dark-mode .dataset-card:hover,
body.dark-mode .dataset-card:focus {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color-headings);
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

/* Quality badge */
.quality-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.grade-excellent {
  background-color: #dcfce7;
  color: #166534;
}

body.dark-mode .grade-excellent {
  background-color: #14532d;
  color: #86efac;
}

.grade-good {
  background-color: #dbeafe;
  color: #1e40af;
}

body.dark-mode .grade-good {
  background-color: #1e3a5f;
  color: #93c5fd;
}

.grade-acceptable {
  background-color: #fef3c7;
  color: #92400e;
}

body.dark-mode .grade-acceptable {
  background-color: #78350f;
  color: #fde68a;
}

.grade-poor {
  background-color: #fee2e2;
  color: #991b1b;
}

body.dark-mode .grade-poor {
  background-color: #7f1d1d;
  color: #fca5a5;
}

.quality-badge-lg {
  font-size: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
}

/* Card meta */
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.card-meta span {
  font-size: 0.8rem;
  color: var(--text-color-muted);
  background: var(--code-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.card-summary {
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  flex: 1;
}

.card-footer {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-color-muted);
}

/* Load more */
.datasets-load-more {
  text-align: center;
  margin-top: 2rem;
}
.datasets-load-more button {
  padding: 0.6rem 2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
.datasets-load-more button:hover {
  opacity: 0.9;
}

/* Loading & empty */
.datasets-loading,
.datasets-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-color-muted);
}

/* Modal overlay */
.dataset-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  overflow-y: auto;
}

body.dark-mode .dataset-modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.dataset-modal {
  background: var(--body-bg);
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  padding: 2rem;
  position: relative;
  margin: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover {
  color: var(--text-color);
  background: var(--code-bg);
}

.modal-header {
  margin-bottom: 1.5rem;
}
.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color-headings);
  margin-bottom: 0.25rem;
}
.modal-header .modal-original-name {
  font-size: 0.9rem;
  color: var(--text-color-muted);
  margin-bottom: 0.75rem;
  direction: ltr;
  text-align: right;
}

.modal-section {
  margin-bottom: 1.5rem;
}
.modal-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color-headings);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color-light);
}
.modal-section p {
  line-height: 1.7;
  color: var(--text-color);
}
.modal-section ul {
  list-style: none;
  padding: 0;
}
.modal-section ul li {
  padding: 0.4rem 0;
  padding-right: 1.25rem;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.6;
}
.modal-section ul li::before {
  position: absolute;
  right: 0;
  top: 0.5rem;
}

.modal-section.strengths li::before {
  content: "✓";
  color: #16a34a;
  font-weight: bold;
}

.modal-section.weaknesses li::before {
  content: "✗";
  color: #dc2626;
  font-weight: bold;
}

.modal-section.uses li::before {
  content: "→";
  color: var(--accent);
}

/* Quality bars */
.quality-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quality-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  flex: 0 0 120px;
  font-size: 0.85rem;
  color: var(--text-color);
  text-align: right;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: var(--code-bg);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.bar-score {
  flex: 0 0 32px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color-headings);
  text-align: center;
}

/* Sample previews */
.sample-previews {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sample-item {
  background: var(--code-bg);
  border: 1px solid var(--border-color-light);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  direction: rtl;
  overflow-x: auto;
}

/* Modal metadata */
.modal-metadata dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}
.modal-metadata dl dt {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-color-headings);
}
.modal-metadata dl dd {
  font-size: 0.85rem;
  color: var(--text-color);
  margin: 0;
}

/* Modal links */
.modal-links a {
  display: inline-block;
  margin-left: 0.5rem;
  margin-bottom: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.modal-links a:hover {
  background: var(--accent);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .datasets-page {
    padding: 2rem 1rem;
  }
  .datasets-page > header h1 {
    font-size: 1.5rem;
  }
  .datasets-grid {
    grid-template-columns: 1fr;
  }
  .datasets-filters {
    flex-direction: column;
  }
  .datasets-filters select {
    width: 100%;
  }
  .dataset-modal {
    padding: 1.25rem;
    border-radius: 12px;
  }
  .dataset-modal-overlay {
    padding: 1rem;
  }
  .bar-label {
    flex: 0 0 90px;
    font-size: 0.8rem;
  }
  .modal-metadata dl {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .card-header {
    flex-direction: column;
  }
  .quality-badge {
    align-self: flex-start;
  }
}
/* Datasets credits / acknowledgment */
.datasets-credits {
  margin-top: 3rem;
  padding: 2rem;
  border-top: 1px solid var(--border-color-light);
  color: var(--text-color-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.datasets-credits h3 {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}
.datasets-credits p {
  margin-bottom: 0.75rem;
}
.datasets-credits a {
  color: var(--text-color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.datasets-credits a:hover {
  color: var(--text-color-link-hover);
}
.datasets-credits strong {
  color: var(--text-color);
}

.datasets-citation {
  margin-top: 1rem;
}
.datasets-citation summary {
  cursor: pointer;
  color: var(--text-color-link);
  font-size: 0.85rem;
}
.datasets-citation summary:hover {
  color: var(--text-color-link-hover);
}
.datasets-citation pre {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--code-bg);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
  direction: ltr;
  text-align: left;
}
.datasets-citation code {
  font-family: var(--font-mono);
  color: var(--code-text);
}

/*# sourceMappingURL=style.css.map */