﻿/* --- RESET & FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

body {
    background-color: #050505;
    color: white;
    font-family: 'Montserrat', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* --- CUSTOM CURSOR --- */
.cursor-dot, .cursor-outline {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    border-radius: 50%; z-index: 9999; pointer-events: none;
}
.cursor-dot { width: 8px; height: 8px; background-color: white; }
.cursor-outline {
    width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 250px;
    height: 100vh;
    border: 2px solid white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding-bottom: 50px;
    background: #303030;
    z-index: 100;
    flex-shrink: 0;
}
.logo { text-align: center; font-weight: 700; line-height: 1; font-size: 1.5rem; }
.logo span { display: block; font-size: 2.5rem; margin-bottom: 0px; margin-top: 10px; margin-left: 10px; margin-right: 10px;}
.vertical-title {
    writing-mode: vertical-rl; transform: rotate(180deg); text-align: left;
    font-family: 'Montserrat', sans-serif; font-size: 6rem; font-weight: 800; line-height: 90%;
    text-transform: uppercase; color: #bebebe; flex-grow: 1;
    display: flex; align-items: center; justify-content: left; pointer-events: none; margin-bottom: 10%; margin-right: 0%;
}
.nav-menu { display: flex; flex-direction: column; gap: 0px; background: #050505;}
.nav-link {
    text-decoration: none; color: #d8d8d8; font-weight: bold; text-transform: uppercase;
    font-size: 1.2rem; padding: 10px 15px; border: 2px solid #ffffff;
    transition: all 0.3s ease; display: block; text-align: center;
}
.nav-link:hover {
    background-color: rgb(129, 129, 129); color: black; border-color: white;
}

.nav-link.active {
    background-color: white; color: black; border-color: white;
}

/* --- MAIN CONTENT & VIDEO --- */
.main-content {
    flex-grow: 1; position: relative; overflow: visible;
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: top;
}
#bg-video {
    position: relative; width: 100%; height: 100%;
    object-fit: cover; z-index: -1; opacity: 0.9;
}

.cta-btn {
    position: absolute; bottom: 50px; right: 50px;
    background: rgba(0,0,0,0.7); color: white; border: 1px solid white;
    padding: 15px 30px; font-weight: bold; font-size: 1.1rem;
    text-transform: uppercase; letter-spacing: 2px;
    transition: 0.3s;
}
.cta-btn:hover { background: white; color: black; }
/* --- HORIZONTAL PROJECTS GALLERY --- */
.gallery-wrapper {
    width: 100%;
    height: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    padding: 100px;
    /* Hide scrollbar */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.gallery-wrapper::-webkit-scrollbar { display: none; }

.project-track {
    display: flex;
    gap: 50px;
    padding-right: 100px; /* Space at end */
}

/* --- UPDATED PROJECT CARDS FOR PARALLAX --- */
.project-card {
    min-width: 450px; /* Slightly wider */
    height: 60vh;
    position: relative;
    border: 1px solid #333;
    overflow: clip; /* Critical: hides the overflow of the big image */
    background: #111;
    flex-shrink: 0; /* Prevents squashing */
}

/* The Image needs to be bigger than the card to move */
.project-card img {
    position: absolute;
    width: 200%;      /* Extra width for parallax movement */
    height: 100%;
    left: -38%;       /* Center the wide image initially */
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.5s ease, transform 0.1s ease; /* Smooth opacity, instant movement */
    will-change: transform; /* Performance optimization */
}

.project-card:hover {
    border-color: white;
}

.project-card:hover img {
    opacity: 1;
}

/* Info box stays the same */
.project-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, black, transparent);
    padding: 20px; z-index: 10;
    transform: translateY(100%); transition: 0.3s;
}
.project-card:hover .project-info { transform: translateY(0); }

/* --- MOBILE ADJUSTMENT --- */
@media (max-width: 768px) {
    .project-card { min-width: 85vw; height: 50vh; }
}
/* --- MODAL (BEHANCE POPUP) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    scrollbar-width: none;
}
.modal-overlay.active { display: flex; opacity: 1; scrollbar-width: none;}

.modal-content {
    width: 90%; height: 90%;
    background: black; border: 2px solid white;
    position: relative;
    scrollbar-width: none; 
}

.close-modal {
    position: absolute; top: -40px; right: 0;
    color: white; font-size: 2rem; font-weight: bold; cursor: pointer;
}
.close-modal:hover { color: #aaa; }

iframe { width: 100%; height: 100%; border: none; }
/* --- UI DECORATION --- */
.corner-tl, .corner-tr, .corner-br {
    position: fixed; width: 20px; height: 20px; z-index: 200; pointer-events: none; scrollbar-width: none;
}
.corner-tl { top: 20px; left: 270px; border-top: 2px solid white; border-left: 2px solid white; }
.corner-tr { top: 20px; right: 20px; border: 2px solid white; background: white; }
.corner-br { bottom: 20px; right: 20px; }
.corner-br::after { content: '+'; font-size: 2rem; color: white; position: absolute; bottom: 0; right: 0; }

