/* 1. GLOBAL & LAYOUT */
:root {
    --bg-light: #f8fafc;
    --glass-white: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent-gray: #e2e8f0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-image: url(../assets/images/webbackground1.jpg);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-light: #0f172a;
    --glass-white: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-gray: #1e293b;
    background-image: none;
    background-color: #020617;
}

/* Specific Dark Mode Tweaks */
body.dark-mode .box {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

body.dark-mode .sidebar-tall {
    background: rgba(30, 41, 59, 0.9);
}

body.dark-mode .hero-box {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode a,
body.dark-mode .social-links li a,
body.dark-mode .circle-menu span {
    color: #ffffff;
}

body.dark-mode #back-button {
    color: #ffffff;
}

body.dark-mode #back-button:hover {
    color: #98e2cd;
    /* Using your mint/green accent color for better visibility */
}

body.dark-mode .resume-link {
    color: #98e2cd;
    /* Your mint color */
}

#dark-mode-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #000000;
    color: black;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 3000;
    cursor: pointer;
    /* Smooth transitions for disappearing */
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.4);
}

/* Class to trigger the disappearance */
#dark-mode-toggle.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

#dark-mode-toggle:hover {
    background-color: #999999;
    transform: scale(1.1);
}

body.dark-mode #dark-mode-toggle {
    background-color: #ffffff;
    color: white;
}

a {
    text-decoration: none;
    color: #000000;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(10rem, auto);
    gap: 1.5rem;
    max-width: 75rem;
    width: 100%;
}

.center-2x2 h1 {
    font-size: 3rem;
    text-align: center;
}


.box {
    border-radius: 2rem;
    padding: 1.5rem;
    position: relative;
    background: var(--glass-white);
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    border: 0.0625rem solid var(--glass-border);
    box-shadow: 0 0.5rem 2rem 0 rgba(31, 38, 135, 0.07);
    transition: all 0.3s ease;
    color: var(--text-main);
}

.box p {
    margin-block: 2rem;
}

.tall {
    grid-row: span 2;
    margin-top: 4rem;
}

.tall-b {
    grid-row: span 2;
}


/* 2. PROJECTS */

.project-grid {
    display: grid;
    grid-template-columns: repeat(1fr);
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
    height: 50rem;
    overflow-y: scroll;
    scrollbar-color: #98e2cd #00000020;
    scrollbar-width: thin;
}

.project-box {
    text-align: center;
    transition: transform 0.2s;
    height: 8rem;
    position: relative;
    overflow: hidden;
    border: #C19A6B dashed 0.0625rem;
    border-radius: 0.5rem;
}

.project-box:hover {
    transform: scale(1.03);
}

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

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.3125rem;
}

.project-text {
    font-size: 0.7rem;
    color: white;
    line-height: 1.2;
}

.application-icons {
    width: 2rem;
}

/* 3. STATUS & SKILLS (Videos/Images) */
.status-box {
    background: white;
    border: none;
    padding: 0rem;
    overflow: hidden;
}

.status-box img {
    border-radius: 1.5rem;
    width: 100%;
    height: 100%;
    display: block;
    /* Removes the "inline" whitespace/gap at the bottom */
    object-fit: cover;
}

.skills-box {
    background: white;
    border: none;
    padding: 0rem;
    overflow: hidden;
}

.main-project-video {
    border-radius: 1.5rem;
    width: 100%;
    height: 100%;
    display: block;
    /* Removes the "inline" whitespace/gap at the bottom */
    object-fit: contain;
}

.restaurant-project-img {
    border-radius: 1.5rem;
    width: 100%;
    height: 100%;
    display: block;
    /* Removes the "inline" whitespace/gap at the bottom */
    object-fit: contain;
}

.main-project-img {
    border-radius: 1.5rem;
    width: 100%;
    height: auto;
    margin-block: 2rem;
}

.more-projects h2 {
    margin-top: 0.6rem;
}

