html {
  scroll-behavior: smooth;
}

/* === Scroll Top Button === */
.scroll-top-btn {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 80;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.12);
  backdrop-filter: blur(12px);
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: all 0.3s ease;
}
.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}
.light .scroll-top-btn {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.15);
  color: #7c3aed;
}
.light .scroll-top-btn:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}

/* === Theme Variables === */
:root, .dark {
  --bg: #08080d;
  --modal-bg: #1b1b21;
  --modal-border: rgba(73, 68, 84, 0.3);
  --modal-text: #e4e1e9;
  --modal-placeholder: #958ea0;
  --modal-icon: #a078ff;
  --modal-hint: #958ea0;
  --kbd-bg: rgba(73, 68, 84, 0.3);
  --kbd-text: #958ea0;
  --kbd-border: rgba(73, 68, 84, 0.4);
  --search-hover: rgba(139, 92, 246, 0.08);
  --search-btn-border: rgba(73, 68, 84, 0.4);
  --search-btn-text: #958ea0;
  --theme-icon: #d0bcff;
  --nav-bg: rgba(19, 19, 24, 0.8);
  --nav-link: #958ea0;
  --nav-title-color: #e4e1e9;
  --sidebar-bg: #1b1b21;
  --sidebar-text: rgba(228, 225, 233, 0.5);
  --sidebar-hover: rgba(228, 225, 233, 0.8);
  --sidebar-border: rgba(255, 255, 255, 0.03);
  --breadcrumb-link: #a078ff;
  --breadcrumb-sep: #494454;
  --breadcrumb-active: #e4e1e9;
  --card-bg: #1b1b21;
  --card-border: rgba(73, 68, 84, 0.3);
  --input-bg: #0e0e13;
  --input-border: rgba(73, 68, 84, 0.2);
  --input-text: #e4e1e9;
  --input-placeholder: #958ea0;
  --tag-border: rgba(73, 68, 84, 0.4);
  --tag-text: #958ea0;
  --admin-label: #958ea0;
  --text-primary: #e4e1e9;
  --text-secondary: #cbc3d7;
}

.light {
  --bg: #f8f7fc;
  --modal-bg: #ffffff;
  --modal-border: rgba(0, 0, 0, 0.1);
  --modal-text: #1a1a2e;
  --modal-placeholder: #9ca3af;
  --modal-icon: #7c3aed;
  --modal-hint: #9ca3af;
  --kbd-bg: rgba(0, 0, 0, 0.05);
  --kbd-text: #6b7280;
  --kbd-border: rgba(0, 0, 0, 0.1);
  --search-hover: rgba(139, 92, 246, 0.06);
  --search-btn-border: rgba(0, 0, 0, 0.15);
  --search-btn-text: #6b7280;
  --theme-icon: #7c3aed;
  --nav-bg: rgba(248, 247, 252, 0.85);
  --nav-link: #6b7280;
  --nav-title-color: #1a1a2e;
  --sidebar-bg: #ffffff;
  --sidebar-text: rgba(0, 0, 0, 0.45);
  --sidebar-hover: rgba(0, 0, 0, 0.75);
  --sidebar-border: rgba(0, 0, 0, 0.05);
  --breadcrumb-link: #7c3aed;
  --breadcrumb-sep: #d1d5db;
  --breadcrumb-active: #1a1a2e;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --input-bg: #f3f4f6;
  --input-border: rgba(0, 0, 0, 0.1);
  --input-text: #1a1a2e;
  --input-placeholder: #9ca3af;
  --tag-border: rgba(0, 0, 0, 0.12);
  --tag-text: #6b7280;
  --admin-label: #6b7280;
  --text-primary: #1a1a2e;
  --text-secondary: #4b5563;
}

/* === Theme Transition (View Transitions API) === */
::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
  z-index: 1;
}
::view-transition-new(root) {
  animation: theme-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  mix-blend-mode: normal;
  z-index: 2;
}
@keyframes theme-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === Global === */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
  color: var(--text-primary);
}

.theme-transition, .theme-transition * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Nav buttons - fallback styles (Tailwind CDN bağımsız) */
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--search-btn-border);
  color: var(--search-btn-text);
  font-size: 14px;
  cursor: pointer;
  background: transparent;
  transition: border-color 0.2s;
}
.nav-search-btn:hover { border-color: rgba(139, 92, 246, 0.4); }
.nav-projects-link {
  color: #a78bfa;
  font-weight: 600;
  border-bottom: 2px solid #8b5cf6;
  padding-bottom: 4px;
  text-decoration: none;
  transition: all 0.2s;
}
.nav-mobile-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: 0;
  transition: all 0.3s;
}
.nav-mobile-btn:hover { background: rgba(139, 92, 246, 0.1); }
.light .nav-projects-link { color: #7c3aed; border-bottom-color: #7c3aed; }

/* Themed components */
.nav-themed { background: var(--nav-bg); backdrop-filter: blur(12px); }
.nav-title { color: var(--nav-title-color); }
.sidebar-bg { background: transparent; border-right: 1px solid var(--sidebar-border); }

/* === Sidebar Redesign === */
.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 8px;
}

.sidebar-project-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nav-title-color);
  transition: color 0.3s;
}
.sidebar-project-name:hover {
  color: #a78bfa;
}

.sidebar-tags {
  margin-top: 12px;
}
.sidebar-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.15);
  transition: all 0.2s;
}
.sidebar-tag:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.3);
}

.sidebar-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--sidebar-text);
  opacity: 0.7;
}

.sidebar-nav-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--sidebar-text);
  opacity: 0.5;
  text-transform: uppercase;
}

/* Light theme sidebar */
.light .sidebar-tag {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.15);
}
.light .sidebar-tag:hover {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(124, 58, 237, 0.25);
}
.light .sidebar-project-name:hover {
  color: #7c3aed;
}

/* Sidebar Search */
.sidebar-search-wrap {
  position: relative;
  margin: 0 16px 12px;
}
.sidebar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px !important;
  color: var(--sidebar-text);
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}
.sidebar-search-input {
  width: 100% !important;
  padding: 7px 12px 7px 32px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(139, 92, 246, 0.15) !important;
  background: rgba(139, 92, 246, 0.05) !important;
  background-color: rgba(139, 92, 246, 0.05) !important;
  color: var(--nav-title-color);
  font-size: 12px !important;
  height: auto !important;
  line-height: 1.4 !important;
  outline: none !important;
  transition: all 0.2s ease;
  box-shadow: none !important;
}
.sidebar-search-input:focus {
  border-color: rgba(139, 92, 246, 0.4) !important;
  background: rgba(139, 92, 246, 0.08) !important;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1) !important;
}
.sidebar-search-input::placeholder {
  color: var(--sidebar-text);
  opacity: 0.5;
  font-size: 11px !important;
}
.light .sidebar-search-input {
  border-color: rgba(124, 58, 237, 0.15) !important;
  background: rgba(124, 58, 237, 0.04) !important;
  background-color: rgba(124, 58, 237, 0.04) !important;
}
.light .sidebar-search-input:focus {
  border-color: rgba(124, 58, 237, 0.35) !important;
  background: rgba(124, 58, 237, 0.06) !important;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.08) !important;
}
.sidebar-no-result {
  padding: 8px 20px;
  font-size: 11px;
  color: var(--sidebar-text);
  opacity: 0.6;
  font-style: italic;
}