/* --- WINDOW BASE STYLE --- */
.window-container {
    background: rgba(0, 0, 0, 0.95); /* Light/White background like video */
    color: rgb(155, 155, 155);
    border: 2px solid white;
    display: flex; flex-direction: column;
}
.window-header {
    background: rgb(255, 255, 255); color: rgb(0, 0, 0); padding: 8px 15px;
    font-family: monospace; display: flex; justify-content: space-between; align-items: center;
    font-size: 1.1rem;
}
.window-controls span {
    display: inline-block; width: 12px; height: 12px; border: 2px solid rgb(0, 0, 0); margin-left: 5px;
}
.window-body { padding: 30px; overflow-y: auto; flex-grow: 1; }

/* =========================================
   LAYOUT RESTORATION (VIDEO ACCURACY)
   ========================================= */

/* --- ABOUT ME LAYOUT --- */
.about-window {
    width: 50%; max-width: 1100px; height: 80%;
}

.about-grid {
    display: grid;
    grid-template-rows: auto auto 1fr; /* Header, Bio, Columns */
    gap: 20px;
    height: 90%;
}

/* 1. Top Spec Bar (Name, Age, etc) */
.spec-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 2px solid rgb(255, 255, 255);
    font-family: 'Courier New', monospace;
    font-weight: bold;
}
.spec-item {
    padding: 10px;
    border-right: 2px solid rgb(255, 255, 255);
    display: flex; flex-direction: column;
}
.spec-item:last-child { border-right: none; }
.spec-label { font-size: 0.8rem; text-transform: uppercase; color: #c0c0c0; }
.spec-val { font-size: 1.2rem; }

/* 2. Bio Text */
.bio-section {
    font-size: 1.1rem; line-height: 1.5; border-bottom: 2px solid rgb(255, 255, 255); padding-bottom: 20px; border-color: #ffffff;
}

/* 3. The 4 Columns (Education, Skills, etc) */
.info-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
}
.column-title {
    font-size: 1.2rem; font-weight: 800; text-transform: uppercase;
    border-bottom: 4px solid rgb(255, 255, 255); margin-bottom: 15px; padding-bottom: 5px;
}
.timeline-item { margin-bottom: 15px; border-left: 2px solid #2c2c2c; padding-left: 10px; }
.t-year { font-weight: 800; font-size: 1rem; }
.t-desc { font-size: 0.9rem; color: #d8d8d8; }

.skills-list span {
    display: block; /* List style */
    margin-bottom: 5px; font-weight: 600;
}

.software-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.sw-box {
    background: white; color: black;
    height: 40px; display: flex; align-items: center; justify-content: center;
    font-weight: bold; border-radius: 4px;
}

/* --- CONTACT LAYOUT --- */
.contact-window {
    width: 500px; /* Fixed small width like video */
    height: auto;
    position: relative;
}
.contact-content {
    display: flex; flex-direction: column; gap: 15px;
}
.contact-input-look {
    border: 2px solid white;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: black;
    font-size: 1.1rem;
    position: relative;
}
.contact-label {
    position: absolute; top: -10px; left: 10px;
    background: black; padding: 0 5px; font-size: 0.8rem; color: #ffffff;
}
.socials-row {
    display: flex; gap: 10px; justify-content: center; margin-top: 10px;
}
.social-btn {
    width: 50px; height: 50px; border: 2px solid white;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: white; font-weight: bold; font-size: 1.2rem;
    transition: 0.2s;
}
.social-btn:hover { background: white; color: black; }


/* --- RESPONSIVE FIXES --- */
@media (max-width: 768px) {
    body { flex-direction: column; overflow: auto; height: auto; }
    .sidebar { width: 100%; position: relative; border-right: none; height: auto; flex-direction: row; align-items: center; }
    .vertical-title { display: none; }
    .nav-menu { flex-direction: row; }
    .nav-link { font-size: 0.9rem; padding: 5px 10px; }
    
    .cursor-dot, .cursor-outline { display: none; }
    * { cursor: auto; }

    /* Stack the About Grid on mobile */
    .about-window { width: 95%; height: auto; margin: 20px 0; }
    .spec-bar { grid-template-columns: 1fr 1fr; } /* 2x2 on mobile */
    .info-columns { grid-template-columns: 1fr; } /* Stack columns */
    
    /* Contact */
    .contact-window { width: 90%; }
}
/* --- TOPOGRAPHY BACKGROUND --- */
.sidebar {
    /* Keep existing styles */
    position: relative;
    overflow: hidden; /* Ensure the map doesn't spill out */
    background: black; /* Fallback */
}

.topo-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 150%;
    height: 150%;
    z-index: -2; /* Behind everything */
    opacity: 0.9; /* Subtle visibility */
    
    /* Create the "Contour Lines" using repeating gradients */
    background-image: repeating-radial-gradient(
        circle at 150% 50%,
        transparent 0,
        transparent 74px,
        #bbbbbb 75px,
        transparent 76px
    );
    
    /* Apply the SVG filter we defined in HTML */
    filter: url(#topo-filter);
    
    /* Smooth transition for the morphing */
    transition: transform 3s ease-out;
}

/* Ensure Logo and Nav sit ON TOP of the background */
.logo, .vertical-title, .nav-menu {
    position: relative;
    z-index: 2;
}
@keyframes flow {
    0% { background-position: 0% 0%; }
    50% { background-position: 50% 100%; } /* Moves vertical */
    100% { background-position: 0% 0%; }
}

.topo-bg {
    /* ... keep your existing settings ... */
    position: absolute;
    /* ... */
    
    /* ADD THIS ANIMATION: */
    animation: flow 10s ease infinite;
    
    /* Ensure the background is large enough to scroll */
    background-size: 100% 200%; 

}
