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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-1: #6366f1;
    --accent-2: #ec4899;
    --accent-3: #f59e0b;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

html.dark-mode {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --glass-bg: rgba(30, 30, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-1: #818cf8;
    --accent-2: #f472b6;
    --accent-3: #fbbf24;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, var(--accent-1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, var(--accent-2) 0%, transparent 50%);
    opacity: 0.03;
    animation: drift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease-out;
}

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

.logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    animation: quirkyBounce 3s ease-in-out infinite;
}

@keyframes quirkyBounce {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-2deg) scale(1.05); }
    50% { transform: rotate(2deg) scale(1); }
    75% { transform: rotate(-1deg) scale(1.02); }
}

.logo::before {
    content: '✨';
    position: absolute;
    font-size: 0.8em;
    animation: twinkle 1.5s ease-in-out infinite;
    top: -10px;
    right: -15px;
}

.logo::after {
    content: '🚀';
    position: absolute;
    font-size: 0.7em;
    animation: float 2s ease-in-out infinite;
    bottom: -8px;
    left: -10px;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(10deg); }
}

.theme-toggle {
    width: 60px;
    height: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 3px;
}

.theme-toggle:hover {
    border-color: var(--accent-1);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

html.dark-mode .theme-toggle {
    justify-content: flex-end;
}

.toggle-circle {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow);
}

/* Main content */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 5rem;
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease-out both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-1);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

html.dark-mode .card:hover {
    box-shadow: 0 20px 40px rgba(129, 140, 248, 0.2);
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.card-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

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

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.card-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.card-link:hover::after {
    transform: translateX(4px);
}

.card-link:hover {
    color: var(--accent-2);
}

/* Footer */
footer {
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    padding: 2.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    animation: slideUp 0.6s ease-out 0.4s both;
}

footer a {
    color: var(--accent-1);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

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

footer a:hover::after {
    width: 100%;
}

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

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1.5rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .cards-grid {
        gap: 1.5rem;
    }

    .card {
        padding: 2rem;
    }
}
