/* Modern Portfolio Styling */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Theme colors */
  --bg-primary: #1a1a2e;
  --bg-secondary: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-text: #2d3748;
}

[data-theme="light"] {
  --bg-primary: #f5f7fa;
  --bg-secondary: rgba(0, 0, 0, 0.03);
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --card-bg: #ffffff;
  --card-text: #2d3748;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Full Background */
body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background-image: url(./images/bi-large.jpg);
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-color: var(--bg-primary);
  margin: 0;
  overflow-x: hidden;
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

/* Navigation Bar */
.navbar {
  background: transparent;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.navbar-scrolled {
  background: rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  margin: 0 10px;
  position: relative;
  transition: var(--transition-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.btn-theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  margin-left: 10px;
}

.btn-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(180deg);
}

/* Video as background */
video {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.5);
}

/* Hero Section */
.hero-section {
  padding: 140px 20px 60px;
  margin-top: 0;
  position: relative;
  animation: fadeInDown 1s ease-out;
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  animation: gradientShift 3s ease infinite;
}

.gradient-text-alt {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.portfolio-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 12px 32px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.portfolio-badge:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about-section {
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 60px 40px;
  margin: 40px 0;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.stats-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Skills Section */
.skills-section {
  padding: 40px 0;
}

.skill-card {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  height: 100%;
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-hover-shadow);
}

.skill-icon {
  font-size: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
}

.skill-card h5 {
  color: var(--card-text);
  font-weight: 600;
  margin-bottom: 20px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.skill-tag {
  background: var(--primary-gradient);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Search and Filter */
.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 1.2rem;
}

.search-input {
  padding: 12px 12px 12px 45px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.15);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
}

/* Tech Tags on Cards */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}


/* For mobile devices */
@media only screen and (max-width: 767px) {
  body {
    /* The file size of this background image is 93% smaller
     * to improve page load speed on mobile internet connections */
    background-image: url(./images/bi-small.jpg);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .portfolio-badge {
    font-size: 1.2rem;
    padding: 10px 24px;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .card-img-wrapper {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .social-buttons .btn {
    margin-bottom: 15px;
    width: 100%;
    max-width: 300px;
  }
}



/* Cards Styling */
.project-item {
  transition: var(--transition-smooth);
  opacity: 1;
  transform: scale(1);
}

.project-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  transform: translateY(0);
  animation: fadeInUp 0.6s ease-out backwards;
}

.project-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(102, 126, 234, 0.5);
}

.card-img-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-img-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
  opacity: 0;
  transition: var(--transition-smooth);
}

.project-card:hover .card-img-wrapper::after {
  opacity: 1;
}

.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  opacity: 0;
}

.card-img-top.loaded {
  opacity: 1;
}

.project-card:hover .card-img-top {
  transform: scale(1.1);
}

.card-body {
  padding: 25px;
  background: linear-gradient(180deg, var(--card-bg) 0%, var(--card-bg) 100%);
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--card-text);
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 10px;
}

.card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
  transition: var(--transition-smooth);
}

.project-card:hover .card-title::after {
  width: 60px;
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

[data-theme="light"] .card-text {
  color: #4a5568;
}

.btn-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  color: #fff;
}

/* Contact Section */
.contact-section {
  padding: 60px 0;
}

.contact-card {
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 50px 40px;
  box-shadow: var(--card-shadow);
}

.contact-intro {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-smooth);
  min-width: 120px;
}

.contact-link:hover {
  transform: translateY(-10px);
  background: rgba(102, 126, 234, 0.2);
  color: var(--text-primary);
}

.contact-link i {
  font-size: 2.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-link span {
  font-weight: 600;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Social media links / Footer */
.social-buttons {
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-text {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}

.footer-subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0%, 100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(20deg);
  }
}

/* Stagger animation for cards */
.col:nth-child(1) .project-card { animation-delay: 0.1s; }
.col:nth-child(2) .project-card { animation-delay: 0.2s; }
.col:nth-child(3) .project-card { animation-delay: 0.3s; }
.col:nth-child(4) .project-card { animation-delay: 0.4s; }
.col:nth-child(5) .project-card { animation-delay: 0.5s; }
.col:nth-child(6) .project-card { animation-delay: 0.6s; }
.col:nth-child(7) .project-card { animation-delay: 0.7s; }
.col:nth-child(8) .project-card { animation-delay: 0.8s; }
.col:nth-child(9) .project-card { animation-delay: 0.9s; }

/* Mobile responsiveness */
@media only screen and (max-width: 767px) {
  body {
    background-image: url(./images/bi-small.jpg);
  }
  
  .hero-section {
    padding: 120px 20px 40px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .portfolio-badge {
    font-size: 1.2rem;
    padding: 10px 24px;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .card-img-wrapper {
    height: 180px;
  }
  
  .about-section {
    padding: 40px 20px;
  }
  
  .stats-container {
    justify-content: center;
  }
  
  .filter-buttons {
    justify-content: center;
  }
  
  .filter-btn {
    font-size: 0.85rem;
    padding: 8px 16px;
  }
  
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .contact-links {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .social-buttons .btn {
    margin-bottom: 15px;
    width: 100%;
    max-width: 300px;
  }
}

/* Footer styling */
#page-container {
  position: relative;
  min-height: 100vh;
}

#content-wrap {
  padding-bottom: 120px;
}

#footer {
  position: relative;
  bottom: 0;
  width: 100%;
  margin-top: 60px;
}

/* Scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Light theme adjustments */
[data-theme="light"] {
  color: #2d3748;
}

[data-theme="light"] video {
  filter: brightness(0.8);
}

[data-theme="light"] .navbar-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="light"] .search-input {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .search-input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .filter-btn {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .about-section,
[data-theme="light"] .contact-card {
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .portfolio-badge,
[data-theme="light"] .contact-link {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
}

[data-theme="light"] .search-icon {
  color: #666;
}
