:root {
    --sky-color: linear-gradient(to bottom, skyblue, #6b99d9);
    --cloud-color: white;
    --shallow-water-color: linear-gradient(to bottom, rgb(32, 32, 116), rgb(20, 20, 61));
    --deep-water-color: linear-gradient(to bottom, rgb(20, 20, 61), rgb(8, 8, 44));
    --abyss-color: linear-gradient(to bottom, rgb(8, 8, 44), black);
    --carousel-sets: 2;
}
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
    
    .carousel-track, .carousel-track.reverse {
        animation: none !important;
        transform: none !important;
        flex-wrap: wrap !important; 
        overflow-x: auto;
    }
    
    .bubble:hover {
        transform: none !important;
    }
}
@media (prefers-color-scheme: light) {
    :root {
        
    }
}
html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;

    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    background-color: black;
}

h2 {
    
}

p, h3 {
    font-family: Montserrat, Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;

}

header {
    height: 0;
}

section {
    scroll-margin-top: 50vh;
}


/* SECTION 1 /////////////////////////////////////////////////////////////*/

section:nth-of-type(1) {
    position: relative;
    background: var(--sky-color);
    width: 100%;
    height: 80%;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

h1 {
    text-align: center;
    margin: 0;
    font-size: 5em;
    color: rgb(56, 56, 130);
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

/* Call to action */
section:nth-of-type(1)>a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10%;
    min-width: fit-content;
    padding: .6rem 1rem;

    text-decoration: none;
    color: white;
    font-size: 2em;
    background-color: rgb(56, 56, 130);
    border-radius: 20px;

    animation: pulse-button 5s infinite linear;
}

section:nth-of-type(1)>a:hover {
    border: rgb(56, 56, 130), solid, 3px;
    background-color: transparent;
    color: rgb(56, 56, 130);
}

@keyframes pulse-button {
    from {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

/* Name text */
.name-container {
    position: absolute;
    left: 30vw;
    bottom: -4vw;
}

.name-container>h2 {
    position: absolute;

    font-size: calc(10px + 5vw);
    font-weight: 900;
    color: #ddd;
    letter-spacing: .4px;
    text-transform: uppercase;
    perspective: 500px;
    transform: rotate(3deg);
    z-index: 10;
    margin: 0;
}

#last-name {
    left: 21vw;
}

.name-container>h2::before,
.name-container>h2::after {
    content: attr(aria-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 11;
    text-shadow: 0.16px 0.16px 0.16px rgba(0, 0, 0, 0.3);
}

.name-container>h2::before {
    animation: drifting-letters-1 3.5s ease-in-out infinite;
    clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%);
}

.name-container>h2::after {
    opacity: .7;
    filter: blur(1px);
    transform: translate(-50%, -50%) rotateX(20deg);
    animation: drifting-letters-2 3.5s ease-in-out infinite;
    clip-path: polygon(0% 50%, 100% 50%, 100% 100%, 0% 100%);
}

@keyframes drifting-letters-1 {
    50% {
        transform: translate(-50%, -60%);
        clip-path: polygon(0% 0%, 100% 0%, 100% 60%, 0% 60%);

    }
}

@keyframes drifting-letters-2 {
    50% {
        transform: translate(-50%, -60%) rotateX(10deg);
        clip-path: polygon(0% 60%, 100% 60%, 100% 100%, 0% 100%);
    }
}



/* Floating Clouds */
.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: var(--cloud-color);
    border-radius: 100px;
    opacity: 0.7;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: var(--cloud-color);
    border-radius: 100px;
}

.cloud::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud::after {
    width: 60px;
    height: 60px;
    top: -30px;
    right: 10px;
}

.cloud-1 {
    width: 100px;
    height: 40px;
    top: 15%;
    left: -100px;
    animation: float 23s infinite linear;
}

.cloud-2 {
    width: 120px;
    height: 45px;
    top: 25%;
    right: -120px;
    animation: float-reverse 25s infinite linear;
    animation-delay: 1s;
}

.cloud-3 {
    width: 90px;
    height: 35px;
    top: 35%;
    left: -90px;
    animation: float 28s infinite linear;
    animation-delay: 5s;
}

.cloud-4 {
    width: 120px;
    height: 45px;
    top: 15%;
    right: -120px;
    animation: float-reverse 22s infinite linear;
    animation-delay: 3s;
}

.cloud-5 {
    width: 90px;
    height: 35px;
    top: 20%;
    left: -90px;
    animation: float 24s infinite linear;
    animation-delay: 9s;
}


@keyframes float {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(100vw + 200px));
    }
}

