/* Siber İşlem Theme System
   CSS Variables ile tam dark/light mode desteği
   FOUC engellemek için theme-manager.js inline yüklenmeli */

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Inter', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== LIGHT MODE ========== */
:root,
:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  --bg-overlay: rgba(248, 250, 252, 0.85);
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --primary: #0891b2;
  --primary-hover: #0e7490;
  --primary-text: #ffffff;
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.15);
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --header-bg: rgba(255, 255, 255, 0.85);
  --code-bg: #f1f5f9;
  --logo-halo: rgba(15, 23, 42, 0.08);
  --logo-halo-soft: rgba(15, 23, 42, 0.04);
  color-scheme: light;
}

/* ========== DARK MODE ========== */
:root[data-theme="dark"] {
  --bg: #0a0e1a;
  --bg-elevated: #0f1729;
  --bg-card: #131a2e;
  --bg-muted: #1a2440;
  --bg-overlay: rgba(10, 14, 26, 0.85);
  --border: #1e293b;
  --border-strong: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-soft: #64748b;
  --primary: #06b6d4;
  --primary-hover: #22d3ee;
  --primary-text: #0a0e1a;
  --accent: #22d3ee;
  --accent-glow: rgba(34, 211, 238, 0.25);
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(10, 14, 26, 0.85);
  --code-bg: #0a0e1a;
  --logo-halo: rgba(255, 255, 255, 0.28);
  --logo-halo-soft: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

/* ========== AUTO (system) ========== */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0a0e1a; --bg-elevated: #0f1729; --bg-card: #131a2e; --bg-muted: #1a2440;
    --bg-overlay: rgba(10, 14, 26, 0.85);
    --border: #1e293b; --border-strong: #334155;
    --text: #e2e8f0; --text-muted: #94a3b8; --text-soft: #64748b;
    --primary: #06b6d4; --primary-hover: #22d3ee; --primary-text: #0a0e1a;
    --accent: #22d3ee; --accent-glow: rgba(34, 211, 238, 0.25);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.4); --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
    --header-bg: rgba(10, 14, 26, 0.85); --code-bg: #0a0e1a;
    --logo-halo: rgba(255, 255, 255, 0.28); --logo-halo-soft: rgba(255, 255, 255, 0.14);
    color-scheme: dark;
  }
}

/* ========== BASE ========== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.25s var(--transition), color 0.25s var(--transition);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

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

/* Tema gecisi animasyonu */
*, *::before, *::after {
  transition: background-color 0.25s var(--transition), border-color 0.25s var(--transition), color 0.25s var(--transition);
}

/* ========== LAYOUT ========== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 1rem; }

/* ========== NAVBAR ========== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.875rem 1rem; gap: 1rem; }
.navbar-brand { display: flex; align-items: center; gap: 0.625rem; font-weight: 800; font-size: 1.25rem; color: var(--text); }
/* Logo halo — tüm .logo / .site-logo class'lı img'lerde geçerli.
   var(--logo-halo) light/dark mode'a göre ayarlı:
   - Light: çok yumuşak koyu shadow (derinlik hissi)
   - Dark: yumuşak beyaz halo (logo'nun siyah bölgeleri sahnede kalır) */
.logo, .site-logo {
  object-fit: contain;
  filter:
    drop-shadow(0 0 4px var(--logo-halo))
    drop-shadow(0 0 14px var(--logo-halo-soft));
  transition: filter 0.25s var(--transition);
}
.navbar-brand .logo { width: 48px; height: 48px; display: inline-block; }
.navbar-nav {
  display: flex; gap: 0.25rem; align-items: center; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.navbar-nav::-webkit-scrollbar { display: none; }
.navbar-nav .nav-link { scroll-snap-align: start; }
.nav-link {
  padding: 0.5rem 0.875rem; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 500;
  font-size: 0.9rem; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: var(--bg-muted); color: var(--text); }

.navbar-actions { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.navbar-search-form { display: contents; }

/* ========== MOBILE DRAWER ========== */
.navbar-toggle {
  display: none;
  background: var(--bg-muted); border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; border-radius: var(--radius-sm); cursor: pointer;
  align-items: center; justify-content: center; padding: 0;
}
.navbar-toggle:hover { background: var(--accent-glow); border-color: var(--primary); }
.navbar-toggle svg { width: 22px; height: 22px; }

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 998; opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--transition);
  backdrop-filter: blur(2px);
}
.drawer-backdrop[hidden] { display: none; }
.drawer-backdrop.active { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(86vw, 340px);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s var(--transition);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: -8px 0 32px rgba(0,0,0,0.25);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.active { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.125rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-elevated); z-index: 1;
}
.drawer-close {
  background: var(--bg-muted); border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.drawer-close:hover { background: var(--accent-glow); border-color: var(--primary); }
.drawer-close svg { width: 18px; height: 18px; }

.drawer-search {
  position: relative; margin: 1rem 1.125rem 0.5rem;
}
.drawer-search svg {
  position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-soft); pointer-events: none;
}
.drawer-search input {
  width: 100%; padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: var(--bg-muted); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); font-size: 0.95rem;
}
.drawer-search input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.drawer-nav { padding: 0.75rem 0.625rem 1rem; display: flex; flex-direction: column; gap: 0.125rem; }
.drawer-nav-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-soft); padding: 0.75rem 0.875rem 0.375rem;
}
.drawer-link {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.875rem 0.875rem; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; font-size: 0.95rem;
  min-height: 44px; /* touch target */
}
.drawer-link:hover, .drawer-link.active {
  background: var(--bg-muted); color: var(--primary);
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  background: var(--bg-muted); border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { background: var(--accent-glow); border-color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun,
:root[data-theme="auto"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon,
:root[data-theme="auto"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .theme-toggle .icon-sun { display: none; }
  :root[data-theme="auto"] .theme-toggle .icon-moon { display: block; }
}

/* Search input */
.search-input {
  background: var(--bg-muted); border: 1px solid var(--border); color: var(--text);
  padding: 0.5rem 0.875rem; border-radius: var(--radius-sm); font-size: 0.875rem;
  min-width: 200px;
}
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.125rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.875rem; border: 1px solid transparent;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-text); transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-muted); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

/* ========== HERO ========== */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); margin-bottom: 2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-img { width: 100%; aspect-ratio: 21/9; object-fit: cover; background: var(--bg-muted); }
.hero-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  color: #fff;
}
.hero-title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.2; margin: 0.5rem 0; color: #fff; }
.hero-title a { color: #fff; }
.hero-meta { display: flex; gap: 0.75rem; align-items: center; font-size: 0.85rem; color: rgba(255,255,255,0.8); }

/* ========== ARTICLE CARDS ========== */
.grid-articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; }
@media (max-width: 1024px) { .layout-main { grid-template-columns: 1fr; } }

