/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: .7em;
}

::-webkit-scrollbar-track {
    background: hsl(0, 0%, 73%);
    border-radius: 100vw;
}

::-webkit-scrollbar-thumb {
    background: hsl(0, 0%, 20%);
    border-radius: 100vw;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(0, 0%, 25%);
}

/* NAVBAR */
.navigatie {
    background-color: #333;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.max-width {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.menu {
    list-style: none;
    display: flex;
    gap: 30px;
}

.menu li a {
    color: white;
    text-decoration: none;
}

.menu-btn {
    display: none;
}

/* HOME */
.home {
    min-height: 100vh;
    background: url('project_frontend_img/home_background_1.png') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
}

.home-inhoud h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.boxes {
    display: flex;
    gap: 20px;
}

.box {
    background: white;
    width: 120px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.box:active {
    transform: scale(0.98);
}

.box:hover {
    width: 250px;
    height: 120px;
}

.box h2 {
    margin-top: 20px;
    font-size: 1.1rem;
    transition: 0.3s;
}

.click-info {
    opacity: 0;
    transition: 0.3s;
    margin-top: 20px;
    color: #555;
    font-weight: 500;
}

.box:hover .click-info {
    opacity: 1;
}

/* OPLEIDING */
.opleiding {
    background-color: #d6d5d1;
    padding: 120px 20px;
}

.opleiding h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.opleiding-txt {
    max-width: 800px;
    margin: auto;
    line-height: 1.7;
}

/* VAARDIGHEDEN */
.vaardigheden {
    padding: 120px 20px;
    background-color: #f5f5f5;
}

.vaardigheden h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.vaardigheden-lijst {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto 50px;
}

.vaardigheid {
    background: white;
    width: 150px;
    height: 65px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* subtle premium shadow */
}

.vaardigheid:hover {
    width: 250px;
    height: 150px;
}

.vaardigheid h3 {
    margin-top: 20px;
    font-size: 1.1rem;
    transition: 0.3s;
}

.vaardigheid p {
    opacity: 0;
    transition: 0.3s;
    padding: 15px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.vaardigheid:hover p {
    opacity: 1;
}

/* ===============================
   PROJECTEN (NIEUW)
================================ */

.projecten {
    background-color: #d6d5d1;
    padding: 120px 20px 70px;
}

.projecten h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.projecten-container,
.extra-projecten {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px auto;
}


.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Specific fix for Pygame and Python logo images to prevent cropping and add breathing room */
.project-card[data-project="pygame"] img,
.project-card[data-project="project3"] img {
    object-fit: contain;
    padding: 20px;
    background-color: #ffffff;
}

.project-card h3 {
    margin: 15px 0 5px;
}

.project-card p {
    margin-bottom: 15px;
    color: #666;
}

/* BEKIJK MEER */
.bekijk-meer-btn {
    margin: 60px auto;
    display: block;
    padding: 15px 35px;
    background-color: #4682B4;
    color: white;
    font-size: 1.1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.hidden {
    display: none;
}

/* ===============================
   MODAL
================================ */

.project-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 2000;
    overflow-y: auto;
    padding: 40px 15px;
    -webkit-overflow-scrolling: touch;
}

.project-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    margin: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

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

.modal-media {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 25px 0;
}

.modal-media.dual-media {
    grid-template-columns: 1fr 1fr;
}

.modal-media.triple-media {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {

    /* On mobile, always single column */
    .modal-media.dual-media,
    .modal-media.triple-media {
        grid-template-columns: 1fr;
    }

    .project-modal {
        padding: 20px 10px;
    }

    .modal-content {
        padding: 45px 20px 25px;
        border-radius: 12px;
    }

    .modal-media img,
    .modal-media iframe {
        height: 250px !important;
    }

    .project-modal[data-current-project="hobbies"] .modal-media img {
        width: 100% !important;
        max-width: 300px;
        height: auto !important;
        aspect-ratio: 1/1;
    }
}

.modal-media img,
.modal-media iframe {
    width: 100%;
    height: 450px;
    /* Default height for single images (like Hobbies) */
    border-radius: 15px;
    /* Softer, more modern corners */
    object-fit: cover;
    /* Fills the space more professionally for photos */
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    /* Soft shadow for depth */
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border for definition */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Adjust height for multiple media items to keep them manageable */
.modal-media.dual-media img,
.modal-media.triple-media img,
.modal-media.dual-media iframe {
    height: 280px;
}

/* Specific projects that need 'contain' to avoid cropping (logos, diagrams) */
.project-modal[data-current-project="pygame"] .modal-media img,
.project-modal[data-current-project="project3"] .modal-media img,
.project-modal[data-current-project="project5"] .modal-media img {
    object-fit: contain;
    padding: 15px;
}

/* Specific styling for Hobbies to make the photo square and smaller */
.project-modal[data-current-project="hobbies"] .modal-media img {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    object-fit: cover;
}

.modal-media img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.modal-media iframe {
    object-fit: contain;
    /* Keep videos contain */
}

.github-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #24292e;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

/* CONTACT */
.contact {
    padding: 120px 20px;
    background-color: #f5f5f5;
    text-align: center;
}

/* ===============================
   VAARDIGHEDEN – BALKEN FIX
================================ */

.skill {
    max-width: 800px;
    margin: 20px auto;
}

.skill span {
    display: block;
    font-size: 1rem;
    margin-bottom: 6px;
    color: #333;
}

.skill-bar {
    width: 100%;
    height: 12px;
    background-color: #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background-color: #4682B4;
    border-radius: 6px;
    transition: width 0.6s ease;
}

/* ===============================
   CONTACT SECTIE (HERSTELD)
================================ */

.contact {
    background-color: #f5f5f5;
    padding: 150px 0;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

.contact-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: black;
}

.contact-item img {
    width: 50px;
    height: 50px;
}

.contact-item a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* CV knop */
.download-cv {
    margin-top: 40px;
    padding: 15px 30px;
    background-color: #4682B4;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.download-cv:hover {
    background-color: #365f7b;
}

/* ===============================
   SMOOTH UITKLAPPEN PROJECTEN
================================ */

.extra-projecten {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;

    /* animatie */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.6s ease, opacity 0.4s ease;
}

/* Actieve (uitgeklapte) staat */
.extra-projecten.show {
    max-height: 2000px;
    /* groot genoeg */
    opacity: 1;
}

/* ===============================
   MEDIA QUERIES
================================ */

@media screen and (max-width: 768px) {

    /*navbar*/
    .max-width {
        padding: 0 15px;
    }

    .home-inhoud {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
        text-align: center;
    }

    .home-inhoud h1 {
        width: 100%;
        text-align: center;
    }

    .boxes {
        flex-direction: column;
        align-items: center;
        width: 100%;

    }

    .box {
        /*width: 100%;*/
        width: 120px
    }

    .menu {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .max-width {
        padding: 0 20px;
    }

    .menu-btn {
        display: block;
        z-index: 999;
    }

    /* Missing .bar styles added for visibility */
    .menu-btn .bar {
        height: 3px;
        width: 25px;
        background-color: white;
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    .menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: #333;
        flex-direction: column;
        align-items: center;
        gap: 0;
        margin: 0;
        padding: 20px 0;
        transition: all 0.3s ease;
    }

    .menu.active {
        left: 0;
    }

    .menu li {
        width: 100%;
        text-align: center;
    }

    .menu li a {
        display: block;
        padding: 15px 0;
    }

    /* Hamburger menu animation */
    .menu-btn.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-btn.active .bar:nth-child(2) {
        opacity: 0;
        transition: 0.1s;
        /* smooth fade */
    }

    .menu-btn.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }


    /*opleiding sectie*/
    .opleiding {
        padding: 80px 0 40px 0;
    }

    .opleiding h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .opleiding-txt {
        padding: 0 15px;
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /*vaardigheden sectie*/

    .vaardigheden-lijst {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }

    .vaardigheid {
        width: 100%;
        aspect-ratio: 1/1;
        min-height: unset;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0;
        height: 150px;
    }

    .vaardigheid h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .vaardigheid p {
        font-size: 0.9rem;
        padding: 0 10px;
        text-align: center;
    }

    .skill {
        margin: 0 15px 15px 15px;
    }

    .skill span {
        margin-left: 0;
        text-align: left;
        display: block;
        margin-bottom: 5px;
    }

    .skill-bar {
        margin: 0;
        width: 100%;
    }

    /*projecten sectie*/

    .projecten-container {
        display: flex;
        /* Added to support flex-direction */
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    /* Updated .project to .project-card to match HTML */
    .project-card {
        width: 90%;
        /* height: 350px;  Removed fixed height to allow content (img + text) to dictate height naturally, or keep if strict */
        height: auto;
        min-height: 300px;
    }

    /* Fix for "Bekijk meer" section on mobile */
    .extra-projecten {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        /* consistent spacing */
        width: 100%;
        grid-template-columns: unset;
        /* Override grid from desktop */
    }

    .project-card .overlay p {
        font-size: 0.9rem;
        line-height: 1.4;
        padding: 15px;
    }

    /*overmij sectie*/
    .contact {
        padding: 80px 20px;
    }

    .contact-container {
        flex-direction: column;
        gap: 30px;
        width: 100%;
        padding: 0 15px;
    }

    .contact-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .contact-item img {
        width: 40px;
        height: 40px;
    }

    .contact-item span,
    .contact-item a {
        font-size: 1rem;
        word-break: break-word;
        text-align: center;
    }

    .download-cv {
        width: 100%;
        max-width: 250px;
        text-align: center;
        padding: 12px 20px;
        margin-top: 20px;
    }

    /*secties full screen*!*/

    .home,
    .opleiding,
    .vaardigheden,
    .projecten,
    .contact {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 60px 20px;
        box-sizing: border-box;
    }


    .home {
        background-image: url('project_frontend_img/home_background_phone.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        min-height: 100vh;
        padding-top: 80px;
    }


    .projecten {
        min-height: 100vh;
        height: auto;
        padding-bottom: 40px;
    }
}

/* LIGHTBOX (Zoom) */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    cursor: zoom-out;
}

.image-lightbox.active {
    display: flex;
}

.image-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
}

/* Indicatie dat home-box fotos klikbaar zijn */
.project-modal[data-current-project="over-mij"] .modal-media img,
.project-modal[data-current-project="hobbies"] .modal-media img,
.project-modal[data-current-project="werk"] .modal-media img {
    cursor: zoom-in;
}