:root {
    --bg-top: #0E0330;
    --bg-bottom: #56A1F7;
    --text-light: #FFFFFF;
    --text-dark: #0E0330;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Lora', serif;
}

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

body {
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 50%, var(--bg-top) 100%);
    min-height: 100vh;
    color: var(--text-light);
    font-family: var(--font-secondary);
    -webkit-font-smoothing: antialiased;
}

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

.section {
    padding: 2rem 0;
    min-height: auto;
    /* Changed from fixed height to auto to accommodate content */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Typography */
h1 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 72px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 40px;
    margin-bottom: 1rem;
}

h3 {
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

p,
.contact-link,
.gallery-caption {
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 18px;
    line-height: 1.6;
}

/* Specific Section Styles */
#hero {
    min-height: 80vh;
    padding-top: 0;
    text-align: center;
}

#about {
    padding-top: 0;
    margin-top: calc(-6rem - 50px);
}

.contact-email {
    margin-top: 1rem;
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 18px;
}

/* Project Split Layout */
.project-split {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.project-split.reverse {
    flex-direction: row-reverse;
    /* For Project 2 */
}

.project-visual {
    flex: 1;
}

.project-content {
    flex: 2;
}

.project-content p:nth-of-type(2) {
    margin-top: 2rem;
}

.project-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-img {
    width: 100%;
    max-width: 550px;
    height: auto;
    border-radius: 12px;
    box-shadow: none;
}

#project1 .project-img {
    max-width: 400px;
}

#project3 .project-img {
    max-width: 400px;
    /* Specific resize for Project 3 */
}

#project4 .project-img {
    max-width: 400px;
}

#project3 .gallery-item:nth-child(-n+5) .gallery-img {
    max-width: 525px;
}

#project4 .gallery-item:nth-child(-n+5) .gallery-img {
    max-width: 525px;
}

.img-placeholder {
    display: none;
    /* Hide placeholder if still present */
}

.about-img-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Ensure image stays within circle */
}

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

.about-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-centered h2 {
    margin-bottom: 1.5rem;
}

.about-centered p {
    margin-bottom: 1rem;
}

/* Gallery Styles */
.project-gallery {
    position: relative;
    width: 100%;
    margin-top: 1rem;
}

.gallery-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding-bottom: 1rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.gallery-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.gallery-item {
    min-width: 100%;
    /* Show one item at a time, or adjust to 80% for peek */
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Prevent items from shrinking */
}

.gallery-img-placeholder {
    display: none;
}

.gallery-img {
    width: 100%;
    max-width: 1050px;
    /* Limit width for better viewing */
    height: auto;
    border-radius: 8px;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: zoom-in;
    display: block;
}

.gallery-caption {
    text-align: center;
    max-width: 800px;
    opacity: 0.9;
}

/* Gallery Navigation Buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    /* Removed background */
    border: none;
    color: white;
    font-size: 3rem;
    /* Increased size for better visibility without bg */
    padding: 0 1rem;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s;
}

.gallery-nav:hover {
    background: transparent;
    transform: translateY(-50%) scale(1.2);
}

.gallery-nav.prev {
    left: -3rem;
}

.gallery-nav.next {
    right: -3rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {

    .project-split,
    .project-split.reverse {
        flex-direction: column;
        gap: 2rem;
    }

    .gallery-nav {
        background: rgba(0, 0, 0, 0.5);
        padding: 0.5rem 1rem;
        font-size: 2rem;
    }

    .gallery-nav.prev {
        left: 10px;
    }

    .gallery-nav.next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 48px;
    }

    h2 {
        font-size: 32px;
    }

    .section {
        padding: 2rem 0;
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    max-height: 90vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Animations */

/* Hero Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.hero-animate {
    opacity: 0;
    /* Initially hidden */
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger delays for hero elements */
.hero-delay-1 {
    animation-delay: 0.2s;
}

.hero-delay-2 {
    animation-delay: 0.4s;
}

.hero-delay-3 {
    animation-delay: 0.6s;
}

/* Scroll Reveal Base */
.reveal {
    opacity: 0;
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Directional Variants */
.reveal-up {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}