/* ===============================================
   Reset & Base Styles
   =============================================== */

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

:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --background: #ffffff;
    --background-secondary: #f8fafc;
    --border: #e2e8f0;
    --accent: #3b82f6;

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

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===============================================
   Typography
   =============================================== */

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

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

/* ===============================================
   Hero Section
   =============================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

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

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.profile-photo {
    margin: 0 auto 2rem;
    width: 300px;
    height: 300px;
    position: relative;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--background);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.profile-photo::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.profile-photo:hover::before {
    opacity: 1;
}

.profile-photo:hover img {
    transform: scale(1.02);
    box-shadow: 0 25px 70px rgba(37, 99, 235, 0.2);
}

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

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.hero-badge:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--primary);
    position: relative;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* ===============================================
   Buttons
   =============================================== */

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

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

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

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

/* ===============================================
   About Section
   =============================================== */

.about {
    padding: var(--section-padding);
    background: var(--background);
}

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

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

.skill-item {
    padding: 2rem;
    background: var(--background-secondary);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

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

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

.skill-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===============================================
   Projects Section
   =============================================== */

.projects {
    padding: var(--section-padding);
    background: var(--background-secondary);
}

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

.project-card {
    background: var(--background);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.project-card.featured {
    grid-column: span 1;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-color: var(--primary);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.project-status {
    padding: 0.375rem 0.875rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-status.upcoming {
    background: var(--secondary);
}

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

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

.project-links {
    margin-top: auto;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.project-link:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

/* GitHub Projects */
#github-projects {
    display: contents;
}

.github-project {
    background: var(--background);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.github-project:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.github-project h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.github-project p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.github-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.github-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.github-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.github-link:hover {
    color: var(--primary-dark);
}

/* ===============================================
   Contact Section
   =============================================== */

.contact {
    padding: var(--section-padding);
    background: var(--background);
}

.contact-description {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--background-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.social-link.github:hover {
    border-color: #333;
    background: #333;
    color: white;
}

.social-link.linkedin:hover {
    border-color: #0077b5;
    background: #0077b5;
    color: white;
}

/* ===============================================
   Footer
   =============================================== */

.footer {
    padding: 2rem;
    background: var(--background-secondary);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===============================================
   Responsive Design
   =============================================== */

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1.5rem;
    }

    .hero {
        min-height: 90vh;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
        margin-bottom: 1.5rem;
    }

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

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

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

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

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

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

    .social-links {
        flex-direction: column;
        align-items: stretch;
    }

    .social-link {
        justify-content: center;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        text-align: center;
    }
}

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

    .profile-photo {
        width: 160px;
        height: 160px;
    }

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

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

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

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

/* ===============================================
   Loading State
   =============================================== */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
