/* =========================
   RESET & BASE
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #020030;
    color: white;
    overflow-x: hidden;
}

/* =========================
   HEADER / NAVIGATION
========================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 30px 60px;   /* ⬅ taller navbar */
    background: rgba(3, 1, 20, 0.85);
}
.hero a {
    margin-top: 40px;
}


.logo {
    font-size: 24px;
    font-weight: bold;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #00a2ff;
}

nav ul li a.active {
    color: #00a2ff;
    position: relative;
}

nav ul li a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background-color: #00a2ff;
    border-radius: 2px;
}

/* =========================
   HERO SECTION (HOME)
========================= */
.hero {
    padding-top: 120px;
}
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0px 5px 20px rgba(255, 102, 0, 0.5);
}

.hero h2 {
    font-size: 3.2rem;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-style: italic;

    max-width: 900px;
    line-height: 1.2;
    margin-bottom: 15px;
}
.hero p {
    font-size: 1.3rem;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-style: italic;

    max-width: 650px;
    margin-top: 10px;
}
/* =========================
   BUTTONS
========================= */

button {
    font-size: xx-large;
    border-radius: 30rem;
    height: 5rem;
    padding: 0 40px;
    background-color: rgba(153, 151, 170, 0.8);
    font-style: italic;
    border: 2px solid deepskyblue;
    transition: 0.4s;
    cursor: pointer;
}

button:hover {
    background-color: rgba(3, 1, 20, 0.8);
    color: white;
}

/* =========================
   PORTFOLIO PAGE
========================= */

.portfolio-page {
    padding-top: 140px;
    padding-left: 60px;
    padding-right: 60px;
}

.portfolio-intro {
    max-width: 900px;
    margin: 0 auto 80px auto;
    text-align: center;
}

.portfolio-intro h2 {
    font-size: 3rem;
    font-family: Georgia, 'Times New Roman', Times, serif;
    margin-bottom: 20px;
}

.portfolio-intro p {
    font-size: 1.2rem;
    opacity: 0.85;
    line-height: 1.7;
}

/* =========================
   PROJECTS GRID
========================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: rgba(3, 1, 20, 0.9);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    text-decoration: none;
    color: white;

    transition:
            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.45s ease;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 38px 75px rgba(0, 162, 255, 0.4);
}

.project-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.project-card h3 {
    font-size: 1.4rem;
    margin: 20px 20px 10px 20px;
}

.project-card p {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.6;
    margin: 0 20px 30px 20px;
}

/* =========================
   CATEGORY TAGS
========================= */

.tag {
    display: inline-block;
    margin: 16px 20px 0 20px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 20px;
    text-transform: uppercase;
}

.hands-on { background: rgba(255, 140, 0, 0.95); }
.technical { background: rgba(0, 162, 255, 0.95); }
.three-d   { background: rgba(170, 90, 255, 0.95); }

/* =========================
   ABOUT PAGE
========================= */

.about-page {
    padding-top: 120px;
}

.about-hero img {
    width: 100%;
    max-height: 80vh;
    height: auto;
    object-fit: contain;
    display: block;
}


.about-section {
    max-width: 1200px;
    margin: 120px auto;
    padding: 0 40px;

    display: flex;
    align-items: center;
    gap: 80px;
}

.about-content,
.about-image {
    flex: 1.3;
}

.about-image img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
}


.about-content h2,
.about-section h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

.about-content p,
.about-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.85;
    max-width: 600px;
}
/* =========================
   ABOUT IMAGE POP-OUT EFFECT
========================= */

.about-image {
    perspective: 1000px; /* enables 3D depth */
}

.about-image img {
    transition:
            transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.5s ease;
}

.about-image img:hover {
    transform: scale(1.08); /* POP forward */
    box-shadow:
            0 30px 60px rgba(0, 0, 0, 0.55),
            0 0 0 rgba(0, 0, 0, 0);
}
.home-featured {
    padding: 120px 60px;
    text-align: center;
}

.home-featured h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

.home-featured p {
    max-width: 700px;
    margin: 0 auto 60px auto;
    opacity: 0.85;
    line-height: 1.6;
}

/* =========================
   CONTACT SECTION
========================= */

.contact-section {
    max-width: 900px;
    margin: 140px auto;
    padding: 0 40px;
    text-align: center;
}

.contact-section h3 {
    font-size: 2.3rem;
    margin-bottom: 20px;
}

.contact-section p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 30px;
}

.contact-section ul {
    list-style: none;
}

.contact-section ul li {
    margin-bottom: 12px;
}

/* =========================
   FOOTER
========================= */

