@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Quicksand:wght@300..700&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Quicksand:wght@300..700&family=Raleway:ital,wght@0,100..900;1,100..900&family=Special+Gothic+Expanded+One&display=swap');

/* Reset & base styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}

#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: #1b1b1b;
}

#vanta-bg1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    filter: blur(1.5px);
}

body > * {
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    padding-top: 1em;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    font-size: 1.5em;
}

nav ul li {
    margin: 0 0.5em;
    padding: .3em 1em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.025));
    border-top: 1px solid rgba(255, 255, 255, 0.75);
    border-bottom: none;
    color: rgba(255, 255, 255, 0.9);
}

nav ul li:hover {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.01));
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.75);
    color: rgba(255, 255, 255, 0.9);
}

nav ul li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
}

nav ul li a:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
}

/* Headings */
#index_name {
    text-align: center;
    margin-top: 1em;
    margin-bottom: 0.05em;
    font-size: 7em;
    color: rgba(255, 255, 255, 0.9);
    font-family: "Michroma", sans-serif;
    font-weight: 600;
    font-style: normal;
}

#index_designation {
    text-align: center;
    margin-top: 0.01em;
    font-size: 2em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.resume_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Quicksand", sans-serif;
  font-weight: 500;
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(to right, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 0 0.5em rgba(255, 255, 255, 0.05);
  padding-left: 1em;
  padding-right: 1em;
}

.resume_btn:hover {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.15));
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.02);
}

.resume_btn:active {
  transform: scale(0.98);
  box-shadow: 0 0 0.5em rgba(255, 255, 255, 0.1) inset;
}

.resume_top_right {
  position: absolute;
  top: 2.4em;
  right: 1.5em;
  z-index: 10;
  width: 6.5em; /* width enough for "Resume" text */
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.4s ease;
  padding: 0.6em 1em;
  box-sizing: border-box;
}

/* Snippet styles */
.snippet_container {
    display: flex;
    justify-content: center;
    padding-top: 0.15em;
}

.snippet_item {
    margin-top: 3em;
    margin-left: 1em;
    margin-right: 1em;
    justify-content: center;
    text-align: center;
    font-size: 1.75em;
}

