/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    overflow-x: hidden;
}

header {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    transform: perspective(500px) rotateX(10deg);
    transition: transform 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
}

header h1:hover {
    transform: perspective(500px) rotateX(0deg) scale(1.05);
}

nav {
    position: relative;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: flex-end;
    transition: all 0.5s ease;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #5e72e4;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

nav ul li a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

nav ul li a.active::after {
    transform: scaleX(1);
}

main {
    padding-top: 80px;
}

.section {
    min-height: 100vh;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 2rem;
    position: relative;
    --parallax-x: 0px;
    --parallax-y: 0px;
}

.parallax-ready {
    transform: translate(var(--parallax-x), var(--parallax-y));
    transition: transform 0.2s ease-out;
}

h2 {
    margin-bottom: 2rem;
    position: relative;
    text-align: center;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #5e72e4;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: #5e72e4;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #4154c0;
    text-decoration: underline;
}

/* 3D Cube */
.scene {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    perspective: 600px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.front {
    background: rgba(94, 114, 228, 0.8);
    transform: translateZ(100px);
}

.back {
    background: rgba(251, 99, 64, 0.8);
    transform: rotateY(180deg) translateZ(100px);
}

.right {
    background: rgba(45, 206, 137, 0.8);
    transform: rotateY(90deg) translateZ(100px);
}

.left {
    background: rgba(251, 207, 51, 0.8);
    transform: rotateY(-90deg) translateZ(100px);
}

.top {
    background: rgba(87, 97, 160, 0.8);
    transform: rotateX(90deg) translateZ(100px);
}

.bottom {
    background: rgba(23, 43, 77, 0.8);
    transform: rotateX(-90deg) translateZ(100px);
}

.controls {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

button {
    background-color: #5e72e4;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: perspective(400px) rotateX(0);
}

button:hover {
    background-color: #4154c0;
    transform: perspective(400px) rotateX(10deg) translateY(-5px);
    box-shadow: 0 5px 15px rgba(94, 114, 228, 0.3);
}

/* 3D Flip Cards */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    width: 250px;
    height: 300px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-front {
    background: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%);
    color: white;
}

.card-front img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.card-front h3 {
    margin-top: auto;
}

.card:hover .card-front img {
    transform: scale(1.05);
}

.card-back {
    background: white;
    color: #333;
    transform: rotateY(180deg);
}

/* 3D Carousel */
.carousel-container {
    width: 100%;
    max-width: 800px;
    height: 300px;
    position: relative;
    perspective: 800px;
    margin: 2rem auto;
}

.carousel {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 1s;
}

.carousel-item {
    position: absolute;
    width: 300px;
    height: 180px;
    line-height: 180px;
    font-size: 1.5rem;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0.7;
    transform: translateZ(-300px);
}

.carousel-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.carousel-nav {
    position: absolute;
    bottom: -40px;
    width: 100%;
    text-align: center;
}

.carousel-nav button {
    margin: 0 10px;
}

/* 3D Contact Form */
.form-3d-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    perspective: 1000px;
}

#contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: rotateX(5deg);
    transition: transform 0.5s ease;
}

#contact-form:hover {
    transform: rotateX(0);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    transform: translateZ(10px);
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

input:focus, textarea:focus {
    border-color: #5e72e4;
    outline: none;
    box-shadow: 0 0 10px rgba(94, 114, 228, 0.2);
    transform: translateZ(10px);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #5e72e4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #4154c0;
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 10px 20px rgba(94, 114, 228, 0.3);
}

