/* =================================
   CSS RESET & BASE STYLES
   ================================= */

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

:root {
    /* Color Palette */
    --color-bg-dark: #0a0e27;
    --color-bg-purple: #1a0b2e;
    --color-accent-blue: #4facfe;
    --color-accent-pink: #ff6b9d;
    --color-accent-purple: #9d50bb;
    --color-text-primary: #ffffff;
    --color-text-secondary: #b8c5d6;
    --color-text-muted: #7a8b9e;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-accent-blue), var(--color-accent-pink));
    --gradient-bg: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-bg-purple) 100%);
    --gradient-card: linear-gradient(135deg, rgba(74, 172, 254, 0.1), rgba(255, 107, 157, 0.1));
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-primary);
    background: var(--gradient-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* =================================
   BACKGROUND EFFECTS
   ================================= */

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Fog/Mist Effect */
.fog-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(74, 172, 254, 0.03) 0%, transparent 70%);
    animation: fogFloat 20s ease-in-out infinite;
}

.fog-layer-2 {
    animation: fogFloat 25s ease-in-out infinite reverse;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.03) 0%, transparent 70%);
}

@keyframes fogFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Gradient Orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orbFloat 15s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--color-accent-blue);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--color-accent-pink);
    bottom: 20%;
    right: 10%;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--color-accent-purple);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(50px, -50px);
    }
    66% {
        transform: translate(-50px, 50px);
    }
}

/* =================================
   MAIN CONTAINER
   ================================= */

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =================================
   HEADER
   ================================= */

.header {
    padding: var(--spacing-md) 0;
    text-align: center;
}

.logo-container {
    display: inline-block;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(74, 172, 254, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(255, 107, 157, 0.7));
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* =================================
   HERO SECTION
   ================================= */

.hero {
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-lg);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
}

.title-main {
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.title-sub {
    display: block;
    color: var(--color-text-primary);
    text-shadow: 0 0 30px rgba(74, 172, 254, 0.5);
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(20deg);
    }
}

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

.hero-divider {
    width: 150px;
    height: 3px;
    background: var(--gradient-primary);
    margin: var(--spacing-md) auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(74, 172, 254, 0.5);
}

/* =================================
   PROJECTS GRID
   ================================= */

.projects {
    flex: 1;
    display: flex;
    align-items: center;
    padding: var(--spacing-lg) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    width: 100%;
}

/* =================================
   PROJECT CARDS
   ================================= */

.project-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: var(--spacing-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(74, 172, 254, 0.5);
    box-shadow: 0 20px 60px rgba(74, 172, 254, 0.2);
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

/* Card Content */
.card-content {
    position: relative;
    z-index: 2;
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--spacing-md);
    color: var(--color-accent-blue);
    transition: all 0.3s ease;
}

.project-card:hover .card-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--color-accent-blue));
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.card-description {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

/* Card Status */
.card-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.status-active .status-indicator {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
}

.status-construction .status-indicator {
    background: #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
}

.status-active .status-text {
    color: #00ff88;
}

.status-construction .status-text {
    color: #ffaa00;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Card Arrow */
.card-arrow {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 2rem;
    color: var(--color-accent-blue);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.project-card.active:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Active Card Styles */
.project-card.active {
    background: rgba(74, 172, 254, 0.05);
    border-color: rgba(74, 172, 254, 0.3);
}

.project-card.active:hover {
    box-shadow: 0 20px 60px rgba(74, 172, 254, 0.4);
    border-color: rgba(74, 172, 254, 0.6);
}

/* Construction Card Styles */
.project-card.construction {
    opacity: 0.7;
    cursor: not-allowed;
}

.project-card.construction:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 170, 0, 0.3);
}

.construction-overlay {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 3;
}

.construction-icon {
    font-size: 2rem;
    animation: constructionBlink 2s ease-in-out infinite;
}

@keyframes constructionBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* =================================
   FOOTER
   ================================= */

.footer {
    text-align: center;
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-accent-blue);
}

.footer-separator {
    color: var(--color-text-muted);
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }
    
    .container {
        padding: var(--spacing-sm);
    }
    
    .logo {
        width: 80px;
    }
    
    .hero {
        padding: var(--spacing-md) 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .project-card {
        padding: var(--spacing-md);
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .gradient-orb {
        filter: blur(60px);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .footer-links {
        font-size: 0.75rem;
    }
}

/* =================================
   ACCESSIBILITY
   ================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.project-card:focus {
    outline: 2px solid var(--color-accent-blue);
    outline-offset: 4px;
}

.footer-link:focus {
    outline: 2px solid var(--color-accent-blue);
    outline-offset: 2px;
}