:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --bg-color: #f9f9f9;
    --nav-bg: #ffffff;
    --card-bg: #ffffff;
    --shadow: - 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: all 0.3s ease;
}

header {
    background-color: var(--nav-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    width: 20%;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    flex-direction: row;
    list-style: none;
    /*margin-left: 2rem;*/
}

@media (max-width: 450px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
}

.nav-links li {
    margin-left: 1rem;
    margin-right: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color)
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
}

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

.page {
    display: none;
    padding: 2rem 0;
}

.page.active {
    display: block;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
}

/* Dark theme styles */
body.dark-theme {
    --primary-color: #4da6ff;
    --secondary-color: #3ddc84;
    --text-color: #f0f0f0;
    --bg-color: #121212;
    --nav-bg: #1e1e1e;
    --card-bg: #2d2d2d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}


/* Smooth transitions for theme change */
body, header, .card {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-color);
}

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

.intro {
    font-size: 1.1rem;
    margin-bottom: 3rem;
}


/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

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

.primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

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

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


/* About page */
.about-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.about-content {
    display: flex;
    gap: 3rem;
}

.about-text {
    flex: 2;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.profile-image {
    width: 250px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.7;
}

.skills-section {
    width: 100%;
}

h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--primary-color);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.skill {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }

    .about-image {
        justify-content: flex-start;
        order: 2;
    }

    .about-text {
        order: 1;
    }
}


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

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image {
    height: 180px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e74c3c;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin: 0 0 1rem;
    font-size: 1.3rem;
}

.card-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.project-link:before {
    content: "→";
    margin-right: 0.3rem;
    transition: margin-right 0.2s ease;
}

.project-link:hover:before {
    margin-right: 0.5rem;
}


/* Experience page */
.experience-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.experience-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.experience-item:hover {
    transform: translateY(-3px);
}

.experience-content {
    padding: 2rem;
}

.experience-title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.experience-subtitle, .experience-duration {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: normal;
    color: var(--secondary-color);
}

.experience-duration {
    margin-bottom: 1rem;
}

.experience-accommodations {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.experience-accomplishments li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.experience-summary {
    margin: 1.5rem 0 0;
    line-height: 1.6;
    font-style: italic;
}

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

    .experience-title {
        font-size: 1.3rem;
    }
}


/* Contact page */
.contact-container {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info, .contact-form {
    flex: 1;
}

.contact-method {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.contact-method i {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 30px;
}

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

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    resize: vertical;
}

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
}


/* Project Details */
.project-details {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.project-content {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.project-media {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-screenshot, .project-gif {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

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

.project-synopsis, .project-tech, .project-challenges {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.tech-list {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.tech-list li {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.project-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    justify-content: center;
}

.project-links .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .project-content {
        flex-direction: column;
    }

    .project-links {
        flex-direction: column;
        align-items: center;
    }
}


/* Carousel Styles */
.media-carousel {
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-slides {
    display: flex;
    overflow: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

.carousel-item {
    min-width: 100%;
    transition: transform 0.5s ease;
    text-align: center;
}

.carousel-item img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.carousel-caption {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--text-color);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1;
}

.carousel-arrow.prev {
    left: 10px;
}

.carousel-arrow.next {
    right: 10px;
}

.carousel-arrow:hover {
    background: rgba(0,0,0,0.8);
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    top: 50%;
    transform: translateY(-50%);
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform: translateY(-50%) scale(0.9)}
    to {transform: translateY(-50%) scale(1)}
}

#modal-image {
    width: auto;
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.modal-caption {
    margin: 1rem auto;
    text-align: center;
    color: white;
    max-width: 80%;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1;
}

.modal-arrow.prev {
    left: 20px;
}

.modal-arrow.next {
    right: 20px;
}

.modal-arrow:hover {
    background: rgba(0,0,0,0.8);
}


/* Hover Effects */
.carousel-item img:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


/* Responsive Carousel */
@media(max-width: 768px) {
    .carousel-item img {
        max-height: 300px;
    }

    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    .modal-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}


/* Footer */
footer {
    background-color: var(--nav-bg);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

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

.social-links a {
    color: var(--text-color);
    font-size: 1.3rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}