@keyframes float-reverse {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100vw - 200px));
    }
}

/* SECTION 2 /////////////////////////////////////////////////////////////*/

section:nth-of-type(2) {
    --bg-variable-name: var(--shallow-water-color);
}



/* Update the shared block to use the glow */
section:not(:first-of-type) {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle 150px at var(--cursorX, 50%) var(--cursorY, 50%),
            rgba(66, 245, 245, var(--glowOpacity, 0.1)) 0%,
            transparent 100%),
        var(--bg-variable-name);
    /* This is the bottom layer */

}

section:nth-of-type(2) {
    color: white;

    width: 100%;
    height: 300vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

section:nth-of-type(2) p {
    color: #6b99d9;
}

h2 {
    margin: 0;
    scroll-margin-top: 30vh;
}


.wave-text span {
    display: inline-block;
    font-size: 4rem;
    color: #6b99d9;
    animation: wave 7s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(66, 245, 245, 0.1),
        0 0 25px rgba(66, 245, 245, 0.1),
        0 0 35px rgba(66, 245, 245, 0.1);
}



.wave-text span:nth-child(1) {
    animation-delay: 0s;
}

.wave-text span:nth-child(2) {
    animation-delay: 0.2s;
}

.wave-text span:nth-child(3) {
    animation-delay: 0.4s;
}

.wave-text span:nth-child(4) {
    animation-delay: 0.6s;
}

.wave-text span:nth-child(5) {
    animation-delay: 0.7s;
}

.wave-text span:nth-child(6) {
    animation-delay: 0.8s;
}

.wave-text span:nth-child(7) {
    animation-delay: 0.9s;
}

.wave-text span:nth-child(8) {
    animation-delay: 1s;
}

.wave-text span:nth-child(9) {
    animation-delay: 1.1s;
}

.wave-text span:nth-child(10) {
    animation-delay: 1.2s;
}

.wave-text span:nth-child(11) {
    animation-delay: 1.3s;
}

.wave-text span:nth-child(12) {
    animation-delay: 1.4s;
}

@keyframes wave {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}



/* --- SECTION 2 GRID & BUBBLE LOGIC --- */

.parent {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
    justify-items: center;
    padding: 2rem 0;
}

.wave-container {
    grid-column: 1 / -1;
    order: -1; 
}

.bubble {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    
    width: 120px;
    height: 120px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: rgba(107, 153, 217, 0.15);
    border: 3px solid rgba(202, 203, 205, 0.4);
    color: #6b99d9;
    cursor: pointer;
    backdrop-filter: blur(6px);
    
    animation: floatBubble 4s ease-in-out infinite;
    animation-delay: var(--delay);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bubble.active {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: auto;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 50;
    padding: 1.5rem;
}

@media (min-width: 1024px) {
    .parent {
        display: block; 
        height: 600px;  
        width: 100%;
    }

    section:nth-of-type(2) .wave-container {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .bubble {
        position: absolute !important;
        left: var(--x) !important;
        top: var(--y) !important;
        width: 100px;
        height: 100px;
    }

    .bubble.active {
        width: 320px;
        grid-column: auto;
    }
}

/* --- TEXT & ANIMATION FIXES --- */

.bubble-title {
    font-size: 2.5em;
    line-height: 1;
}

.bubble-text {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    font-size: 0.95rem;
    color: #ddd;
    margin-top: 0;
    transition: all 0.4s ease;
}
.bubble.active {
    animation: floatBubble 10s infinite ease-in-out;
}

.bubble.active .bubble-text {
    opacity: 1;
    max-height: 300px;
    margin-top: 1rem;
}

.bubble.active .bubble-title {
    font-size: 1.2rem;
}

/* Floating animation */
@keyframes floatBubble {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
        transform: scale(1.2);
    }
}

#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background-color: var(--particle-color, #fff);
    border-radius: 50%;
    opacity: 0;
    filter: blur(1px);
    transition: background-color 0.5s ease, opacity 0.5s ease;
    animation: drift 10s infinite ease-in-out;
}

@keyframes drift {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, 50px);
    }

    66% {
        transform: translate(-20px, 100px);
    }
}

