html {
    scroll-behavior: smooth;
  }
  
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-image: linear-gradient(to bottom, #000000 0%, #170117 15%, #110009 25%, #170117 45%, #150523 65%, #000d32 95%);
    /* Default background */
    color: white;
    /* Default text color */
    transition: background-color 0.3s, color 0.3s;
    /* Smooth transitions */
    min-height: 100vh;
    /* Ensure full viewport height */
    display: flex;
    flex-direction: column;
    /* Stack header, sections, and footer */
}
/* Header/Navigation */
header {
    top: 0;
    width: 100%;
    background-color: transparent;
}

nav {
    display: flex;
    justify-content: space-between;
    max-width: 70%;
    /* Ensures the content stays within the margins on larger screens */
    margin: 0 auto;
}

.nav-left {
    padding: 14px;
    font-size: 1.5em;
    text-decoration: none;
}

.nav-left a {
    text-decoration: none;
    cursor: pointer;
    color: white;
}

.nav-right ul{
    font-size: 1rem;;
    margin: 0px;
    padding: 0px;
    list-style-type: none;

}
.nav-right li {
    float: left;
}

.nav-right li a {
    position: relative;
    display: block;
    color: white;
    padding: 14px 16px;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    transition: color 0.3s ease;
}

.nav-right li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 8px; /* Adjust if needed */
    width: 100%;
    height: 1px;
    background-color: white;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-right li a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


@media (max-width: 1268px) {
    nav {
        max-width: 100%;
        display: flex;
        
    }

    .nav-left {
        font-size: 1.1em;
    }

    .nav-right{
        display: flex; /* Add this */
        justify-content: center; /* Add this */
    }
    .nav-right ul {
        display: flex; /* Add this */
        justify-content: center; /* Add this */
      }
    
      .nav-right li {
        font-size: 1.1em;
        float: none; /* Remove float */
      }

}

/* Landing Section */
#landing {
    min-height: 100vh;
    display: grid;
    place-items: center;
    /* Centers content both horizontally and vertically */
    padding: 20px;
    box-sizing: border-box;
    /* Include padding in height calculation */
}

.landing-content {
    text-align: center;
    width: 100%;
    /* Full width on small screens */
    max-width: 70%;
    /* Limits width on larger screens */
    margin: 0 auto;
    /* Centers the content */
}

.profile-pic img {
    border-radius: 50%;
    border: 2px solid white;
    width: 16vh;
    /* Adjust size as needed */
    height: 16vh;
    /*border-radius: 50%;*/
    object-fit: cover;
}

.name {
    font-size: 2em;
    margin: 20px 0;
}

.role-container {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1vh;
}

.social-icons img {
    width: 32px;
    height: 32px;
    /* Adjust icon size */
    filter: invert(100%);
    /* Invert colors to white */
}
.container-toggle{
    margin-top: 0.5vh;
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: transparent;
  }
.theme-toggle{
    all:unset;
    background-color: transparent;
    cursor: pointer;
}
.theme-icon {
    width: 32px;
    height: 32px;
    object-fit: contain; /* Optional: prevents stretching */
    display: block; /* Optional: removes extra spacing if inside inline elements */
  }
.container-intro{
    margin-top: 2vh;
    width: 100%;
    font-style: italic;
}

.counter-number {
    margin-top: 10vh;
}
    /* Gap for counter */
.scroll-down {
    margin-top: 0.5vh;
    font-size: 2em;
    cursor: pointer; 

}

@media (max-width: 1268px) {
    
    .landing-content {
        text-align: center;
        min-width: 100%;
        /* Full width on small screens */
        /* Limits width on larger screens */
        margin: 0 auto;
        /* Centers the content */
    }

    .social-pic img {
        width: 18vh;
        /* Adjust size as needed */
        height: 18vh;
        border-radius: 50%;
        object-fit: cover;
    }
    .container-intro {
        width: 100%;
        font-size: 0.8em;
    }
    .counter-number {
        margin-top: 18vh;
    }
    
    .scroll-down {
        margin-top: 1.7vh;
        font-size: 1.5em;
    }
}
@media (max-height: 500px) {
    .profile-pic img {
        width: 25vh;
        /* Adjust size as needed */
        height: 25vh;
    }
}
/* About Section */
#about {
    min-height: 100vh;
    padding: 40px 20px;
    text-align: left;
}

.about-content {
    max-width: 70%;
    margin: 0 auto;
}

.about-title,
.practical-skills-title {
    margin-top: 10vh;
    font-size: 2em;
    margin-bottom: 20px;
}

.about-details {
    margin-bottom: 30px;
}

.download-cv {
    border-radius: 5px;
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 0.5vh;
}

.download-cv a {
    text-decoration: none;
    color: white;
}

.timeline {
    border-left: 2px solid white;
    padding-left: 20px;
}

.milestone {
    padding: 0px;
    margin-bottom: 50px;
    position: relative;
}
.milestone h3 {
    padding: 0px;
    margin: 0px;
}
.milestone h4 {
    padding: 0px;
    margin: 0px;
}
.milestone p{
    margin: 0px;
    padding: 0px;
}

.experience-education {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);

}

.skills {
    max-width: 70%;
    margin: 0 auto;
}

