/* Global Styles */
*{
    margin: 0;
    padding: 0;
    font-family: 'Sans Serif';
    box-sizing: border-box;
}
html {
    scroll-padding-top: 80px; /* Match your header height */
    scroll-behavior: smooth;
  }
  
body{
    background: rgb(147, 199, 230);
    color: rgb(6, 6, 66);
    line-height: 1.7;
    scroll-behavior: smooth;
}

/* Header and Navigation */
header {
    background: rgb(6, 6, 66);
    width: 100%;
    color: white;
    padding: 0rem 2rem;
    justify-content: space-between;
    align-items: center;
    top: 0;
    position:sticky;
    z-index: 1000;
}
nav dl {
    display: flex;
    justify-content: center;
}
.left{
    font-size: 1.5rem;
    justify-content: start;
}
nav{
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 80px;
    background-color: rgb(6, 6, 66);
}
nav dl dt{
    margin: 5px 23px;
    margin-top: 15px;
}
nav dl dt a{
   font-size: 1.3rem;
   text-decoration: none;
   color: rgb(240, 235, 229);
}
nav dl dt a:hover{
    text-decoration: wavy;
    color: blue;
 }
 nav dl dt a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -3px;
    background: blue;
    transition: width 0.3s ease;
}
 /* Header and Navigation Ends */


/* Home Section */
.firstsec{
    display: flex;
    justify-content: space-around;
    padding: 80px 0;
    align-items: center;
    /* background-image: url('./Assets/BG1.jpg'); */
    background: linear-gradient(rgba(43, 134, 144, 0.6), rgba(101, 59, 159, 0.6)), url('./Assets/BG1.jpg');
    background-size: cover;
    color: white;
    text-shadow: 5px 2px 3px rgba(0, 0, 0, 0.4);
}
.firstsec > div{ /*its get applied on the first div only*/
    width: 30%;
}
.leftsec{
    font-size: 2.8rem;
    margin-left: 50px;
}
.leftsec .btn{
   margin: 30px 0;
   padding: 12px;
   background: rgb(49, 4, 94);
   border-color: aliceblue;
   border-radius: 10px;
   color: aliceblue;
   font-size: 20px;
   cursor: pointer; 
}
.leftsec .btn:hover{
    background-color: #8f94fb;
    color: #222;
    font-weight: bold;
}
.name{
    color: aqua;
}
.middlesec img {
    width: 280px;
    height: 430px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid #00ffe1;
    box-shadow: 0 0 25px rgba(0, 255, 225, 0.5);
    margin-left: 75px;
}
.rightsec img{
    width: 100%;
}
#element{
    color: black;
    text-shadow:
      3px 2px 5px rgba(211, 136, 136, 0.5),   /* inner dark */
      -2px -2px 10px rgba(55, 149, 54, 0.3);  /* soft light */
}

/* Home Section Ends */


/* About Section */
.abtsection {
    padding: 3rem 6rem;
    text-align:justify;
    background-image: url('./Assets/BG3.jpg');
    color: aliceblue;
}
.abtsection h1{
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 2rem;
    color: #cceeff;
    text-shadow: 2px 2px 8px #000;
}
/* .abtsection h1:hover{
    color: rgb(147, 199, 230);
    text-decoration: underline;
    cursor: pointer;
} */
.abtsection p{
    text-align: center;
    padding: 1rem 0;
    font-size: 1.3rem;
}
/* About Section Ends*/


/* Skills Section */
.skillsection {
    padding: 3rem 2rem;
    background-image: url('./Assets/BG2.png');
    background-size: cover;
    background-position: center;
    color: aliceblue;
}

.skillsection h1 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 2rem;
    color: #cceeff;
    text-shadow: 2px 2px 8px #000;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: auto;
}

.skill-card {
    background-color: #161b22;
    border-left: 7px solid #58a6ff;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 5px 15px 20px rgba(169, 220, 154, 0.4);
    cursor: pointer;
}

.skill-card .icon {
    font-size: 2rem;
    color: #58a6ff;
    margin-top: 3px;
}

.skill-card p {
    margin: 0;
    font-size: 1.5rem;
    color: #e6edf3;
}

.skill-card p span {
    display: inline-block;
    margin-top: 4px;
    font-size: 1.2rem;
    color: #c9d1d9;
}
/* Skills Section ENDS */



/*Education Section Starts*/
.edusection {
    padding: 3rem 4rem;
    text-align:justify;
    background-image: url('./Assets/BG3.jpg');
    color: aliceblue;
}
.edusection h1{
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 2rem;
    color: #cceeff;
    text-shadow: 2px 2px 8px #000;
}
/* .edusection h1:hover{
    color: rgb(147, 199, 230);
    text-decoration: underline;
    cursor: pointer;
} */
.edusection .p1 ul li{
    color: aliceblue;
    text-align: left;
    line-height: 120%;
    padding: 0;
    font-size: 1.2rem;
}
/*education section Ends*/



/* Projects Section Starts */
.projects-container{
    padding: 3rem 6rem;
    background-image: url('./Assets/BG2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.projects-container h1{
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 2rem;
    color: #cceeff;
    text-shadow: 2px 2px 8px #000;
}

/* Card Styling */
.card {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    /* background-color: rgb(114, 18, 18) !important; */
    background-image: url('./Assets/BG4.jpg');
    background-size: cover;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}
.card-body{
    text-align: center;
}
.card-body h4 {
    color: white;
    border-bottom: 2px solid #fff;
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 12px;
    font-weight: 900;
}

/* Card Image */
.card-img-top {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Overlay */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    font-size: 20px;
    background-color: rgba(198, 225, 237, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

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


/* Projects Section Ends */



/* Contact Section Container Starts */
.contact-container {
    padding: 80px 20px;
    background-image: url('./Assets/BG3.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-bottom: 0;
  }
  
.container {
  max-width: 1200px;
  margin: auto;
}

/* Flex row to align both cards */
.row.justify-content-center {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: stretch;
}

/* Contact Card Styling */
.contact-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 30px 40px;
  height: 100%; /* Ensures both cards take up equal space */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Contact Heading Styling */
.contact-heading h4 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1e2a38;
}

.contact-info{
    font-size: 20px;
}

.contact-info i {
  font-size: 1.7rem;
  color: #007bff;
  margin-top: 5px;
}

.contact-info a{
  text-decoration: none;
  color: black;
}
.contact-info a:hover {
  color: #0056b3;
  text-decoration: wavy;
}

/* Form Styling */
.contact-form .form-control {
  border-radius: 12px;
  border: 1px solid #ccc;
  padding: 12px 15px;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.contact-form .form-control:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

/* Submit Button Styling */
.submit-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  width: 100%;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.submit-btn:hover {
  background: #0056b3;
}

/* Contact Section Container Ends */

/* Footer Section Starts */
.container-footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  color: #f1f1f1;
  font-size: 1.2rem;
  margin-top: 50px;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
  border-radius: 40px;
}

.container-footer p {
  margin: 0.5rem 0;
}

/* Footer Section Ends */

/* RESPONSIVE DESIGN */

/* General adjustments for medium devices (Tablets & iPads) */
@media (max-width: 991px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
  }

  nav dl {
    flex-wrap: wrap;
    justify-content: center;
  }

  .firstsec {
    flex-direction: column;
    text-align: center;
    padding: 60px 10px;
  }

  .firstsec > div {
    width: 100%;
    margin: 10px 0;
  }

  .leftsec {
    font-size: 2rem;
    margin-left: 0;
  }

  .middlesec img {
    margin-left: 0;
    width: 200px;
    height: 300px;
  }

  .abtsection,
  .edusection,
  .projects-container {
    padding: 2rem 1rem;
  }

  .skill-card p {
    font-size: 1.2rem;
  }

  .skill-card p span {
    font-size: 1rem;
  }

  .contact-container .col-5 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Small devices (phones) */
@media (max-width: 576px) {
  .leftsec {
    font-size: 1.5rem;
  }

  .leftsec .btn {
    font-size: 16px;
    padding: 10px;
  }

  .abtsection p {
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  .skill-card {
    padding: 1rem;
    gap: 0.5rem;
  }

  .skill-card .icon {
    font-size: 1.5rem;
  }

  .projects-container .row > div {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .card-img-top {
    height: 200px;
  }

  .contact-heading h4 {
    font-size: 20px;
  }

  .contact-info {
    font-size: 16px;
  }

  .submit-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Header improvements for mobile view */
@media (max-width: 576px) {
  header {
    padding: 1rem 1rem;
  }

  nav {
    flex-direction: column;
    align-items: center;
  }

  .left {
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-align: center;
  }

  .right dl {
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  nav dl dt {
    margin: 8px 0;
  }

  nav dl dt a {
    font-size: 1.1rem;
  }
}



.navbar-brand {
  font-family: inherit;
  font-weight: bold;
  color: aqua !important;
}

.nav-link {
  font-size: 1.2rem;
}

.nav-link:hover {
  color: #00ffff !important;
}



/* Hide mobile nav on large screens */
.mobile-nav {
  display: none;
}

/* Show mobile nav and hide desktop nav on screens < 992px */
@media (max-width: 991px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-nav {
    display: block !important;
  }
}

/* Back to Top Button */
#backToTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  border: none;
  outline: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  font-size: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}
#backToTopBtn:hover {
  background-color: #0056b3;
}

/* Extra Large Screen Adjustments */
@media (min-width: 1200px) {
  .leftsec {
    font-size: 3rem;
  }
  .middlesec img {
    width: 300px;
    height: 450px;
  }
}