.article-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.25s var(--transition);
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.article-card-img { aspect-ratio: 16/9; background: var(--bg-muted); object-fit: cover; width: 100%; }
.article-card-body { padding: 1.125rem; display: flex; flex-direction: column; gap: 0.625rem; flex: 1; }
.article-card-title {
  font-size: 1.125rem; font-weight: 700; line-height: 1.35; margin: 0;
  color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card-title a { color: var(--text); }
.article-card-title a:hover { color: var(--primary); }
.article-card-excerpt {
  color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card-meta { display: flex; gap: 0.75rem; align-items: center; font-size: 0.8rem; color: var(--text-soft); margin-top: auto; }

/* Category badge */
.cat-badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--accent-glow); color: var(--primary); border: 1px solid var(--primary);
}

/* Tag chip */
.tag-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.3rem 0.7rem; background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--text-muted);
}
.tag-chip:hover { background: var(--accent-glow); color: var(--primary); border-color: var(--primary); }

/* ========== SIDEBAR ========== */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text); margin: 0 0 1rem 0; padding-bottom: 0.625rem;
  border-bottom: 2px solid var(--primary); display: inline-block;
}
.sidebar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.sidebar-list li a {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem 0;
  color: var(--text); border-bottom: 1px solid var(--border);
}
.sidebar-list li:last-child a { border-bottom: 0; }
.sidebar-list .num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-glow); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
}
.sidebar-list .ttl { font-size: 0.875rem; line-height: 1.35; }

.cat-list { display: flex; flex-direction: column; }
.cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; color: var(--text); border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.cat-list a:last-child { border-bottom: 0; }
.cat-list .count { color: var(--text-soft); font-size: 0.75rem; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Newsletter widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--primary-text); border-color: transparent;
}
.newsletter-widget .sidebar-title { color: var(--primary-text); border-color: rgba(255,255,255,0.3); }
.newsletter-widget p { color: var(--primary-text); opacity: 0.95; font-size: 0.875rem; margin-bottom: 0.875rem; }
.newsletter-widget input {
  width: 100%; padding: 0.625rem 0.875rem; border: none; border-radius: var(--radius-sm);
  margin-bottom: 0.625rem; background: rgba(255,255,255,0.95); color: #0f172a;
}
.newsletter-widget button {
  width: 100%; padding: 0.625rem; background: rgba(0,0,0,0.25); color: #fff; border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.newsletter-widget button:hover { background: rgba(0,0,0,0.4); }

/* ========== ARTICLE PAGE ========== */
.article-hero { margin-bottom: 1.5rem; }
.article-cover {
  width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius-lg);
  background: var(--bg-muted);
}
.article-title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.15; margin: 1rem 0; }
.article-meta {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-soft); }

.article-body {
  font-size: 1.075rem; line-height: 1.8; color: var(--text);
}
.article-body h1, .article-body h2, .article-body h3 { margin-top: 2rem; margin-bottom: 0.75rem; font-weight: 700; line-height: 1.3; }
.article-body h2 { font-size: 1.625rem; }
.article-body h3 { font-size: 1.3rem; }
.article-body p { margin: 1rem 0; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body code { background: var(--code-bg); padding: 0.15rem 0.4rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; }
.article-body pre { background: var(--code-bg); padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; border: 1px solid var(--border); }
.article-body pre code { background: transparent; padding: 0; }
.article-body blockquote {
  border-left: 4px solid var(--primary); padding-left: 1rem; margin: 1.25rem 0;
  color: var(--text-muted); font-style: italic;
}
.article-body img { border-radius: var(--radius-sm); margin: 1.25rem 0; }
.article-body ul, .article-body ol { padding-left: 1.5rem; }
.article-body li { margin: 0.4rem 0; }

/* Share */
.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0; padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.share-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.875rem; background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.85rem; cursor: pointer;
}
.share-btn:hover { background: var(--accent-glow); border-color: var(--primary); color: var(--primary); }

