/* ==================== ROOT & GENERAL ==================== */
:root {
    --primary: #6366f1;
    --secondary: #4f46e5;
    --accent: #ec4899;
    --dark: #111827;
    --light: #f9fafb;
    --gray: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --dark: #f9fafb;
    --light: #1f2937;
    --gray: #d1d5db;
    --border: #374151;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    color: var(--dark);
    transition: var(--transition);
    line-height: 1.6;
}

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

/* ==================== NAVBAR ==================== */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

body.dark-mode .navbar {
    background: #1f2937;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

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

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

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

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

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

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ==================== HERO ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 100px 20px 80px;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.hero-content .tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-content .description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

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

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

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

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

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-large {
    padding: 14px 40px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat p {
    opacity: 0.9;
}

/* ==================== PROJECTS ==================== */
.projects {
    padding: 80px 20px;
    background: white;
}

body.dark-mode .projects {
    background: #1f2937;
}

.projects h2 {
    font-size: 2.5rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 1rem;
}

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

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

.project-card {
    background: var(--light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

body.dark-mode .project-card {
    background: #2d3748;
}

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

.project-image {
    position: relative;
    height: 250px;
    background: linear-gradient(135deg, #e0e7ff 0%, #cffafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.placeholder-image {
    font-size: 4rem;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.overlay-content p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.overlay-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--gray);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    position: relative;
}

body.dark-mode .modal-content {
    background: #1f2937;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--dark);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== ABOUT ==================== */
.about {
    padding: 80px 20px;
    background: var(--light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.dark-mode .highlight {
    background: #2d3748;
}

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

.highlight i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.highlight h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.highlight p {
    color: var(--gray);
    margin: 0;
    font-size: 0.9rem;
}

.image-placeholder {
    font-size: 6rem;
    text-align: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #cffafe 100%);
    padding: 2rem;
    border-radius: 12px;
}

/* ==================== SKILLS ==================== */
.skills {
    padding: 80px 20px;
    background: white;
}

body.dark-mode .skills {
    background: #1f2937;
}

.skills h2 {
    font-size: 2.5rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 3rem;
}

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

.skill-category {
    background: var(--light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

body.dark-mode .skill-category {
    background: #2d3748;
}

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

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.skill-bar {
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 10px;
    animation: progressBar 1s ease-out;
}

@keyframes progressBar {
    from { width: 0; }
}

/* ==================== TESTIMONIALS ==================== */
.testimonials {
    padding: 80px 20px;
    background: var(--light);
}

.testimonials h2 {
    font-size: 2.5rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 3rem;
}

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

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.dark-mode .testimonial-card {
    background: #2d3748;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.testimonial-card .stars {
    color: #fbbf24;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.testimonial-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    font-size: 2.5rem;
}

.testimonial-author h4 {
    color: var(--dark);
    margin-bottom: 0.2rem;
}

.testimonial-author p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
}

/* ==================== CONTACT ==================== */
.contact {
    padding: 80px 20px;
    background: white;
}

body.dark-mode .contact {
    background: #1f2937;
}

.contact h2 {
    font-size: 2.5rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 1rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--light);
    color: var(--dark);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-info h3 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-info p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

body.dark-mode .contact-method {
    background: #2d3748;
}

.contact-method:hover {
    transform: translateX(8px);
    background: var(--primary);
    color: white;
    border-left-color: var(--accent);
}

.contact-method i {
    font-size: 1.5rem;
}

.contact-method h4 {
    margin-bottom: 0.2rem;
}

.contact-method p {
    font-size: 0.9rem;
    margin: 0;
}

.contact-cta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.contact-cta h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.contact-cta p {
    color: var(--gray);
    margin: 0;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 20px 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
    background: var(--accent);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ==================== SCROLL TO TOP ==================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.scroll-to-top.show {
    display: flex;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    background: var(--secondary);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: left 0.3s;
        padding: 2rem 0;
        gap: 0;
    }

    body.dark-mode .nav-menu {
        background: #1f2937;
    }

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

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        gap: 1rem;
    }

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

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

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

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content .tagline {
        font-size: 1.1rem;
    }

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

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

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