/* ============================================================
   KodÖrnekleri.com — CSS Design System v2.0
   Modern, dark-mode destekli, responsive tasarım sistemi
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ══════════════════════════════════════════════════════════════ */
:root {
  /* ── Tipografi ── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ── Renkler — Light Mode ── */
  --bg-body: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-nav: #0f172a;
  --bg-nav-hover: rgba(255,255,255,0.08);
  --bg-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --bg-code: #1e293b;
  --bg-code-light: #f8fafc;
  --bg-badge: rgba(99,102,241,0.1);
  --bg-skeleton: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #f8fafc;
  --text-link: #6366f1;
  --text-link-hover: #4f46e5;

  --border-default: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #6366f1;
  --border-code: rgba(99,102,241,0.2);

  /* ── Vurgu Renkleri ── */
  --accent-primary: #6366f1;    /* Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-python: #3b82f6;     /* Mavi */
  --accent-php: #8b5cf6;        /* Mor */
  --accent-js: #f59e0b;         /* Amber */
  --accent-csharp: #10b981;     /* Yeşil */
  --accent-ai: #ec4899;         /* Pembe */
  --accent-danger: #ef4444;
  --accent-success: #22c55e;
  --accent-warning: #f59e0b;
  --accent-info: #06b6d4;

  /* ── Gölgeler ── */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.09);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 20px rgba(99,102,241,0.15);
  --shadow-card-hover: 0 12px 28px rgba(99,102,241,0.12);

  /* ── Boyutlar ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* ── Geçişler ── */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Z-index ── */
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ══════════════════════════════════════════════════════════════
   2. DARK MODE
   ══════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg-body: #0b1120;
  --bg-surface: #1e293b;
  --bg-surface-hover: #273548;
  --bg-nav: #0f172a;
  --bg-hero: linear-gradient(135deg, #312e81 0%, #4c1d95 50%, #581c87 100%);
  --bg-code: #0f172a;
  --bg-code-light: #1e293b;
  --bg-badge: rgba(99,102,241,0.2);
  --bg-skeleton: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;
  --text-link: #818cf8;
  --text-link-hover: #a5b4fc;

  --border-default: #334155;
  --border-hover: #475569;
  --border-focus: #818cf8;
  --border-code: rgba(129,140,248,0.25);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.3);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 20px rgba(129,140,248,0.2);
  --shadow-card-hover: 0 12px 28px rgba(129,140,248,0.15);
}

/* ══════════════════════════════════════════════════════════════
   3. GLOBAL RESET & BASE STYLES
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition-base), color var(--transition-base);
}

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

::selection {
  background: rgba(99,102,241,0.25);
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════
   4. NAVBAR
   ══════════════════════════════════════════════════════════════ */
.ko-navbar {
  background: var(--bg-nav) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-sticky);
}

.ko-navbar .navbar-brand img {
  height: 38px;
  width: auto;
  transition: transform var(--transition-fast);
}
.ko-navbar .navbar-brand:hover img {
  transform: scale(1.03);
}

.ko-navbar .nav-link {
  color: rgba(255,255,255,0.75) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}
.ko-navbar .nav-link:hover,
.ko-navbar .nav-link.active {
  color: #fff !important;
  background: var(--bg-nav-hover);
}
.ko-navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
}

/* Navbar Search */
.ko-search-input {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #fff !important;
  border-radius: var(--radius-full) !important;
  font-size: 0.85rem;
  padding: 0.4rem 1rem !important;
  transition: all var(--transition-fast);
}
.ko-search-input::placeholder {
  color: rgba(255,255,255,0.45);
}
.ko-search-input:focus {
  background: rgba(255,255,255,0.12) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2) !important;
  outline: none;
}

/* Dark Mode Toggle */
.ko-theme-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}
.ko-theme-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  transform: rotate(15deg);
}

