/* ============================================================
   The Technical Artist - Global Stylesheet
   Clean Minimalist Design
   ============================================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Colors - Dark Theme (default): white on charcoal */
  --bg-primary: #1c1c1e;
  --bg-secondary: #222224;
  --bg-card: #2a2a2c;
  --bg-card-hover: #323234;
  --bg-code: #161618;
  --bg-nav: rgba(28, 28, 30, 0.92);

  --text-primary: #e5e5e5;
  --text-secondary: #999999;
  --text-muted: #666666;
  --text-link: #e5e5e5;

  --accent: #e5e5e5;
  --accent-hover: #ffffff;
  --accent-subtle: rgba(255, 255, 255, 0.06);

  --border-color: #363638;
  --border-radius: 6px;
  --border-radius-sm: 4px;
  --border-radius-lg: 8px;

  --shadow-sm: none;
  --shadow-md: 0 1px 4px rgba(0, 0, 0, 0.4);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-code: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;
  --space-4xl: 7rem;

  /* Layout */
  --max-width: 1000px;
  --nav-height: 56px;
  --sidebar-width: 220px;

  /* Transitions */
  --transition: 0.15s ease;
}

/* Light Theme: black on off-white */
[data-theme="light"] {
  --bg-primary: #f5f5f3;
  --bg-secondary: #ededeb;
  --bg-card: #e8e8e6;
  --bg-card-hover: #e0e0de;
  --bg-code: #1a1a1a;
  --bg-nav: rgba(245, 245, 243, 0.92);

  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-link: #1a1a1a;

  --accent: #1a1a1a;
  --accent-hover: #000000;
  --accent-subtle: rgba(0, 0, 0, 0.04);

  --border-color: #d5d5d3;

  --shadow-sm: none;
  --shadow-md: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; margin-bottom: var(--space-lg); }
h2 { font-size: 1.75rem; margin-bottom: var(--space-md); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-sm); }
h4 { font-size: 1.1rem; margin-bottom: var(--space-sm); }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

ul, ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

li {
  margin-bottom: var(--space-xs);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav__container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav__logo:hover {
  color: var(--text-primary);
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--text-primary);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2px;
  padding: 0;
  margin: 0;
}

.nav__link {
  position: relative;
}

.nav__link > a {
  display: block;
  padding: 6px 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav__link > a:hover,
.nav__link > a.active {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

/* Dropdown */
.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
  list-style: none;
}

.nav__link:hover .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown a {
  display: block;
  padding: 6px 12px;
  color: var(--text-secondary);
  font-size: 0.825rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition);
}

.nav__dropdown a:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

/* Section sub-menu within dropdown */
.nav__dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border-color);
  margin-left: 12px;
  padding-left: 8px;
}

.nav__dropdown ul a {
  font-size: 0.75rem;
  padding: 3px 8px;
  color: var(--text-muted);
}

.nav__dropdown ul a:hover {
  color: var(--text-primary);
}

/* Mobile menu toggle */
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--text-primary);
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Main Content */
.main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* Hero Section */
.hero {
  padding: var(--space-4xl) var(--space-xl);
  text-align: center;
  position: relative;
}

.hero::before {
  display: none;
}

.hero__content {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero__title {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
}

.hero__title .gradient-text {
  color: var(--accent);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font-body);
}

.btn--primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn--secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* Section */
.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-size: 1.875rem;
  margin-bottom: var(--space-sm);
}

.section__desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.card:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  transform: scaleX(1);
}

.card__icon {
  width: 40px;
  height: 40px;
  background: var(--accent-subtle);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
}

.card__icon--cyan,
.card__icon--pink,
.card__icon--green,
.card__icon--orange { background: var(--accent-subtle); }

.card__title {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.card__title a {
  color: var(--text-primary);
}

.card__title a:hover {
  color: var(--text-secondary);
}

.card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-subtle);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 50px;
  border: none;
}

.tag--cyan,
.tag--green,
.tag--pink,
.tag--orange {
  background: var(--accent-subtle);
  color: var(--text-secondary);
}

/* Page Layout with Sidebar */
.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-2xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-xl));
  align-self: start;
  max-height: calc(100vh - var(--nav-height) - var(--space-2xl));
  overflow-y: auto;
}

.sidebar__section {
  margin-bottom: var(--space-xl);
}

.sidebar__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.sidebar__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar__links li {
  margin-bottom: 1px;
}

.sidebar__links a {
  display: block;
  padding: 6px var(--space-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-radius: var(--border-radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition);
}

.sidebar__links a:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
  border-left-color: var(--text-muted);
}

.sidebar__links a.active {
  color: var(--text-primary);
  background: var(--accent-subtle);
  border-left-color: var(--text-primary);
  font-weight: 600;
}

/* Article Content */
.article {
  max-width: 720px;
}