/* 4. CONTACT BOX */
.sidebar-tall {
    grid-row: span 2;
    background: rgba(255, 255, 255, 0.8);
}

.form-container {
    max-width: 25rem;
    margin-left: auto;
    margin-right: auto;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container textarea {
    margin-top: 0.4rem;
    background-color: #98e2cd;
    border-radius: 0.5rem;
    width: 100%;
    padding: 0.625rem;
    border: 0.0625rem solid #77c8b2;
    box-sizing: border-box;
}

.form-container textarea {
    height: 6rem;
    resize: vertical;
}

.form-container input[type="button"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
    background-color: #98e2cd;
    color: black;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.form-container input[type="button"]:hover {
    background-color: #C19A6B;
    color: white;
}

.response-container {
    display: none;
}

/* 5. HERO BOX & NAVIGATION */
.center-2x2 {
    grid-column: span 2;
    /* grid-row: span 2; */
}

.rest-center-2x2 {
    grid-column: span 2;
    /* grid-row: span 2; */
}

.restaurant-project-video {
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    object-fit: cover;
    min-height: 28.75rem;

}

.hero-box {
    margin-top: 4rem;
    background: #ffffff;
    position: relative;
    padding-top: 18rem;
    border: 0.0625rem solid #cbd5e1;
}

#rvlogo {
    position: absolute;
    top: 2rem;
    width: 19rem;
    z-index: 80;
    left: 50%;
    transform: translateX(-50%);
}

#nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0;
    position: absolute;
    top: 0rem;
    left: 0.125rem;
    z-index: 1000;
}

.circle-menu {
    border-radius: 50%;
    width: 2.8rem;
    height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 30;
}

.circle-menu span {
    color: #000000;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1.8rem;
    text-shadow: 0 0 0.5rem rgba(152, 226, 205, 0.6);
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-icon {
    display: none;
    width: 1rem;
    height: auto;
    position: absolute;
    top: 1.2rem;
    left: 1rem;
}

#nav-toggle.active .hamburger-icon {
    display: none;
}

#nav-toggle.active .close-icon {
    display: block;
}

#primary-nav {
    display: none;
    position: absolute;
    top: 0;
    left: -200%;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(0.5rem);
    border-radius: 1.5rem;
    border: 0.0625rem solid #98e2cd40;
    z-index: 900;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#primary-nav.active {
    left: 0;
}

#primary-nav ul {
    list-style: none;
    text-align: center;
    width: 100%;
}

#primary-nav ul li {
    margin: 1.5rem 0;
}

#primary-nav ul li a {
    display: inline-block;
    color: #fff;
    font-size: 1.8rem;
}

#back-button {
    display: block;
    font-size: 2rem;
    color: #000000;
    text-align: left;
    margin-bottom: 1rem;
    text-decoration: none;
    z-index: 200;
}

#back-button:hover {
    color: #C19A6B;
}

.vertical-tall {
    grid-row: span 2;
    margin-top: 4rem;
}

.vertical-tall-b {
    grid-row: span 2;
}

.project-grid-two {
    display: grid;
    grid-template-columns: repeat(1fr);
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
    height: 50rem;
    overflow-y: scroll;
    scrollbar-color: #98e2cd #00000020;
    scrollbar-width: thin;
}

/* 6. VIDEO BOX STYLES */
.kobo-main-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    margin-top: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background: #000;
}

.kobo-main-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.about-box h1 {
    margin-bottom: 2rem;
}

/* 7. RATING / RESUME BOX */
.resume-link {
    color: #7c3aed;
}

.social-links {
    margin-block: 2rem;
    justify-content: center;
    list-style: none;
    display: flex;
    gap: 1rem;
    transition: color 0.3s ease;
}

.social-links li a {
    color: #000000;
}

.social-links li a:hover i {
    color: #7c3aed;
}

/* 8. SLIDESHOW BOX */
.wide-bottom {
    grid-column: span 2;
}

.slideshow-box {
    padding: 0rem;
    border: none;
}

