:root {
  --bg: #0f1115;
  --text: #ffffff;
  --accent: #0d6efd;
}

[data-theme="light"] {
  --bg: #f4f6f8;
  --text: #111111;
}

body {
  background: var(--bg);
  color: var(--text);
}

.bg-image {
  position: fixed;
  inset: 0;
  background: url('../img/bg.webp') center/cover no-repeat;
  z-index: -3;
  filter: blur(0px);
  transform: scale(1.05);
}

.bg-image {
  animation: slowZoom 30s infinite alternate ease-in-out;
}

@keyframes slowZoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.1); }
}

.bg-fade {
  position: fixed;
  inset: 0;
  z-index: -2;
  backdrop-filter: blur(12px);
}

canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background .3s ease, border .3s ease;
}

/* Improve mobile spacing */
/*.section {
  padding: 100px 0;
}*/

.section {
  padding: 100px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: all .8s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 992px) {

  .section {
    padding: 80px 20px;
  }

  .terminal-section {
    padding: 120px 20px 60px 20px;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-content {
    margin-right: 10px;
  }

  .skill {
    padding: 0 5px;
  }

}

h2 {
  margin-bottom:40px;
  border-left:4px solid var(--accent);
  padding-left:15px;
}

.progress {
  height:8px;
  margin-bottom:30px;
}

.progress-bar {
  width:0;
  background:var(--accent);
  transition:width 1.5s ease;
}

.timeline {
  position:relative;
  padding-left:30px;
  border-left:2px solid var(--accent);
}

.timeline-item {
  margin-bottom:40px;
  opacity:0;
  transform:translateY(20px);
  transition:all .6s ease;
}

.timeline-item.visible {
  opacity:1;
  transform:translateY(0);
}

.timeline-content {
  padding:20px;
  border-radius:8px;
}

/*[data-theme="light"] {
  --bg-dark: #f4f6f8;
  --text-dark: #111;
}*/

[data-theme="dark"] .bg-fade {
  background: rgba(0,0,0,0.75);
}

[data-theme="light"] .bg-fade {
  background: rgba(255,255,255,0.75);
}

[data-theme="light"] .glass {
  background: rgba(255,255,255,0.6);
  border:1px solid rgba(0,0,0,0.1);
}

.terminal-section {
  min-height: 100vh;
  padding-top: 0px; /* pushes content below navbar */
  display: flex;
  align-items: center;
}

/*.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: background .3s ease, border .3s ease;
}

[data-theme="light"] .glass {
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}*/

/*.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: background .3s ease, border .3s ease;
}

[data-theme="light"] .glass {
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}*/

.btn-primary {
  background: var(--accent);
  border: none;
  transition: all .3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(13,110,253,0.4);
}

/*.navbar {
  backdrop-filter: blur(18px);
  background: rgba(255,255,255,0.08) !important;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: background .3s ease;
}

[data-theme="light"] .navbar {
  background: rgba(255,255,255,0.6) !important;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}*/

.navbar .btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  transition: all .3s ease;
}

.navbar .btn:hover {
  background: var(--text);
  color: var(--bg);
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text);
}

#terminal.typing-complete::after {
  content: " _";
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

@media (max-width: 576px) {

  h2 {
    font-size: 1.5rem;
  }

  #terminal {
    font-size: 0.85rem;
  }

  .progress {
    height: 6px;
  }

}

#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {

  * {
    animation: none !important;
    transition: none !important;
  }

}