/* Reset default margins and paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Set body font */
body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Canvas */
#animationCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000;
}

/* Main Content Styling */
.content {
    position: relative;
    z-index: 1;
    color: #fff;
}

/* Hero Section */
#hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
}

#hero h1 {
    font-size: 5em;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    margin-top: 20px;
}

.scroll-indicator span {
    font-size: 1em;
}

.scroll-indicator .arrow {
    margin-top: 10px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(10px);
    }
    60% {
        transform: rotate(45deg) translateY(5px);
    }
}

/* Section Styling */
section {
    padding: 60px 10%;
    background: rgba(0, 0, 0, 0.7);
}

section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

section p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #fff;
}

/* Carousel */
.carousel,
.carousel-big {
    display: flex;
    overflow: hidden;

    scroll-behavior: smooth;
    padding: 20px;
    gap: 20px;
}

.carousel-item,
.carousel-item-big {
    position: relative;
    overflow: hidden;

    width: 350px;
    height: 400px;
    cursor: pointer;
    perspective: 1000px;
    min-width: 350px; /* Ensure minimum width */
    min-height: 400px; /* Ensure minimum height */
}

.carousel-item-big {
    width: 700px;
    height: 800px;
    min-width: 700px; /* Ensure minimum width */
    min-height: 800px; /* Ensure minimum height */
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 6px 32px 0 rgba(0,0,0,0.25), 0 1.5px 6px 0 rgba(0,0,0,0.12);
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: opacity 0.3s;
}

.card-face.front {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
}

.card-face.back {
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(to top, #181818 90%, rgba(0,0,0,0.7) 100%);
    color: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 24px;
    text-align: center;
    opacity: 1;
    backface-visibility: hidden;
}

.card-bio h4 {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: 0.5px;
}

.card-bio p {
    font-size: 1.05em;
    color: #eaeaea;
    margin: 0;
    line-height: 1.5;
}

.carousel-item.flipped .card-face.front {
    opacity: 0;
    pointer-events: none;
}

.carousel-item.flipped .card-face.back {
    opacity: 1;
    pointer-events: auto;
    animation: showBackFace 0.6s forwards;
}

@keyframes showBackFace {
    0% {
        opacity: 0;
        backface-visibility: hidden;
    }
    100% {
        opacity: 1;
        backface-visibility: visible;
    }
}

.carousel-item.flipped .card,
.carousel-item-big.flipped .card {
    transform: rotateY(180deg);
    backface-visibility: visible;
}

.text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    background: linear-gradient(to top, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.2) 100%);
    padding: 18px 16px 12px 16px;
    border-radius: 0 0 10px 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.text-overlay h3 {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.text-overlay .title {
    font-size: 1em;
    font-weight: 400;
    margin-bottom: 0;
    margin-top: 0;
    color: #eaeaea;
    letter-spacing: 0.1px;
}

.card-social-icons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 8px;
    align-items: center;
}

.card-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    transition: background 0.2s, transform 0.2s;
}

.card-social-icons a:hover {
    background: #fff;
    transform: scale(1.12);
}

.card-social-icons img {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Ensure images fit within the card */
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
}

social-links a:hover {
    text-decoration: underline;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #555;
    background: rgba(0, 0, 0, 0.7);
}

footer p {
    color: #aaa;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 1000px) {
    #hero h1 {
        font-size: 3em;
    }

    section h2 {
        font-size: 2em;
    }

    .carousel {
        flex-direction: column;
        align-items: center;
        overflow: auto;

    }

    .carousel-item {
        margin-bottom: 20px;
        overflow: auto;
        min-height: auto;
        min-width: auto;

    }
    .carousel .carousel-item {
        margin-bottom: 20px; /* Add space between carousel items */
    }

    .card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .card-face.back {
        overflow-y: auto;
    }
    .carf-face.back p {
        padding-top: 20px;
    }

    .event-details {
        flex-direction: column;
    }

    /* Ensure projects are displayed horizontally on mobile */
    .carousel-big {
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
    }

    .carousel-item-big {
        width: 80%;
        margin-right: 20px;
    }
}

@media screen and (max-width: 480px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav ul {
        flex-direction: column;
        margin-top: 10px;
    }

    header nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }
    .carousel {
        flex-direction: column;
        align-items: center;
        padding: 0;
        overflow: auto;

    }

    .carousel-item {
        width: 80%;
        overflow: auto;

        margin-bottom: 20px;
    }
    .back {
        padding: 10px;
    }

    /* Ensure projects are displayed horizontally on mobile */
    .carousel-big {
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
    }

    .carousel-item-big {
        width: 80%;
        margin-right: 20px;
    }
}

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