/* Disable scrolling */
html {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100%;
    overscroll-behavior: none;
}

::selection {
    background-color: #304057;
    color: #ffffff;
}

/* Base Styles */
body {
    display: block;
    font-family: "PT Sans Caption", sans-serif;
    background: radial-gradient(circle, #1a2b4a, #162a43, #0c203a, #070e1c);
    color: #ffffff;
    min-height: 100vh;
    padding: 0;
}

/* Container */
.container {
    /*min-height: 100vh;*/
    height: 85vh;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 95vw;
    max-width: 100vw;
    padding: 3vw;
    border-radius: 4vw;
    margin: 0 auto;
    /*z-index: 5;*/
    overflow-y: hidden;
}

/* Section */
.section {
    width: 100vw;
    max-width: 100vw;
    /*height: 50vh;*/
    margin: 0 auto 3rem auto;
    padding: 6vh 0vw;
    border-radius: 4vw;
    /*background-color: rgba(18, 18, 18, 0.2);*/
    position: relative;
    /*z-index: 5;*/
}

#projects.section {
    background-color: rgba(18, 18, 18, 0.2);
    box-shadow: 0 0 2.5vw 1vw rgba(18, 18, 18, 0.25);
    border-radius: 5vw;
    max-width: 80vw;
    margin: 0 auto 3rem auto;
    padding: 2vw 2.5vw 2vw 2.5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

.pre-section {
    box-shadow: 0 0 1vw 1vw rgba(18, 18, 18, 0.2);
    background-color: rgba(18, 18, 18, 0.2);
    max-width: 66vw;
    height: auto;
    /*max-height: 40vh;*/
    margin: 0 auto;
    border-radius: 4vw;
    padding: 3vw;
    overflow: hidden;
}

.timeline {
    background-color: rgba(18, 18, 18, 0.2);
    box-shadow: 0 0 1.2vw 0.5vw rgba(18, 18, 18, 0.2);
    position: relative;
    margin: 0 auto;
    padding: 2vw 2.5vw 2vw 2.5vw;
    max-width: 80vw;
    /*height: auto;*/
    height: calc(19vh + 20vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 5vw;
}
.timeline-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
    order: 0;
    z-index: 5;
}
.timeline-title, #projects.section h2 {
    font-size: 3.2vw;
    color: #e0e0e0;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 5;
}
/* Horizontal timeline items */
.timeline-items-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 5vw;
    width: 100%;
    height: calc(29vh + 10vh);
}
.timeline-item {
    position: relative;
    margin-bottom: 15vw;
    /*width: 30vw;*/
    /*max-height: 12vw;*/
    display: flex;
}
.timeline-content {
    background: rgba(18, 18, 18, 0.89);
    padding: 2vw 2.5vw;
    border-radius: 1.5vw;
    box-shadow: 0 0 1vw 1vw rgba(18, 18, 18, 0.2);
    width: 29vw;
    height: calc(17vh + 9vw);
    min-height: 18vh;
    display: flex;
    flex-direction: column;
    z-index: 5;
}
.timeline-content h3 {
    margin: 0 0 0.5vw 0;
    color: #e0e0e0;
    font-size: 1.5vw;
    line-height: 1.2;
}
.timeline-content h4 {
    margin: 0 0 0.5vw 0;
    color: #b0b0b0;
    font-size: 1.3vw;
    font-weight: 400;
    line-height: 1.2;
}
.timeline-content ul {
    margin: 0 0 1vw 1.5vw;
    padding: 0;
    color: #d2d2d2;
    font-size: 1.05vw;
    line-height: 1.5;
}
.timeline-date {
    display: block;
    color: #b0b0b0;
    font-size: 1vw;
    /*margin-top: 1vw;*/
    font-style: italic;
}
@media (max-width: 768px) {
    .timeline {
        padding: 2rem 0 2rem 1.2rem;
    }
    .timeline-title {
        margin-left: 30px;
        font-size: 1.3rem;
    }
    .timeline-content {
        left: 30px;
        padding: 1rem 1rem;
        min-width: 0;
        max-width: 90vw;
    }
    .timeline:before {
        left: 15px;
    }
    .timeline-item:before {
        left: 3px;
        width: 18px;
        height: 18px;
    }
}