.snippet_img {
    width: 300px;
    height: 250px;
    border-radius: 1em;
    border-style: ridge;
    border-color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.snippet_img:hover {
    width: 310px;
    height: 260px;
    border-radius: 1em;
    border-style: ridge;
    border-color: rgba(255, 255, 255, 0.6);
}

.snippet_text {
    margin-top: 0.5em;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* 2-column grid layout */
.grid {
    display: flex;
    flex-direction: column;
    gap: 2em;
    max-width: 1000px;
    margin: 20px auto;
    align-items: center;
}

/* Card styles */
.card {
    background-color: rgb(212, 212, 212);
    background-image: url('Images/card_bg1.jpg');
    padding: 3em;
    cursor: pointer;
    border-radius: 7em;
    text-align: center;
    transition: 0.3s;
    width: 90%;
    height: auto;
    border: 5px solid rgba(91, 91, 91, 0.85);
    box-shadow: 0 0 1em 1em rgba(0, 0, 0, 0.1);
    font-size: 1.1em;
    font-weight: 450;
}

.card:hover {
    background-color: rgb(235, 234, 234);
    padding: 3.5em 3em;
}

/* Popup modal styles */
.popup {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65); /* Overlay */
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: rgb(235, 234, 234);
    background-image: url('Images/pjt_bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    width: 50%;
    height: 80%;
    padding: 30px;
    border-radius: 0.5em;
    overflow-y: auto;
    position: relative;
    text-align: center;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

.popup-content img {
    max-width: 100%;
    height: 20em;
    border-radius: 1em;
    margin: 1.5em 0;
}

/* Project header */
.project_header {
    font-size: 1.75em;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.popup-content p {
    text-align: justify;
    font-size: 1.3em;
    font-weight: 400;
    margin: auto 2em;
}

/* Swiper styles */
.swiper {
    width: 60%;
    height: 70%;
    justify-content: center;
    margin-top: 3em;
}

.swiper-slide {
    text-align: center;
}

.swiper_img {
    height: 100%;
    width: 100%;
}

.swiper-button-prev {
    padding-left: 1em;
}

.swiper-button-next {
    padding-right: 1em;
}

/* Header */
.about-header {
    font-size: 3em;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1em;
}

/* Layout container: image + about content */
.grid1 {
    display: flex;
    gap: 2em;
    margin: 3em 10%;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: nowrap; /* side-by-side on wide screens */
}

/* Image styles */
.about-img {
    max-width: 35em;
    height: 40em;
    border-radius: 3em;
    box-shadow: 0 0 100px rgba(255, 255, 255, 0.1);
    background: black;
    flex-shrink: 0; /* prevent shrinking */
}

/* About container grows to fill space */
.about_container {
    flex-grow: 1;
    height: 40em;
    overflow-y: auto;
}

/* Asymmetric grid inside about_container */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    height: 100%;
}

/* Asymmetric grid item placement */
.top-left {
    grid-column: 1 / 2;
    grid-row: 1 ;
    background-color: #DBDCDA;
    padding: 30px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    box-sizing: border-box;
    background-image: url('Images/about_bg4.jpg');
}

.bottom-left {
    grid-column: 1 / 2;
    grid-row: 2 / 4; /* spans rows 2 and 3 */
    background-color: #c9c9c9;
    padding: 30px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    box-sizing: border-box;
    background-image: url('Images/2.jpg');
    background-size: cover;
    background-repeat: no-repeat;
}

.top-right {
    grid-column: 2 / 3;
    grid-row: 1 / 3; /* spans rows 1 and 2 */
    background-color: #bbbaba;
    padding: 30px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-image: url('Images/about_bg4.jpg');
    background-size: cover;
    background-repeat: no-repeat;
}

.bottom-right {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    background-color: #dededeef;
    padding: 30px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
    box-sizing: border-box;
    background-image: url('Images/about_bg4.jpg');
}

/* Skills */
.skill {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5em;
    padding: 0 1em;
}

.skill-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 0.2em;
}

.skill-bar {
    background-color: rgba(255, 255, 255, 0.2);
    height: 20px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.skill-level {
    height: 100%;
    background-color: #007bff;
    text-align: right;
    padding-right: 10px;
    color: #fff;
    font-size: 0.9em;
    line-height: 20px;
    transition: width 0.5s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 1000px) {
    /* Stack the main containers vertically */
    .grid1 {
        flex-direction: column;
        align-items: center;
    }

    .about-img {
        max-width: 90vw;
        height: auto;
        margin-bottom: 1em;
    }

    .about_container {
        width: 90vw;
        height: auto;
    }

    /* Switch asymmetric grid from grid to stacked flex */
    .grid-container {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        height: auto;
    }

    /* Make each item full width and cancel grid placement */
    .top-left,
    .bottom-left,
    .top-right,
    .bottom-right {
        flex: 1 1 100%;
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .bottom-right {
        flex: 1 1 100%;
        grid-column: auto !important;
        grid-row: auto !important;
    }

}

#contact_me {
    text-align: center;
    margin-top: 0.5em;
    margin-bottom: 0.05em;
    font-size: 6em;
    color: rgba(255, 255, 255, 0.9);
}

/* Contact Form Styles */
.contact-form {
  display: flex;
  backdrop-filter: blur(100px);
  flex-direction: column;
  gap: 1.5em;
  max-width: 600px;
  margin: 3em auto;
  padding: 2em;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 1em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 1em rgba(255, 255, 255, 0.05);
}

.form-label {
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1em;
  gap: 0.3em;
}

.form-input,
.form-textarea {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5em;
  padding: 0.8em 1em;
  color: #fff;
  font-size: 1em;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.6);
}

.form-button {
  align-self: flex-start;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  color: rgba(255, 255, 255, 0.95);
  border: none;
  padding: 0.7em 2em;
  font-size: 1em;
  border-radius: 2em;
  cursor: pointer;
}

.form-button:hover {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
}

.social_link{
    display: flexbox; 
    text-align: center;
    margin-top: 4em;
}

.social_link_img{
    width: 5em;
    height: 5em;
    margin: auto 1.5em;
    border-radius: 1.5em;
    background-color: white;
}

/* Lazy loading image styles */
.lazy-img {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.lazy-img.loaded {
    opacity: 1;
}

/* Popup transition animation */
@keyframes popupFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-content {
    animation: popupFadeIn 0.4s ease-out;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
