:root {
    --bg: #f8f8ff;
    --text: #34407b;
    --muted: #363d57;
    --accent: #ffaa02;
    --white: #ffffff;
    --dark-blue: #11004c;
    --shadow: rgba(17, 0, 76, 0.4);
}

[data-theme="dark"] {
    --bg: #1a1a2e;
    --text: #e2e2e2;
    --muted: #b0b0b0;
    --white: #16213e;
    --shadow: rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
}

.intro {
    padding: 2rem 1rem;
    max-width: 70%;
    margin: 0 auto;
    text-align: center;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.site-nav {
    display: flex;
    padding: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    border: 1px solid var(--text);
    border-radius: 50px;
    min-width: 300px;
}

nav a {
    margin-left: 20px;
    margin-right: 20px;
    text-decoration: none;
    color: var(--text);
}

nav a:hover {
    text-decoration: underline;
}

h1,
h2,
h3 {
    line-height: 1.3em;
}

.profile-pic {
    height: 180px;
    width: 180px;
    margin: 0.75em 0;
    border-radius: 12px;
    object-fit: cover;
}

section {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.button {
    display: inline-block;
    padding: 10px 16px;
    margin: 0.5em;
    border: 1px solid var(--text);
    border-radius: 2rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
}

.button:hover,
.button:focus {
    background-color: var(--text);
    border-color: var(--accent);
    color: var(--bg);
}

.button:focus {
    outline: None;
}

.about {
    max-width: 70%;
}

.extra-rambling {
    font-size: 0.7rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    margin-top: 2rem;
}

.side-panel,
.content-panel {
    width: 100%;
}

.tools-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tools-list li {
    background: #eef0f7;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Styles for the Past Projects page */

.project-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.project-card {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 1.5rem;
    margin: 0;
    border-radius: 12px;
    box-shadow: 0px 0px 4px 0px #11004c;
    width: 300px;
    cursor: pointer;
    transition:
        transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease;
}

.project-card:hover,
.project-card:focus {
    transform: translateY(-5px);
    box-shadow: 0px 12px 24px rgba(17, 0, 76, 0.4);
}

.project-card:focus {
    outline: 3px solid var(--accent);
}

.project-card h2 {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.project-card .subtitle {
    font-style: italic;
    margin-top: 0;
    margin-bottom: 1rem;
}

.project-card .description {
    font-style: normal;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.project-card img {
    max-width: 100%;
    height: auto;
    margin-top: 0.5rem;
}

/* Not used atm */
/* .muted {
    color: var(--muted);
} */

/* The Footer styles */

footer {
    padding: 1rem 1rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
}

.footer-links img {
    width: 1rem;
    height: 1rem;
}

/* Modal Popup Styles */
.project-modal {
    position: fixed;
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 900px;
    width: 95%;
    box-shadow: 0px 12px 24px rgba(17, 0, 76, 0.4);
    background: white;
    overflow: visible;
}

.modal-content {
    padding: 3rem;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h2,
.modal-content .subtitle {
    margin: 0 0;
}


/* Arrows for the Modal Popup */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #11004c;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 2000;
}

.nav-arrow:hover {
    background: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: -70px;
}

.next {
    right: -70px;
}

/* Modal Popup close button positioning */
.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #11004c;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    padding: 0;
    z-index: 2100;
    cursor: pointer;
}

.modal-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    padding-bottom: 15px;
    scrollbar-width: thin;
}

.description strong{
    color: var(--text);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.modal-details {
    margin-top: 1.5rem;
    text-align: left;
}

.overview {
    color: var(--text);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.gallery-item {
    margin: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* The image itself */
.gallery-item img {
    height: 220px;
    width: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0px 4px 10px rgba(17, 0, 76, 0.15);
    display: block;
}

/* The caption styling */
.gallery-item figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #11004c;
    font-weight: 500;
    text-align: center;
    max-width: 250px;
    /* Keeps text from stretching too wide */
    line-height: 1.4;
}

/* --- Product Gallery Layout --- */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: auto;
}

.featured-view {
    width: 100%;
    text-align: center;
    border-radius: 12px;
    padding: 15px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-view img {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: 8px;
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Thumbnails --- */
.thumbnail-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px;
    scroll-padding: 0 20px;
    justify-content: center;
}

.thumb-wrapper {
    flex: 0 0 80px;
    height: 60px;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--thumb-bg);
    padding: 0;
    transition: 0.2s;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-wrapper.active {
    border-color: var(--accent);
    transform: scale(1.1);
}

/* --- Lightbox Styles --- */
.lightbox {
    border: none;
    padding: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox[open] {
    display: flex;
}

.lightbox.active {
    display: flex;
}

.lightbox-carousel {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* The "Carousel" snap */
    scrollbar-width: none;
}

.close-lightbox{
    position: absolute;
    top: 40px;
    right: 250px;
    background: white;
    color: #11004c;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    padding: 0;
    z-index: 2100;
    cursor: pointer;
}

.lb-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

.lb-slide img {
    max-width: 90%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    width: auto;
    height: auto;
}

/* MEDIA QUERIES */
@media (min-width: 768px) {
    .main-content {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .side-panel {
        flex: 1;
        top: 20px;
        text-align: center;
    }

    .content-panel {
        flex: 1.5;
        text-align: left;
    }

    .about,
    .tools {
        align-items: flex-start;
        text-align: left;
    }

    .tools-list {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    .nav-arrow {
        background: rgba(17,
                0,
                76,
                0.8);
        width: 40px;
        height: 40px;
    }

    /* Adjust Gallery for Mobile */
    .modal-gallery img {
        height: 160px;
    }

    .gallery-item figcaption {
        font-size: 0.8rem;
        max-width: 150px;
    }
}

@media (max-width: 600px) {
    .featured-view img {
        max-height: 250px;
    }

    .thumbnail-strip {
        justify-content: flex-start;
        padding-left: 10px;
    }

    .thumb-wrapper {
        flex: 0 0 60px;
        height: 45px;
    }
}