:root {
    --bg-dark: #0e0e12;
    --card-bg: #1a1a22;
    --primary: #f1f1f1;
    --accent: #F9CB40;
    --text-light: #f1f1f1;
    --text-muted: #aaa;
    --max-width: 900px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #ffd65c;
}

/* Header */
header {
    width: 100%;
    background: rgba(26, 26, 34, 0.8);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-light);
    font-weight: 500;
}

nav a:hover {
    color: var(--accent);
}

/* Main Layout */
main {
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    text-align: center;
}

section {
    width: 100%;
    margin-bottom: 4rem;
}

h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

p {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
}

/* Bio */
#bio img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(249, 203, 64, 0.3);
}

/* Projecten */
#projecten {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: #23232d;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 20px rgba(249, 203, 64, 0.3);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #111;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.03);
    opacity: 0.95;
}

.project-card h3 {
    color: var(--accent);
    margin: 1rem 0 0.5rem 0;
}

.project-card p {
    color: var(--text-muted);
    padding: 0 1rem 1.5rem;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
    padding: 1rem;
    animation: fadeIn 0.4s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    width: 95%;
    max-width: 1100px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
}

/* Carousel */
.carousel {
    flex: 1 1 500px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background-color: #111;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel img,
.carousel video {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    background-color: #111;
    display: none;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel img.active,
.carousel video.active {
    display: block;
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    border-radius: 50%;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin: 0.8rem 0 0;
    gap: 0.8rem;
    /* vergrootte afstand */
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dots .dot.active {
    background-color: var(--accent);
}

/* Tekst naast afbeelding */
.modal-text {
    flex: 1 1 350px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.modal-text h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal-text p {
    color: var(--text-muted);
    line-height: 1.6;
    max-height: 60vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
    color: var(--accent);
    cursor: pointer;
    z-index: 10;
}

/* Fade animatie */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Contactformulier */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

input,
textarea {
    width: 100%;
    max-width: 600px;
    background: #23232d;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    color: var(--text-light);
}

input:focus,
textarea:focus {
    outline: 2px solid var(--accent);
}

button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

button:hover {
    background: #ffbf00;
}

/* Bericht na formulier */
.form-message {
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.form-message.show {
    opacity: 1;
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* ============================= */
/* RESPONSIEF GEDRAG */
/* ============================= */

@media (max-width: 1024px) {
    nav {
        gap: 1.2rem;
        /* meer ruimte tussen links op iPad */
    }

    nav a {
        font-size: 0.95rem;
        /* iets kleiner op iPad */
    }
}

@media (max-width: 900px) {
    .modal-body {
        flex-direction: column;
        align-items: center;
    }

    .modal-text {
        text-align: center;
    }
}

/* Fix modal scroll & layout op mobiel */
@media (max-width: 768px) {
    .modal {
        align-items: flex-start;
        overflow-y: auto;
        padding: 2rem 1rem;
    }

    .modal-content {
        width: 100%;
        max-height: none;
        padding: 1.5rem;
    }

    .modal-text p {
        max-height: none;
        overflow: visible;
    }

    .carousel-dots {
        gap: 1rem;
        /* extra ruimte tussen dots op mobiel */
    }
}