/* Responsive styles */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    nav ul {
        position: fixed;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        padding: 80px 30px 30px;
        z-index: 1000;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        align-items: flex-start;
    }
    
    nav.active ul {
        right: 0;
    }
    
    nav ul li {
        margin: 1rem 0;
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 0.8rem 0;
        font-size: 1.1rem;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .section {
        margin: 1rem;
        padding: 3rem 1rem;
    }
    
    .cards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .carousel-item {
        width: 240px;
        height: 150px;
        line-height: 150px;
        font-size: 1.3rem;
    }
    
    .cube {
        width: 150px;
        height: 150px;
    }
    
    .face {
        width: 150px;
        height: 150px;
    }
    
    .front, .back {
        transform: translateZ(75px);
    }
    
    .right {
        transform: rotateY(90deg) translateZ(75px);
    }
    
    .left {
        transform: rotateY(-90deg) translateZ(75px);
    }
    
    .top {
        transform: rotateX(90deg) translateZ(75px);
    }
    
    .bottom {
        transform: rotateX(-90deg) translateZ(75px);
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }
    
    .section {
        margin: 0.5rem;
        padding: 2rem 1rem;
    }
    
    .card {
        width: 90%;
        max-width: 280px;
    }
    
    .carousel-item {
        width: 200px;
        height: 130px;
        line-height: 130px;
        font-size: 1.1rem;
    }
    
    .form-3d-container {
        width: 95%;
    }
    
    #contact-form {
        padding: 1.5rem;
    }
    
    .cube {
        width: 120px;
        height: 120px;
    }
    
    .face {
        width: 120px;
        height: 120px;
        font-size: 1.2rem;
    }
    
    .front, .back {
        transform: translateZ(60px);
    }
    
    .right {
        transform: rotateY(90deg) translateZ(60px);
    }
    
    .left {
        transform: rotateY(-90deg) translateZ(60px);
    }
    
    .top {
        transform: rotateX(90deg) translateZ(60px);
    }
    
    .bottom {
        transform: rotateX(-90deg) translateZ(60px);
    }
    
    .controls {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Background Animation with Particles */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    animation: float 15s ease-in-out infinite;
    opacity: 0.3;
}

.particle:nth-child(2) {
    top: 70%;
    left: 80%;
    width: 60px;
    height: 60px;
    animation: float 18s ease-in-out infinite 1s;
    opacity: 0.2;
}

.particle:nth-child(3) {
    top: 40%;
    left: 40%;
    width: 120px;
    height: 120px;
    animation: float 20s ease-in-out infinite 2s;
    opacity: 0.1;
}

.particle:nth-child(4) {
    top: 10%;
    left: 60%;
    width: 40px;
    height: 40px;
    animation: float 12s ease-in-out infinite 3s;
    opacity: 0.2;
}

.particle:nth-child(5) {
    top: 80%;
    left: 30%;
    width: 70px;
    height: 70px;
    animation: float 16s ease-in-out infinite 2s;
    opacity: 0.15;
}

.particle:nth-child(6) {
    top: 30%;
    left: 85%;
    width: 50px;
    height: 50px;
    animation: float 14s ease-in-out infinite 1s;
    opacity: 0.25;
}

.particle:nth-child(7) {
    top: 90%;
    left: 50%;
    width: 90px;
    height: 90px;
    animation: float 22s ease-in-out infinite;
    opacity: 0.1;
}

.particle:nth-child(8) {
    top: 15%;
    left: 25%;
    width: 65px;
    height: 65px;
    animation: float 17s ease-in-out infinite 3s;
    opacity: 0.2;
}

.particle:nth-child(9) {
    top: 55%;
    left: 15%;
    width: 55px;
    height: 55px;
    animation: float 15s ease-in-out infinite 2s;
    opacity: 0.15;
}

.particle:nth-child(10) {
    top: 75%;
    left: 75%;
    width: 75px;
    height: 75px;
    animation: float 19s ease-in-out infinite 1s;
    opacity: 0.2;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(5deg);
    }
    50% {
        transform: translateY(10px) translateX(-15px) rotate(10deg);
    }
    75% {
        transform: translateY(-15px) translateX(-5px) rotate(5deg);
    }
    100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
}

#gallery.section {
    padding-top: 3rem;
    padding-bottom: 5rem;
} 