/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --background: #0f172a;
    --background-light: #1e293b;
    --surface: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #475569;
    --success: #10b981;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--primary);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-primary);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 24px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--primary-light);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1.1;
}

.hero-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Code Block Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-block {
    background: var(--background-light);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
}

.code-header {
    background: var(--surface);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.code-content {
    padding: 24px;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
    overflow-x: auto;
}

.code-content .keyword { color: #c084fc; }
.code-content .property { color: #60a5fa; }
.code-content .string { color: #4ade80; }
.code-content .boolean { color: #f472b6; }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

/* ===== Section Styles ===== */
section {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 60px;
}

/* ===== About Section ===== */
.about {
    background: var(--background);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.education-badge {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: var(--background-light);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 28px;
}

.edu-icon {
    font-size: 2rem;
}

.edu-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.edu-text strong {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.edu-text span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.skills-heading {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    margin-top: 32px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--background-light);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.skill-icon {
    font-size: 1.3rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.stat-card {
    background: var(--background-light);
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 8px;
    display: block;
}

/* ===== Projects Section ===== */
.projects {
    background: var(--background-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--background);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.project-image {
    height: 200px;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon {
    font-size: 5rem;
}

.project-content {
    padding: 28px;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tech-tag {
    padding: 6px 14px;
    background: var(--surface);
    color: var(--primary-light);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.project-link.live {
    background: var(--primary);
    color: var(--text-primary);
}

.project-link.live:hover {
    background: var(--primary-dark);
}

.project-link.github {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.project-link.github:hover {
    border-color: var(--primary);
    background: var(--background-light);
}

.more-projects {
    text-align: center;
    margin-top: 60px;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--background);
}

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

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 48px;
    background: var(--background-light);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
    min-width: 200px;
}

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

.contact-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.contact-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--background-light);
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-socials a:hover {
    color: var(--primary-light);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .code-block {
        max-width: 400px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--background);
        width: 100%;
        text-align: center;
        padding: 40px 0;
        gap: 24px;
        transition: var(--transition);
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero {
        padding: 120px 24px 80px;
    }

    .scroll-indicator {
        display: none;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .about-stats {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .code-block {
        max-width: 100%;
    }

    .code-content {
        font-size: 0.75rem;
        padding: 16px;
    }

    .project-content {
        padding: 20px;
    }
}