/* Left Section */
.left-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 0.1vw;
    position: relative;
}

/*separating line*/
.left-section::after {
    content: "";
    position: absolute;
    right: -0.5px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 100%;
    background-color: #ffffff;
    min-height: 22.5vw;
}

.profile-picture {
    position: relative;
    z-index: 5;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-picture img {
    box-shadow: 0 0 1vw 1vw rgba(18, 18, 18, 0.2);
    max-width: 10vw;
    max-height: 10vw;
    border-radius: 50%;
    margin-bottom: -0.5vw;
    position: relative;
    z-index: 3;
    transition: transform 0.4s cubic-bezier(.4,2,.6,1), box-shadow 2.4s, filter 8.4s;
}

.profile-picture:hover {
    transform: scale(1.04) rotate(-2deg);
}

.profile-picture:hover img {
    filter: brightness(1.15) saturate(1.2) drop-shadow(0 0 1vw #1e90ff88);
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 0 5vw 1.5vw rgba(6, 26, 45, 0.6), 0 0 0.5vw 0.2vw rgb(0, 111, 255);
}

h1 {
    font-family: "Monospaced", monospace;
    font-size: 2.5vw;
    margin-bottom: -0.5vw;
    font-weight: bold;
    white-space: nowrap;
    z-index: 5;
}

p {
    font-size: 1.2vw;
    color: #d2d2d2;
    margin-bottom: 0vw;
    z-index: 5;
    /*width: fit-content;*/
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1vw; /* Space between links */
    font-size: 2.3vw;
    margin-top: 1vw;
    z-index: 5;
}

.social-links a {
    color: #ffffff;
    text-decoration: none;
    z-index: 1;
    transition: color 0.3s;
    z-index: 5;

}

.social-links a:hover {
    color: #1e90ff;
}

.name-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 5;
}


/* Contact Information */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 0.9vw; /* Space between each contact item */
    font-size: 0.8vw;
    color: #7a7a7a;
    margin-top: 0.5vw;
    text-align: center;
    z-index: 5;
}

.contact-info span {
    display: inline-block; /
    margin: 0 0.5vw;
}

/* Right Section */
.right-section {
    flex: 3;
    padding-left: 3vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 500vw;
}

.right-section a {
    color: #1e90ff;
    text-decoration: none;
    z-index: 5;
}

.right-section a:hover {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.right-section p {
    font-size: 1.5vw;
    margin-bottom: 0;
    width: fit-content;
    z-index: 5;

}

h2 {
    width: fit-content;
    font-size: 3.2vw;
    margin-bottom: 1vw;
    font-weight: bold;
    z-index: 5;
}

.right-section a.resume-link {
    color: #1e90ff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5vw;
    margin-top: 2.5vw;
    transition: color 0.3s;
    width: fit-content;
    z-index: 5;
}

.right-section a.resume-link:hover {
    color: #ffffff;
}

/* Projects Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22vw, 1fr));
    gap: 2.5vw;
    justify-items: center;
    align-items: stretch;
    margin-top: 2vw;
    margin-bottom: 2vw;
    width: 100%;
    /*z-index: 5;*/
}

.project-card {
    background: rgba(18, 18, 18, 0.82);
    border-radius: 1.2vw;
    box-shadow: 0 0.4vw 2.4vw 0 rgba(0,0,0,0.18);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 18vw;
    max-width: 28vw;
    width: 100%;
    height: 100%;
    min-height: 28vw;
    z-index: 5;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 8px 32px 0 rgba(17, 79, 136, 0.33);
    border: 1.5px solid #124e83;
    z-index: 5;
}

