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

:root {
    /* Color Palette */
    --primary-bg: #0a0a0f;
    --secondary-bg: #12121a;
    --card-bg: #1a1a27;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #06b6d4;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #2d2d3d;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', var(--font-primary);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

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

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width var(--transition-normal);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===== HEADER/HERO SECTION ===== */
.header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15), transparent 50%);
    pointer-events: none;
}

.hero {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 8rem 5% 4rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    z-index: 10;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.4);
}

/* ===== HERO VISUAL ===== */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-animation {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(26, 26, 39, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.code-line {
    height: 12px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    border-radius: 6px;
    animation: code-pulse 3s ease-in-out infinite;
    opacity: 0.6;
}

.code-line:nth-child(1) {
    width: 80%;
    animation-delay: 0s;
}

.code-line:nth-child(2) {
    width: 60%;
    animation-delay: 0.5s;
}

.code-line:nth-child(3) {
    width: 90%;
    animation-delay: 1s;
}

.code-line:nth-child(4) {
    width: 70%;
    animation-delay: 1.5s;
}

@keyframes code-pulse {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 0.8; transform: translateX(10px); }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: var(--spacing-xl) 0;
    background: var(--secondary-bg);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
    cursor: default;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
}

.service-icon {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--primary-bg);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-text h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tech-stack {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.tech-stack h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-tag {
    padding: 0.6rem 1.2rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 20px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tech-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

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

.footer-content {
    display: grid;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-main h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-main p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.email-link {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.email-link:hover {
    color: var(--accent-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 0.95rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 6rem 5% 3rem;
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-visual {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 5%;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 5rem 5% 2rem;
    }
    
    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }
}