* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html{
    scroll-behavior: smooth;
    font-family: "League Spartan", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: clamp(2rem, 2vw, 5rem);
    color: #000000;
}
::-webkit-scrollbar {
    width: 4px;
  }
  
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  
  ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
  }  
.header{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    min-height: 900px;
    color: rgb(0, 0, 0);
}
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #ffffff, #ffffff);
    overflow: hidden;
    z-index: -1;
}
.shape {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2.5px solid rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    pointer-events: none; /* Ignoring clicks */
    transition: transform 0.7s ease-out; /* Smooth movement */
}
/* For squares */
.shape.square {
    border-radius: 0;
}
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
.logo img{
    height: 2rem;
}
nav li{
    list-style: none;
    display: inline;
    padding: 0rem 0.25rem;
}
nav a{
    text-decoration: none;
    color: #000000;
}
nav a:hover{
    color: rgb(80, 80, 80);
}
.nav_menu{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3.125rem;
    height: 15vh;
}
.hamburger{
    display: none;
}
.hamburger.active .bar:nth-child(2){
    opacity: 0;
}
.hamburger.active .bar:nth-child(1){
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(3){
    transform: translateY(-8px) rotate(-45deg);
}
.bar{
    display: block;
    width: 0.8rem;
    height: 3.5px;
    margin: 5px;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: black;
}
.hamburger.active .bar:nth-child(2){
    opacity: 0;
}
.hamburger.active .bar:nth-child(1){
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(3){
    transform: translateY(-8px) rotate(-45deg);
}
.container_1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3.125rem;
    flex-grow: 1;
    gap: 1.75rem;
}
.container_2{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    min-height: 900px;
}
.container_3{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    min-height: 900px;
}
.intro_text{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    height: 100%;
    width: 50%;
    padding: 0rem;
}
.intro_text, .img_wrapper {
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
  }
  .intro_text.slide-out, .img_wrapper.slide-out {
    transform: translateY(2%); /* Hiding the block downward */
    opacity: 0;
}

.intro_text.slide-in, .img_wrapper.slide-in {
    transform: translateY(0); /* Restore to the original position */
    opacity: 1;
}
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.text_2, .text_3{
    font-size: clamp(1rem, 1.5vw, 4rem);
    font-weight: 500;
}
.text_4{
    display: none;
}
.container_1 .img_wrapper{
    display: flex;
    width: 50%;
    height: 100%;
    justify-content: right;
    padding: 0rem;
    gap: 0rem;
}
.img_wrapper form{
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
}
.youtube_video{
    color: white;
}
.youtube_video:hover{
    color: #0085D5;
}
.img_wrapper input{
    border: none;
    border-bottom: 2px solid #ccc;
    outline: none;
    padding: 5px 0;
    font-size: 16px;
    width: 100%;
    background: transparent;
    transition: border-bottom-color 0.5s ease;
    color: white;
}
.img_wrapper button {
    background-color: #0085D5;
    color: white;
    border: none;
    padding: 0.5rem;
    font-size: clamp(0.5rem, 1.5vw, 4rem);
    font-weight: bold;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.img_wrapper button:hover {
    background-color: #0085D5;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.img_wrapper button:active {
    transform: scale(0.95);
    box-shadow: none;
}
.About_me_text{
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.img_wrapper input:hover {
    border-bottom-color: #007BFF;
}
.img_wrapper input:focus {
    border-bottom-color: #007BFF;
}
.img_wrapper img{
    max-width: 100%;
    max-height: auto;
    object-fit: cover;
}
main{
    display: flex;
    flex-direction: column;
    align-items: center;
}
.projects_text{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10vh;
    padding: 1.25rem;
}
.gallery_wrapper {
    display: flex;
    padding: 1.25rem 3.125rem;
    height: 90vh;
}
.gallery {
    display: grid;
    height: 100%;
    width: 100%;
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
}
.gallery_item {
    transition: transform 0.3s ease;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.gallery_item img,
.gallery_item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
}
.gallery_item:hover {
    transform: scale(1.05);
}
.gallery_item img:hover {
    filter: brightness(0.9) saturate(1.2);
}
.modal {
    display: none; /* Initially hidden */
    position: fixed; /* Fixed positioning */
    z-index: 1; /* Above other content */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    opacity: 0; /* Start fully transparent */
    transform: scale(0.9); /* Start slightly scaled down */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth opening */
}

.modal.show {
    display: block; /* Make the modal visible */
    opacity: 1; /* Fully visible */
    transform: scale(1); /* Restore to normal size */
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    margin: 5% auto;
    padding: 1rem;
    gap: 1rem;
    width: 80%;
    height: 80%;
    overflow-y: auto; /* Add vertical scroll */
    border-radius: 16px; /* Add rounded corners for better aesthetics */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Add shadow for depth */
}

/* Scrollbar styling for Webkit browsers */
.modal-content::-webkit-scrollbar {
    width: 16px; /* Reduced width for a cleaner look */
}

.modal-content::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 8px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}
.modalText{
    font-size: clamp(2rem, 2vw, 5rem);
}
.modalImage{
    display: flex;
    flex-direction: column;
    width:90%;
    height: fit-content;
}
/* Close button */
.close {
    color: #aaa;
    font-size: 1.5rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 25px;
    transition: color 0.3s ease; /* Smooth hover effect */
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Styles for images inside the modal */
.modal-image {
    height: auto; /* Adjust for responsive scaling */
    width: 100%;
    margin-bottom: 1rem;
    display: block;
}

/* Styles for clickable images */
.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease; /* Add hover effect */
}

.clickable-image:hover {
    transform: scale(1.05); /* Slight zoom on hover */
}

  
.timeline-container {
    flex-grow: 1;
    position: relative;
    width: 100%;
    overflow: hidden;
}
.timeline {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    background-color: black;
    top: 0;
    bottom: 0;
}
.timeline-item {
    display: flex;
    width: 100%;
    height: 20%;
    margin: 1rem 0;
    opacity: 0;
    transform: translateX(-3rem);
    transition: opacity 2s, transform 1s;
}

.timeline-item.timeline-item-left {
    transform: translateX(3rem); 
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    background-color: #666;
    color: white;
    padding: 0.75rem;
    width: 40%;
}
.timeline-item-left {
    justify-content: flex-end;
    padding-right: 3.125rem;
}
.timeline-item-right {
    justify-content: flex-start;
    padding-left: 3.125rem;
}
.dot {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background-color: black;
    border-radius: 50%;
}
.dot:nth-child(1) {
    top: 0%;
}

.dot:nth-child(2) {
    top: 25%;
}

.dot:nth-child(3) {
    top: 50%;
}

.dot:nth-child(4) {
    top: 75%;
}
footer{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
    padding: 2rem 1.25rem;
    background-color: #666;
    color: white;
    font-weight: 500;
}
footer a{
    text-decoration: underline;
    color: white;
}
footer a:hover{
    color: rgb(80, 80, 80);
}
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .shape:nth-child(n+8) { /* Keep only 7 shapes */
        display: none;
    }
    .nav_menu{
        padding: 1.25rem;
    }
    .container_1 {
        padding: 1.25rem;
        flex-grow: 1;
        gap: 1rem;
    }
    .text_3{
        display: none;
    }
    .text_4{
        display: block;
        font-size: clamp(1rem, 1.5vw, 4rem);
        font-weight: 500;
    }
    .projects_text{
        padding: 1.25rem;
    }
    .gallery_wrapper{
        padding: 0rem 1.25rem 1.25rem 1.25rem;
    }
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .item_5, .item_6{
        display: none;
    }
    .timeline-item-left {
        padding-right: 1.25rem;
    }
    .timeline-item-right {
        padding-left: 1.25rem;
    }
    .timeline-item-content {
        width: 42.5%;
    }
    .footer{
        padding: 2rem 1.25rem;
        gap: 1.25rem;
    }
    .footer_link{
        padding: 0rem 0.25rem;
    }
}
@media screen and (max-width: 767px) {
    .shape:nth-child(n+6) { /* Keep only 5 shapes */
        display: none;
    }
    .header{
        min-height: 0px;
    }
    .nav_menu{
        padding: 1.25rem;
        z-index: 1;
    }
    .hamburger{
        display: block;
        z-index: 1;
    }
    .nav_buttons{
        display: flex;
        position: fixed;
        z-index: -1;
        width: 100%;
        height: 100%;
        right: -100%;
        top: 0vh;
        flex-direction: column;
        background-color: white;
        text-align: center;
        justify-content: center;
        transition: 0.6s;
    }
    .nav_buttons.active{
        right: 0;
    }
    nav li{
        list-style: none;
        display: list-item;
        padding: 1rem 0.25rem;
    }
    .container_1, .container_2, .container_3{
        min-height: 0px;
    }
    .container_1 {
        padding: 1.25rem;
        flex-grow: 1;
        gap: 1rem;
        justify-content: center;
        align-items: center;
    }
    .container_1 .img_wrapper{
        display: none;
    }
    .intro_text{
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        width: 100%;
        max-width: 368px;
    }

    
    .text_3{
        display: none;
    }
    .text_4{
        display: block;
        font-size: clamp(1rem, 1.5vw, 4rem);
        font-weight: 500;
    }
    .projects_text{
        padding: 0.75rem;
    }
    .gallery_wrapper{
        padding: 0.5rem 1.25rem 1rem 1.25rem;
    }
    .gallery {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.5rem;
    }
    .item_3, .item_4, .item_5, .item_6{
        display: none;
    }
    .timeline-item-left {
        padding-right: 1.25rem;
    }
    .timeline-item-right {
        padding-left: 1.25rem;
    }
    .timeline-item-content {
        width: 42.5%;
    }
    .timeline {
        display: none;
    }
    .timeline-item-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
        background-color: #666;
        color: white;
        padding: 0.75rem;
        width: 100%;
        font-size: clamp(0.75rem, 2vw, 5rem);
    }
    .timeline-item-left {
        justify-content: flex-start;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .timeline-item-right {
        justify-content: flex-start;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .dot {
        display: none;
    }
    .footer{
        padding: 2rem 1.25rem;
        gap: 1.25rem;
    }
    .footer_link{
        padding: 0rem 0.25rem;
    }
    .footer_name{
        display: none;
    }
    .footer_p{
        text-align: center;
        line-height: 1.75rem;
    }
}