/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-dark: #0f1115;
    --bg-card: #181b21;
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #2d3748;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section { padding: 5rem 0; }
h1, h2, h3 { line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; }
p { color: var(--text-muted); margin-bottom: 1.5rem; }

.btn {
    display: inline-block;
    background: var(--accent);
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); color: #ffffff; }
.btn-outline { background: transparent; border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* --- ASSET PROTECTION --- */
/* Disables text highlighting across the whole site */
body {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

/* Add this class to anything you DO want people to copy (like your email) */
.selectable {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Prevents images from being click-and-dragged to the desktop */
img, .img-placeholder {
    -webkit-user-drag: none;
    user-drag: none;
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

nav { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.nav-links a:hover { color: var(--text-main); }
.nav-links a.btn { color: #ffffff; }

/* --- HERO (Animated) --- */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 40%);
    animation: ambient-drift 20s infinite ease-in-out;
    z-index: 0;
    pointer-events: none;
}

@keyframes ambient-drift {
    0% { transform: scale(1) translate(0, 0); }
    33% { transform: scale(1.1) translate(3%, 5%); }
    66% { transform: scale(0.9) translate(-3%, -2%); }
    100% { transform: scale(1) translate(0, 0); }
}

.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 3.5rem; font-weight: 800; max-width: 800px; margin: 0 auto 1.5rem; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 2rem; }

/* --- PROJECT CARDS (Used in both grid and carousel) --- */
.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover { 
    border-color: var(--accent); 
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.15);
}

.project-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.project-img-wrapper img, .img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: linear-gradient(45deg, #181b21, #222731);
    font-size: 0.9rem;
}

.project-card:hover .project-img-wrapper img, 
.project-card:hover .img-placeholder {
    transform: scale(1.05);
}

.project-content { padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; }
.tags { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tag { 
    font-size: 0.75rem; font-weight: 600;
    background: rgba(59, 130, 246, 0.1); 
    color: var(--accent);
    padding: 0.35rem 0.8rem; border-radius: 20px; 
}

.project-content h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.project-content p { font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1; }

.project-link {
    color: var(--text-main); font-weight: 600; font-size: 0.95rem;
    display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start;
}
.project-link svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.project-card:hover .project-link { color: var(--accent); }
.project-card:hover .project-link svg { transform: translateX(5px); }

/* --- PROJECT GRID & FILTERS (projects.html) --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* --- PROJECT FILTER BAR --- */
        .filter-bar { 
            display: flex; 
            justify-content: flex-start; 
            flex-wrap: wrap; 
            gap: 0.75rem; 
            margin-top: 3rem; /* <-- This adds the missing space above the pills */
            margin-bottom: 2.5rem; 
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border); 
        }

        .filter-btn {
            background: var(--bg-card); /* Gives them a slight contrast against the background */
            border: 1px solid var(--border);
            color: var(--text-muted); 
            padding: 0.5rem 1.25rem;
            border-radius: 30px; 
            font-size: 0.9rem; 
            font-weight: 500; 
            cursor: pointer; 
            transition: all 0.3s ease;
        }

        .filter-btn:hover { border-color: var(--accent); color: var(--text-main); }
        .filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- SINGLE PROJECT (project-single.html) --- */
.project-hero-section { padding: 120px 0 2rem; text-align: center; }
.project-hero-section h1 { font-size: 3rem; margin-bottom: 1rem; }
.project-hero-section .tags { justify-content: center; margin-bottom: 2rem; }

.project-banner {
    width: 100%; height: 500px; border-radius: 12px;
    overflow: hidden; margin-bottom: 4rem; border: 1px solid var(--border);
}

.project-details-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; }
.project-body h2 { font-size: 1.8rem; margin-top: 2rem; margin-bottom: 1rem; }
.project-body p { margin-bottom: 1.5rem; font-size: 1.05rem; }

.project-meta-sidebar {
    background: var(--bg-card); padding: 2rem;
    border-radius: 12px; border: 1px solid var(--border); position: sticky; top: 100px;
}
.meta-item { margin-bottom: 1.5rem; }
.meta-item:last-child { margin-bottom: 0; }
.meta-item h4 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.25rem; }
.meta-item p { margin-bottom: 0; color: var(--text-main); font-weight: 500; }