/* SECTION 3 leerdoelen /////////////////////////////////////////////////////////////*/
section:nth-of-type(3) {
    --bg-variable-name: var(--deep-water-color);
}


section:nth-of-type(3) {
    color: white;

    width: 100%;
    min-height: 300vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

section:nth-of-type(3) .wave-text span {
    color: #5385c2;
    text-shadow: 0 0 15px rgba(66, 245, 245, 0.1),
        0 0 25px rgba(66, 245, 245, 0.1),
        0 0 35px rgba(66, 245, 245, 0.1);
}

#leerdoelen-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.grid-parent {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 95%;
    max-width: 1600px;
    height: 80vh;
}

/* Badges voor de competenties */
.competence-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(66, 245, 245, 0.2);
    border: 1px solid rgba(66, 245, 245, 0.5);
    color: #42f5f5;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Meetbaarheid blokje */
.measurement {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #6b99d9;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
}

.measurement h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #6b99d9;
}

.measurement ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: #ddd;
}

/* Grid Assignments */
section:nth-of-type(3) .leerdoel-1 {
    grid-area: 1 / 1 / 4 / 2;
    display: flex;
    align-items: center;
    
}

.section-title {
    grid-area: 2 / 2 / 3 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.leerdoel-2 {
    grid-area: 1 / 3 / 4 / 4;
    display: flex;
    align-items: center;
}

/* Card Styling & Animations */
.goal-card {
    width: 80%;
    background: rgba(107, 153, 217, 0.05);
    border: 2px solid rgba(107, 153, 217, 0.2);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: all 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.left-slide {
    transform: translateX(-150px);
}

.right-slide {
    transform: translateX(150px);
}

.goal-card.reveal {
    opacity: 1;
    transform: translateX(0);
}

.placeholder-img img {
    width: 100%;
    height: 50%;
    opacity: 0.7;
}

/* Responsive Logic */
@media (width < 1230px) {
    .wave-text span {
    font-size: 50px;
}
}
@media (width < 680px) {
    .wave-text span {
    font-size: 30px;
}
}
@media (max-width: 1024px) {
    .grid-parent {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        gap: 2rem;
    }


    .left-slide,
    .right-slide {
        transform: translateY(30px);
    }
}


/* SECTION 4 /////////////////////////////////////////////////////////////*/
section:nth-of-type(4) {
    --bg-variable-name: var(--abyss-color);
}

section:nth-of-type(4) {
    color: white;

    width: 100%;
    min-height: 300vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

section:nth-of-type(4) .wave-text span {
    color: #609696;
    text-shadow: 0 0 15px rgba(66, 245, 245, 0.2),
        0 0 25px rgba(66, 245, 245, 0.2),
        0 0 35px rgba(66, 245, 245, 0.2);
}

#obsession {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--abyss-color);
    overflow: hidden;
}

.obsessions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: max-content;
    width: 100%;
    height: 100%;
}


section:nth-of-type(4) .kook-passie {
    grid-area: 1 / 1 / 2 / 4;

}

section:nth-of-type(4) .section-title {
    grid-area: 2 / 2 / 3 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    margin: 8% 0;
}

section:nth-of-type(4) .sport-passie {
    grid-area: 3 / 1 / 4 / 4;
}

/* Carousel Mechanics */
.carousel-container {
    width: 100%;
    overflow: clip;
    display: flex;
    align-items: center;

    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}


.carousel-track {
    display: flex;
    width: max-content;
    animation: scroll-left 20s linear infinite;
}

.carousel-track.reverse {
    animation: scroll-right 25s linear infinite;
}

.carousel-item {
    width: 200px;
    height: 280px;
    margin: 0 30px;
    border-radius: 10px;
    overflow: clip;
    border: 3px solid rgb(58, 149, 167);
}

.carousel-img {
    width: 200px;
    height: 200px;
    margin: 0 30px;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid rgb(58, 149, 167);
}

.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Infinite Scroll Animations */
/* Bron: Cyd Stumpel */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-100% / var(--carousel-sets)));
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(calc(-100% / var(--carousel-sets)));
    }

    100% {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .obsessions-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 0.5fr 1fr;
    }

    section:nth-of-type(4) .section-title {
        grid-area: 2 / 1 / 3 / 2;
    }

    .carousel-item {
        width: 180px;
        height: 110px;
    }
}

