/* --- Root Variables & Theme Sync --- */
:root {
    --bg-gradient: linear-gradient(135deg, #0f0c29, #1e1b41, #161630);
    --text: #e0f7ff;
    --text-muted: #a0a0c0;
    --primary: #40c4ff;
    --primary-glow: rgba(64, 196, 255, 0.35);
    --accent: #a78bfa;
    --card: rgba(30, 30, 60, 0.75);
    --border: rgba(167, 139, 250, 0.22);
    --shadow: 0 12px 48px rgba(0, 0, 0, 0.5);

    --scrollbar-bg: #0f0c29;
    --scrollbar-thumb: #1e1b41;
    --scrollbar-hover: #5967ff;
    --item-bg-muted: rgba(64, 196, 255, 0.07);
    --item-bg-hover: rgba(64, 196, 255, 0.18);
    
    --white: #ffffff;
    --black: #000000;
}

.light-theme {
    --bg-gradient: linear-gradient(135deg, #f0f4f8, #e2e8f0, #d1d9e6);
    --card: rgba(255, 255, 255, 0.9);
    --border: rgba(0, 86, 179, 0.15);
    --shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
    --text: #1e293b;
    --text-muted: #334155;
    --primary: #0056b3;
    --primary-glow: rgba(0, 86, 179, 0.15);
    --accent: #553c9a;
    --scrollbar-bg: #f1f5f9;
    --scrollbar-thumb: #cbd5e0;
    --scrollbar-hover: #0056b3;
    --item-bg-muted: rgba(0, 86, 179, 0.08);
    --item-bg-hover: rgba(0, 86, 179, 0.12);
}

/* --- Base Styles --- */
html, body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    background: var(--bg-gradient);
    color: var(--text);
    font-family: "Tektur", sans-serif;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--scrollbar-bg); }
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb); 
    border-radius: 10px;
    border: 3px solid var(--scrollbar-bg); 
}
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }

/* --- Container & Headers --- */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(40px, 5vw, 80px) 0;
}

h1 {
    text-align: center;
    color: var(--accent);
    font-size: clamp(1.8rem, 4.5vw, 4rem);
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Video Section --- */
.video-wrapper {
    width: 100%;
    border-radius: clamp(12px, 2vw, 24px);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
    background: var(--black); 
}

video {
    width: 100%;
    display: block;
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    gap: clamp(1rem, 2vw, 2rem);
    margin-bottom: clamp(2rem, 4vw, 4rem);
    grid-template-columns: repeat(2, 1fr);
}

.gallery-item {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--item-bg-muted);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--primary-glow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* --- Details Card --- */
.details-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: clamp(1.5rem, 4vw, 4rem);
    margin-bottom: clamp(2rem, 4vw, 4rem);
    box-shadow: var(--shadow);
}

h2 {
    color: var(--accent);
    font-size: clamp(1.2rem, 2vw, 2rem);
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.description {
    font-size: clamp(0.95rem, 1.2vw, 1.25rem);
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Tech Stack Scaling --- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}










/* --- Tech Box Styling --- */
.tech-box {
    background: var(--item-bg-muted);
    padding: clamp(1rem, 1.5vw, 2rem);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.tech-box:hover { 
    background: var(--item-bg-hover);
    transform: translateX(5px);
}

.tech-box b { 
    color: var(--primary); 
    display: block; 
    font-size: 1rem; 
    margin-bottom: 4px; 
}

.tech-box span { 
    color: var(--primary);
    font-size: 0.85rem; 
    opacity: 0.9; 
}

/* --- Action Buttons --- */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: clamp(30px, 5vw, 60px);
}

.btn {
    text-decoration: none;
    padding: 18px 36px;
    border-radius: 12px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(0.8rem, 1vw, 1rem);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    flex: 1;
    max-width: 300px;
}


.btn-live { 
    background: linear-gradient(135deg, var(--btn-grad-start), var(--btn-grad-end)); 
    color: var(--white); 
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-code { 
    border: 2px solid var(--accent); 
    color: var(--accent); 
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px var(--primary-glow);
    filter: brightness(1.1);
}

/* --- Pagination Section --- */
.pagination-section {
    width: 100%;
    padding: clamp(100px, 10vw, 180px) 0;
    border-top: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

.project-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-item {
    flex: 1;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.nav-item.prev { align-items: flex-start; }
.nav-item.next { align-items: flex-end; }

.nav-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    letter-spacing: 0.25em;
    color: var(--text-muted); 
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.nav-link-wrapper {
    display: flex;
    align-items: center;
    gap: clamp(15px, 2vw, 30px);
}

.nav-project-title {
    font-size: clamp(1.8rem, 3.5vw, 4rem);
    font-weight: 600;
    margin: 0;
    color: var(--nav-link);
    line-height: 1.1;
    transition: color 0.4s ease;
}

.nav-arrow {
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    color: var(--primary);
    opacity: 0;
    transition: all 0.4s ease;
}

.nav-item:hover .nav-project-title { color: var(--primary); }
.nav-item.prev:hover .nav-arrow { opacity: 1; transform: translateX(-15px); }
.nav-item.next:hover .nav-arrow { opacity: 1; transform: translateX(15px); }

.nav-divider {
    width: 1px;
    height: clamp(60px, 8vw, 120px);
    background: var(--border);
    margin: 0 clamp(30px, 6vw, 100px);
}

/* --- Layout Optimization --- */
@media (min-width: 1100px) {
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
    .tech-grid { grid-template-columns: repeat(4, 1fr); }
}













@media (max-width: 820px) {
    .nav-project-title{
        color: var(--primary);
    }
}


@media (max-width: 767px) {
    .pagination-section {
        padding: 60px 0;
        border-top: 1px solid var(--border);
    }

    .project-navigation {
        display: grid;
        grid-template-columns: 1fr 1px 1fr; 
        align-items: start;
        gap: 15px;
    }

    .nav-item {
        display: flex;
        flex-direction: column; 
        align-items: center;    
        text-align: center;
        text-decoration: none;
    }

    .nav-meta {
        font-size: 0.65rem;
        letter-spacing: 0.2em;
        color: var(--text-muted);
        margin-bottom: 8px;
    }

    .nav-project-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary);
        margin: 0 0 12px 0;
        line-height: 1.3;
        min-height: 2.6em; 
    }

    .nav-arrow {
        font-size: 1.5rem;
        color: var(--accent); 
        opacity: 1;
        transition: transform 0.3s ease;
    }

    .nav-divider {
        display: block;
        width: 1px;
        height: 80px;
        margin: 0 auto;
        background: var(--border);
        align-self: center;
    }

    .nav-item:active .nav-project-title {
        color: var(--primary);
    }
}







/*================================== FOOTER MEDIAS ======================================= */
@media (min-width: 1100px) {
	.footer-container {
		gap: 6rem;
	}

	.links {
		gap: 3rem 4rem;
	}
}


@media (max-width: 767px) {
	.footer-container {
		grid-template-columns: 1fr 3fr;
		gap: 4rem;
		align-items: start;
	}

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

	.tech-icons,
	.social-links {
		justify-content: flex-start;
	}

	.links {
		grid-template-columns: repeat(4, 1fr);
		text-align: left;
	}
}