/* --- PROJECT GALLERY --- */
        .project-gallery { margin-bottom: 4rem; }
        
        .gallery-main {
            width: 100%; height: 500px; border-radius: 12px;
            overflow: hidden; border: 1px solid var(--border);
            margin-bottom: 1rem; cursor: zoom-in;
            position: relative;
        }

        .gallery-thumbnails {
            display: flex; gap: 1rem; overflow-x: auto;
            scrollbar-width: none; /* Hides scrollbar in Firefox */
            padding-bottom: 0.5rem; /* Room for focus rings/shadows */
        }
        
        .gallery-thumbnails::-webkit-scrollbar { display: none; } /* Hides scrollbar in Webkit */

        .thumb {
            width: 140px; height: 90px; flex-shrink: 0;
            border-radius: 8px; overflow: hidden;
            border: 2px solid transparent; cursor: pointer;
            transition: all 0.3s ease; opacity: 0.5;
        }

        .thumb.active, .thumb:hover { border-color: var(--accent); opacity: 1; }

        /* --- LIGHTBOX --- */
        .lightbox {
            display: none; position: fixed; z-index: 2000;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(15, 17, 21, 0.95); backdrop-filter: blur(8px);
            align-items: center; justify-content: center;
        }

        .lightbox.active { display: flex; }

        .lightbox-close {
            position: absolute; top: 20px; right: 40px;
            font-size: 3rem; color: var(--text-muted); cursor: pointer;
            transition: 0.3s; line-height: 1;
        }

        .lightbox-close:hover { color: var(--accent); }
        .lightbox-content { max-width: 90%; max-height: 90%; border-radius: 8px; overflow: hidden; }

/* --- FOOTER --- */
        footer { 
            padding: 3rem 0; 
            border-top: 1px solid var(--border); 
            color: var(--text-muted); 
            font-size: 0.9rem; 
        }

        .footer-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1.5rem;
        }

        /* Removes the margin-bottom from the paragraph inside the footer */
        .footer-left p {
            margin-bottom: 0;
            font-size: 0.9rem;
        }

        .footer-right {
            display: flex;
            align-items: center;
            gap: 2rem;
        }

        .footer-links {
            display: flex;
            gap: 1.5rem;
        }

        .footer-links a {
            transition: color 0.3s ease;
        }

        .footer-links a:hover {
            color: var(--text-main);
        }

        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            transition: color 0.3s ease, transform 0.3s ease;
        }

        .social-links a:hover {
            color: var(--accent);
            transform: translateY(-2px);
        }

        .social-links svg {
            width: 20px;
            height: 20px;
        }

        /* --- MOBILE RESPONSIVE TWEAKS --- */
        @media (max-width: 768px) {
            .footer-content {
                flex-direction: column;
                text-align: center;
                justify-content: center;
            }
            .footer-right {
                flex-direction: column;
                gap: 1.5rem;
            }
        }


        /* --- LONG-FORM TEXT PAGES (Privacy, Terms, etc.) --- */
.page-hero {
    padding: 120px 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4rem;
}

.page-hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.page-hero p { font-size: 1rem; color: var(--text-muted); margin-bottom: 0; }

.text-document {
    max-width: 800px; /* Narrower for optimal reading */
    margin: 0 auto;
}

.text-document h2 { font-size: 1.8rem; margin-top: 3rem; margin-bottom: 1rem; color: var(--text-main); }
.text-document h3 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: 0.75rem; color: var(--text-main); }
.text-document p { margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.7; color: var(--text-muted); }
.text-document ul, .text-document ol { margin-bottom: 1.5rem; padding-left: 1.5rem; color: var(--text-muted); }
.text-document li { margin-bottom: 0.5rem; line-height: 1.7; }
.text-document a { color: var(--accent); text-decoration: underline; text-decoration-color: transparent; transition: 0.3s; }
.text-document a:hover { text-decoration-color: var(--accent); }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .project-details-grid { grid-template-columns: 1fr; gap: 2rem; }
    .project-banner { height: 300px; }
    .project-hero-section h1 { font-size: 2.2rem; }
}