.project-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    padding: 2vw 1vw 2vw 1vw;
    z-index: 5;
}

.project-thumb {
    width: 8vw;
    height: 8vw;
    min-width: 80px;
    min-height: 80px;
    max-width: 160px;
    max-height: 160px;
    object-fit: cover;
    border-radius: 1vw;
    box-shadow: 0 0.2vw 0.8vw rgba(0,0,0,0.08);
    margin-bottom: 1.2vw;
    transition: box-shadow 0.2s;
}


.project-info {
    text-align: center;
    padding: 0 1.2vw 0.5vw 1.2vw;
}

.project-info h3 {
    margin: 0.5vw 0 0.3vw 0;
    font-size: 1.3vw;
    color: #e0e0e0;
    z-index: 5;
}

.project-desc {
    color: #b0b0b0;
    font-size: 1vw;
    margin-bottom: 0.5vw;
    z-index: 5;
}

.project-tech {
    color: #1e90ff;
    font-size: 0.95vw;
    margin-bottom: 0;
    margin-left: 0;
    display: block;
    text-align: center;
    z-index: 5;
}

.experience-location {
    color: #b0b0b0;
    font-size: 1.1vw;
    margin: 0 0 0.7vw 0;
    font-style: italic;
    line-height: 1.2;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0; /* Keeps particles behind other content but also hoverable */
    overflow-y: hidden;
    /*zoom: 3;*/
}


.resume-link {
    color: #1e90ff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
.resume-link:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    html, body {
        padding: 0;
        margin: 0;
        font-size: 16px;
        overflow-x: hidden;
    }

    .container {
        flex-direction: column;
        width: 90%;
        height: auto;
        padding: 4vw 2vw;
        border-radius: 0;
        overflow: visible;
        align-items: center;
        justify-content: center;
    }

    .section,
    .pre-section,
    .timeline {
        width: 90%;
        max-width: 95vw;
        padding: 5vw 4vw;
        height: 70vh;
    }

    #projects.section {
        width: 77%;
        max-width: 95vw;
        padding: 5vw 4vw;
        height: 70vh;
    }

    .left-section,
    .right-section {
        flex: unset;
        width: 100%;
        padding: 0;
        margin: 0 auto;
        align-items: center;
        text-align: center;
    }

    .left-section::after {
        display: none;
    }

    .profile-picture img {
        max-width: 28vw;
        max-height: 28vw;
    }

    h1 {
        font-size: 6vw;
    }

    h2,
    .timeline-title,
    #projects.section h2 {
        font-size: 5.5vw;
        text-align: center;
    }

    .right-section p,
    .right-section a,
    .right-section a.resume-link,
    .project-info h3,
    .project-desc,
    .project-tech,
    .experience-location,
    p,
    .contact-info,
    .timeline-content h3,
    .timeline-content h4,
    .timeline-content ul,
    .timeline-date {
        font-size: 3.5vw;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 6vh;
        margin-top: 4vw;
        margin-bottom: 4vw;
    }

    .project-card {
        width: 100%;
        max-width: 90vw;
        min-height: auto;
        padding: 3vw;
    }

    .project-card a {
        padding: 4vw;
    }

    .project-thumb {
        width: 28vw;
        height: 28vw;
        margin-bottom: 2.5vw;
    }


    .timeline-items-row {
        flex-direction: column;
        gap: 5vw;
        height: auto;
    }

    .timeline-item {
        margin-bottom: 2vw;
    }

    .timeline-content {
        min-width: 72vw;
        max-width: 75vw;
        height: auto;
    }

    .social-links {
        font-size: 6vw;
        gap: 4vw;
    }

    .contact-info {
        font-size: 3vw;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Ensure spacing after projects */
    .projects-grid + * {
        margin-top: 3rem;
    }
}
