/* =========================================================
   LAVANYA CHANDRAN – PORTFOLIO STYLESHEET
   UI / Full Stack Development | SEO | Digital Marketing
   ========================================================= */

* {
  font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  color: #212529;
  overflow-x: hidden;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  position: relative;
}

.section-title:before {
  content: "";
  position: absolute;
  display: block;
  width: 10rem;
  height: 0.0625rem;
  background: color-mix(in srgb, #212529e8, transparent 60%);
  left: 0;
  right: 0;
  bottom: 0.0625rem;
  margin: auto;
}

.section-title::after {
  content: "";
  position: absolute;
  display: block;
  width: 3.75rem;
  height: 0.1875rem;
  background: #212529e8;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.cursor-pointer {
  cursor: pointer;
}

.navbar-dark,
.bg-dark,
.bg-dark-theme {
  background-color: #212529e8 !important;
}

.bg-light-theme {
  background-color: #afb3b7 !important;
}

.navbar {
  z-index: 1030;
}

.navbar-nav .nav-link {
  font-weight: normal;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  opacity: 1;
}

/* Hero Section */
#hero {
  background: linear-gradient(135deg, #2c2c2c, #1e1e1e);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: #fff;
  min-height: 100vh;
  display: flex;
  width: 100%;
  text-shadow: 0.0625rem 0.0625rem 0.25rem rgba(0, 0, 0, 0.5);
  align-items: center;
}

/* Animated background */
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Full-screen carousel */
#portfolioCarousel,
#portfolioCarousel .carousel-inner,
#portfolioCarousel .carousel-item {
  min-height: 100vh;
  width: 100%;
}

#portfolioCarousel .carousel-item .container-fluid {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.carousel-caption-custom {
  z-index: 2;
}

/* Hero and carousel images */
.carousel img {
  max-width: 18.75rem;
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0.625rem 1.25rem rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.w-fit {
  width: fit-content;
}

/* About section */
#about .about-img {
  animation: profile_animate 8s ease-in-out 1s infinite;
  background-image: url("../images/aboutme.jpg");
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 0.625rem #1c0f0f4d;
  filter: grayscale(100%);
  height: 18rem;
  width: 18rem;
  max-width: 100%;
  justify-self: center;
  align-self: center;
  margin: 0 auto;
}

@keyframes profile_animate {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25% { border-radius: 40% 70% 20% 50% / 40% 50% 70% 70%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* General card polish */
.card {
  overflow-wrap: anywhere;
}

.card img {
  object-fit: cover;
}

/* Projects */
#projects .project-item {
  position: relative;
  cursor: pointer;
  height: 15rem;
  overflow: hidden;
}

#projects .project-item > img {
  width: 100%;
  object-fit: cover;
}

#projects .project-item .card-menu {
  display: none;
}

#projects .project-item:hover .card-menu,
#projects .project-item:focus-within .card-menu {
  display: flex;
  background: rgba(0, 0, 0, 0.58);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  color: white;
}

/* Qualifications */
#qualifications .card-align {
  top: -0.75rem !important;
}

#qualifications .fade:not(.show) {
  display: none;
}

#qualifications .nav-pills .nav-link.active {
  color: #000 !important;
  margin: 0.5rem !important;
  text-align: center;
  padding: 0.5rem 1.5rem;
}

#qualifications .nav-pills .nav-link {
  color: #35383cd9 !important;
  background-color: #fff !important;
  border: 0;
  text-align: center;
  margin: 0.5rem !important;
  padding: 0.5rem 1.5rem;
  border-radius: 6.25rem !important;
}

#qualifications .timeline {
  position: relative;
  margin: 0 auto;
  padding: 0.3125rem 0;
  width: 100%;
  max-width: 56.25rem;
}

#qualifications .timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 3.125rem;
  bottom: 0;
  width: 0.125rem;
  background: #000;
  transform: translateX(-50%);
}

#qualifications .timeline-item {
  position: relative;
  width: 50%;
  padding: 1.215rem 1.875rem;
}

#qualifications .timeline-item::before {
  content: '';
  position: absolute;
  top: 1.875rem;
  width: 0.9375rem;
  height: 0.9375rem;
  background: #000;
  border-radius: 50%;
  z-index: 1;
}

#qualifications .timeline-item.left {
  left: 0;
  text-align: right;
}

#qualifications .timeline-item.left::before {
  right: -0.5rem;
}

#qualifications .timeline-item.right {
  left: 50%;
  text-align: left;
}

#qualifications .timeline-item.right::before {
  left: -0.5rem;
}

#qualifications .timeline-content {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid #ccc;
}

#qualifications .timeline-title {
  font-weight: 600;
  font-size: 1.1rem;
}

#qualifications .timeline-subtitle {
  margin-bottom: 0.25rem;
  color: #555;
}

