/**
 * BYTESAR TECHNOLOGIES - MAIN STYLESHEET
 * AI-First Modern Minimalist Design
 *
 * This file imports all modular CSS files for the redesign
 */

/* =========================================
   DESIGN SYSTEM
   ========================================= */
@import url('variables.css');
@import url('base.css');
@import url('layout.css');
@import url('components.css');
@import url('sections.css');
@import url('animations.css');

/* =========================================
   GOOGLE FONTS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;700&family=Inter:wght@400;500;700&display=swap');

/* =========================================
   TABLER ICONS
   ========================================= */
@import url('../vendor/tabler-icons/tabler-icons.min.css');

/* =========================================
   LEGACY/CUSTOM STYLES
   (Temporary - will be migrated to modular files)
   ========================================= */

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  overflow: hidden;
  background: var(--color-deep-navy);
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid transparent;
  border-top-color: var(--color-electric-blue);
  border-bottom-color: var(--color-electric-blue);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: rotate 1s linear infinite;
}

/* Back to top button (override) */
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 996;
  background: var(--gradient-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--glow-primary);
}

.back-to-top i {
  font-size: 20px;
  color: var(--color-white);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-primary-hover);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/* Header */
#header {
  background: #ffffff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: all 0.5s;
  padding: 15px 0;
}

#header .container {
  max-width: 1400px;
}

#header.header-scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Logo */
#header .logo {
  font-size: 28px;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-heading);
}

#header .logo a {
  color: var(--color-text-primary);
}

#header .logo img {
  max-height: 35px;
  transition: all 0.3s ease;
}

/* Navigation Menu */
.navbar {
  padding: 0;
}

#navbar {
  margin-left: auto;
}

#navbar ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

#navbar ul li {
  position: relative;
}

#navbar ul li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

#navbar ul li a:hover,
#navbar ul li a.active {
  color: var(--color-electric-blue);
}

/* Dropdown Menu */
#navbar .dropdown ul {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 280px;
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 99;
  display: block;
}

#navbar .dropdown:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#navbar .dropdown ul li {
  width: 100%;
}

#navbar .dropdown ul li a {
  padding: 12px 20px;
  font-size: 14px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

#navbar .dropdown ul li a i {
  font-size: 18px;
  color: var(--color-electric-blue);
  opacity: 0.8;
}

#navbar .dropdown ul li a:hover {
  background: var(--color-light-gray);
  color: var(--color-electric-blue);
}

#navbar .dropdown ul li a:hover i {
  opacity: 1;
  transform: scale(1.1);
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  font-size: 28px;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-nav-toggle:hover {
  color: var(--color-electric-blue);
}

/* Mobile Navigation */
@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: block;
  }

  #navbar ul {
    display: none;
  }

  .navbar-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.95);
    z-index: 9999;
    overflow-y: auto;
  }

  #navbar.navbar-mobile ul {
    display: block !important;
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 16px;
    padding: 20px 0;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  #navbar.navbar-mobile ul li {
    width: 100%;
  }

  #navbar.navbar-mobile ul li a {
    padding: 14px 24px;
    font-size: 16px;
  }

  #navbar.navbar-mobile .dropdown ul {
    position: static;
    display: none !important;
    box-shadow: none;
    background: var(--color-light-gray);
    margin: 8px 20px;
    border-radius: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  #navbar.navbar-mobile .dropdown > ul.dropdown-active {
    display: block !important;
  }

  #navbar.navbar-mobile .btn-primary {
    width: calc(100% - 48px);
    margin: 10px 24px;
    justify-content: center;
  }
}

/* Progress Bars */
.progress {
  height: 60px;
  display: block;
  background: var(--color-light-gray);
  border-radius: var(--radius-md);
  overflow: visible;
}

.progress .skill {
  padding: 0;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  display: block;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--color-text-primary);
}

.progress .skill .val {
  float: right;
  font-style: normal;
  color: var(--color-electric-blue);
}

.progress-bar {
  width: 0;
  height: 60px;
  transition: width 1.5s ease;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 600;
}

/* Portfolio/Gallery (Legacy - will be replaced) */
.portfolio-container,
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.portfolio-item,
.gallery-item {
  transition: all var(--transition-base);
}

.portfolio-item.hidden,
.gallery-item.hidden {
  display: none;
}

/* Carousel Styles (for custom carousel.js) */
.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-wrapper {
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-slide {
  flex-shrink: 0;
  width: 100%;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--color-white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.carousel-btn:hover {
  background: var(--color-electric-blue);
  color: var(--color-white);
  box-shadow: var(--glow-primary);
}

.carousel-btn-prev {
  left: 20px;
}

.carousel-btn-next {
  right: 20px;
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-pagination {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

.carousel-pagination-dot.active,
.carousel-pagination-dot:hover {
  background: var(--color-electric-blue);
  transform: scale(1.2);
}

/* =========================================
   RESPONSIVE OVERRIDES
   ========================================= */

@media (max-width: 768px) {
  #header .logo {
    font-size: 24px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .carousel-btn-prev {
    left: 10px;
  }

  .carousel-btn-next {
    right: 10px;
  }
}
