/* ================================
   THEME VARIABLES
   ================================ */

:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-tertiary: #adb5bd;
    --accent-primary: #0d6efd;
    --accent-hover: #0a58ca;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.95);
}

:root[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --accent-primary: #58a6ff;
    --accent-hover: #79c0ff;
    --border-color: #30363d;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7);
    --card-bg: #161b22;
    --nav-bg: rgba(13, 17, 23, 0.95);
}

/* ================================
   RESET & BASE STYLES
   ================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ================================
   NAVIGATION
   ================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
}

.brand-icon {
    font-size: 1.5rem;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-icon {
    font-size: 1.2rem;
    opacity: 0.7;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--accent-primary);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* ================================
   MAIN CONTENT
   ================================ */

.main-content {
    margin-top: 80px;
}

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

.section {
    padding: 5rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   HERO SECTION
   ================================ */

.hero-section {
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.greeting {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
}

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

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

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

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

/* ================================
   BUTTONS
   ================================ */

.btn-primary,
.btn-secondary,
.btn-project {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

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

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

.btn-project {
    background: var(--accent-primary);
    color: white;
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-project:hover {
    background: var(--accent-hover);
    transform: translateX(4px);
}

/* ================================
   ABOUT SECTION
   ================================ */

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
}

.about-paragraph {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* ================================
   SKILLS SECTION
   ================================ */

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

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

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

.skill-category-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

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

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ================================
   PROJECTS SECTION
   ================================ */

.projects-container {
    max-width: 900px;
    margin: 0 auto;
}

.project-accordion {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.project-accordion:hover {
    box-shadow: var(--shadow-md);
}

.accordion-header {
    width: 100%;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background: var(--bg-tertiary);
}

.accordion-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.accordion-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.accordion-arrow {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.project-accordion.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    border-top: 1px solid transparent;
}

.project-accordion.active .accordion-content {
    max-height: 2000px;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.project-info {
    flex: 1;
}

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

.project-tech,
.project-features {
    margin-bottom: 1.5rem;
}

.project-tech h4,
.project-features h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.4rem 0.875rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 500;
}

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

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

.project-features li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* ================================
   FOOTER
   ================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

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

    .greeting {
        font-size: 1.25rem;
    }

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

    .section {
        padding: 3rem 0;
        min-height: auto;
    }

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

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

    .accordion-title {
        font-size: 1.25rem;
    }

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

    .accordion-header {
        padding: 1rem 1.5rem;
    }

    .project-accordion.active .accordion-content {
        padding: 1.5rem;
    }
}

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

    .container {
        padding: 0 1rem;
    }

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

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

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