/* === Skeleton Loading === */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-card {
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}
.skeleton-line {
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(139,92,246,0.06) 25%, rgba(139,92,246,0.12) 50%, rgba(139,92,246,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-title { height: 22px; width: 55%; margin-bottom: 16px; }
.skeleton-text { height: 12px; width: 90%; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; margin-bottom: 16px; }
.skeleton-tags { display: flex; gap: 8px; margin-bottom: 16px; }
.skeleton-tag { height: 20px; width: 56px; border-radius: 10px; }
.skeleton-footer { height: 14px; width: 40%; }
/* === Version History === */
.version-badge {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
}
.versions-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}
.version-item:hover {
  background: rgba(139, 92, 246, 0.08) !important;
}
.version-preview-box {
  background: rgba(139, 92, 246, 0.05);
  border: 1px dashed rgba(139, 92, 246, 0.2);
}
.light .version-badge {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}
.light .version-preview-box {
  background: rgba(124, 58, 237, 0.03);
  border-color: rgba(124, 58, 237, 0.15);
}

/* === Custom Select / Dropdown === */
.filter-select,
.custom-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--card-bg);
  color: var(--nav-title-color);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px 36px 8px 14px;
  outline: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 13px;
  font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  min-width: 180px;
  line-height: 1.4;
}
.filter-select:hover,
.custom-select:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background-color: rgba(139, 92, 246, 0.05);
}
.filter-select:focus,
.custom-select:focus {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 0 2px 8px rgba(0,0,0,0.15);
}
.filter-select option,
.custom-select option {
  background: var(--card-bg);
  color: var(--nav-title-color);
  padding: 10px 14px;
  font-size: 13px;
}
.filter-select option:checked,
.custom-select option:checked {
  background: rgba(139, 92, 246, 0.15);
}
.light .filter-select,
.light .custom-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.light .filter-select:hover,
.light .custom-select:hover {
  background-color: rgba(124, 58, 237, 0.05);
  border-color: rgba(124, 58, 237, 0.3);
}
.light .filter-select:focus,
.light .custom-select:focus {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08), 0 2px 8px rgba(0,0,0,0.08);
}

/* === Custom Dropdown Component === */
.cdd-wrapper {
  position: relative;
  min-width: 220px;
}
.cdd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--nav-title-color);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}
.cdd-trigger:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.05);
}
.cdd-trigger.open {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.cdd-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdd-arrow {
  font-size: 18px;
  color: rgb(139, 92, 246);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.cdd-trigger.open .cdd-arrow {
  transform: rotate(180deg);
}
.cdd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(139, 92, 246, 0.1);
  z-index: 50;
  overflow: hidden;
  animation: cddSlideIn 0.2s ease;
  max-height: 280px;
  display: flex;
  flex-direction: column;
}
.cdd-menu.cdd-menu-up {
  top: auto;
  bottom: calc(100% + 6px);
  animation: cddSlideUp 0.2s ease;
}
@keyframes cddSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cddSlideUp {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cdd-items {
  overflow-y: auto;
  max-height: 260px;
  padding: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cdd-items::-webkit-scrollbar {
  display: none;
}
.cdd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--nav-title-color);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  text-align: left;
}
.cdd-item:hover {
  background: rgba(139, 92, 246, 0.1);
  color: rgb(196, 167, 255);
}
.cdd-item.active {
  background: rgba(139, 92, 246, 0.15);
  color: rgb(196, 167, 255);
  font-weight: 600;
}
.cdd-item-icon {
  font-size: 16px;
  color: rgba(139, 92, 246, 0.5);
  flex-shrink: 0;
}
.cdd-item:hover .cdd-item-icon {
  color: rgb(139, 92, 246);
}
.cdd-empty {
  padding: 16px;
  text-align: center;
  color: var(--admin-label, #888);
  font-size: 12px;
}
.light .cdd-menu {
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(124, 58, 237, 0.08);
}
.light .cdd-item:hover {
  background: rgba(124, 58, 237, 0.08);
  color: rgb(109, 40, 217);
}
.light .cdd-item.active {
  background: rgba(124, 58, 237, 0.12);
  color: rgb(109, 40, 217);
}

/* === Search Highlight === */
mark {
  background: rgba(139, 92, 246, 0.25);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.light mark {
  background: rgba(124, 58, 237, 0.15);
}

/* === Activity Log === */
.activity-log-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  transition: background 0.2s;
}
.activity-log-item:hover {
  background: rgba(139, 92, 246, 0.05);
}

/* === Dashboard Charts === */
.dash-chart-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
}
.dash-chart-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sidebar-text);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dash-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.dash-bar-label {
  font-size: 11px;
  color: var(--nav-title-color);
  width: 80px;
  flex-shrink: 0;
  text-align: right;
}
.dash-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(139, 92, 246, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.dash-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.dash-bar-fill-alt {
  background: linear-gradient(90deg, #ec4899, #f472b6);
}
.dash-bar-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--sidebar-text);
  width: 24px;
}

