/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors - Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Typography */
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.2s ease;
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #9198a1;
    --text-tertiary: #6e7681;
    --border-color: #30363d;
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 3.5rem; font-weight: 800; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p { 
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .header {
    background: rgba(13, 17, 23, 0.8);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.logo span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* ==================== HERO ==================== */
.hero {
    padding: calc(80px + var(--space-4xl)) 0 var(--space-4xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.08;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-theme="dark"] .hero-image {
    opacity: 0.05;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.hero h1 {
    margin-bottom: var(--space-lg);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== SECTIONS ==================== */
.section {
    padding: var(--space-4xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ==================== GRID ==================== */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-with-image {
    padding: 0;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-with-image h3,
.card-with-image p {
    padding: 0 var(--space-xl);
}

.card-with-image h3 {
    padding-top: var(--space-lg);
}

.card-with-image p:last-child {
    padding-bottom: var(--space-xl);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

.card h3 {
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
}

.card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==================== STATS ==================== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2xl);
    padding: var(--space-3xl) 0;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==================== TECH STACK ==================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.tech-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition);
}

.tech-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.tech-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ==================== CTA ==================== */
.cta {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.08;
    z-index: 0;
}

.cta-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-theme="dark"] .cta-background {
    opacity: 0.05;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta h2 {
    margin-bottom: var(--space-md);
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.footer-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .tech-grid { grid-template-columns: repeat(3, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-lg);
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .nav {
        display: none;
    }
    
    .hero {
        padding: calc(80px + var(--space-2xl)) 0 var(--space-2xl);
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}
