/* Main CSS - Core Styles */
@import url('components.css');
@import url('animations.css');
@import url('responsive.css');

/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-dark: #4338ca;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    
    /* Background Colors */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a3e;
    --bg-card: rgba(15, 15, 35, 0.8);
    --bg-hover: rgba(99, 102, 241, 0.1);
    
    /* Text Colors */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #06b6d4;
    
    /* Border & Effects */
    --border-color: rgba(99, 102, 241, 0.2);
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glow-primary: rgba(99, 102, 241, 0.4);
    --glow-secondary: rgba(139, 92, 246, 0.3);
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 2rem;
    --grid-gap: 2rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

/* Light Theme Variables */
:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(248, 250, 252, 0.9);
    --bg-hover: rgba(99, 102, 241, 0.05);
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --border-color: rgba(99, 102, 241, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animation Initial States */
.hero-content h1,
.hero-content .hero-subtitle,
.hero-content .hero-description,
.hero-buttons .btn,
.navbar,
.section-header,
.stat-item,
.hex-item,
.skills-legend,
.project-card,
.contact-item,
.social-icon {
    opacity: 0;
    transform: translateY(30px);
}

.navbar {
    transform: translateY(-100px);
}

.hex-item {
    transform: translateY(30px) scale(0);
}

/* Animated class applied by JS */
.animated {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.animated.navbar {
    transform: translateY(0) !important;
}

.animated.hex-item {
    transform: scale(1) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--primary-dark);
}

/* Sections */
section {
    padding: var(--section-padding);
    position: relative;
    margin-bottom: 2rem;
}

.skills {
    padding-bottom: 4rem;
}

.projects {
    padding-top: 4rem;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-primary);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 10;
    padding-top: 2rem;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text-primary);
    z-index: 10;
}

.section-title::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -20px;
    right: -20px;
    bottom: -10px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 50%, 
        rgba(6, 182, 212, 0.1) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    z-index: -1;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Add icon before section titles */
.section-title .title-icon {
    font-size: 0.8em;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Section number styling */
.section-title .section-number {
    font-size: 0.6em;
    color: var(--text-secondary);
    font-weight: 400;
    margin-right: 1rem;
    opacity: 0.7;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Form Styles */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--glow-primary);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: var(--font-size-base);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: var(--font-size-sm);
    color: var(--primary-color);
    background: var(--bg-primary);
    padding: 0 0.5rem;
}

/* Error States */
.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    color: #fca5a5;
}

.form-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    color: #86efac;
}

/* App Error */
.app-error {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.error-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
}

.error-content h3 {
    color: #fca5a5;
    margin-bottom: 1rem;
}

.error-content p {
    margin-bottom: 2rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.m-0 { margin: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
