html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #0f172a;
  color: #e5e7eb;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.theme-sun {
  background: linear-gradient(180deg, #fffdf5 0%, #f8fafc 45%, #f3f4f6 100%);
  color: #1f2937;
}

.theme-sun .text-text {
  color: #1f2937 !important;
}

.theme-sun .bg-base {
  background: transparent !important;
}

.theme-sun .text-neon {
  color: #a16207 !important;
}

.brand-title {
  color: #22c55e !important;
}

.theme-sun .brand-title {
  color: #15803d !important;
}

.theme-sun .bg-neon {
  background-color: #facc15 !important;
}

.theme-sun .border-neon\/30,
.theme-sun .border-neon\/40,
.theme-sun .border-neon\/60 {
  border-color: rgba(161, 98, 7, 0.45) !important;
}

.theme-sun .hover\:bg-neon:hover {
  background-color: #facc15 !important;
}

.theme-sun .hover\:text-neon:hover {
  color: #a16207 !important;
}

.theme-sun .hover\:border-neon:hover {
  border-color: #a16207 !important;
}

.theme-sun .hover\:shadow-neon:hover {
  box-shadow: 0 0 20px rgba(161, 98, 7, 0.35) !important;
}

.theme-sun .bg-slate-950,
.theme-sun .bg-slate-950\/80,
.theme-sun .bg-slate-900\/90,
.theme-sun .bg-slate-900\/70,
.theme-sun .bg-slate-900\/60,
.theme-sun .from-slate-900\/85,
.theme-sun .to-slate-800\/70,
.theme-sun .from-slate-900,
.theme-sun .to-emerald-950\/40 {
  background-color: rgba(255, 255, 255, 0.9) !important;
  background-image: none !important;
}

.theme-sun .text-slate-100,
.theme-sun .text-slate-200,
.theme-sun .text-slate-300 {
  color: #374151 !important;
}

.theme-sun .text-slate-400 {
  color: #6b7280 !important;
}

.theme-sun .text-slate-500 {
  color: #9ca3af !important;
}

.theme-sun .border-slate-800,
.theme-sun .border-slate-800\/60,
.theme-sun .border-slate-700,
.theme-sun .border-slate-500,
.theme-sun .border-slate-400,
.theme-sun .border-slate-600 {
  border-color: #d1d5db !important;
}

.course-reveal {
  animation: courseFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
}

@keyframes courseFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.course-accent-web:hover {
  box-shadow: 0 14px 38px rgba(14, 165, 233, 0.22);
  border-color: rgba(14, 165, 233, 0.7);
}

.course-accent-devops:hover {
  box-shadow: 0 14px 38px rgba(16, 185, 129, 0.24);
  border-color: rgba(16, 185, 129, 0.7);
}

.course-accent-data:hover {
  box-shadow: 0 14px 38px rgba(251, 191, 36, 0.23);
  border-color: rgba(251, 191, 36, 0.75);
}

.course-accent-linux:hover {
  box-shadow: 0 14px 38px rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.68);
}

.theme-sun .course-accent-web:hover {
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.2);
}

.theme-sun .course-accent-devops:hover {
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.2);
}

.theme-sun .course-accent-data:hover {
  box-shadow: 0 12px 28px rgba(202, 138, 4, 0.22);
}

.theme-sun .course-accent-linux:hover {
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.18);
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.terminal-line {
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  will-change: width, opacity;
  animation: terminalType 1.1s steps(var(--chars)) var(--delay) forwards;
}

.terminal-cursor-line {
  opacity: 0;
  animation: terminalCursorReveal 120ms ease-out var(--cursor-delay, 1300ms) forwards;
}

@keyframes terminalType {
  from {
    width: 0;
    opacity: 0.75;
  }

  to {
    width: calc(var(--chars) * 1ch);
    opacity: 1;
  }
}

@keyframes terminalCursorReveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.smooth-ui {
  transition-property: background-color, border-color, color, box-shadow, transform, opacity;
  transition-duration: 320ms;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-neon,
.btn-outline,
.btn-ghost {
  transition: all 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-dark .btn-neon {
  background: #22c55e;
  color: #052e16;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.2);
}

.theme-dark .btn-neon:hover {
  background: #4ade80;
  color: #052e16;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.28);
  transform: translateY(-1px);
}

.theme-dark .btn-outline {
  border: 1px solid rgba(148, 163, 184, 0.9);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.4);
}

.theme-dark .btn-outline:hover {
  border-color: #22c55e;
  color: #22c55e;
  background: rgba(15, 23, 42, 0.72);
}

.theme-dark .btn-ghost {
  border: 1px solid rgba(34, 197, 94, 0.75);
  color: #22c55e;
  background: transparent;
}

.theme-dark .btn-ghost:hover {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border-color: #4ade80;
}

.theme-slider {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 66px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.85);
  padding: 3px;
  cursor: pointer;
  user-select: none;
  transition: all 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-slider-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.theme-slider .sun {
  left: 8px;
  opacity: 0.65;
}

.theme-slider .moon {
  right: 9px;
  opacity: 1;
}

.theme-knob {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #e5e7eb, #cbd5e1);
  transform: translateX(0);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.28);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), background 280ms ease;
}

.theme-sun .theme-slider {
  background: rgba(250, 204, 21, 0.2);
  border-color: rgba(161, 98, 7, 0.55);
}

.theme-sun .theme-slider .sun {
  opacity: 1;
}

.theme-sun .theme-slider .moon {
  opacity: 0.45;
}

.theme-sun .theme-knob {
  transform: translateX(30px);
  background: linear-gradient(180deg, #fde047, #f59e0b);
}

@media (max-width: 767px) {
  .mobile-stack {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
