/*
 * Custom CSS for kuncik.dev
 * Author: Dominic Kuncik
 * Date: August 2025
 */

:root {
  --transition-speed: 0.3s;
}

/* Global Styles */
body {
  transition: background-color var(--transition-speed), color var(--transition-speed);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}

.text-gradient {
  background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.navbar {
  transition: background-color var(--transition-speed), backdrop-filter var(--transition-speed);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1030; /* Ensure navbar stays above other content */
}

/* Light mode navbar styling */
[data-bs-theme="light"] .navbar {
  background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
}

/* Dark mode navbar styling */
[data-bs-theme="dark"] .navbar {
  background-color: rgba(33, 37, 41, 0.85); /* Semi-transparent dark background */
}

/* Ensure hamburger menu has proper background in collapsed state */
.navbar-collapse {
  border-radius: 0 0 0.5rem 0.5rem;
  transition: all var(--transition-speed);
  padding-bottom: 0.5rem; /* Add padding at bottom */
}

/* Adjust collapsed menu position on mobile */
@media (max-width: 992px) {
  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    margin-top: 0.5rem; /* Shift dropdown menu down slightly */
  }
}



.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-link {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--bs-primary);
}

/* Card styling */
.card {
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 0.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Project tech badges */
.tech-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Timeline for About page */
.timeline {
  position: relative;
  padding-left: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--bs-primary);
}

/* Pulsate animation for timeline dots */
@keyframes pulsate {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.7);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(var(--bs-primary-rgb), 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0);
  }
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 2rem; /* Space for content after the circle */
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.4rem; /* Your fix - perfect alignment with the line */
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--bs-primary);
  z-index: 1;
  box-sizing: border-box; /* Ensure the border doesn't change the element size */
  animation: pulsate 2s infinite ease-in-out; /* Apply the pulsate animation */
}

/* Handle border color based on theme */
[data-bs-theme="light"] .timeline-item::before {
  border: 2px solid white;
}

[data-bs-theme="dark"] .timeline-item::before {
  border: 2px solid var(--bs-body-bg); /* Using background color for dark mode border */
}

/* Material Icons Styling */
.material-symbols-outlined {
  vertical-align: middle;
  line-height: 1;
}

/* Theme Toggle */
.theme-toggle {
  cursor: pointer;
}

/* Footer */
footer {
  padding: 2rem 0;
  margin-top: auto;
}

/* Contact Form */
.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Accessibility - Focus Styles */
a:focus, button:focus, input:focus, textarea:focus, select:focus,
.form-control:focus, .btn:focus, .nav-link:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item::before {
    left: -1.8rem;
    width: 0.75rem;
    height: 0.75rem;
  }
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] .card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Profile image styling */
.profile-image {
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.profile-image:hover {
  transform: scale(1.02);
}

/* Animation for CTA buttons */
.btn-cta {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-cta::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  transition: height 0.3s;
  z-index: -1;
}

.btn-cta:hover::after {
  height: 100%;
}

/* 404 page styling */
.error-404 {
  font-size: 6rem;
  font-weight: 700;
}

@media (max-width: 576px) {
  .error-404 {
    font-size: 4rem;
  }
}
