/* CSS Variables */
:root {
    --primary: #00ff88;
    --secondary: #0084ff;
    --accent: #ff006e;
    --dark: #0a0a0f;
    --dark-lighter: #141419;
    --dark-card: rgba(20, 20, 25, 0.6);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --blur: 20px;
}

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

body {
    font-family: 'Xenon', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 132, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 0, 110, 0.1) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundMove {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }
}

/* Grid Pattern Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 5rem;
    padding: 4rem 0 2rem;
    position: relative;
}

header::before {
    content: 'DEMO';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 200px;
    font-weight: 900;
    opacity: 0.03;
    pointer-events: none;
    white-space: nowrap;
}

header h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 8s ease infinite;
}

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

.subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

/* Project Card with Glassmorphism */
.project-card {
    background: var(--dark-card);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Card Hover Glow Effect */
.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 255, 136, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Card Top Accent */
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: slideAccent 3s linear infinite;
}

@keyframes slideAccent {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.project-card:hover::after {
    opacity: 1;
}

.project-card h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

/* Status Badge */
.project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
    align-self: flex-start;
}

.project-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.status-active {
    background: rgba(0, 255, 136, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-active::before {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.status-development {
    background: rgba(0, 132, 255, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(0, 132, 255, 0.3);
}

.status-development::before {
    background: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.status-archived {
    background: rgba(255, 0, 110, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 0, 110, 0.3);
}

.status-archived::before {
    background: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
}

footer a:hover {
    color: var(--secondary);
}

footer a:hover::after {
    width: 100%;
    background: var(--secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    header::before {
        font-size: 100px;
    }

    .container {
        padding: 2rem 1rem;
    }

    header {
        margin-bottom: 3rem;
        padding: 2rem 0 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .project-card {
        padding: 1.5rem;
    }

    footer {
        margin-top: 3rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--dark);
}

::-moz-selection {
    background: var(--primary);
    color: var(--dark);
}