:root {
    --primary-color: #8b5cf6;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #e2e8f0;
    --heading-color: #f8fafc;
    --bg-gradient-start: #0f172a;
    --bg-gradient-mid: #1e293b;
    --bg-gradient-end: #312e81;
    --animation-duration: 1s;
    --animation-delay-increment: 0.15s;
    --animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

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

html, body {
    height: 100%;
    overflow: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #f1f5f9;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    background-attachment: fixed;
    overflow: hidden;
    perspective: 1000px;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatParticle3D 20s ease-in-out infinite;
    z-index: 0;
}

body::before {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

body::after {
    bottom: 10%;
    right: 5%;
    animation-delay: 5s;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
}

@keyframes floatParticle3D {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate3d(20px, -30px, 50px) rotateX(90deg) rotateY(180deg) scale(1.2);
        opacity: 0.6;
    }
    50% {
        transform: translate3d(-15px, 20px, -30px) rotateX(180deg) rotateY(360deg) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate3d(30px, 15px, 20px) rotateX(270deg) rotateY(540deg) scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: translate3d(0, 0, 0) rotateX(360deg) rotateY(720deg) scale(1);
        opacity: 0.3;
    }
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 15px 0;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

h1, h2, h3 {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 300;
    margin-bottom: 15px;
    text-align: center;
    transform-style: preserve-3d;
    white-space: nowrap; /* Prevent wrapping for headings */
}

h1 { font-size: 4.5em; }
h2 { font-size: 2.5em; }
h3 { font-size: 1.8em; }

.btn {
    display: inline-block;
    background: rgba(139, 92, 246, 0.25);
    color: #f8fafc;
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 16px 32px;
    font-size: 1.1em;
    letter-spacing: 0.05em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn:hover {
    background: rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.6);
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateZ(20px);
    box-shadow: 
        0 15px 35px rgba(139, 92, 246, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 60px 0;
    text-align: center;
    position: relative;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 2;
    transform-style: preserve-3d;
}

section:nth-of-type(even) {
    background-color: var(--bg-light);
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(35px) saturate(150%);
    -webkit-backdrop-filter: blur(35px) saturate(150%);
    z-index: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.loading-glass-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px) saturate(120%);
    -webkit-backdrop-filter: blur(25px) saturate(120%);
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.3s ease;
}

.loading-glass-container:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

@keyframes slideUp {
    0% { 
        opacity: 0; 
        transform: translateY(30px) scale(0.9) rotateX(-20deg);
        filter: blur(10px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
}

.spinner {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    transform-style: preserve-3d;
    animation: spinner3D 3s ease-in-out infinite;
}

@keyframes spinner3D {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(180deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(360deg);
    }
}

.spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top: 2px solid transparent;
    border-right: 2px solid transparent;
    border-image: linear-gradient(135deg, #06b6d4, #8b5cf6, #06b6d4) 1;
    border-radius: 50%;
    animation: spin 3s linear infinite;
}

.spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotateZ(0deg); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.5) rotateZ(180deg); opacity: 0.5; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#main-content {
    height: 100%;
}

#pages-container {
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease-in-out;
    position: relative;
    z-index: 1;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    text-align: center;
    position: relative;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 2;
    transform-style: preserve-3d;
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('hero-bg.png') no-repeat center center/cover;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    justify-content: center;
}

.hero-section h1 {
    font-size: 4.5em;
    font-weight: 200;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: title3D 6s ease-in-out infinite;
}

@keyframes title3D {
    0%, 100% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: perspective(1000px) rotateX(5deg) rotateY(10deg);
    }
    75% {
        transform: perspective(1000px) rotateX(-5deg) rotateY(-10deg);
    }
}

.hero-section p {
    font-size: 1.4em;
    opacity: 0.8;
    font-weight: 300;
    color: #eee;
    animation: subtitleFloat 4s ease-in-out infinite;
}

@keyframes subtitleFloat {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg);
    }
    50% {
        transform: translateY(-5px) rotateX(5deg);
    }
}

.hero-section .btn {
    margin: 10px;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
}

.hero-section .btn:hover {
    transform: perspective(1000px) rotateX(8deg) rotateY(8deg) translateZ(20px);
}

.animate-item {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.initial-hidden {
    opacity: 0;
}

@keyframes fadeInUp {
    0% { 
        opacity: 0; 
        transform: translateY(40px) scale(0.9) rotateX(-20deg);
        filter: blur(10px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.85) rotateX(-20deg);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateX(0deg);
        filter: blur(0px);
    }
}

@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-50px) rotateY(-30deg); }
    100% { opacity: 1; transform: translateX(0) rotateY(0deg); }
}

@keyframes slideInRight {
    0% { opacity: 0; transform: translateX(50px) rotateY(30deg); }
    100% { opacity: 1; transform: translateX(0) rotateY(0deg); }
}

.page.in-view .animate-fade-in-up { animation: fadeInUp var(--animation-duration) var(--animation-timing-function) forwards var(--animation-delay); }
.page.in-view .animate-fade-in-scale { animation: fadeInScale var(--animation-duration) var(--animation-timing-function) forwards var(--animation-delay); }
.page.in-view .animate-slide-in-left { animation: slideInLeft var(--animation-duration) var(--animation-timing-function) forwards var(--animation-delay); }
.page.in-view .animate-slide-in-right { animation: slideInRight var(--animation-duration) var(--animation-timing-function) forwards var(--animation-delay); }

.animate-item.delay-1 { --animation-delay: calc(var(--animation-delay-increment) * 1); }
.animate-item.delay-2 { --animation-delay: calc(var(--animation-delay-increment) * 2); }
.animate-item.delay-3 { --animation-delay: calc(var(--animation-delay-increment) * 3); }
.animate-item.delay-4 { --animation-delay: calc(var(--animation-delay-increment) * 4); }
.animate-item.delay-5 { --animation-delay: calc(var(--animation-delay-increment) * 5); }
.animate-item.delay-6 { --animation-delay: calc(var(--animation-delay-increment) * 6); }
.animate-item.delay-7 { --animation-delay: calc(var(--animation-delay-increment) * 7); }
.animate-item.delay-8 { --animation-delay: calc(var(--animation-delay-increment) * 8); }

@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }
}

/* Add contact section styling */
.contact-section {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), 
                url('hero-bg.png') no-repeat center center/cover;
    color: #f1f5f9;
}

.contact-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.contact-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    min-width: 0; /* Allow shrinking below content width */
}

.contact-item:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateZ(20px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.contact-item i {
    font-size: 2.5em;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.2) rotate(10deg);
}

.contact-item p {
    color: #e2e8f0;
    font-size: 1.1em;
    margin-top: 10px;
}

.site-footer-contact {
    margin-top: 80px;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
}

.site-footer-contact p {
    color: #cbd5e1;
    font-size: 0.9em;
    text-align: center;
}

/* Remove the separate footer section */
#site-footer {
    display: none;
}

/* Brighten about section */
.about-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #f1f5f9;
}

.about-content p {
    color: #e2e8f0;
    font-size: 1.2em;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .contact-icons {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
        margin: 40px 0;
    }
    .contact-item {
        padding: 25px 15px;
    }
    .contact-item i {
        font-size: 2em;
    }
    .contact-item p {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .contact-icons {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 30px 0;
    }
    .contact-item {
        padding: 20px 15px;
    }
    .contact-item i {
        font-size: 1.8em;
    }
    .contact-item p {
        font-size: 0.9em;
    }
}