.site-footer {
    margin-top: 160px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(3, 1, 20, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .verse {
    font-style: italic;
    margin-bottom: 8px;
}

.site-footer .reference {
    opacity: 0.8;
    margin-bottom: 15px;
}

.site-footer .copyright {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* =========================
   IMAGE MODAL
========================= */

#imageModal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

#modalImg {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 10px;
}

#closeModal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* cursor effect */
.preview-img {
    cursor: pointer;
    transition: transform 0.3s ease;
}
/* =========================
   BACK BUTTON
========================= */

.back-link {
    display: inline-block;
    margin-bottom: 30px;

    font-size: 1.1rem;
    font-weight: bold;

    color: #00a2ff;
    text-decoration: none;

    transition: all 0.3s ease;
}
/* =========================
   SCROLLABLE SCREENSHOTS
========================= */

.scroll-gallery {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
}

.scroll-container {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 20px;


}
.scroll-container img {
    height: 450px;
    border-radius: 18px;
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
/* =========================
   PORTFOLIO TOP IMAGE STYLE
========================= */

.portfolio-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;

    border: 3px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);

    padding: 6px;

    box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.6);
}

/* =========================
   PORTFOLIO PAGE IMAGE
========================= */
/* =========================
   UNO MODAL PREVIEW BORDER
========================= */

.uno-modal #modalImg {
    border: 4px solid rgba(255, 255, 255, 0.3);
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;

    box-shadow:
            0 0 25px rgba(0, 162, 255, 0.3),
            0 10px 40px rgba(0, 0, 0, 0.8);
}

.portfolio-gallery .scroll-container img {
    height: 320px;   /* 🔥 SAME as TribeVibe */

    border: 3px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);

    padding: 6px;

    box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.6);
}
/* =========================
   PORTFOLIO IMAGE LAYOUT FIX
========================= */

.portfolio-page .about-image {
    flex: 1.6;
}
.menu-toggle {
    display: none;
}
/* =========================
   TRIBEVIBE CUSTOM SIZE
========================= */

.tribe-gallery .scroll-container img {
    height: 320px;   /* 🔥 your preferred size */
}
/* hover */
.scroll-container img:hover {
    transform: scale(1.05);
}

/* =========================
   UNO SCROLL IMAGES (ONLY UNO)
========================= */

.uno-gallery .scroll-container img {

    padding: 6px;
    background: rgba(255, 255, 255, 0.05);

    border-radius: 14px;

    box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.6);
}
/* =========================
   FIX SINGLE CARD WIDTH (HANDS-ON PAGE ONLY)
========================= */

.single-project {
    grid-template-columns: 1fr;
    justify-items: start;
}

.single-project .project-card {
    max-width: 420px;
    width: 100%;
}

.back-link:hover {
    color: white;
    transform: translateX(-5px); /* subtle slide */
}
.preview-img:hover {
    transform: scale(1.03);
}
/* =========================
   3D CARD CINEMATIC IMAGE
========================= */

.slider-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;

    opacity: 1;
    transition: opacity 1.2s ease-in-out;  /* 🔥 smoother */
}

.zooming {
    animation: slowZoom 3.5s ease forwards;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}
.gamelab-img {
    width: 80%;
    max-height: 600px;
    object-fit: contain;
}

/* =========================
   ARDUINO IMAGE SIZE FIX
========================= */

.arduino-img {
    width: 80%;
    max-height: 400px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* =========================
   SCROLL REVEAL ANIMATION
========================= */

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }

/* =========================
   NAVBAR RESPONSIVE (FINAL)
========================= */

/* DESKTOP */
nav {
    display: flex;
    margin-left: auto;
}

nav ul {
    display: flex;
    gap: 40px;
}

/* HIDE BURGER ON DESKTOP */
.menu-toggle {
    display: none;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 900px) {

    /* SHOW BURGER */
    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 26px;
        color: white;
        cursor: pointer;
    }

    /* HIDE NAV */
    nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(3, 1, 20, 0.95);
        text-align: center;
        padding: 20px 0;
    }

    /* SHOW WHEN CLICKED */
    nav.active {
        display: flex;
    }

    nav ul {
        flex-direction: column;
        gap: 20px;
    }
    /* FIX CARD WIDTH ON MOBILE */
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

/* =========================
   ABOUT PAGE + PORTFOLIO FIX (MOBILE)
========================= */

@media (max-width: 900px) {

    /* STACK ALL SECTIONS (VERY IMPORTANT) */
    .about-section {
        flex-direction: column !important;
        gap: 30px;
        margin: 60px auto;
        padding: 0 20px;
    }

    /* FORCE REVERSED SECTIONS TO ALSO STACK */
    .about-section.reverse {
        flex-direction: column !important;
    }

    /* FIX IMAGE SIZE */
    .about-image {
        width: 100%;
    }
    .about-image img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* FIX TEXT */
    .about-content {
        width: 100%;
    }

    .about-content p {
        max-width: 100%;
    }

    /* 🔥 FIX PROJECT CARDS WIDTH */
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}


/* =========================
   EXTRA SMALL DEVICES (PHONES)
========================= */

@media (max-width: 500px) {

    .about-section {
        padding: 0 15px;
        gap: 25px;
    }

    .about-content h2,
    .about-section h3 {
        font-size: 1.6rem;
    }

    .about-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .about-image img {
        width: 100%;
        height: auto;
        margin: 0 auto;
        display: block;
    }
}