/* SECTION 5 /////////////////////////////////////////////////////////////*/

section:nth-of-type(5) {
    --bg-variable-name: black;
}

section:nth-of-type(5) {

    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    margin-top: 10%;
}
#fish-container {
    position: relative; 
    width: 100%;
    height: 100vh; 
    overflow: hidden;
}
.student-fish {
    position: absolute;
    left: -200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: swim linear infinite;
    z-index: 10;
}

.fish-body {
    position: relative;
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
}

.student-fish img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--fish-glow);
    box-shadow: 0 0 15px var(--fish-glow);
    object-fit: cover;
    z-index: 2;
}

/* De Staart */
.fish-tail {
    position: absolute;
    left: -7px; 
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 30px solid var(--fish-glow); 
    border-radius: 5px;
    z-index: 1;
    
    /* De kwispel-animatie */
    animation: tailWag 0.5s ease-in-out infinite alternate;
    transform-origin: left center;
}

/* De naam van de student */
.fish-name {
    color: white;
    font-size: 0.7rem;
    font-family: Montserrat, sans-serif;
    margin-top: 8px;
    text-shadow: 0 0 5px black;
}
@keyframes swim {
    0% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(25vw) translateY(-30px) rotate(2deg);
    }
    75% {
        transform: translateX(75vw) translateY(30px) rotate(-2deg);
    }
    100% {
        transform: translateX(calc(100vw + 300px)) translateY(0);
    }
}

@keyframes tailWag {
    from {
        transform: rotate(-15deg);
    }
    to {
        transform: rotate(15deg);
    }
}

/* Navigation Buttons */
.nav-button {
    position: fixed;
    right: 2rem;
    padding: 0.8rem 1.5rem;
    background-color: rgb(56, 56, 130);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 100;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    background-color: black;
    font-size: 2em;
    border: solid white 2px;
}

.nav-button:hover {
    background-color: rgb(76, 147, 160);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.nav-button:active {
    transform: translateY(0);
}

.float-up-btn {
    top: 2rem;

}

.sink-down-btn {
    bottom: 2rem;
}


/* Footer //////////////////////////////////////////////////////////////////////////////// */

.ocean-floor {
    position: relative;
    width: 100%;
    min-height: 300px;
    background: linear-gradient(to bottom, #000 0%, #08082c 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

/* De zandbodem */
.sand-floor {
    width: 100%;
    height: 60px;
    background: #c2b280; /* Zandkleur */
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.5);
    clip-path: polygon(0 20%, 15% 0, 35% 15%, 55% 5%, 75% 20%, 85% 5%, 100% 15%, 100% 100%, 0 100%);
    z-index: 5;
}

/* De inhoud van de footer */
.footer-content {
    position: relative;
    z-index: 10;
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Space Grotesk', sans-serif;
}

.footer-links a {
    color: #42f5f5;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.footer-links a:hover {
    border-bottom: 1px solid #42f5f5;
}

/* Zeewier animatie */
.seaweed-container {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    height: 150px;
    pointer-events: none;
}

.seaweed {
    position: absolute;
    bottom: 0;
    width: 10px;
    background: linear-gradient(to top, #1b4d3e, #2e8b57);
    border-radius: 5px 5px 0 0;
    transform-origin: bottom center;
    animation: sway 4s ease-in-out infinite alternate;
}

.seaweed-1 { height: 80px; left: 10%; animation-duration: 3s; }
.seaweed-2 { height: 120px; left: 15%; animation-duration: 4s; animation-delay: 1s; }
.seaweed-3 { height: 60px; left: 85%; animation-duration: 3.5s; }

@keyframes sway {
    from { transform: rotate(-5deg) skewX(-2deg); }
    to { transform: rotate(5deg) skewX(2deg); }
}

@media (width < 700px) {
    .name-container {
        top: 112%;
        left: 50%;
        right: 50%;

    }

    .name-container h2 {

        font-size: 50px;
    }
    .nav-button {
        right: 1rem;
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .float-up-btn {
        top: 1rem;
    }

    .sink-down-btn {
        bottom: 1rem;
    }

    .wave-text span {
        font-size: 3rem;

    }

}