@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00f0;
    --deep-space: #06070a;
    --cosmic-purple: #1a0d2e;
    --star-dust: rgba(255, 255, 255, 0.85);
    --meteor-gray: #2a2a3a;
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
}

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

html {
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(145deg, #06070a, #0f0f1b);
    color: var(--star-dust);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(0, 240, 255, 0.4);
    color: white;
}

/* 🌌 Cosmic Background Effects */
body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 240, 255, 0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 0, 240, 0.02) 0%, transparent 40%),
        repeating-linear-gradient(
            45deg,
            rgba(0, 240, 255, 0.015),
            rgba(0, 240, 255, 0.015) 1px,
            transparent 1px,
            transparent 60px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 0, 240, 0.01),
            rgba(255, 0, 240, 0.01) 1px,
            transparent 1px,
            transparent 80px
        );
    animation: cosmicDrift 120s linear infinite;
    z-index: -3;
    pointer-events: none;
}

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

/* ⚡ High Voltage Pulse Effect */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 240, 255, 0.03) 70%);
    animation: voltagePulse 8s var(--ease-in-out-expo) infinite;
    z-index: -2;
    pointer-events: none;
    opacity: 0;
}

@keyframes voltagePulse {
    0%, 100% { opacity: 0; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}

/* 🚀 Header Section - Cyberpunk Hero */
header {
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    background: radial-gradient(ellipse at center, #0d1117 0%, var(--deep-space) 100%);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 0 20px;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(0, 240, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 70% 70%, rgba(255, 0, 240, 0.05) 0%, transparent 20%);
    animation: nebulaFloat 40s linear infinite;
    z-index: -1;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--deep-space), transparent);
    z-index: 1;
}

@keyframes nebulaFloat {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-5%, 5%); }
    50% { transform: translate(-10%, 0); }
    75% { transform: translate(-5%, -5%); }
    100% { transform: translate(0, 0); }
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* 💎 Typography - Apple-like Precision */
h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 
        0 0 10px rgba(0, 240, 255, 0.5),
        0 0 30px rgba(0, 240, 255, 0.2);
    background: linear-gradient(90deg, white, #c2f5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    transform: scaleX(0);
    transform-origin: left;
    animation: titleUnderline 1.5s var(--ease-out-quint) 0.5s forwards;
}

@keyframes titleUnderline {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: white;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    letter-spacing: -0.02em;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s var(--ease-out-quint);
}

h2.in-view::after {
    transform: scaleX(1);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    line-height: 1.3;
}

p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 🖱️ Interactive Elements */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.4s var(--ease-out-quint);
    overflow: hidden;
    z-index: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 0 15px rgba(0, 240, 255, 0),
        inset 0 0 10px rgba(0, 240, 255, 0);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-quint);
}

.btn:hover {
    color: black;
    transform: translateY(-3px);
    box-shadow: 
        0 0 25px rgba(0, 240, 255, 0.4),
        inset 0 0 15px rgba(0, 240, 255, 0.3);
}

.btn:hover::before {
    opacity: 1;
}

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

/* 🛸 Section Styling */
section {
    padding: 150px 0;
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(6, 7, 10, 0.9) 0%,
        rgba(10, 12, 20, 0.7) 50%,
        rgba(6, 7, 10, 0.9) 100%);
    z-index: -1;
}

section:nth-child(even)::before {
    background: linear-gradient(to bottom, 
        rgba(10, 12, 20, 0.9) 0%,
        rgba(15, 18, 30, 0.7) 50%,
        rgba(10, 12, 20, 0.9) 100%);
}

/* 🎴 Project Cards - Holographic Effect */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 0 auto;
    max-width: 1200px;
}

.card {
    position: relative;
    background: rgba(20, 22, 30, 0.6);
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s var(--ease-out-quint);
    overflow: hidden;
    z-index: 1;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(0, 240, 255, 0.03) 30%,
        rgba(255, 0, 240, 0.03) 70%,
        transparent 100%
    );
    transform: rotate(45deg);
    animation: holographicScan 6s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-quint);
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0, 240, 255, 0.2),
        inset 0 0 0 1px rgba(0, 240, 255, 0.2);
    border-color: rgba(0, 240, 255, 0.3);
}

.card h3 {
    color: var(--neon-cyan);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--neon-cyan);
    transition: width 0.4s var(--ease-out-quint);
}

.card:hover h3::after {
    width: 80px;
}

.card p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.card ul {
    list-style-type: none;
    margin-bottom: 25px;
}

.card li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.card li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
}

.card a {
    color: var(--neon-cyan);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: all 0.3s var(--ease-out-quint);
    display: inline-flex;
    align-items: center;
}

.card a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-out-quint);
}

.card a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.card a:hover {
    color: white;
}

.card a i {
    margin-left: 8px;
    font-size: 0.8em;
    transition: transform 0.3s var(--ease-out-quint);
}

.card a:hover i {
    transform: translateX(3px);
}

@keyframes holographicScan {
    0% { transform: translateY(-100%) rotate(45deg); }
    100% { transform: translateY(100%) rotate(45deg); }
}

/* 📱 Social Icons - Interactive Glow */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    transition: all 0.4s var(--ease-out-quint);
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta));
    z-index: -1;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s var(--ease-out-quint);
}

.social-icons a:hover {
    transform: translateY(-5px);
    color: black;
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3);
}

.social-icons a:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* 🏁 Footer - Sleek & Minimal */
footer {
    text-align: center;
    padding: 40px 0;
    background: rgba(6, 7, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ✨ Scroll Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    z-index: 1000;
    transition: width 0.1s linear;
}

/* 🌀 Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 25px;
    }
    
    section {
        padding: 100px 0;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 25px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .social-icons a {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* 🎆 Particle Effects (Optional - can be toggled via JS) */
.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
}

/* Add this to your scripts.js for the in-view animations */
document.addEventListener('DOMContentLoaded', function() {
    const observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
            if (entry.isIntersecting) {
                entry.target.classList.add('in-view');
            }
        });
    }, { threshold: 0.1 });
    
    document.querySelectorAll('section, h2, .card').forEach(el => {
        observer.observe(el);
    });
    
    // Scroll progress indicator
    window.addEventListener('scroll', function() {
        const winScroll = document.body.scrollTop || document.documentElement.scrollTop;
        const height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
        const scrolled = (winScroll / height) * 100;
        document.querySelector('.scroll-progress').style.width = scrolled + '%';
    });
});