.photoplayer {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 18.75rem;
    overflow: hidden;
    border-radius: 1.5rem;
}

.photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    object-fit: cover;
    opacity: 0;
}

.photo:first-child {
    opacity: 1;
}

.photoplayer2 {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1.5rem;
    margin-top: 2rem;
}

/* The <a> tags are now the slides */
.photoplayer2 a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* The images fill the <a> tags */
.photoplayer2 .photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: static;
    /* Remove the absolute positioning from the image itself */
    opacity: 1;
    /* Let the <a> tag handle opacity */
}

.signage-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;

    display: flex;
    justify-content: center;
    align-items: center;
}

.signage-frame {
    width: 1920px;
    height: 1080px;

    transform: scale(0.4) translateY(-3rem);

    transform-origin: center center;

    flex-shrink: 0;
    border: none;
}

.big-signage {
    text-decoration: underline;
    text-align: center;
}

.img-wrapper-two {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 1rem;
}

.fam-res-app-imgs {
    width: 7rem;
}

#my_flipbook {
    margin-top: 2rem;
}

/* 9. BACK TO TOP */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #98e2cd;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 2000;
    transition: all 0.3s ease;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: #C19A6B;
    color: white;
    transform: translateY(-0.3125rem);
}

/* FOOTER */
footer {
    margin-top: 2rem;
    font-size: 0.6rem;
    text-align: center;
    width: 100%;
}

/* RESPONSIVE */
@media (max-width: 64rem) {
    .bento-grid {
        display: flex;
        flex-direction: column;
    }

    .box {
        width: 100%;
        order: 2;
    }

    .center-2x2 {
        order: 1;
        grid-column: span 1;
        grid-row: span 1;
        padding-top: 12rem;
        margin-top: 6rem;
    }

    .rest-center-2x2 {
        order: 1;
        grid-column: span 1;
        grid-row: span 1;
    }

    .center-2x2 h1 {
        margin-top: 4rem;
    }

    .tall {
        margin-top: 0rem;
    }

    .vertical-tall {
        margin-top: 0rem;
    }

    #nav-toggle {
        display: block;
        cursor: pointer;
    }

    #primary-nav {
        display: flex;
    }

    #back-button {
        display: none;
    }

    #rvlogo {
        width: 17rem;
        top: 2rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        height: 38rem;
    }

    .project-grid-two {
        grid-template-columns: repeat(2, 1fr);
        height: 38rem;
    }

    .project-box {
        height: 11rem;
    }

    .ad-box {
        order: 3;
    }

    .signage-frame {
        transform: scale(0.5) translateY(-1rem);
    }

}

@media (min-width: 33.1rem) and (max-width: 44rem) {
    .signage-frame {
        transform: scale(0.3) translateY(-5rem);
    }
}


@media (max-width: 33rem) {
    .bento-grid {
        display: flex;
        flex-direction: column;
    }

    .box {
        width: 100%;
        order: 2;
    }

    .center-2x2 {
        order: 1;
        grid-column: span 1;
        grid-row: span 1;
        padding-top: 12rem;
        margin-top: 6rem;
    }

    .rest-center-2x2 {
        order: 1;
        grid-column: span 1;
        grid-row: span 1;
    }

    .tall {
        margin-top: 0rem;
    }

    .vertical-tall {
        margin-top: 0rem;
    }

    .center-2x2 h1 {
        margin-top: 4rem;
    }

    #nav-toggle {
        display: block;
        cursor: pointer;
    }

    #primary-nav {
        display: flex;
    }

    #back-button {
        display: none;
    }

    #rvlogo {
        width: 17rem;
        top: 4rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        height: 32rem;
    }

    .project-grid-two {
        grid-template-columns: repeat(2, 1fr);
        height: 28rem;
    }

    .project-box {
        height: 8rem;
    }

    .ad-box {
        order: 3;
    }

    .signage-frame {
        transform: scale(0.2) translateY(-5rem);
    }

}