:root {
    --main: #0d6efd;
    --main-bg: #212529
}

html {
    scroll-behavior: smooth;
}

/* Basic Styling */
body {
    padding-top: 56px; /* Adjusts for fixed navbar */
}

.section {
    padding: 80px 0;
    min-height: 95vh;
}

.section h2 {
    margin-bottom: 20px;
}

.section div p strong {
    color: var(--main);
}

#about .container,
#contact .container {
    max-width: 900px; /* Set a fixed width for the text block */
    margin: 0 auto; /* Center align the block */
    text-align: justify; /* Ensures text is centered */
}

#about .container p {
    text-align: justify;
    line-height: 1.6; /* Increases spacing between lines */
}

/* Change navbar link color on hover */

.navbar-nav .nav-item {
    margin-right: 25px; /* Adds space between menu items */
}

.navbar-nav .nav-link:hover {
    color: var(--main); /* Change to your preferred hover color */
}

#home {
    background-color: var(--main);
}

#homediv {
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-items: center;
    align-items: center;
    height: 80%;
    gap: 10px;
}

.hometext, .socialicons {
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.hometext {
    margin-top: 100px;
    margin-bottom: 100px;
    transform: translateX(-100px);
}

.socialicons {
    display: flex;
    flex-direction: row; /* Ensure icons are in a row */
    justify-content: center; /* Centers the icons horizontally */
    align-items: center; /* Aligns icons properly */
    gap: 75px; /* Space between icons */
    margin-top: 20px; /* Adds some spacing from the text */
    transform: translateX(100px);
}

.socialicon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: 0;
    padding: 0;
    transition: transform 0.3s ease-in-out;
}

.socialicon:hover {
    transform: scale(1.3); /* Slight zoom effect on hover */
}

.socialicon svg {
    display: block;
    width: 64px; /* Adjust icon size */
    height: 64px;
    color: white;
}

#homediv h1 {
    margin-bottom: 20px;
    font-size: 60px;
}

#homediv p {
    font-size: 26px;
}

/* When the element is visible, animate it */
.hometext.show {
    opacity: 1;
    transform: translateX(0);
}

.socialicons.show {
    opacity: 1;
    transform: translateX(0);
}

/* Scroll To Top Button */
#scrollToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px; /* Set a fixed width */
    height: 50px; /* Set a fixed height */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; /* Remove Bootstrap padding */
}

#scrollToTop svg {
    padding-bottom: 2px;
}

/* Default style for navbar links */
.navbar-nav .nav-link {
    position: relative;
    color: white; /* Default text color */
    transition: color 0.3s ease-in-out;
}

/* Active link style with bottom border */
.navbar-nav .nav-item.active .nav-link {
    color: var(--main) !important; /* Change text color */
}

.navbar-nav .nav-item.active .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px; /* Adjust thickness */
    width: 100%;
    height: 3px;
    background-color: var(--main); /* Change to your preferred active color */
    transition: width 0.3s ease-in-out;
}

.resume-title {
    font-size: 26px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 20px;
    color: black;
}
.resume-item {
    padding: 0 0 20px 20px;
    margin-top: -2px;
    border-left: 2px solid var(--main);
    position: relative;
}

.resume-item h4 {
    line-height: 18px;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    font-family: "Poppins", sans-serif;
    color: var(--main);
    margin-bottom: 10px;
}

.resume-item h5 {
    font-size: 16px;
    background: var(--main-bg);
    padding: 5px 15px;
    display: inline-block;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
    border-radius: 5px;
}

.resume-item ul {
    padding-left: 20px;
}

.resume-item ul li {
    padding-bottom: 10px;
}

.resume-item:last-child {
    padding-bottom: 0;
}

/* Triangle using Border */
.resume-item::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 18px solid var(--main); /* Triangle Color */
    left: -13px; /* Adjust position */
    top: -1px;
}

/* Optional: Make the triangle rounded */
.resume-item::before {
    border-radius: 3px; /* Add slight rounding */
}

/* Initial hidden state */
.resume-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Slide-in from left (for Education) */
.education .resume-item {
    transform: translateX(-100px);
}

/* Slide-in from right (for Professional Experience) */
.professional .resume-item {
    transform: translateX(100px);
}

/* When visible, animate */
.resume-item.show {
    opacity: 1;
    transform: translateX(0);
}

