/* ==========================================================================
   CodeSonic - Consolidated Site Styles
   Combines base styles and home page styles into a single file
   ========================================================================== */

/* ==========================================================================
   ROOT VARIABLES & THEMES
   ========================================================================== */

/* Root Variables - Dark Theme (Default) */
:root {
    --primary-color: #6366F1;
    --secondary-color: #8B5CF6;
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    --background-color: #0F172A;
    --surface-color: #1E293B;
    --card-color: #334155;
    --text-color: #E5E7EB;
    --text-muted: #9CA3AF;
}

/* Light Theme */
[data-theme="light"] {
    --background-color: #FFFFFF;
    --surface-color: #F8FAFC;
    --card-color: #F1F5F9;
    --text-color: #1E293B;
    --text-muted: #64748B;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

/* Header Styles */
header {
    background-color: var(--surface-color);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Main Content */
main {
    flex: 1;
    padding: 3rem 0;
}

/* Footer Styles */
footer {
    background-color: var(--surface-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-color);
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #4F46E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Theme Toggle Button */
.theme-toggle {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
    color: var(--text-color);
}

.theme-toggle:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.theme-toggle:active svg {
    transform: scale(0.9);
}

/* Hide sun icon in dark mode, moon icon in light mode */
[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: none;
}

/* ==========================================================================
   HOME PAGE SPECIFIC STYLES
   ========================================================================== */

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 5rem;
}

.feature-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* Tech Stack Section */
.tech-stack {
    margin-top: 5rem;
    text-align: center;
}

.tech-stack h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.tech-badge {
    background-color: var(--card-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Status Section */
.status-section {
    margin-top: 5rem;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 1rem;
    text-align: center;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    border-radius: 2rem;
    color: var(--success-color);
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

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

@media (max-width: 768px) {

    /* Navigation */
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-top: 1rem;
    }

    /* Hero Section */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    /* Features */
    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Tech Stack */
    .tech-stack h2 {
        font-size: 1.5rem;
    }
}