/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Light Theme (Default) */
:root {
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #fafbfc;

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #2c3e50;
    --text-tertiary: #34495e;
    --text-muted: #4a5568;
    --text-light: #666;

    /* Border Colors */
    --border-color: #e9ecef;
    --border-light: #f0f0f0;

    /* Accent Colors */
    --accent-primary: #3498db;
    --accent-hover: #2980b9;
    --accent-secondary: #9b59b6;
    --accent-success: #27ae60;
    --accent-selection: #3498db;

    /* Card Colors */
    --card-bg: #ffffff;
    --card-border: #e9ecef;
    --card-shadow: rgba(0, 0, 0, 0.06);
    --card-shadow-hover: rgba(0, 0, 0, 0.12);

    /* Gradient Separator */
    --separator-gradient: linear-gradient(90deg, transparent 0%, #e9ecef 20%, #e9ecef 80%, transparent 100%);

    /* Enhanced shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
    --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.2);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --gradient-hero: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* CSS Variables for Dark Theme */
[data-theme="dark"] {
    /* Background Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #162032;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #e2e8f0;
    --text-tertiary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #94a3b8;

    /* Border Colors */
    --border-color: #334155;
    --border-light: #1e293b;

    /* Accent Colors */
    --accent-primary: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-secondary: #a78bfa;
    --accent-success: #34d399;
    --accent-selection: #60a5fa;

    /* Card Colors */
    --card-bg: #1e293b;
    --card-border: #334155;
    --card-shadow: rgba(0, 0, 0, 0.4);
    --card-shadow-hover: rgba(0, 0, 0, 0.6);

    /* Gradient Separator */
    --separator-gradient: linear-gradient(90deg, transparent 0%, #334155 20%, #334155 80%, transparent 100%);

    /* Enhanced shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 24px 80px rgba(0, 0, 0, 0.7);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    --gradient-accent: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --gradient-hero: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(167, 139, 250, 0.15) 100%);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {

    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Typography - Enhanced Hierarchy */
h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

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

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


/* Sections - Better Spacing with Subtle Separation */
section {
    padding: 7rem 0;
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Subtle gradient separator between sections */
section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 64px);
    max-width: 1368px;
    height: 1px;
    background: var(--separator-gradient);
    opacity: 0.5;
}

/* Improved Button/Link States */
button,
.cta-primary,
.social-button,
.contact-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active,
.cta-primary:active,
.social-button:active {
    transform: scale(0.98);
}

/* Selection Color */
::selection {
    background: var(--accent-selection);
    color: white;
}

::-moz-selection {
    background: var(--accent-selection);
    color: white;
}

/* Section Header - Impactful */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .section-header h2 {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--gradient-accent);
    border-radius: 3px;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 750px;
    margin: 2rem auto 0;
    font-weight: 400;
}

/* Smooth scroll reveal animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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