/* Base styles */
body {
    color: var(--color-text-primary);
    font-family: 'SF Pro Text', 'Helvetica Neue', sans-serif;
    position: relative;
    overflow-x: hidden;
    background: var(--color-bg-primary);
}

/* Subtle background */
.subtle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    z-index: -2;
    opacity: 0.98;
    animation: subtleGradientFlow 15s ease infinite alternate;
}

/* Subtle overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    z-index: -1;
    opacity: 0.9;
}

/* Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%
    }
    50% {
        background-position: 100% 50%
    }
    100% {
        background-position: 0% 50%
    }
}

@keyframes subtleGradientFlow {
    0% {
        opacity: 0.95;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.95;
    }
}

@keyframes letterFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes techPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Fade-in animation for sections */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animated section headings */
.animated-heading {
    position: relative;
    display: block;
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 2rem;
    padding: 0.5em 0;
    overflow: hidden;
    background: none;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    color: #FFFFFF;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.animated-heading:hover {
    transform: translateY(-3px);
    color: var(--color-accent);
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
    transition: all 0.3s ease;
}

.animated-heading .text-wrapper {
    position: relative;
    display: inline-block;
}

.animated-heading .letter {
    display: inline-block;
    transform-origin: 50% 100%;
    opacity: 0;
    animation: letterFadeIn 0.5s forwards;
}

/* Letter animation delays - using a more efficient approach */
.animated-heading .letter:nth-child(1) {
    animation-delay: 0.05s;
}

.animated-heading .letter:nth-child(2) {
    animation-delay: 0.1s;
}

.animated-heading .letter:nth-child(3) {
    animation-delay: 0.15s;
}

.animated-heading .letter:nth-child(4) {
    animation-delay: 0.2s;
}

.animated-heading .letter:nth-child(5) {
    animation-delay: 0.25s;
}

.animated-heading .letter:nth-child(6) {
    animation-delay: 0.3s;
}

.animated-heading .letter:nth-child(7) {
    animation-delay: 0.35s;
}

.animated-heading .letter:nth-child(8) {
    animation-delay: 0.4s;
}

.animated-heading .letter:nth-child(9) {
    animation-delay: 0.45s;
}

.animated-heading .letter:nth-child(10) {
    animation-delay: 0.5s;
}

.animated-heading .letter:nth-child(11) {
    animation-delay: 0.55s;
}

.animated-heading .letter:nth-child(12) {
    animation-delay: 0.6s;
}

.animated-heading .letter:nth-child(13) {
    animation-delay: 0.65s;
}

.animated-heading .letter:nth-child(14) {
    animation-delay: 0.7s;
}

.animated-heading .letter:nth-child(15) {
    animation-delay: 0.75s;
}

.animated-heading .letter:nth-child(16) {
    animation-delay: 0.8s;
}

.animated-heading .letter:nth-child(17) {
    animation-delay: 0.85s;
}

.animated-heading .letter:nth-child(18) {
    animation-delay: 0.9s;
}

.animated-heading .letter:nth-child(19) {
    animation-delay: 0.95s;
}

.animated-heading .letter:nth-child(20) {
    animation-delay: 1s;
}

/* Hover effects for images and text */
.hover-effect img,
.hover-effect span {
    transition: var(--transition-fast);
}

.hover-effect:hover img {
    transform: scale(1.2);
}

.hover-effect:hover span {
    transform: scale(1.1);
}

/* Basic image styles */
img {
    max-width: 100%;
    height: auto;
}

/* Global interactive elements */
a, button {
    transition: var(--transition-fast);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}