:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --background-light: #f8fafc;
    --background-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-white);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.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 {
    color: var(--primary-color);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-white) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
}

/* Projects Section */
.projects {
    padding: 80px 0;
    background-color: var(--background-white);
}

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

.project-card {
    background: var(--background-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 4rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-header {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    padding: 2rem;
}

.project-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.project-content {
    padding: 2rem;
}

.project-images {
    margin-bottom: 2rem;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.image-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

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

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

.detail-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

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

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

.detail-section li::before {
    content: '▸';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Skills Section */
.skills {
    padding: 80px 0;
    background-color: var(--background-light);
}

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

.skill-card {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.skill-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.skill-icon i {
    font-size: 2rem;
    color: white;
}

.skill-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.skill-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tools span {
    background-color: var(--background-light);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Personal Projects Section */
.personal-projects {
    padding: 80px 0;
    background-color: var(--background-light);
}

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

.personal-project-card {
    background: var(--background-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.personal-project-card .project-header {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    padding: 1.5rem;
}

.personal-project-card .project-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.project-description {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Single Image Container (for projects with one image) */
.single-image-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.single-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.single-image-container:hover img {
    transform: scale(1.05);
}

/* Carousel Component */
.carousel-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 10;
}

.carousel-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.carousel-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.indicator.active {
    background: var(--primary-color);
    border-color: white;
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Bottom Gallery Carousel */
.bottom-gallery {
    padding: 40px 0 0;
    background-color: var(--background-white);
    margin-bottom: 0;
}

.sliding-gallery-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.sliding-gallery {
    height: 200px;
    width: 100%;
    position: relative;
}

.sliding-track {
    display: flex;
    height: 100%;
    transition: transform 0.8s ease-in-out;
    will-change: transform;
}

.sliding-image {
    flex: 0 0 auto;
    width: calc(25% - 2px);
    height: 100%;
    margin-right: 2px;
    position: relative;
    overflow: hidden;
    background-color: var(--background-light);
}

.sliding-image:last-child {
    margin-right: 0;
}

.sliding-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.sliding-image:hover img {
    transform: scale(1.05);
}

/* Pause/play overlay (optional) */
.sliding-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
    pointer-events: none;
    transition: background 0.3s ease;
}

.sliding-gallery:hover::before {
    background: rgba(0, 0, 0, 0.05);
}

/* Optional pause indicator */
.sliding-gallery-wrapper:hover::after {
    content: '⏸';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    animation: fadeInPause 0.3s ease forwards;
}

@keyframes fadeInPause {
    to {
        opacity: 1;
    }
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: var(--background-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-content-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.contact-content-centered .contact-info {
    max-width: 600px;
}

.contact-content-centered .contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-info h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.contact-item i {
    width: 20px;
    color: var(--primary-color);
}

.contact-form {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--background-white);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
    }

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

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

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

    .hero-content h2 {
        font-size: 1.25rem;
    }

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

    .project-details {
        grid-template-columns: 1fr;
    }

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

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

    .carousel-container {
        height: 250px;
    }

    .sliding-gallery {
        height: 150px;
    }

    .sliding-image {
        width: calc(33.333% - 2px);
    }

    .sliding-gallery-wrapper {
        margin: 0 10px;
    }

    .hero-buttons {
        justify-content: center;
    }
}

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

    .hero {
        padding: 100px 0 60px;
    }

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

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

    .projects,
    .skills,
    .contact {
        padding: 60px 0;
    }

    .project-card {
        margin-bottom: 3rem;
    }

    .project-header,
    .project-content {
        padding: 1.5rem;
    }

    .main-image {
        height: 250px;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    .sliding-gallery {
        height: 120px;
    }

    .sliding-image {
        width: calc(50% - 1px);
    }

    .bottom-gallery {
        padding: 20px 0 0;
    }

    .sliding-gallery-wrapper:hover::after {
        font-size: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

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

/* Loading states and hover effects */
.project-card,
.skill-card,
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.btn:focus,
.nav-link:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}