/* Live readers + reading progress */
.live-pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); margin-right: 0.4rem; vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
[data-live-views].counter-bump {
  animation: counter-bump 0.5s ease;
  color: var(--primary);
}
@keyframes counter-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); color: var(--success); }
  100% { transform: scale(1); }
}

.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: transparent; z-index: 200; pointer-events: none;
}
.reading-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width 0.1s linear;
}

/* Media gallery */
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }
.media-item img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); cursor: zoom-in; border: 1px solid var(--border); }

/* ========== PAGINATION ========== */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin: 2.5rem 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 0.5rem 0.875rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  color: var(--text); background: var(--bg-card); font-size: 0.875rem;
}
.pagination .active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.pagination a:hover { background: var(--bg-muted); }

/* ========== FOOTER ========== */
.footer {
  margin-top: 4rem; padding: 2.5rem 0 1.5rem; border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.875rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer ul a { color: var(--text-muted); font-size: 0.875rem; }
.footer ul a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 0.85rem; }

/* ========== TOAST ========== */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border); padding: 0.875rem 1.125rem;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 280px; color: var(--text);
  animation: slideIn 0.3s ease; border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 10000;
  display: none; align-items: center; justify-content: center; padding: 2rem;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-sm); }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; background: transparent; border: 0; color: #fff; font-size: 2rem; cursor: pointer; }

/* ========== UTILITIES ========== */
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-primary { color: var(--primary); }
.skeleton { background: linear-gradient(90deg, var(--bg-muted), var(--bg-card), var(--bg-muted)); background-size: 200% 100%; animation: skeleton 1.5s infinite; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.section-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary); display: inline-block; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }

/* ========== RESPONSIVE ========== */

/* Tablet (≤ 768px) */
@media (max-width: 768px) {
  .container { padding: 0 0.875rem; }
  .search-input { min-width: 0; width: 140px; }
  .navbar-inner { padding: 0.75rem 0.875rem; gap: 0.625rem; }
  .navbar-brand { font-size: 1.1rem; }
  .navbar-brand .logo { width: 40px; height: 40px; }
  .hero-content { padding: 1.25rem; }
  .hero-img { aspect-ratio: 16/10; }
  .article-title { margin: 0.75rem 0; }
  .article-body { font-size: 1rem; line-height: 1.7; }
  .article-body h2 { font-size: 1.35rem; }
  .article-body h3 { font-size: 1.15rem; }
  .share-buttons { gap: 0.375rem; }
  .share-btn { font-size: 0.8rem; padding: 0.4rem 0.7rem; }
  main.container { padding-top: 1rem; padding-bottom: 1.5rem; }
}

/* Mobil (≤ 900px) — drawer aktif, desktop nav gizli */
@media (max-width: 900px) {
  .navbar-nav { display: none; }
  .navbar-search-form { display: none; }
  .navbar-toggle { display: inline-flex; }
}

/* Mobil (≤ 640px) */
@media (max-width: 640px) {
  .navbar-brand span:last-child {
    font-size: 1rem;
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .article-meta { font-size: 0.8rem; gap: 0.5rem; }
  .grid-articles { grid-template-columns: 1fr; gap: 1rem; }
  .hero-title { font-size: 1.25rem; }
  .hero-meta { font-size: 0.75rem; gap: 0.5rem; }
  .hero-content { padding: 1rem; }
  .section-title { font-size: 1.25rem; }
  .toast-container { left: 0.5rem; right: 0.5rem; top: 0.5rem; }
  .toast { min-width: 0; width: 100%; }
  .media-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .pagination { gap: 0.25rem; }
  .pagination a, .pagination span { padding: 0.45rem 0.7rem; font-size: 0.8rem; }
  .article-card-img { aspect-ratio: 16/10; }
  .sidebar-widget { padding: 1rem; }
  /* safe-area for notched phones */
  .navbar-inner { padding-left: max(0.875rem, env(safe-area-inset-left)); padding-right: max(0.875rem, env(safe-area-inset-right)); }
  .footer { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
}

/* Küçük telefon (≤ 380px) */
@media (max-width: 380px) {
  .navbar-brand span:last-child { display: none; }
  .hero-title { font-size: 1.1rem; }
  .article-card-title { font-size: 1rem; }
  .theme-toggle, .navbar-toggle { width: 38px; height: 38px; }
  .btn { padding: 0.55rem 0.9rem; font-size: 0.85rem; }
}

/* Body scroll-lock when drawer open */
body.drawer-open { overflow: hidden; }
