:root {
    /* Cartography Color Palette */
    --color-bg: #051014; /* Deep trench dark blue */
    --color-blob-1: #003b46; /* Deep ocean */
    --color-blob-2: #07575b; /* Shallow water/Teal */
    --color-blob-3: #2a6f41; /* Vegetation/Forest Green */
    --color-interactive: rgba(221, 161, 94, 0.4); /* Topographic elevation sand/gold */
    
    --text-white: #e8f1f2;
    --text-muted: rgba(232, 241, 242, 0.5);
    
    /* Initial mouse positions for the JS to hook into */
    --mouse-x: 50vw;
    --mouse-y: 50vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--text-white);
    height: 100vh;
    width: 100vw;
    overflow-x: hidden; 
    position: relative;
}

/* --- BACKGROUND & INTERACTIVE ANIMATION --- */
.bg-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -2;
    overflow: hidden;
    background: var(--color-bg);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.8;
    animation: drift 30s infinite alternate ease-in-out;
    pointer-events: none;
}

.blob-1 {
    height: 700px; width: 800px;
    background: var(--color-blob-1);
    top: -20%; left: -10%;
}

.blob-2 {
    height: 500px; width: 500px;
    background: var(--color-blob-2);
    bottom: -10%; right: -10%;
    animation-duration: 40s;
    animation-delay: -5s;
}

.blob-3 {
    height: 600px; width: 600px;
    background: var(--color-blob-3);
    top: 30%; left: 40%;
    animation-duration: 50s;
    animation-delay: -15s;
    opacity: 0.4;
}

/* The Interactive Mouse Blob */
.interactive-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-interactive) 0%, rgba(0,0,0,0) 60%);
    border-radius: 50%;
    top: 0; left: 0;
    /* Uses CSS variables updated by JS */
    transform: translate(calc(var(--mouse-x) - 300px), calc(var(--mouse-y) - 300px));
    pointer-events: none;
    z-index: -1;
    /* A slight transition makes the follow effect feel fluid like water */
    transition: transform 0.15s ease-out; 
    mix-blend-mode: screen;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20%, 15%) scale(1.1); }
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
    background-image: radial-gradient(rgba(0,0,0,0) 1px, rgba(255,255,255,0.04) 1px);
    background-size: 3px 3px;
    backdrop-filter: contrast(110%) brightness(100%);
}

/* --- LAYOUT --- */
.container {
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 4rem;
    position: relative;
    z-index: 10;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand {
    flex: 1;
    display: flex;
    gap: 1rem;
}

.brand span:last-child { color: var(--text-muted); }

.nav-center {
    flex: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 4rem;
    justify-content: center;
    padding-left: 10%;
}

.nav-center a {
    text-decoration: none;
    color: var(--text-white);
    transition: color 0.3s ease;
}

.nav-center a:hover { color: #dda15e; } 

.header-data {
    flex: 1;
    text-align: right;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: monospace; 
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

h1 {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 900px;
}

h1 span.highlight {
    display: block;
    background: linear-gradient(to right, #e8f1f2, #66b2b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.85rem;
    padding-bottom: 1rem;
}

.footer-col { flex: 1; }
.footer-col h4 { font-weight: 700; margin-bottom: 0.5rem; color: var(--text-white);}
.footer-col p { color: var(--text-muted); line-height: 1.4;}
.footer-center { text-align: center; }

.footer-right { 
    text-align: right; 
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2rem;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) rotate(45deg);}
    40% {transform: translateY(-10px) rotate(45deg);}
    60% {transform: translateY(-5px) rotate(45deg);}
}

/* --- PROJECT GALLERY --- */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Default 4 columns for large desktop */
    gap: 2rem;
    width: 100%;
    max-width: 100%; 
    margin-top: 6rem;
    margin-bottom: 4rem;
    text-align: left;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-interactive);
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.project-link {
    display: inline-block;
    text-decoration: none;
    color: var(--color-interactive);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-link:hover {
    color: var(--text-white);
}

/* --- INDIVIDUAL PROJECT PAGES --- */
.back-link {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--color-interactive);
}

.project-container {
    justify-content: flex-start;
    gap: 4rem;
}

.project-content {
    align-items: flex-start;
    text-align: left;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.project-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 2rem;
    text-align: left;
}

.map-placeholder {
    width: 100%;
    height: 500px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    color: var(--text-muted);
    font-family: monospace;
}

.project-writeup h2 {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.project-writeup p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.construction-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 3rem;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px; 
    margin: 2rem 0;
    overflow: hidden; 
}

.progress-bar-fill {
    height: 100%;
    width: 75%; 
    background: #FF5F15; 
    box-shadow: 0 0 15px #FF5F15; 
    animation: pulse-bar 2s infinite ease-in-out;
}

@keyframes pulse-bar {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
    /* Tablets and smaller laptops */
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Mobile devices */
    .container { padding: 1.5rem; }
    header { flex-direction: column; gap: 2rem; text-align: center; align-items: center;}
    .nav-center { grid-template-columns: 1fr; gap: 1rem; text-align: center; padding-left: 0;}
    .header-data { display: none; }
    footer { flex-direction: column; gap: 2rem; text-align: center; align-items: center;}
    .footer-right { align-items: center; }
    
    .project-gallery {
        grid-template-columns: 1fr; /* Stacks projects into a single column */
        margin-top: 4rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}