.article__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.article__breadcrumb a {
  color: var(--text-muted);
}

.article__breadcrumb a:hover {
  color: var(--text-primary);
}

.article__breadcrumb .separator {
  color: var(--text-muted);
}

.article__header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-color);
}

.article__category {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-subtle);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  margin-bottom: var(--space-md);
}

.article__title {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
}

.article__meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.825rem;
}

.article__body h2 {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.article__body h3 {
  margin-top: var(--space-xl);
}

.article__body p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.article__body ul,
.article__body ol {
  margin-bottom: var(--space-lg);
}

.article__body li {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

/* Code Blocks */
.code-block {
  position: relative;
  margin: var(--space-lg) 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px var(--space-md);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.code-block__lang {
  color: var(--text-muted);
  font-weight: 600;
  font-family: var(--font-code);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-block__copy {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 0.7rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition);
}

.code-block__copy:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.code-block__copy.copied {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.code-block pre {
  background: var(--bg-code) !important;
  padding: var(--space-lg) !important;
  margin: 0 !important;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
}

.code-block code {
  font-family: var(--font-code) !important;
  font-size: 0.85rem !important;
}

/* Inline code */
.article__body code:not([class*="language-"]),
p code,
li code {
  background: var(--accent-subtle);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-code);
  font-size: 0.825em;
}

/* Info Boxes */
.info-box {
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  margin: var(--space-lg) 0;
  border-left: 2px solid var(--border-color);
  background: var(--accent-subtle);
}

.info-box--tip,
.info-box--note,
.info-box--warning {
  background: var(--accent-subtle);
  border-left-color: var(--text-muted);
}

.info-box--tip .info-box__title,
.info-box--note .info-box__title,
.info-box--warning .info-box__title {
  color: var(--text-primary);
}

.info-box__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

.info-box__content {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.info-box__content p:last-child {
  margin-bottom: 0;
}

/* Feature Grid (Home Page) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.feature {
  text-align: center;
  padding: var(--space-lg);
}

.feature__number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.feature__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section Landing Cards */
.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.landing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}

.landing-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.landing-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-lg);
}

.landing-card__title {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.landing-card__desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  line-height: 1.6;
}

.landing-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: gap var(--transition);
}

.landing-card:hover .landing-card__link {
  gap: var(--space-md);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
  margin-top: var(--space-4xl);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
}

.footer__brand {
  max-width: 280px;
}

.footer__brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.footer__brand-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer__section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__links a {
  display: block;
  padding: 3px 0;
  color: var(--text-secondary);
  font-size: 0.825rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  max-width: var(--max-width);
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Table of Contents */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.toc__title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-md);
}

.toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc__list li {
  margin-bottom: var(--space-xs);
}

.toc__list a {
  display: block;
  padding: 4px var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition);
}

.toc__list a:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

/* Responsive */
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
    display: none;
  }

  .sidebar.mobile-visible {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: var(--space-xl);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .nav__links.open {
    transform: translateX(0);
  }

  .nav__link > a {
    font-size: 1rem;
    padding: var(--space-md);
  }

  .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: var(--space-md);
  }

  .nav__toggle {
    display: block;
  }

  .hero {
    padding: var(--space-3xl) var(--space-xl);
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 0;
    border: none;
    padding: 0;
  }

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

  .feature:last-child {
    border-bottom: none;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .landing-cards {
    grid-template-columns: 1fr;
  }

  .footer__container {
    grid-template-columns: 1fr;
  }

  .article__title {
    font-size: 1.75rem;
  }

  .sidebar.mobile-visible {
    display: block;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-gradient {
  color: var(--accent);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }

/* Prism.js Theme Overrides (monochrome) */
code[class*="language-"],
pre[class*="language-"] {
  color: #c8c8c8;
  text-shadow: none;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #555555;
}

.token.punctuation {
  color: #888888;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #e0e0e0;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #a0a0a0;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #b0b0b0;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #ffffff;
  font-weight: 500;
}

.token.function,
.token.class-name {
  color: #d8d8d8;
}

.token.regex,
.token.important,
.token.variable {
  color: #b0b0b0;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Selection */
::selection {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  margin-left: var(--space-md);
  transition: border-color var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--text-muted);
}

.theme-toggle__thumb {
  position: absolute;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-primary);
  border-radius: 50%;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle__icon {
  font-size: 9px;
  line-height: 1;
}

[data-theme="light"] .theme-toggle__thumb {
  transform: translateX(18px);
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(2) { transition-delay: 0.05s; }
.fade-in:nth-child(3) { transition-delay: 0.1s; }
.fade-in:nth-child(4) { transition-delay: 0.15s; }
.fade-in:nth-child(5) { transition-delay: 0.2s; }
.fade-in:nth-child(6) { transition-delay: 0.25s; }