.skill-indicators {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.skill {
    text-align: center;
    padding: 10px;
    border: 0.1px solid white;
    border-radius: 5px;
}
.skill-name{
    filter: invert(100%);
}
.skill-name img{
    width: 3rem;
    height: 3rem;
}

.skill-level {
    font-size: 1.2em;
}

.verified{
    filter: invert(100%);
}
@media (max-width: 1268px) {
    .about-content {
        max-width: 100%;
        margin: 0 auto;
    }

    .experience-education {
        max-width: 100%;
        grid-template-columns: 2fr;
    }

    .skills {
        max-width: 100%;
        margin: 0 auto;
    }
    .skill {
        text-align: center;
        padding: 10px;
    }

    .skill-indicators {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .skill-name img{
        width: 2rem;
        height: 2rem;
    }
    .skill-level {
        font-size: 0.9em;
    }
}

/* Blog & Projects Section */
#blog-projects {
    min-height: 60vh;
    padding: 20px;
}

.blog-projects-content {
    max-width: 70%;
    margin: 0 auto;
}

.blog-projects-title {
    font-size: 2em;
    margin-bottom: 20px;
    text-align: left;
}

.blog-project-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.preview {
    border: 1px solid white;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
}

.details-button {
    font-family: 'Montserrat', sans-serif;    
    border: 1px solid white;
    border-radius: 5px;
    background-color: transparent;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 20px;
}



/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Semi-transparent black background */
    display: none;
    z-index: 999;
}

/* Modal window */
.modal {
    border: 1px solid white;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    /* Default width */
    max-width: 800px;
    /* Maximum width for large screens */
    background-image: linear-gradient(to bottom, #000000, #110009, #170117, #150523, #000d32);
    color: white;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    max-height: 80%;
    /* Prevent modal from being too tall */
}

/* Modal open class */
.modal.open,
.modal-overlay.open {
    display: block;
}

/* Modal close button */
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.6rem;
    cursor: pointer;
}

/* Modal content */
.modal-content {
    margin-top: 20px;
}



/* Responsive Design */
@media (max-width: 1268px) {
    .blog-projects-content {
        max-width: 100%;
        margin: 0 auto;
    }

    .blog-project-container {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }

    .preview {
        border: 1px solid white;
        border-radius: 5px;
        padding: 20px;
    }

    .modal {
        width: 90%;
        /* Smaller width for small screens */
        max-width: 95%;
        /* Allow a bit more space on mobile */
        max-height: 80%;
        /* Prevent modal from becoming too tall */
    }
}

/* Contact Section */
#contact {
    min-height: 50vh;
    padding: 40px 20px;
    text-align: left;
}

.contact-content {
    max-width: 70%;
    margin: 0 auto;
}

.contact-title {
    font-size: 2em;
    margin-bottom: 20px;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
}

input,
textarea {
    padding: 10px;
    border: 1px solid white;
    background-color: transparent;
    color: white;
    font-family: 'Orbitron', sans-serif;
    resize: vertical;
    /* Allow vertical resizing of the textarea */
    border-radius: 5px;
}

.send-message {
    border-radius: 5px;
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    width: fit-content;
    /* Adjust width to content */
    margin-top: 10px;
}

.error-message {
    color: red;
    font-size: 0.8em;
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 968px) {
    .contact-content {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Footer */
footer {
    position: relative;
    text-align: center;
    padding: 20px;
    background-color: transparent;
}


#back-to-top {
    position: absolute;
    /* Position relative to the footer */
    bottom: 20px;
    right: 150px;
    background-color: transparent;
    border: 0.2px solid white;
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 1rem;
    z-index: 1002;
    opacity: 0;
    /* Initially hidden */
    transition: opacity 0.3s ease;
    /* Smooth transition for visibility */
}


.arrow-up {
    display: inline-block;
    font-size: 1.2em;
    line-height: 1;
}


@media (max-width: 768px) {
    #back-to-top {
        bottom: 15px;
        right: 15px;
    }
}

/* Responsive adjustments */
@media (min-width: 968px) {
    body {
        padding-left: 15%;
        /* Side margins */
        padding-right: 15%;
    }
}

.light-theme {
    background-image: linear-gradient(to bottom, #eeeeff, #e8e8ff, #e1e1ff, #dbdbff, #d5d5ff);
    /* Light grey background */
    color: black;
}

.light-theme nav{
    background-color: transparent;
}
.light-theme .nav-left a {
    text-decoration: none;
    color: black;
    cursor: pointer;
}

.light-theme .nav-right a {
    color: black;
}
.light-theme .nav-right li a::after {
    background-color: black;
}
.light-theme #theme-toggle {
    cursor: pointer; 
}

.light-theme .social-icons img {
    filter: invert(0%);
    /* Default: no inversion (black) */
}
.light-theme .profile-pic img{
    border: 2px solid black;
}
.light-theme .skill {
    text-align: center;
    padding: 20px;
    border: 0.5px solid black;
    border-radius: 5px;
}
.light-theme .skill-name {
    filter: invert(0%);
}

.light-theme .timeline {
    border-left: 2px solid black;
    padding-left: 20px;
}
.light-theme .verified{
        filter: invert(0%);
}

.light-theme footer {
    background-color: transparent;
}

.light-theme .details-button,
.light-theme .download-cv,
.light-theme .download-cv a,
.light-theme .send-message {
    border-color: black;
    color: black;
}


.light-theme .preview,
.light-theme .details-button {
    border-color: black;
    color: black;
}

.light-theme .modal {
    border: 1px solid black;
    background-image: linear-gradient(to bottom, #eeeeff, #e8e8ff, #e1e1ff, #dbdbff, #d5d5ff);
    color: black;
}

.light-theme .modal-close {
    color: black;
}

.light-theme #back-to-top{
    color: black;
}

.light-theme input,
.light-theme textarea {
    border-color: black;
    color: black;
}

/* Navbar fix to cover the whole width*/
.light-theme header {
    width: 100%;
    /* Ensure full width on light-theme */
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
  }

  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }