/* Enhanced styles for Dilip Das Portfolio */

/* General Enhancements */
:root {
  --primary-color: #0056b3;
  --secondary-color: #537895;
  --accent-color: #A890FE;
  --text-color: #212529;
  --light-bg: #f8f9fa;
  --dark-bg: #343a40;
  --transition-speed: 0.3s;
}

body {
  scroll-behavior: smooth;
}

/* Enhanced Button Styles */
.btn-d {
  display: inline-block;
  padding: 10px 25px;
}

/* Profile image hover effects */
.profile-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  cursor: pointer;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.profile-img {
  transition: transform 0.5s ease;
}

.profile-img-wrapper:hover .profile-img {
  transform: scale(1.05);
}

.profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 86, 179, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.profile-img-wrapper:hover .profile-overlay {
  opacity: 1;
}

.profile-text {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.profile-img-wrapper:hover .profile-text {
  transform: translateY(0);
}

/* Timeline styles for experience and education */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-dot {
  position: absolute;
  left: -30px;
  top: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #0056b3;
  border: 3px solid white;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

.timeline-content {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.timeline-date {
  color: #6c757d;
  font-size: 0.9rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: rgba(0, 86, 179, 0.2);
}

/* Service cards with tilt effect */
.service-card {
  background-color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Modern Service Cards with Flip Effect */
.service-card-modern {
  background-color: transparent;
  perspective: 1000px;
  height: 100%;
  min-height: 320px;
  cursor: pointer;
}

.service-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
}

.service-card-modern:hover .service-card-inner {
  transform: rotateY(180deg);
}

.service-card-front, .service-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.service-card-front {
  background: white;
  color: var(--text-color);
}

.service-card-back {
  background: var(--primary-color);
  color: white;
  transform: rotateY(180deg);
}

.service-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 86, 179, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.service-icon-circle i {
  font-size: 2rem;
  color: var(--primary-color);
}

.service-card-modern:hover .service-icon-circle {
  transform: scale(1.1);
}

.service-card-back ul li {
  text-align: left;
  font-size: 0.9rem;
}

.service-card-back .btn {
  transition: all 0.3s ease;
}

.service-card-back .btn:hover {
  transform: scale(1.05);
}

/* Tab styling */
.nav-tabs .nav-link {
  color: #495057;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
  color: #0056b3;
  background-color: transparent;
  border-bottom: 2px solid #0056b3;
}

.nav-tabs .nav-link:hover {
  border-color: transparent;
  color: #0056b3;
}

/* Counter box */
.counter-box {
  transition: transform 0.3s ease;
}

.counter-box:hover {
  transform: translateY(-5px);
}

/* Typing text animation */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #0056b3 }
}

/* Spin animation for profile border */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-d {
  background: var(--primary-color);
  color: white;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed) ease;
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-d:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Navigation Enhancements */
.navbar {
  transition: all 0.4s ease;
}

.navbar-scrolled {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.nav-link {
  position: relative;
  transition: all var(--transition-speed) ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: white;
  transition: width var(--transition-speed) ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section Enhancements */
#home-hero-section {
  position: relative;
  overflow: hidden;
}

#hero {
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/pattern.svg');
  opacity: 0.05;
  pointer-events: none;
}

#home-hero-heading {
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #0056b3, #A890FE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* About Section Enhancements */
#about img.rounded-circle {
  border: 5px solid white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed) ease;
}

#about img.rounded-circle:hover {
  transform: scale(1.05);
}

.skill-badge {
  transition: all var(--transition-speed) ease;
  cursor: default;
}

.skill-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* Services Section Enhancements */
.service-card {
  transition: all var(--transition-speed) ease;
  cursor: pointer;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-card i {
  transition: all var(--transition-speed) ease;
}

.service-card:hover i {
  transform: scale(1.2);
}

/* Projects Section Enhancements */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-speed) ease;
  cursor: pointer;
}

.project-card img {
  transition: all var(--transition-speed) ease;
  width: 100%;
  border-radius: 8px;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  opacity: 0;
  transition: all var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: white;
  border-radius: 8px;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

/* Contact Form Enhancements */
.modern-form__form-control--textarea {
  min-height: 150px;
  resize: vertical;
}

.form-control:focus {
  box-shadow: none;
  border-color: var(--primary-color);
}

.line-box .line {
  height: 2px;
  width: 0;
  background: var(--primary-color);
  transition: all var(--transition-speed) ease;
}

.form-control:focus + .line-box .line {
  width: 100%;
}

.submit-now {
  min-width: 150px;
}

/* Form validation feedback */
.form-control.is-valid {
  border-color: #28a745;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Footer Enhancements */
footer {
  position: relative;
}

.social-icons {
  margin-bottom: 1rem;
}

.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  margin: 0 5px;
  transition: all var(--transition-speed) ease;
}

.social-icons a:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) ease;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

/* Loading Spinner */
.spinner {
  display: none;
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* Media Queries */
@media (max-width: 768px) {
  #home-hero-heading {
    font-size: 2.5rem;
  }
  
  .social-icons a {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 576px) {
  .btn-d {
    padding: 8px 20px;
  }
  
  #home-hero-heading {
    font-size: 2rem;
  }
}