/* Mobile navbar */
@media (max-width: 991.98px) {
  .ko-navbar .navbar-collapse {
    background: var(--bg-nav);
    padding: 1rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: 0.5rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   5. HERO SECTION
   ══════════════════════════════════════════════════════════════ */
.ko-hero {
  background: var(--bg-hero);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.ko-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: heroFloat 8s ease-in-out infinite;
}
.ko-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
  animation: heroFloat 6s ease-in-out infinite reverse;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.ko-hero-title {
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.ko-hero-subtitle {
  opacity: 0.85;
  font-size: 1rem;
  position: relative;
  z-index: 1;
  max-width: 600px;
}
.ko-hero .btn {
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .ko-hero {
    padding: 3rem 2.5rem;
  }
  .ko-hero-title {
    font-size: 2.25rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   6. CARDS
   ══════════════════════════════════════════════════════════════ */
.ko-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.ko-card:hover {
  box-shadow: var(--shadow-md);
}

/* Glassmorphism card */
.ko-card-glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
}
[data-theme="dark"] .ko-card-glass {
  background: rgba(30,41,59,0.7);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Interactive card hover */
.ko-card-hover {
  cursor: pointer;
}
.ko-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent-primary);
}

/* Language cards */
.ko-lang-card {
  padding: 1.25rem;
  text-align: center;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  text-decoration: none !important;
  display: block;
}
.ko-lang-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}
.ko-lang-card .ko-lang-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 0.75rem;
  transition: transform var(--transition-fast);
}
.ko-lang-card:hover .ko-lang-icon {
  transform: scale(1.1) rotate(-3deg);
}
.ko-lang-card .ko-lang-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.ko-lang-card .ko-lang-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Category section card */
.ko-section-card {
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem;
}

/* Code sample card */
.ko-sample-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.ko-sample-card .ko-sample-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}
.ko-sample-card .ko-sample-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.ko-sample-card .ko-sample-title a {
  color: var(--text-primary);
  text-decoration: none;
}
.ko-sample-card .ko-sample-title a:hover {
  color: var(--accent-primary);
}
.ko-sample-card .ko-sample-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  flex: 1;
}
.ko-sample-card .ko-sample-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-default);
}

/* ══════════════════════════════════════════════════════════════
   7. CODE BLOCKS
   ══════════════════════════════════════════════════════════════ */