#qualifications .timeline-date {
  font-size: 0.85rem;
  color: #888;
}

/* Skills */
#skills .card {
  min-height: 22rem;
  display: flex;
  flex-direction: column;
}

#skills .skill-icon {
  margin-right: 0.25rem;
  color: #000;
}

#skills .progress-bar {
  border-radius: 0.625rem;
}

#skills .progress {
  height: 1rem;
  border: 1px solid #afb3b7 !important;
}

/* Contact */
.contact .info-item + .info-item {
  margin-top: 2.5rem;
}

.social-links .info-item i,
.contact .info-item i {
  color: #212529e8;
  background: color-mix(in srgb, #212529e8, transparent 92%);
  font-size: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 3.125rem;
  transition: all 0.3s ease-in-out;
  margin-right: 0.9375rem;
}

.contact .info-item h3 {
  padding: 0;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.3125rem;
}

.contact .info-item p a {
  padding: 0;
  color: #000;
  margin-bottom: 0;
  text-decoration: none;
  font-size: 0.875rem;
}

.social-links .info-item:hover i,
.contact .info-item:hover i {
  background: #212529e8;
  color: #fff;
}

.contact .contact-form {
  height: 100%;
}

.contact .contact-form input[type="text"],
.contact .contact-form input[type="email"],
.contact .contact-form input[type="tel"],
.contact .contact-form textarea {
  font-size: 0.875rem;
  padding: 0.625rem 1rem;
  box-shadow: none;
  border-radius: 0;
  color: #212529e8;
  background-color: color-mix(in srgb, #fff, transparent 50%);
  border-color: color-mix(in srgb, #212529e8, transparent 80%);
}

.contact .contact-form input[type="text"]:focus,
.contact .contact-form input[type="email"]:focus,
.contact .contact-form input[type="tel"]:focus,
.contact .contact-form textarea:focus {
  border-color: #212529e8;
}

.contact .contact-form input[type="text"]::placeholder,
.contact .contact-form input[type="email"]::placeholder,
.contact .contact-form input[type="tel"]::placeholder,
.contact .contact-form textarea::placeholder {
  color: color-mix(in srgb, #212529e8, transparent 70%);
}

.contact .contact-form button[type="submit"] {
  color: #fff;
  background: #212529e8;
  border: 0;
  padding: 0.625rem 1.875rem;
  transition: 0.4s;
  border-radius: 3.125rem;
}

.contact .contact-form button[type="submit"]:hover {
  background: color-mix(in srgb, #212529e8, transparent 25%);
}

/* Digital Marketing & SEO */
#digital-marketing .card {
  height: 100%;
  border-radius: 0.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#digital-marketing .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.10) !important;
}

#digital-marketing .card i {
  color: #212529e8;
}

#digital-marketing .card h5 {
  line-height: 1.4;
}

#digital-marketing p {
  line-height: 1.7;
}

#digital-marketing .digital-project-image {
  display: block;
  width: 100%;
  height: 15rem;
  object-fit: cover;
  object-position: top center;
  background: #f1f3f5;
}

#digital-marketing .badge {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Footer */
footer a {
  transition: opacity 0.2s ease;
}

footer a:hover {
  opacity: 0.75;
}

/* Accessibility: reduce motion when requested */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Tablet and mobile */
@media (max-width: 768px) {
  #skills .card {
    min-height: 25rem;
  }

  #qualifications .timeline::before {
    left: 1.45rem !important;
  }

  #qualifications .timeline-item {
    width: 100%;
    padding-left: 3.125rem;
    padding-right: 0.75rem;
    text-align: left !important;
  }

  #qualifications .timeline-item.left,
  #qualifications .timeline-item.right {
    left: 0 !important;
  }

  #qualifications .timeline-item::before {
    left: 1rem !important;
    right: auto !important;
  }

  #portfolioCarousel .carousel-item .container-fluid {
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  #hero,
  #portfolioCarousel,
  #portfolioCarousel .carousel-inner,
  #portfolioCarousel .carousel-item,
  #portfolioCarousel .carousel-item .container-fluid {
    min-height: 100vh;
    height: auto;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.65rem;
  }

  .navbar {
    min-height: 3.5rem;
    background: #212529e8;
  }

  #hero .col-12.p-5 {
    padding: 5rem 1.25rem 2rem !important;
  }

  #hero h1 {
    font-size: 2.15rem;
  }

  #about .about-img {
    width: 15rem;
    height: 15rem;
  }

  #digital-marketing .digital-project-image {
    height: 12rem;
  }

  #digital-marketing .btn {
    width: 100%;
  }

  #qualifications .nav-pills .nav-link {
    margin: 0.25rem !important;
    padding: 0.45rem 0.85rem;
  }
}
