/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    /* Colors */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 5rem 2rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Utility Classes
   =========================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

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

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--section-padding);
    padding-top: 100px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

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

/* ===========================
   Projects Section
   =========================== */
.projects-section {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.project-card.featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 2px solid var(--primary-light);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.project-badge {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.featured-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

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

.project-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.375rem 0.875rem;
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
}

.project-features h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-features ul {
    list-style: none;
    padding-left: 0;
}

.project-features li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.project-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* ===========================
   Skills Section
   =========================== */
.skills-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

/* ===========================
   Contact Section
   =========================== */
.contact-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.contact-location {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 1rem;
}

/* ===========================
   About Highlights
   =========================== */
.about-highlights {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.highlight-item {
    text-align: center;
}

.highlight-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-mono);
}

.highlight-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===========================
   Project Links
   =========================== */
.project-link {
    margin-bottom: 1rem;
}

.live-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.live-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* ===========================
   Experience Section
   =========================== */
.experience-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

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

.experience-item {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.experience-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.experience-item .company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.experience-item ul {
    list-style: none;
    padding-left: 0;
}

.experience-item li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.experience-item li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.experience-item li strong {
    color: var(--text-primary);
}

.education-section {
    max-width: 900px;
    margin: 2rem auto 0;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
}

.education-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.education-item {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.education-item strong {
    color: var(--text-primary);
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 2rem;
    text-align: center;
    background: var(--text-primary);
    color: var(--bg-primary);
}

.footer p {
    color: var(--text-light);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-base);
        gap: 1rem;
    }

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

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

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

    .hero-description {
        font-size: 1rem;
    }

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

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

    .project-card.featured {
        grid-column: 1;
    }

    .project-stats {
        flex-direction: column;
        gap: 1rem;
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .project-header {
        flex-direction: column;
    }

    .project-badge {
        align-self: flex-start;
    }
}

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

.project-card,
.skill-category {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }
