/* ===== CSS Variables ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #6E44FF 0%, #B88FFF 100%);
    --primary-color: #6E44FF;
    --primary-light: #B88FFF;
    --bg-dark: #0a0a0f;
    --bg-section: #12121a;
    --bg-card: #1a1a27;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a82;
    --border-color: #2a2a3a;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-code: 'JetBrains Mono', 'Courier New', monospace;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-dark);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.08;
    filter: blur(100px);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(110, 68, 255, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Sections ===== */
.section {
    padding: 6rem 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--bg-section);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ===== About Section ===== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

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

.service-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(110, 68, 255, 0.3);
}

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

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(110, 68, 255, 0.2);
}

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

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    font-family: var(--font-code);
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    background: rgba(110, 68, 255, 0.15);
    color: var(--primary-light);
    border-radius: 6px;
    border: 1px solid rgba(110, 68, 255, 0.3);
}

.project-result {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-result strong {
    color: var(--primary-light);
}

/* ===== Tech Stack ===== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.tech-badge {
    background: var(--bg-card);
    padding: 1.5rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.tech-badge:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.tech-name {
    font-family: var(--font-code);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== Contacts ===== */
.contacts-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contacts-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(110, 68, 255, 0.3);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-light);
    border-color: var(--primary-color);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-section);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .hero {
        min-height: 90vh;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .cta-button,
    .contact-button {
        width: 100%;
        text-align: center;
    }

    .service-card,
    .project-card {
        padding: 1.5rem;
    }
}

/* ===== Utility Classes ===== */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