.skeleton-line {
  background: linear-gradient(90deg, rgba(124,58,237,0.05) 25%, rgba(124,58,237,0.1) 50%, rgba(124,58,237,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.input-themed {
  background: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--input-text) !important;
}
.input-themed::placeholder { color: var(--input-placeholder) !important; }
.input-themed:focus {
  border-color: rgba(160, 120, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(160, 120, 255, 0.1);
}

/* === Light Theme - Complete Overrides === */

/* Body & Background */
.light body { background-color: var(--bg); }
.light .bg-glow { opacity: 0.15; }

/* Navigation */
.light nav.nav-themed { border-bottom: 1px solid rgba(0,0,0,0.06); }
.light .nav-title { color: #1a1a2e; }

/* Sidebar */
.light .sidebar-link { color: rgba(0,0,0,0.5); }
.light .sidebar-link:hover { color: #7c3aed; background: rgba(124,58,237,0.05); }
.light .sidebar-link.sidebar-active {
  background: linear-gradient(90deg, rgba(124,58,237,0.08), transparent) !important;
  color: #7c3aed !important;
  border-left-color: #7c3aed;
}
.light .sidebar-link.sidebar-active .sidebar-num { color: #7c3aed !important; }
.light .sidebar-link.sidebar-active .sidebar-dot {
  background: #7c3aed !important;
  box-shadow: 0 0 8px rgba(124,58,237,0.4) !important;
}

/* Project Cards */
.light .project-card-wrap {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.light .project-card-wrap:hover {
  border-color: rgba(124,58,237,0.3);
  box-shadow: 0 16px 48px -8px rgba(124,58,237,0.12);
}
.light .pc-glow { background: radial-gradient(circle, rgba(124,58,237,0.06), transparent 70%); }
.light .pc-top-line { background: linear-gradient(90deg, #7c3aed, #a855f7, #7c3aed); }
.light .pc-title { color: var(--text-primary); }
.light .pc-icon { background: rgba(124,58,237,0.08); }
.light .project-card-wrap:hover .pc-icon { background: rgba(124,58,237,0.14); }
.light .pc-stat { color: var(--text-secondary); }
.light .pc-footer { border-top-color: rgba(0,0,0,0.06); }
.light .pc-tags span { background: rgba(124,58,237,0.08); color: #7c3aed; }

/* Section Cards */
.light .sc-wrap {
  background: linear-gradient(135deg, rgba(124,58,237,0.03), rgba(168,85,247,0.02));
  border-color: rgba(0,0,0,0.08);
  color: var(--text-primary);
}
.light .sc-wrap:hover {
  border-color: rgba(124,58,237,0.3);
  box-shadow: 0 12px 36px -6px rgba(124,58,237,0.1);
}
.light .sc-title { color: var(--text-primary); }
.light .sc-wrap:hover .sc-title { color: #7c3aed; }
.light .sc-desc { color: var(--text-secondary); }
.light .sc-num { background: rgba(124,58,237,0.08); color: #7c3aed; }
.light .sc-wrap:hover .sc-num { background: rgba(124,58,237,0.15); }
.light .sc-arrow { color: #7c3aed; }

/* Feature Cards */
.light .feature-card {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.06) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.light .feature-card:hover {
  background: #ffffff !important;
  box-shadow: 0 20px 60px -12px rgba(124,58,237,0.1) !important;
}
.light .feature-card h3 { color: var(--text-primary); }
.light .feature-card p { color: var(--text-secondary); }

/* Hero */
.light .hero-title { filter: none; }
.light .hero-subtitle { color: var(--text-secondary); }
.light .hero-stats span.text-outline { color: var(--text-secondary); }
.light .text-outline { color: var(--text-secondary); }

/* Wiki Content */
.light .wiki-content h2 {
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(124,58,237,0.06), transparent 70%);
  border-left-color: #7c3aed;
}
.light .wiki-content h2:hover {
  background: linear-gradient(90deg, rgba(124,58,237,0.1), transparent 70%);
  border-left-color: #a855f7;
}
.light .wiki-content h3 { color: #7c3aed; }
.light .wiki-content h3::before { background: linear-gradient(180deg, #7c3aed, #a855f7); }
.light .wiki-content h4 { color: var(--text-primary); }
.light .wiki-content h4::before { color: #7c3aed; }
.light .wiki-content p, .light .wiki-content li { color: var(--text-secondary); }
.light .wiki-content strong { color: var(--text-primary); }
.light .wiki-content li strong { color: var(--text-primary); }
.light .wiki-content p strong:first-child { color: #7c3aed; }
.light .wiki-content a {
  color: #7c3aed;
  background: linear-gradient(transparent 85%, rgba(124,58,237,0.2) 85%);
}
.light .wiki-content a:hover {
  color: #6d28d9;
  background: linear-gradient(transparent 85%, rgba(124,58,237,0.35) 85%);
}

/* Wiki - Code */
.light .wiki-content code {
  background: rgba(124,58,237,0.06);
  color: #7c3aed;
  border-color: rgba(124,58,237,0.12);
}
.light .wiki-content code:hover {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.2);
  box-shadow: none;
}
.light .wiki-content pre {
  background: #fafafe;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.light .wiki-content pre::before {
  background: linear-gradient(90deg, #7c3aed, #a855f7, #7c3aed);
  opacity: 0.4;
}
.light .wiki-content pre:hover {
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.light .wiki-content pre code { color: #374151; background: none; border: none; }
.light .wiki-content pre code:hover { background: none; box-shadow: none; }

/* Wiki - Tables */
.light .wiki-content table { border-color: rgba(0,0,0,0.08); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.light .wiki-content thead { background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(168,85,247,0.03)); }
.light .wiki-content th {
  color: #7c3aed;
  border-bottom-color: rgba(124,58,237,0.1);
}
.light .wiki-content th::after { background: linear-gradient(90deg, #7c3aed, #a855f7, transparent); opacity: 0.2; }
.light .wiki-content td { color: var(--text-secondary); border-bottom-color: rgba(0,0,0,0.05); }
.light .wiki-content tbody tr:hover { background: rgba(124,58,237,0.03); }
.light .wiki-content tbody tr:hover td { color: var(--text-primary); }

/* Wiki - Blockquote */
.light .wiki-content blockquote {
  background: linear-gradient(135deg, rgba(124,58,237,0.04), rgba(168,85,247,0.02));
  border-color: rgba(124,58,237,0.1);
  color: var(--text-secondary);
}
.light .wiki-content blockquote::before { background: linear-gradient(180deg, #7c3aed, #a855f7); }
.light .wiki-content blockquote::after { color: #7c3aed; opacity: 0.2; }
.light .wiki-content blockquote:hover {
  border-color: rgba(124,58,237,0.2);
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(168,85,247,0.03));
  box-shadow: 0 4px 16px rgba(124,58,237,0.06);
}
.light .wiki-content blockquote p { color: inherit; }

/* Wiki - Lists bullets */
.light .wiki-content ul li::before {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 0 4px rgba(124,58,237,0.2);
}
.light .wiki-content ol li::before {
  color: #7c3aed;
  background: rgba(124,58,237,0.08);
}
.light .wiki-content ul li:hover, .light .wiki-content ol li:hover {
  background: rgba(124,58,237,0.03);
}

/* Wiki - Images */
.light .wiki-content img {
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.light .wiki-content img:hover {
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Wiki - HR */
.light .wiki-content hr {
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.2), rgba(168,85,247,0.15), transparent);
}

/* Wiki Section num */
.light .wiki-section .sc-num { background: rgba(124,58,237,0.08); color: #7c3aed; }

/* Search */
.light .search-animate input:focus {
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1), 0 4px 16px -2px rgba(124,58,237,0.06);
  border-color: rgba(124,58,237,0.3);
  background: #ffffff;
}

/* Breadcrumb */
.light .breadcrumb-animate a { color: #7c3aed; }
.light .breadcrumb-animate a:hover { color: #6d28d9; }

/* Tag filters */
.light .tag-filter-btn.active {
  background: rgba(124,58,237,0.08) !important;
  border-color: rgba(124,58,237,0.25) !important;
  color: #7c3aed !important;
}

/* Tailwind class overrides for light theme */
.light .text-violet-400 { color: #7c3aed !important; }
.light .text-violet-300 { color: #8b5cf6 !important; }
.light .bg-violet-500\/10 { background: rgba(124,58,237,0.06) !important; }
.light .bg-violet-500\/15 { background: rgba(124,58,237,0.08) !important; }
.light .text-primary-fixed-dim { color: #7c3aed !important; }
.light .from-on-surface { --tw-gradient-from: #1a1a2e; }
.light .via-primary { --tw-gradient-via: #7c3aed; }
.light .to-secondary { --tw-gradient-to: #a855f7; }
.light .text-on-surface { color: #1a1a2e !important; }
.light .text-on-surface-variant { color: #4b5563 !important; }
.light .text-outline { color: #6b7280 !important; }
.light .bg-surface-container-low { background: #ffffff !important; }
.light .bg-surface-container { background: #f3f4f6 !important; }
.light .border-white\/5 { border-color: rgba(0,0,0,0.06) !important; }

body::-webkit-scrollbar { display: none; }
*::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

.sidebar-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar-scroll::-webkit-scrollbar { display: none; }

::selection { background: rgba(139, 92, 246, 0.3); color: #fff; }

/* === Animations === */
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(160, 120, 255, 0.1); }
  50% { border-color: rgba(160, 120, 255, 0.4); }
}

/* === Page Transition === */
/* body fadeIn kaldırıldı - tw-ready ile tek seferde gösteriliyor */

/* === Animate Elements === */
.anim-fade-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.anim-fade-down {
  opacity: 0;
  animation: fadeInDown 0.5s ease-out forwards;
}

.anim-fade-left {
  opacity: 0;
  animation: fadeInLeft 0.6s ease-out forwards;
}

.anim-fade-right {
  opacity: 0;
  animation: fadeInRight 0.6s ease-out forwards;
}

.anim-scale-in {
  opacity: 0;
  animation: scaleIn 0.5s ease-out forwards;
}

.anim-slide-left {
  animation: slideInLeft 0.4s ease-out forwards;
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }

/* === Glow Backgrounds === */
.bg-glow {
  animation: glowPulse 4s ease-in-out infinite;
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

/* === Nav Animation === */
nav.nav-animate {
  animation: fadeInDown 0.3s ease-out;
}

/* === Sidebar Animation === */
.sidebar-animate {
  animation: slideInLeft 0.35s ease-out;
}

.sidebar-animate nav a {
  opacity: 0;
  animation: fadeInLeft 0.3s ease-out forwards;
}

/* Sidebar link active state */
.sidebar-link.sidebar-active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent) !important;
  color: #c4b5fd !important;
  border-left: 2px solid #8b5cf6;
  padding-left: 14px;
}

.sidebar-link.sidebar-active .sidebar-num {
  color: #a78bfa !important;
}

.sidebar-link.sidebar-active .sidebar-dot {
  background: #8b5cf6 !important;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5), 0 0 16px rgba(139, 92, 246, 0.2) !important;
  width: 5px !important;
  height: 5px !important;
}

.sidebar-animate nav a:nth-child(1) { animation-delay: 0.05s; }
.sidebar-animate nav a:nth-child(2) { animation-delay: 0.08s; }
.sidebar-animate nav a:nth-child(3) { animation-delay: 0.11s; }
.sidebar-animate nav a:nth-child(4) { animation-delay: 0.14s; }
.sidebar-animate nav a:nth-child(5) { animation-delay: 0.17s; }
.sidebar-animate nav a:nth-child(6) { animation-delay: 0.20s; }
.sidebar-animate nav a:nth-child(7) { animation-delay: 0.23s; }
.sidebar-animate nav a:nth-child(8) { animation-delay: 0.26s; }
.sidebar-animate nav a:nth-child(9) { animation-delay: 0.29s; }
.sidebar-animate nav a:nth-child(10) { animation-delay: 0.32s; }
.sidebar-animate nav a:nth-child(11) { animation-delay: 0.35s; }
.sidebar-animate nav a:nth-child(12) { animation-delay: 0.38s; }
.sidebar-animate nav a:nth-child(13) { animation-delay: 0.41s; }
.sidebar-animate nav a:nth-child(14) { animation-delay: 0.44s; }
.sidebar-animate nav a:nth-child(15) { animation-delay: 0.47s; }
.sidebar-animate nav a:nth-child(16) { animation-delay: 0.50s; }
.sidebar-animate nav a:nth-child(17) { animation-delay: 0.53s; }
.sidebar-animate nav a:nth-child(18) { animation-delay: 0.56s; }
.sidebar-animate nav a:nth-child(19) { animation-delay: 0.59s; }
.sidebar-animate nav a:nth-child(20) { animation-delay: 0.62s; }

/* === Hero animations === */
.hero-title {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.hero-subtitle {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
  opacity: 0;
}

.hero-stats {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  opacity: 0;
}

.hero-cta {
  animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
  opacity: 0;
}

/* === Feature cards === */
.feature-card {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.5s; }
.feature-card:nth-child(2) { animation-delay: 0.65s; }
.feature-card:nth-child(3) { animation-delay: 0.8s; }

.feature-card:hover .feature-icon {
  animation: float 2s ease-in-out infinite;
}

/* === Wiki content animations === */
.wiki-animate > * {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}

.wiki-animate > *:nth-child(1) { animation-delay: 0.05s; }
.wiki-animate > *:nth-child(2) { animation-delay: 0.1s; }
.wiki-animate > *:nth-child(3) { animation-delay: 0.15s; }
.wiki-animate > *:nth-child(4) { animation-delay: 0.2s; }
.wiki-animate > *:nth-child(5) { animation-delay: 0.25s; }
.wiki-animate > *:nth-child(6) { animation-delay: 0.3s; }
.wiki-animate > *:nth-child(7) { animation-delay: 0.35s; }
.wiki-animate > *:nth-child(8) { animation-delay: 0.4s; }
.wiki-animate > *:nth-child(9) { animation-delay: 0.45s; }
.wiki-animate > *:nth-child(10) { animation-delay: 0.5s; }

/* === Breadcrumb animation === */
.breadcrumb-animate {
  animation: fadeInLeft 0.4s ease-out forwards;
  opacity: 0;
}

/* === Section title animation === */
.section-title-animate {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
  opacity: 0;
}

/* === Prev/Next nav animation === */
.nav-prev-next {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out 0.3s forwards;
}

.nav-prev-next a {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease,
              background 0.3s ease;
}

.nav-prev-next a:hover {
  box-shadow: 0 8px 24px -4px rgba(139, 92, 246, 0.12);
  border-color: rgba(160, 120, 255, 0.3);
  background: rgba(160, 120, 255, 0.05);
}

/* === Search input animation === */
.search-animate {
  animation: fadeInDown 0.4s ease-out 0.2s forwards;
  opacity: 0;
}

.search-animate input {
  transition: border-color 0.3s ease,
              box-shadow 0.3s ease,
              background 0.3s ease;
}

.search-animate input:focus {
  box-shadow: 0 0 0 3px rgba(160, 120, 255, 0.15),
              0 4px 16px -2px rgba(139, 92, 246, 0.1);
  border-color: rgba(160, 120, 255, 0.4);
  background: rgba(30, 30, 38, 0.9);
}

/* === Page header animation === */
.page-header-animate h1 {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.page-header-animate p {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
  opacity: 0;
}

/* === Link hover transitions === */
a {
  transition: color 0.25s ease, transform 0.25s ease;
}

/* === Icon hover spin === */
.icon-hover-spin:hover .material-symbols-outlined {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(15deg) scale(1.15);
}

/* === Button press effect === */
.btn-press {
  transition: transform 0.15s ease, box-shadow 0.25s ease;
}

.btn-press:active {
  transform: scale(0.95);
}

/* === Project Cards (List Page) === */
.project-card-wrap {
  position: relative;
  display: block;
  padding: 1.5rem;
  background: #1b1b21;
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 16px;
  text-decoration: none;
  color: #e4e1e9;
  overflow: hidden;
  animation: cardSlideUp 0.5s ease-out both;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease;
}

.project-card-wrap:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 16px 48px -8px rgba(139, 92, 246, 0.18),
              0 0 0 1px rgba(139, 92, 246, 0.1);
}

.pc-glow {
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(160, 120, 255, 0.12), transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card-wrap:hover .pc-glow { opacity: 1; }

.pc-top-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #a078ff, #fbabff, #a078ff);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card-wrap:hover .pc-top-line {
  opacity: 1;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.pc-inner { position: relative; z-index: 1; }

.pc-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pc-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(160, 120, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.project-card-wrap:hover .pc-icon {
  background: rgba(160, 120, 255, 0.2);
}

.pc-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.pc-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pc-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #958ea0;
}

.pc-date-stat {
  margin-left: auto;
}

/* === Section Cards (Detail Page) === */
.sc-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(208, 188, 255, 0.04), rgba(251, 171, 255, 0.02));
  border: 1px solid rgba(73, 68, 84, 0.2);
  border-radius: 14px;
  text-decoration: none;
  color: #e4e1e9;
  overflow: hidden;
  animation: cardSlideUp 0.4s ease-out both;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.sc-wrap:hover {
  transform: translateY(-5px);
  border-color: rgba(160, 120, 255, 0.35);
  box-shadow: 0 12px 36px -6px rgba(139, 92, 246, 0.15);
}

.sc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(160, 120, 255, 0.12);
  font-size: 0.7rem;
  font-weight: 800;
  color: #d0bcff;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  transition: background 0.3s ease, transform 0.3s ease;
}

.sc-wrap:hover .sc-num {
  background: rgba(160, 120, 255, 0.25);
  transform: scale(1.08);
}

.sc-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.sc-wrap:hover .sc-title { color: #d0bcff; }

.sc-desc {
  font-size: 0.8rem;
  color: #958ea0;
  line-height: 1.55;
  flex: 1;
}

.sc-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.75rem;
  color: #d0bcff;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sc-wrap:hover .sc-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* === Wiki Content (Markdown) === */

/* Headings */
.wiki-content h2 {
  position: relative;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 2.5rem 0 1rem;
  padding: 0.6rem 0 0.6rem 1rem;
  color: #e4e1e9;
  letter-spacing: -0.02em;
  border-bottom: none;
  background: linear-gradient(90deg, rgba(160, 120, 255, 0.08), transparent 70%);
  border-left: 3px solid #a078ff;
  border-radius: 0 8px 8px 0;
  transition: all 0.3s ease;
}

.wiki-content h2:hover {
  background: linear-gradient(90deg, rgba(160, 120, 255, 0.12), transparent 70%);
  border-left-color: #fbabff;
  padding-left: 1.2rem;
}

.wiki-content h3 {
  position: relative;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  padding-left: 0.8rem;
  color: #d0bcff;
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
}

.wiki-content h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 3px;
  background: linear-gradient(180deg, #a078ff, #fbabff);
  border-radius: 2px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.wiki-content h3:hover::before { opacity: 1; }
.wiki-content h3:hover { padding-left: 1rem; }

.wiki-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
  color: #cbc3d7;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.wiki-content h4::before {
  content: '›';
  color: #a078ff;
  font-weight: 800;
  font-size: 1.2em;
}

.wiki-content h4:hover { color: #d0bcff; }

/* Paragraphs */
.wiki-content p {
  margin-bottom: 1rem;
  color: #cbc3d7;
  line-height: 1.8;
  font-size: 0.92rem;
}

/* Lists */
.wiki-content ul, .wiki-content ol {
  margin: 0.8rem 0 1.2rem 0;
  padding-left: 0;
  color: #cbc3d7;
  list-style: none;
}

.wiki-content ul li, .wiki-content ol li {
  position: relative;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.6rem 0.4rem 1.6rem;
  line-height: 1.7;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background 0.25s ease, transform 0.2s ease;
}

.wiki-content ul li:hover, .wiki-content ol li:hover {
  background: rgba(160, 120, 255, 0.04);
  transform: translateX(4px);
}

.wiki-content ul li::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a078ff, #fbabff);
  box-shadow: 0 0 6px rgba(160, 120, 255, 0.3);
}

.wiki-content ol {
  counter-reset: wiki-ol;
}

.wiki-content ol li::before {
  counter-increment: wiki-ol;
  content: counter(wiki-ol);
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #d0bcff;
  background: rgba(160, 120, 255, 0.1);
  border-radius: 6px;
}

.wiki-content li strong { color: #e4e1e9; }

/* Strong */
.wiki-content strong {
  color: #e4e1e9;
  font-weight: 700;
}

/* Inline code */
.wiki-content code {
  background: linear-gradient(135deg, rgba(160, 120, 255, 0.1), rgba(251, 171, 255, 0.06));
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.83em;
  color: #fbabff;
  border: 1px solid rgba(160, 120, 255, 0.15);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  transition: all 0.2s ease;
}

.wiki-content code:hover {
  background: linear-gradient(135deg, rgba(160, 120, 255, 0.16), rgba(251, 171, 255, 0.1));
  border-color: rgba(160, 120, 255, 0.3);
  box-shadow: 0 0 8px rgba(160, 120, 255, 0.1);
}

/* Code blocks */
.wiki-content pre {
  position: relative;
  background: linear-gradient(145deg, #16161c, #1b1b23);
  border: 1px solid rgba(160, 120, 255, 0.12);
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.82rem;
  line-height: 1.8;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(160, 120, 255, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wiki-content pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #a078ff, #fbabff, #a078ff);
  border-radius: 12px 12px 0 0;
  opacity: 0.5;
}

.wiki-content pre:hover {
  border-color: rgba(160, 120, 255, 0.25);
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(160, 120, 255, 0.08),
              inset 0 1px 0 rgba(160, 120, 255, 0.08);
}

.wiki-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: #e4e1e9;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.wiki-content pre code:hover {
  background: none;
  border-color: transparent;
  box-shadow: none;
}

/* Tables */
.wiki-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(160, 120, 255, 0.12);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.3);
}

.wiki-content thead {
  background: linear-gradient(135deg, rgba(160, 120, 255, 0.12), rgba(251, 171, 255, 0.06));
}

.wiki-content th {
  padding: 0.85rem 1.1rem;
  text-align: left;
  font-weight: 700;
  color: #d0bcff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(160, 120, 255, 0.15);
  position: relative;
}

.wiki-content th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, #a078ff, #fbabff, transparent);
  opacity: 0.3;
}

.wiki-content td {
  padding: 0.75rem 1.1rem;
  color: #cbc3d7;
  border-bottom: 1px solid rgba(73, 68, 84, 0.15);
  transition: all 0.25s ease;
}

.wiki-content tr {
  transition: background 0.25s ease;
}

.wiki-content tbody tr:hover {
  background: rgba(160, 120, 255, 0.04);
}

.wiki-content tbody tr:hover td {
  color: #e4e1e9;
}

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

/* Blockquote */
.wiki-content blockquote {
  position: relative;
  border-left: none;
  padding: 1rem 1.2rem 1rem 3rem;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, rgba(160, 120, 255, 0.06), rgba(251, 171, 255, 0.03));
  border: 1px solid rgba(160, 120, 255, 0.1);
  border-radius: 12px;
  color: #cbc3d7;
  font-style: italic;
  overflow: hidden;
  transition: all 0.3s ease;
}

.wiki-content blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #a078ff, #fbabff);
  border-radius: 12px 0 0 12px;
}

.wiki-content blockquote::after {
  content: '"';
  position: absolute;
  left: 0.8rem;
  top: 0.3rem;
  font-size: 2rem;
  font-weight: 900;
  color: #a078ff;
  opacity: 0.3;
  font-style: normal;
  line-height: 1;
}

.wiki-content blockquote:hover {
  border-color: rgba(160, 120, 255, 0.2);
  background: linear-gradient(135deg, rgba(160, 120, 255, 0.08), rgba(251, 171, 255, 0.04));
  box-shadow: 0 4px 16px -4px rgba(139, 92, 246, 0.1);
  transform: translateX(4px);
}

.wiki-content blockquote p {
  margin-bottom: 0.3rem;
  color: inherit;
}

/* Horizontal rule */
.wiki-content hr {
  border: none;
  height: 2px;
  margin: 2.5rem 0;
  background: linear-gradient(90deg, transparent, rgba(160, 120, 255, 0.3), rgba(251, 171, 255, 0.2), transparent);
  border-radius: 2px;
}

/* Links */
.wiki-content a {
  color: #d0bcff;
  text-decoration: none;
  font-weight: 500;
  background: linear-gradient(transparent 85%, rgba(160, 120, 255, 0.3) 85%);
  padding-bottom: 1px;
  transition: all 0.25s ease;
}

.wiki-content a:hover {
  color: #fbabff;
  background: linear-gradient(transparent 85%, rgba(251, 171, 255, 0.4) 85%);
}

/* Images */
.wiki-content img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(160, 120, 255, 0.1);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3);
  margin: 1rem 0;
  transition: all 0.3s ease;
}

.wiki-content img:hover {
  border-color: rgba(160, 120, 255, 0.25);
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(160, 120, 255, 0.1);
  transform: scale(1.01);
}

/* Definition-like patterns (bold followed by text) */
.wiki-content p strong:first-child {
  color: #d0bcff;
}

/* === Wiki Section (single page) === */
.wiki-section {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease-out forwards;
  /* CSS custom property ile dinamik delay — JS'den set edilir, 17 nth-child kuralı yerine tek satır */
  animation-delay: calc(var(--section-index, 0) * 0.05s + 0.1s);
}

.wiki-section .sc-num {
  flex-shrink: 0;
}

.wiki-section h2 {
  border: none !important;
  background: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

/* === Search Modal Items === */
.search-item {
  opacity: 0;
  transform: translateY(8px);
  animation: searchItemIn 0.25s ease-out forwards;
  transition: none;
}

@keyframes searchItemIn {
  to { opacity: 1; transform: translateY(0); }
}

.search-item.search-hiding {
  animation: searchItemOut 0.2s ease-in forwards;
}

@keyframes searchItemOut {
  to { opacity: 0; transform: translateY(-4px) scale(0.97); }
}

.search-item:nth-child(1) { animation-delay: 0s; }
.search-item:nth-child(2) { animation-delay: 0.03s; }
.search-item:nth-child(3) { animation-delay: 0.06s; }
.search-item:nth-child(4) { animation-delay: 0.09s; }
.search-item:nth-child(5) { animation-delay: 0.12s; }
.search-item:nth-child(6) { animation-delay: 0.15s; }
.search-item:nth-child(7) { animation-delay: 0.18s; }
.search-item:nth-child(8) { animation-delay: 0.21s; }
.search-item:nth-child(9) { animation-delay: 0.24s; }
.search-item:nth-child(10) { animation-delay: 0.27s; }
.search-item:nth-child(11) { animation-delay: 0.30s; }
.search-item:nth-child(12) { animation-delay: 0.33s; }
.search-item:nth-child(13) { animation-delay: 0.36s; }
.search-item:nth-child(14) { animation-delay: 0.39s; }
.search-item:nth-child(15) { animation-delay: 0.42s; }
.search-item:nth-child(16) { animation-delay: 0.45s; }
.search-item:nth-child(17) { animation-delay: 0.48s; }
.search-item:nth-child(18) { animation-delay: 0.51s; }

/* Search breadcrumb transition */
#search-breadcrumb {
  transition: all 0.25s ease;
}

/* No results message animation */
.search-no-results {
  opacity: 0;
  animation: fadeInUp 0.3s ease-out 0.1s forwards;
}

/* === Copy Button === */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(160, 120, 255, 0.1);
  border: 1px solid rgba(160, 120, 255, 0.15);
  border-radius: 6px;
  color: #d0bcff;
  cursor: pointer;
  opacity: 0;
  transition: all 0.25s ease;
}

pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(160, 120, 255, 0.2); border-color: rgba(160, 120, 255, 0.35); }
.copy-btn.copied { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.3); color: #22c55e; }

.copy-icon { transition: transform 0.15s ease, opacity 0.15s ease; display: inline-block; }
.copy-icon-out { transform: scale(0) rotate(-90deg); opacity: 0; }
.copy-icon-in { animation: copyIconPop 0.3s ease-out; }

@keyframes copyIconPop {
  0% { transform: scale(0) rotate(90deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.light .copy-btn { background: rgba(124, 58, 237, 0.06); border-color: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.light .copy-btn:hover { background: rgba(124, 58, 237, 0.12); }

/* === Admin Panel === */

/* Admin animations */
@keyframes adminFadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes adminShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes adminStatPulse {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes adminCardSlide {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes adminIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(3deg); }
}

@keyframes adminGlowPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.admin-header-anim {
  animation: adminFadeSlideUp 0.5s ease-out;
}

.admin-icon-anim {
  animation: adminIconFloat 3s ease-in-out infinite;
}

/* Admin stat cards */
.admin-stat-card {
  position: relative;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  text-align: center;
  opacity: 0;
  animation: adminStatPulse 0.4s ease-out forwards;
  transition: all 0.3s ease;
  overflow: hidden;
}
.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.admin-stat-card:hover::before { opacity: 1; }
.admin-stat-card:hover { transform: translateY(-2px); border-color: rgba(139,92,246,0.25); }

.admin-stat-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.75rem;
  background: rgba(139,92,246,0.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.5rem;
  transition: all 0.3s;
}
.admin-stat-icon span { color: #a078ff; font-size: 1.25rem; }
.admin-stat-card:hover .admin-stat-icon { transform: scale(1.1); }

.admin-stat-value {
  font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--on-surface, #e4e1e9), #d0bcff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.admin-stat-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--admin-label); margin-top: 0.15rem; }

/* Admin project cards */
.admin-project-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  opacity: 0;
  animation: adminCardSlide 0.4s ease-out forwards;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-project-card:hover { transform: translateY(-3px); }

.admin-card-glow {
  position: absolute; inset: 0; border-radius: 1rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,92,246,0.08) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.admin-project-card:hover .admin-card-glow { opacity: 1; }

.admin-card-top-line {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #a078ff, #fbabff, transparent);
  transform: scaleX(0); transition: transform 0.5s ease;
}
.admin-project-card:hover .admin-card-top-line { transform: scaleX(1); }

.admin-card-inner {
  position: relative;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  transition: border-color 0.3s;
}
.admin-project-card:hover .admin-card-inner { border-color: rgba(139,92,246,0.3); }

/* Admin tags */
.admin-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(139,92,246,0.12);
  color: #c4b5fd;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  transition: all 0.2s;
  animation: adminStatPulse 0.25s ease-out;
}
.admin-tag:hover { background: rgba(139,92,246,0.22); transform: scale(1.05); }

.admin-tag-remove {
  cursor: pointer; background: transparent; border: 0;
  color: #c4b5fd; padding: 0; font-size: 0.85rem; line-height: 1;
  transition: all 0.2s;
}
.admin-tag-remove:hover { color: #f87171; transform: scale(1.3); }

/* Admin visibility toggle (replaces dropdown) */
.admin-visibility-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem; font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.admin-visibility-toggle:hover { transform: scale(1.05); }
.admin-visibility-toggle:active { transform: scale(0.95); }

.admin-vis-public {
  background: rgba(52,211,153,0.1);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.25);
}
.admin-vis-public:hover { background: rgba(52,211,153,0.18); border-color: rgba(52,211,153,0.4); }

.admin-vis-private {
  background: rgba(251,146,60,0.1);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.25);
}
.admin-vis-private:hover { background: rgba(251,146,60,0.18); border-color: rgba(251,146,60,0.4); }

/* Admin add button */
.admin-add-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white; border: 0; border-radius: 0.75rem;
  font-weight: 700; font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(124,58,237,0.25);
}
.admin-add-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,0.35); }
.admin-add-btn:active { transform: translateY(0) scale(0.97); }

/* Light theme admin overrides */
.light .admin-stat-value {
  background: linear-gradient(135deg, #1f1f25, #7c3aed);
  -webkit-background-clip: text; background-clip: text;
}
.light .admin-tag { background: rgba(139,92,246,0.08); color: #7c3aed; }
.light .admin-tag-remove { color: #7c3aed; }
.light .admin-tag-remove:hover { color: #ef4444; }
.light .admin-vis-public { background: rgba(16,185,129,0.08); color: #059669; border-color: rgba(16,185,129,0.2); }
.light .admin-vis-private { background: rgba(234,88,12,0.08); color: #ea580c; border-color: rgba(234,88,12,0.2); }
.light .admin-add-btn { box-shadow: 0 4px 12px rgba(124,58,237,0.15); }

/* Admin toolbar */
.admin-toolbar {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  animation: adminFadeSlideUp 0.4s ease-out;
}

.admin-sort-group {
  display: inline-flex;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  overflow: hidden;
}
.admin-sort-btn {
  padding: 0.5rem 0.65rem;
  background: transparent;
  border: 0;
  color: var(--admin-label);
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center;
}
.admin-sort-btn:hover { background: rgba(139,92,246,0.06); color: #a078ff; }
.admin-sort-btn.active { background: rgba(139,92,246,0.12); color: #a078ff; }
.admin-sort-btn + .admin-sort-btn { border-left: 1px solid var(--card-border); }

.admin-toolbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--on-surface, #e4e1e9);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.admin-toolbar-btn:hover { background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.3); color: #a078ff; }
.admin-toolbar-btn-danger { color: #ef4444; border-color: rgba(239,68,68,0.2); }
.admin-toolbar-btn-danger:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4); color: #ef4444; }

/* Admin icon buttons */
.admin-icon-btn {
  width: 2rem; height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--card-border);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--admin-label);
}
.admin-icon-btn:hover { background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.3); color: #a078ff; }
.admin-icon-btn-danger:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); color: #f87171; }

/* Admin danger button */
.admin-danger-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white; border: 0; border-radius: 0.75rem;
  font-weight: 700; font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(220,38,38,0.2);
}
.admin-danger-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(220,38,38,0.3); }
.admin-danger-btn:active { transform: translateY(0) scale(0.97); }

/* Admin drag handle */
.admin-card-drag {
  cursor: grab;
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  opacity: 0.4;
}
.admin-card-drag:hover { opacity: 1; background: rgba(139,92,246,0.08); }
.admin-card-drag:active { cursor: grabbing; }

/* Light theme extras */
.light .admin-sort-btn.active { background: rgba(139,92,246,0.08); }
.light .admin-toolbar-btn:hover { background: rgba(139,92,246,0.05); }
.light .admin-icon-btn-danger:hover { background: rgba(239,68,68,0.05); }

/* === Tag Filter Bar === */
.tag-filter-bar {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  animation: fadeInDown 0.4s ease-out 0.3s both;
}

.tag-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--tag-text);
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: capitalize;
}
.tag-filter-btn:hover {
  border-color: rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.06);
  color: #a078ff;
  transform: translateY(-1px);
}
.tag-filter-btn.active {
  background: rgba(139,92,246,0.12) !important;
  border-color: rgba(139,92,246,0.35) !important;
  color: #a078ff !important;
  box-shadow: 0 2px 8px rgba(139,92,246,0.12);
}
.tag-filter-btn .material-symbols-outlined {
  font-size: 14px;
}

.tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: rgba(139,92,246,0.1);
  color: #a078ff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}
.tag-filter-btn.active .tag-count {
  background: rgba(139,92,246,0.2);
}

/* Light theme tag filter */
.light .tag-filter-bar {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}
.light .tag-filter-btn:hover {
  border-color: rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.04);
  color: #7c3aed;
}
.light .tag-filter-btn.active {
  background: rgba(124,58,237,0.08) !important;
  border-color: rgba(124,58,237,0.25) !important;
  color: #7c3aed !important;
  box-shadow: 0 2px 8px rgba(124,58,237,0.08);
}
.light .tag-count {
  background: rgba(124,58,237,0.08);
  color: #7c3aed;
}
.light .tag-filter-btn.active .tag-count {
  background: rgba(124,58,237,0.15);
}

/* === AI Chatbot Widget === */
.chatbot-panel {
  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  display: flex;
  flex-direction: column;
}
.chatbot-header {
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.chatbot-messages-bg {
  background: var(--input-bg);
}
.chatbot-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: chatMsgIn 0.3s ease-out;
}
.chatbot-msg-user {
  flex-direction: row-reverse;
}
.chatbot-msg-avatar {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(192,38,211,0.2));
  display: flex; align-items: center; justify-content: center;
  color: #a78bfa; flex-shrink: 0;
}
.chatbot-msg-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 14px;
  font-size: 13px; line-height: 1.5;
  background: var(--card-bg); color: var(--modal-text);
  border: 1px solid var(--card-border);
}
.chatbot-msg-user-bubble {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: white; border: none;
}
.chatbot-input-area {
  background: var(--modal-bg);
  border-top: 1px solid var(--modal-border);
}
.chatbot-input {
  background: var(--input-bg) !important; color: var(--modal-text) !important;
  border: 1px solid var(--input-border) !important;
}
.chatbot-input::placeholder {
  color: var(--modal-placeholder) !important;
}
.chatbot-input:focus {
  border-color: rgba(139,92,246,0.4) !important;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1) !important;
}
.chatbot-typing span {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #a78bfa; margin: 0 2px;
  animation: typingDot 1.4s infinite;
}
.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.2); }
}

/* Chatbot Suggestion Buttons */
.chatbot-suggest-area {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(139, 92, 246, 0.15);
}
.chatbot-suggest-label {
  display: block;
  font-size: 12px;
  color: #a78bfa;
  margin-bottom: 8px;
  font-weight: 500;
}
.chatbot-suggest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chatbot-suggest-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.2s ease;
  cursor: pointer;
}
.chatbot-suggest-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}
.light .chatbot-suggest-wrap {
  background: rgba(139, 92, 246, 0.05) !important;
}
.light .chatbot-suggest-btn {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.1);
}
.light .chatbot-suggest-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #5b21b6;
}

/* Chatbot Wiki Links */
.chatbot-link-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(139, 92, 246, 0.12);
}
.chatbot-wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(139, 92, 246, 0.18);
  transition: all 0.2s ease;
}
.chatbot-wiki-link:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}
.light .chatbot-wiki-link {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.08);
}
.light .chatbot-wiki-link:hover {
  background: rgba(139, 92, 246, 0.18);
  color: #5b21b6;
}
/* Chatbot Wiki Project Group */
.chatbot-wiki-project {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 6px;
}
.chatbot-wiki-project:last-child { margin-bottom: 0; }
.chatbot-wiki-section {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.06);
  color: #a78bfa;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: all 0.2s ease;
}
.chatbot-wiki-section:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}
.light .chatbot-wiki-section {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.05);
}
.light .chatbot-wiki-section:hover {
  background: rgba(139, 92, 246, 0.12);
  color: #5b21b6;
}

/* Admin AI analyze button */
.admin-icon-btn-ai {
  background: rgba(139,92,246,0.05);
  border: 1px solid rgba(139,92,246,0.15);
  color: #a78bfa;
}
.admin-icon-btn-ai:hover {
  background: rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.3);
  color: #c4b5fd;
}

/* Chatbot Markdown Styles */
.chatbot-msg-bubble strong { font-weight: 600; }
.chatbot-msg-bubble em { font-style: italic; }
.chatbot-inline-code {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Fira Code', monospace;
}
.chatbot-code-wrap {
  position: relative;
  margin: 6px 0;
}
.chatbot-code-lang {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.6);
  letter-spacing: 0.05em;
}
.chatbot-code-copy {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 4px;
  padding: 3px 5px;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  transition: opacity 0.2s;
}
.chatbot-code-wrap:hover .chatbot-code-copy { opacity: 1; }
.chatbot-code-copy:hover { background: rgba(255,255,255,0.15); color: #fff; }
.chatbot-code-block {
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: 'Fira Code', monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  line-height: 1.4;
  margin: 0;
}
.chatbot-code-lang + .chatbot-code-copy + .chatbot-code-block { padding-top: 22px; }
.chatbot-code-block code { background: none; padding: 0; color: #e2e8f0; }
/* Chatbot Headings */
.chatbot-heading {
  font-weight: 700;
  margin: 6px 0 3px 0;
  color: var(--nav-title-color, #e4e1e9);
  line-height: 1.3;
}
.chatbot-h1 { font-size: 15px; }
.chatbot-h2 { font-size: 14px; }
.chatbot-h3 { font-size: 13px; color: var(--primary, #a78bfa); }
.chatbot-h4 { font-size: 12px; color: var(--primary, #a78bfa); }
.light .chatbot-heading { color: #1f2937; }
.light .chatbot-h3, .light .chatbot-h4 { color: #7c3aed; }

.chatbot-list-item {
  padding-left: 12px;
  position: relative;
  margin: 2px 0;
}
.chatbot-list-item::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #a78bfa;
}
.chatbot-list-item.chatbot-list-num::before { content: none; }

/* Chatbot Copy Button */
.chatbot-msg-bubble { position: relative; }
.chatbot-copy-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  padding: 0;
}
.chatbot-msg-bubble:hover .chatbot-copy-btn { opacity: 1; }
.chatbot-copy-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}
.chatbot-copy-btn.chatbot-copied {
  color: #34d399 !important;
  opacity: 1;
}

/* Chatbot Quick Action Buttons */
.chatbot-quick-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.08);
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(139, 92, 246, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.chatbot-quick-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

/* Light theme chatbot */
.light .chatbot-panel { background: #ffffff; border-color: rgba(0,0,0,0.1); }
.light .chatbot-messages-bg { background: #f8f9fa; }
.light .chatbot-msg-bubble { background: #f0f0f5; color: #1a1a2e; border-color: rgba(0,0,0,0.08); }
.light .chatbot-msg-user-bubble { background: linear-gradient(135deg, #7c3aed, #9333ea); color: white; }
.light .chatbot-input-area { background: #ffffff; border-color: rgba(0,0,0,0.08); }
.light .chatbot-input { background: #f0f0f5; color: #1a1a2e; border-color: rgba(0,0,0,0.1); }
.light .chatbot-input:focus { border-color: rgba(139,92,246,0.4); }
.light .chatbot-msg-avatar { background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(192,38,211,0.1)); }
.light .chatbot-inline-code { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.light .chatbot-code-block { background: #f0f0f5; }
.light .chatbot-code-block code { color: #1a1a2e; }
.light .chatbot-code-lang { color: rgba(124, 58, 237, 0.5); }
.light .chatbot-code-copy { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.4); }
.light .chatbot-code-copy:hover { background: rgba(0,0,0,0.1); color: #1a1a2e; }
.light .chatbot-copy-btn { background: rgba(0,0,0,0.03); color: rgba(0,0,0,0.3); }
.light .chatbot-copy-btn:hover { background: rgba(139,92,246,0.1); color: #7c3aed; }
.light .chatbot-quick-btn { background: rgba(139,92,246,0.06); color: #7c3aed; border-color: rgba(139,92,246,0.15); }
.light .chatbot-quick-btn:hover { background: rgba(139,92,246,0.15); color: #5b21b6; }
.light .admin-icon-btn-ai { background: rgba(139,92,246,0.05); border-color: rgba(139,92,246,0.15); color: #7c3aed; }
.light .admin-icon-btn-ai:hover { background: rgba(139,92,246,0.1); color: #6d28d9; }

/* Animate spin */
.animate-spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === Theme Toggle Switch === */
.theme-toggle-switch {
  position: relative;
  width: 56px; height: 28px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  transition: all 0.3s ease;
}
.theme-toggle-switch:hover { background: rgba(139, 92, 246, 0.25); }
.theme-toggle-icon { font-size: 14px; z-index: 1; transition: all 0.4s ease; }
.theme-icon-sun { color: #fbbf24; }
.theme-icon-moon { color: #a78bfa; }
.theme-toggle-slider {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  top: 2px; left: 2px;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}
/* Dark mode: slider sağda (moon aktif) */
.dark .theme-toggle-slider { transform: translateX(28px); }
.dark .theme-icon-sun { opacity: 0.4; transform: rotate(-90deg) scale(0.8); }
.dark .theme-icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
/* Light mode: slider solda (sun aktif) */
.light .theme-toggle-switch { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.25); }
.light .theme-toggle-switch:hover { background: rgba(251, 191, 36, 0.2); }
.light .theme-toggle-slider { transform: translateX(0); background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4); }
.light .theme-icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.light .theme-icon-moon { opacity: 0.4; transform: rotate(90deg) scale(0.8); }

/* === Page Transition Animation === */
/* pageFadeIn kaldırıldı - tw-ready mekanizması kullanılıyor */

/* === Lazy Loading Cards === */
.lazy-card { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.lazy-card-visible { opacity: 1; transform: translateY(0); }

/* === Project Card Preview === */
.pc-preview {
  font-size: 0.8rem; line-height: 1.5;
  color: var(--sidebar-text);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: all 0.3s ease;
  margin-top: 0;
}
.project-card-wrap:hover .pc-preview {
  max-height: 60px; opacity: 1; margin-top: 0.75rem;
}
.light .pc-preview { color: #64748b; }

/* === Syntax Highlighting Light Theme === */
.light .hljs { background: #f8f9fa !important; color: #1a1a2e !important; }

/* === Last Updated Badge === */
.last-updated-badge {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  animation: fadeSlideUp 0.5s ease-out 0.3s both;
}
.light .last-updated-badge {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 768px) {
  /* Sidebar: gizle, mobilde slide-in */
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed !important;
    width: 280px !important;
    height: calc(100vh - 4rem) !important;
    z-index: 41 !important;
  }
  #sidebar.sidebar-mobile-open {
    transform: translateX(0);
  }
  main.ml-64 { margin-left: 0 !important; padding: 1.5rem !important; }
  main.ml-64 .w-full.max-w-4xl { padding: 0; }

  /* Nav padding */
  nav .flex.justify-between { padding-left: 1rem; padding-right: 1rem; }

  /* Hero responsive */
  .hero-title { font-size: 2.5rem !important; }

  /* Chatbot panel */
  #chatbot-panel { width: calc(100vw - 2rem) !important; right: -1rem; }

  /* Proje kartları tek sütun */
  #project-grid { grid-template-columns: 1fr !important; }
}

/* === Admin Asistan === */
.admin-icon-fill { font-variation-settings: 'FILL' 1; }
.admin-chat-field {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
  background: var(--input-bg, rgba(255,255,255,0.05)) !important;
  color: var(--nav-title-color) !important;
  border: 1px solid var(--card-border);
}
.admin-chat-field:focus {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}
.admin-chat-field::placeholder {
  color: var(--sidebar-text);
  opacity: 0.5;
}
.admin-chat-send-btn {
  padding: 10px 16px;
  background: linear-gradient(to right, #7c3aed, #c026d3);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 0;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}
.admin-chat-send-btn:hover {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  filter: brightness(1.1);
}
.admin-chat-send-btn:active { transform: scale(0.95); }

.admin-quick-btn {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.06);
  color: var(--primary);
  transition: all 0.2s;
}
.admin-quick-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

/* admin chat panel animation handled via JS */

#admin-asistan-toggle {
  animation: adminFabPulse 3s ease-in-out infinite;
}
@keyframes adminFabPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(139, 92, 246, 0.5); }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .bg-glow { animation: none !important; }
  .gradient-animate { animation: none !important; }
  .shimmer { animation: none !important; }
  nav, .modal-backdrop, .chatbot-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Backdrop-filter GPU layer hint */
nav, .chatbot-panel {
  will-change: backdrop-filter;
}

/* === Skip Link === */
.skip-link:focus {
  outline: 2px solid var(--primary, #8b5cf6);
  outline-offset: 2px;
}