/* Code toolbar */
.ko-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid var(--border-code);
  border-bottom: none;
}
[data-theme="dark"] .ko-code-toolbar {
  background: #0f172a;
}
.ko-code-toolbar .ko-code-lang {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ko-code-toolbar .ko-btn-copy {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  font-weight: 500;
}
.ko-code-toolbar .ko-btn-copy:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.ko-code-toolbar .ko-btn-copy.copied {
  background: rgba(34,197,94,0.2);
  border-color: rgba(34,197,94,0.3);
  color: #4ade80;
}

/* Code block */
pre.ko-code {
  background: var(--bg-code);
  border: 1px solid var(--border-code);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  color: #e2e8f0;
  max-height: 520px;
  tab-size: 4;
}
pre.ko-code.ko-code-standalone {
  border-radius: var(--radius-md);
}

/* Code preview (card'lardaki mini preview) */
.ko-code-preview {
  background: var(--bg-code-light);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Line numbers */
.ko-line {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.75rem;
  padding: 0 0.25rem;
}
.ko-lno {
  user-select: none;
  text-align: right;
  opacity: 0.4;
  padding-right: 0.5rem;
  border-right: 1px solid rgba(255,255,255,0.06);
  color: #64748b;
}
.ko-line:hover {
  background: rgba(99,102,241,0.05);
}
.ko-line:hover .ko-lno {
  opacity: 0.8;
}

/* ══════════════════════════════════════════════════════════════
   8. SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.ko-sidebar {
  position: sticky;
  top: 5rem;
}
.ko-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.ko-sidebar-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-default);
}
.ko-sidebar-section {
  margin-bottom: 1rem;
}
.ko-sidebar-section-title {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  padding-left: 0.5rem;
}
.ko-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  color: var(--text-primary) !important;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}
.ko-sidebar-link:hover {
  background: var(--bg-badge);
  color: var(--accent-primary) !important;
  padding-left: 0.85rem;
}
.ko-sidebar-link.active {
  background: var(--bg-badge);
  color: var(--accent-primary) !important;
  font-weight: 600;
}
.ko-sidebar-divider {
  height: 1px;
  background: var(--border-default);
  margin: 0.75rem 0;
}

/* ══════════════════════════════════════════════════════════════
   9. BREADCRUMB
   ══════════════════════════════════════════════════════════════ */
.ko-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
  font-size: 0.82rem;
}
.ko-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.ko-breadcrumb li + li::before {
  content: '›';
  color: var(--text-tertiary);
  font-size: 1rem;
}
.ko-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.ko-breadcrumb a:hover {
  color: var(--accent-primary);
}
.ko-breadcrumb .active {
  color: var(--text-primary);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   10. BUTTONS
   ══════════════════════════════════════════════════════════════ */
.ko-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none !important;
}
.ko-btn-primary {
  background: var(--accent-primary);
  color: #fff !important;
}
.ko-btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  color: #fff !important;
}
.ko-btn-outline {
  background: transparent;
  color: var(--accent-primary) !important;
  border: 1px solid var(--accent-primary);
}
.ko-btn-outline:hover {
  background: var(--accent-primary);
  color: #fff !important;
}
.ko-btn-ghost {
  background: transparent;
  color: var(--text-secondary) !important;
}
.ko-btn-ghost:hover {
  background: var(--bg-badge);
  color: var(--accent-primary) !important;
}
.ko-btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
}
.ko-btn-lg {
  font-size: 1rem;
  padding: 0.65rem 1.5rem;
}
.ko-btn-white {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}
.ko-btn-white:hover {
  background: rgba(255,255,255,0.25);
  color: #fff !important;
}

/* ══════════════════════════════════════════════════════════════
   11. BADGES & TAGS
   ══════════════════════════════════════════════════════════════ */
.ko-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ko-badge-python { background: rgba(59,130,246,0.12); color: var(--accent-python); }
.ko-badge-php { background: rgba(139,92,246,0.12); color: var(--accent-php); }
.ko-badge-js { background: rgba(245,158,11,0.12); color: var(--accent-js); }
.ko-badge-csharp { background: rgba(16,185,129,0.12); color: var(--accent-csharp); }
.ko-badge-ai { background: rgba(236,72,153,0.12); color: var(--accent-ai); }
.ko-badge-new { background: rgba(34,197,94,0.12); color: var(--accent-success); }
.ko-badge-popular { background: rgba(245,158,11,0.12); color: var(--accent-warning); }

/* ══════════════════════════════════════════════════════════════
   12. STATS SECTION
   ══════════════════════════════════════════════════════════════ */
.ko-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.ko-stat-item {
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}
.ko-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.ko-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   13. FOOTER
   ══════════════════════════════════════════════════════════════ */
.ko-footer {
  background: var(--bg-nav);
  color: rgba(255,255,255,0.7);
  padding-top: 3rem;
  margin-top: 4rem;
}
.ko-footer-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.ko-footer a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.88rem;
  display: block;
  padding: 0.2rem 0;
  transition: all var(--transition-fast);
}
.ko-footer a:hover {
  color: #fff;
  padding-left: 0.25rem;
}
.ko-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0;
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ══════════════════════════════════════════════════════════════
   14. BACK TO TOP
   ══════════════════════════════════════════════════════════════ */
.ko-back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
  border: none;
  box-shadow: var(--shadow-lg);
  font-size: 1.2rem;
}
.ko-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ko-back-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99,102,241,0.35);
}

