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

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Montserrat', 'Verdana', sans-serif;
}

h1 {
    font-family: 'Montserrat', 'Verdana', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: #e0e7ff;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

.header {
    background-color: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 15px 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
}

.header-nav {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.header-nav li {
    margin: 0;
}

.header-nav a {
    color: rgba(224, 231, 255, 0.7);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.header-nav a:hover {
    color: #e0e7ff;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.header-nav a.active {
    color: #e0e7ff;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
}

body {
    /* padding-top: 100px; */
    background: #000;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500vw;
    height: 500vh;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 792 792"><style>.st0{fill:%23fa2921}.st1{fill:%23ed79b5}.st2{fill:%23ffb400}.st3{fill:%231e83f7}.st4{fill:%2318c249}</style><path class="st0" d="M375.48 267.63c38.64 34.21 69.78 70.87 89.82 105.42 34.42-61.56 57.42-134.71 57.71-181.3 0-.33 0-.63 0-.91 0-68.94-68.77-95.77-128.01-95.77s-128.01 26.83-128.01 95.77c0 .94 0 2.2 0 3.72 33.02 14.68 72.16 40.91 108.49 73.07z"/><path class="st1" d="M164.7 455.63c24.15-26.87 61.2-55.99 103.01-80.61 44.48-26.18 88.97-44.47 128.02-52.84-47.91-51.76-110.37-96.24-154.6-110.91-.31-.1-.6-.19-.86-.28-65.57-21.3-112.34 35.81-130.64 92.15-18.3 56.34-14.04 130.04 51.53 151.34.89.29 2.09.68 3.54 1.15z"/><path class="st2" d="M681.07 302.19c-18.3-56.34-65.07-113.45-130.64-92.15-.9.29-2.1.68-3.54 1.15-3.75 35.93-16.6 81.27-35.96 125.76-20.59 47.32-45.84 88.27-72.51 118 69.18 13.72 145.86 12.98 190.26-1.14.31-.1.6-.2.86-.28 65.57-21.3 69.83-95 51.53-151.34z"/><path class="st3" d="M336.54 510.71c-11.15-50.39-14.8-98.36-10.7-138.08-64.03 29.57-125.63 75.23-153.26 112.76-.19.26-.37.51-.53.73-40.52 55.78-.66 117.91 47.27 152.72 47.92 34.82 119.33 53.54 159.86-2.24.56-.76 1.3-1.78 2.19-3.01-18.09-31.27-34.35-75.51-44.83-122.88z"/><path class="st4" d="M617.57 482.52c-35.33 7.54-82.42 9.33-130.72 4.66-51.37-4.96-98.11-16.32-134.63-32.5 8.33 70.03 32.73 142.73 59.88 180.6.19.26.37.51.53.73 40.52 55.78 111.93 37.06 159.86 2.24 47.92-34.82 87.79-96.95 47.27-152.72-.37-.76-1.11-1.78-2-3.01z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: blur(120px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    animation: rainbow-spin 300s linear infinite;
}


@keyframes rainbow-spin {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

section {
    min-height: 100vh;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

section h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #e0e7ff;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

.section-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 80px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 1);
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.section-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.15);
}

#about {
    background: transparent;
}

#projects {
    background: transparent;
}

#contact {
    background: transparent;
}

/* Contact Section Styles */
.contact-intro {
    color: rgba(224, 231, 255, 0.8);
    font-size: 1.1rem;
    text-align: left;
    margin: 20px 0 40px 0;
    line-height: 1.6;
}

.contact-form {
    margin-bottom: 50px;
}

/* Center Cloudflare Turnstile widget */
.cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 16px 0 24px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #e0e7ff;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: #e0e7ff;
    font-family: 'Montserrat', 'Verdana', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 12px;
    color: #e0e7ff;
    font-family: 'Montserrat', 'Verdana', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.submit-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

.contact-divider {
    text-align: center;
    position: relative;
    margin: 50px 0 40px 0;
}

.contact-divider::before,
.contact-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(139, 92, 246, 0.3),
        transparent
    );
}

.contact-divider::before {
    left: 0;
}

.contact-divider::after {
    right: 0;
}

.contact-divider span {
    color: rgba(224, 231, 255, 0.5);
    font-size: 0.9rem;
    background: transparent;
    padding: 0 20px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.contact-card:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
    transform: translateY(-5px);
}

.contact-card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.contact-card h3 {
    color: #e0e7ff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.contact-card p {
    color: rgba(224, 231, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    display: block;
}

.footer {
    background-color: rgba(10, 10, 15, 0.8);
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    padding: 20px 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-content p {
    color: rgba(224, 231, 255);
    margin: 0;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: rgba(224, 231, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: rgba(139, 92, 246, 0.9);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header {
        padding: 25px 20px;
    }

    .container {
        flex-direction: column;
        gap: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .header-nav a {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    body {
        padding-top: 140px;
    }

    .section-container {
        padding: 40px 30px;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }
    
    .contact-divider::before,
    .contact-divider::after {
        width: 35%;
    }

    /* keep the form visible on mobile */
    .contact-form {
        margin-bottom: 30px;
    }
    
    .contact-divider {
        margin: 30px 0;
    }
    
    .contact-intro {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}