/* CSS Variables and Global Reset */
:root {
    --bg-dark: #09090b;
    --bg-card: rgba(24, 24, 27, 0.4);
    --border-color: rgba(63, 63, 70, 0.4);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

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

/* Ambient glow in background */
.background-ambient {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(244, 63, 94, 0.05) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeDown 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.highlight {
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 1.5rem;
}

/* Setup initial states for JS animation */
.bento-card {
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Card Styling */
.bento-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    group: hover;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
    filter: grayscale(30%) brightness(0.6);
    z-index: 0;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 9, 11, 0.95) 0%, rgba(9, 9, 11, 0.4) 60%, transparent 100%);
    z-index: 1;
    transition: background 0.4s ease;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.bento-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.bento-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
    line-height: 1.6;
    transition: color 0.3s ease;
}

/* Hover Effects */
.bento-card:hover {
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 10px 40px -10px var(--accent-glow);
    transform: translateY(-5px) !important;
}

.bento-card:hover .card-bg {
    transform: scale(1.05);
    filter: grayscale(0%) brightness(0.8);
}

.bento-card:hover .card-overlay {
    background: linear-gradient(to top, rgba(9, 9, 11, 0.95) 0%, rgba(9, 9, 11, 0.2) 80%, transparent 100%);
}

.bento-card:hover .card-icon {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.bento-card:hover p {
    color: #e4e4e7;
    opacity: 1;
}

/* Grid Spanning */
.large {
    grid-column: span 2;
    grid-row: span 2;
}

.large h3 { font-size: 2rem; }
.large p { font-size: 1.1rem; }

.medium {
    grid-column: span 2;
    grid-row: span 1;
}

.tall {
    grid-column: span 2;
    grid-row: span 2;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .large, .medium, .tall {
        grid-column: span 1;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

/* Footer */
footer {
    margin-top: 5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