/* ══════════════════════════════════════════════════════════════
   15. ARTICLE / CONTENT PAGES
   ══════════════════════════════════════════════════════════════ */
.ko-article-header {
  margin-bottom: 1.5rem;
}
.ko-article-title {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.ko-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.ko-article-meta i {
  margin-right: 0.25rem;
}

.ko-article-content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-primary);
}
.ko-article-content h2 {
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-default);
}
.ko-article-content h3 {
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.ko-article-content ul, .ko-article-content ol {
  padding-left: 1.5rem;
}
.ko-article-content li {
  margin-bottom: 0.35rem;
}
.ko-article-content code {
  background: var(--bg-badge);
  color: var(--accent-primary);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* Previous / Next navigation */
.ko-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-default);
}
.ko-prev-next a {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  text-decoration: none !important;
  transition: all var(--transition-fast);
}
.ko-prev-next a:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}
.ko-prev-next .ko-pn-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.ko-prev-next .ko-pn-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.ko-prev-next .ko-pn-next {
  text-align: right;
}

@media (max-width: 576px) {
  .ko-prev-next {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   16. FORM STYLES
   ══════════════════════════════════════════════════════════════ */
.ko-form .form-control,
.ko-form .form-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}
.ko-form .form-control:focus,
.ko-form .form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.ko-form .form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.ko-form .form-text {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

/* ══════════════════════════════════════════════════════════════
   17. SKELETON LOADING
   ══════════════════════════════════════════════════════════════ */
.ko-skeleton {
  background: var(--bg-skeleton);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════════════════════
   18. UTILITY CLASSES
   ══════════════════════════════════════════════════════════════ */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-ai));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-accent-python { border-color: var(--accent-python) !important; }
.border-accent-php { border-color: var(--accent-php) !important; }
.border-accent-js { border-color: var(--accent-js) !important; }
.border-accent-csharp { border-color: var(--accent-csharp) !important; }
.border-accent-ai { border-color: var(--accent-ai) !important; }

.bg-accent-python-light { background: rgba(59,130,246,0.08) !important; }
.bg-accent-php-light { background: rgba(139,92,246,0.08) !important; }
.bg-accent-js-light { background: rgba(245,158,11,0.08) !important; }
.bg-accent-csharp-light { background: rgba(16,185,129,0.08) !important; }
.bg-accent-ai-light { background: rgba(236,72,153,0.08) !important; }

/* Text colors */
.text-accent-python { color: var(--accent-python) !important; }
.text-accent-php { color: var(--accent-php) !important; }
.text-accent-js { color: var(--accent-js) !important; }
.text-accent-csharp { color: var(--accent-csharp) !important; }
.text-accent-ai { color: var(--accent-ai) !important; }

.text-body-secondary { color: var(--text-secondary) !important; }

/* ══════════════════════════════════════════════════════════════
   19. RESPONSIVE UTILITIES
   ══════════════════════════════════════════════════════════════ */
/* Mobile sidebar off-canvas */
@media (max-width: 991.98px) {
  .ko-mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-surface);
    z-index: var(--z-overlay);
    overflow-y: auto;
    transition: left var(--transition-base);
    box-shadow: var(--shadow-xl);
    padding: 1rem;
  }
  .ko-mobile-sidebar.open {
    left: 0;
  }
  .ko-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: calc(var(--z-overlay) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }
  .ko-mobile-overlay.open {
    opacity: 1;
    visibility: visible;
  }
}

/* ══════════════════════════════════════════════════════════════
   20. ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Stagger children animation */
.animate-stagger > * {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}
.animate-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* ══════════════════════════════════════════════════════════════
   21. PRINT STYLES
   ══════════════════════════════════════════════════════════════ */
@media print {
  .ko-navbar, .ko-footer, .ko-back-top,
  .ko-sidebar, .ko-theme-toggle { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .ko-card { box-shadow: none !important; border: 1px solid #ddd !important; }
}
