/* ==================== */
/* CSS Variables */
/* ==================== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e5e5e5;
    --accent-color: #000000;
    --accent-hover: #333333;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #333333;
    --accent-color: #ffffff;
    --accent-hover: #e5e5e5;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== */
/* Navigation */
/* ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.938rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

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

.btn-resume {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: var(--accent-color);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.938rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-resume:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

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

.hamburger {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.mobile-menu-btn.active .hamburger {
    background-color: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ==================== */
/* Hero Section */
/* ==================== */
.hero {
    padding: 8rem 0 6rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.938rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

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

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

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

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

.hero-social {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.938rem;
    transition: color 0.2s ease;
}

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

.hero-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

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

.project-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.project-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.placeholder-project-img {
    width: 100%;
    height: 100%;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.75rem;
}

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

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

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    padding: 0.375rem 0.875rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.project-links {
    display: flex;
    gap: 1.5rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.938rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.project-link:hover {
    opacity: 0.7;
}

/* ==================== */
/* About Section */
/* ==================== */
.section-about {
    padding: 6rem 0;
}

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

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

.skills-compact {
    margin-top: 3rem;
    display: grid;
    gap: 1.5rem;
}

.skill-category {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.skill-category:last-child {
    border-bottom: none;
}

.skill-category h4 {
    font-size: 0.938rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-category p {
    font-size: 0.938rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ==================== */
/* Contact Section */
/* ==================== */
.section-contact {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

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

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

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ==================== */
/* Footer */
/* ==================== */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

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

/* ==================== */
/* Responsive */
/* ==================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-image-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        padding: 1rem;
        border-radius: 8px;
    }

    .btn-resume {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

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

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

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

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

    .section-projects,
    .section-about,
    .section-contact {
        padding: 4rem 0;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

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

    .nav-container {
        padding: 1rem 1.5rem;
    }

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

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

    .project-card {
        min-width: 100%;
    }
}

/* ==================== */
/* Accessibility */
/* ==================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

a:focus,
button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}