/* From Uiverse.io by vinodjangid07 */ 
.Btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: rgb(27, 27, 27);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition-duration: .3s;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.11);
  }
  
  .svgIcon {
    fill: white;
  }
  
  .icon2 {
    width: 18px;
    height: 5px;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
  }
  
  .tooltip {
    position: absolute;
    right: -105px;
    opacity: 0;
    background-color: var(--main-bg);
    color: var(--main);
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-duration: .2s;
    pointer-events: none;
    letter-spacing: 0.5px;
  }
  
  .tooltip::before {
    position: absolute;
    content: "";
    width: 10px;
    height: 10px;
    background-color: var(--main-bg);
    background-size: 1000%;
    background-position: center;
    transform: rotate(45deg);
    left: -5%;
    transition-duration: .3s;
  }
  
  .Btn:hover .tooltip {
    opacity: 1;
    transition-duration: .3s;
  }
  
  .Btn:hover {
    background-color: var(--main-bg);
    transition-duration: .3s;
  }
  
  .Btn:hover .icon2 {
    border-bottom: 2px solid var(--main);
    border-left: 2px solid var(--main);
    border-right: 2px solid var(--main);
  }
  
  .Btn:hover .svgIcon {
    fill: var(--main);
    animation: slide-in-top 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
  }
  
  @keyframes slide-in-top {
    0% {
      transform: translateY(-10px);
      opacity: 0;
    }
  
    100% {
      transform: translateY(0px);
      opacity: 1;
    }
  }
  
.DownloadButton {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.flip-card {
    width: 608px; /* Let it expand within grid */
    height: 380px; /* Adjust height */
    perspective: 1000px;
    font-family: sans-serif;
}

.container.flip-card-grid {
    display: grid;
    grid-template-columns: auto; /* 2 columns */
    gap: 90px; /* Space between cards */
    justify-content: center;
    align-items: center;
    max-width: 1000px; /* Limit width to keep it structured */
    margin: auto; /* Center align grid */
    margin-top: 110px;
    margin-bottom: 20px;
}
  
.title {
    font-size: 1.5em;
    text-align: center;
    margin: 0;
}
  
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 1s;
    transform-style: preserve-3d;
}
  
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

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

.flip-card-front {
    align-items: center;
}

.card1 {
    width: 100%;  /* Make the image fill the width */
    height: 100%; /* Make the image fill the height */
    background: url('assets/Project1SS.jpg') center/cover no-repeat;
}

.card2 {
    width: 100%;  /* Make the image fill the width */
    height: 100%; /* Make the image fill the height */
    background: url('assets/Project2SS.jpg') center/cover no-repeat;
}

.flip-card-back {
    background: linear-gradient(120deg, var(--main-bg) 30%, var(--main-bg) 88%,
        var(--main) 40%, var(--main) 78%);
    color: white;
    transform: rotateY(180deg);
}

.flip-card-back a {
    text-decoration: none;
    color: var(--main);
}

@media screen and (max-width: 768px) {
    #about .container {
        width: 90%; /* Expands on small screens */
    }

    #contact div p {
        text-align: justify !important;
    }

    .form-group {
        flex-direction: column;
        width: auto; /* Ensures a reasonable width */
        justify-content: center;
        align-items: center; /* Centers inputs */
        gap: 0px;
    }
    input, textarea {
        width: 95%; /* Makes sure inputs expand properly */
    }
}

.form-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.form-group-2 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

input, textarea {
    background: #1e1e1e;
    color: white;
    border: 1px solid #555;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    height: 50px;
    min-width: 25%;
}

.subinp {
    min-width: calc(50% + 10px);
}

textarea {
    height: 350px;
    min-width: calc(50% + 10px);
}

.formbutton {
    background: var(--main-bg);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    min-width: 20%;
    transition: color 0.2s ease-in-out;
}

.formbutton:hover {
    color: var(--main);
}

#contact div p {
    text-align: center;
    line-height: 1.6;
}

.wrapper {
    display: flex;
    width: 90%;
    max-width: 1236px;
    margin-inline: auto;
    position: relative;
    height: 100px;
    margin-top: 5rem;
    overflow: hidden;
    mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0),
      rgba(0, 0, 0, 1) 20%,
      rgba(0, 0, 0, 1) 80%,
      rgba(0, 0, 0, 0)
    );
  }
  
  @keyframes scrollLeft {
    to {
      left: -200px;
    }
  }
  
  .item {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    position: absolute;
    left: max(calc(200px * 8), 100%);
    animation-name: scrollLeft;
    animation-duration: 30s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }

  .item img {
    width: 100px;
    height: 100px;
    object-fit: contain; /* Ensures full image fits */
}
  
.item1 {
    animation-delay: calc(30s / 12 * (12 - 1) * -1);
}

.item2 {
    animation-delay: calc(30s / 12 * (12 - 2) * -1);
}

.item3 {
    animation-delay: calc(30s / 12 * (12 - 3) * -1);
}

.item4 {
    animation-delay: calc(30s / 12 * (12 - 4) * -1);
}

.item5 {
    animation-delay: calc(30s / 12 * (12 - 5) * -1);
}

.item6 {
    animation-delay: calc(30s / 12 * (12 - 6) * -1);
}

.item7 {
    animation-delay: calc(30s / 12 * (12 - 7) * -1);
}

.item8 {
    animation-delay: calc(30s / 12 * (12 - 8) * -1);
}

.item9 {
    animation-delay: calc(30s / 12 * (12 - 9) * -1);
}

.item10 {
    animation-delay: calc(30s / 12 * (12 - 10) * -1);
}

.item11 {
    animation-delay: calc(30s / 12 * (12 - 11) * -1);
}

.item12 {
    animation-delay: calc(30s / 12 * (12 - 12) * -1);
}