/* --- 1. GLOBAL SETTINGS & VARIABLES --- */
:root {
    --accent: #00f2ff; /* Your Cyan/Glow Color */
    --bg-dark: #080808;
    --text-gray: #a0a0a0;
    --glass: rgba(8, 8, 8, 0.6);
    --text-dim: #666;
    --text-main: #ffffff;
}

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

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: #fff;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* --- 2. HERO SECTION (#hero) --- */
#top, .hero {
    position: relative;
    width: 100%;
    min-height: 100vh; /* Changed from height to min-height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* PADDING: This adds the vertical breathing room you're missing */
    padding: 100px 20px; 

    /* THE IMAGE: Let's use the most basic pathing to find it */
    background-color: #080808; /* Fallback if image fails */
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(8,8,8,1)), 
                      url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 5;
    /* This ensures the content doesn't stretch too wide */
    max-width: 900px;
}

.hero-content h2 {
    color: #fff;
}

/* Style the metadata row */
.hero-cta {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.meta-data {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

/* --- NAVIGATION --- */
.glass-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 12px 40px;
    display: flex;
    gap: 30px;
    z-index: 1000;
}

.nav-container {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent) !important;
    text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent); /* Cinematic glow */
    border-bottom: none !important; /* Forces the underline to disappear */
    opacity: 1;
}

.status-code {
    font-family: 'Space Mono', monospace;
    color: var(--accent);
    font-size: 0.7rem;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    letter-spacing: -2px;
}

h2 {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 8px;
    color: var(--text-dim);
    margin-top: -10px;
}

.btn-primary {
    padding: 15px 40px;
    border: 1px solid var(--accent);
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    letter-spacing: 2px;
    transition: 0.4s;
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--accent);
}

/* --- WORK SECTION --- */
.work-section {
    padding: 80px 5%;
    background: #050505;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--accent);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    .section-header h2 {
        text-align: center;
    }
    .section-header .line {
        display: none;
    }
    .filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    #top, .hero {
        background-attachment: scroll;
    }
    .work-section {
        padding-left: 24px;
        padding-right: 24px;
    }
    .glass-nav {
        padding: 12px 20px;
        gap: 18px;
    }
    .nav-link {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
}

.line {
    height: 1px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid #222;
    padding: 8px 18px;
    color: #666;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
}

.filter-btn:hover {
    color: #fff;
    border-color: #444;
}

.filter-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 242, 255, 0.05); /* Very subtle glow */
}

/* The animation definition */
@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* The class we will trigger with JavaScript */
.fade-in {
    animation: fadeInCard 0.5s ease forwards;
}

/* --- GRID LOGIC --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.project-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.project-card {
    background: #111;
    border: 1px solid #222;
    overflow: hidden; 
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* HOVER: Border glow and Shadow only (No Movement) */
.project-card-link:hover .project-card {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* HOVER: Image Color Reveal & Subtle Zoom */
.project-card-link:hover .project-image {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.03);
}

.video-container {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(80%) brightness(0.8); 
    transition: filter 0.6s ease, transform 0.6s ease;
}

/* --- PROJECT INFO (Restoring your Styles) --- */
.project-info {
    padding: 25px;
    border-top: 1px solid #222;
}

.project-client {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent); /* Restored Cyan Color */
    letter-spacing: 2px;
    margin-bottom: 8px;
    display: block;
}

.project-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff; /* Restored Bold White */
    margin-bottom: 8px;
    text-transform: uppercase;
}

.project-meta {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #666; /* Restored Gray */
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Navigation Arrows */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 24px;
    padding: 20px 15px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

#prevVid { left: 30px; }
#nextVid { right: 30px; }

/* Dot Indicators */
.indicators-container {
    position: absolute;
    bottom: -40px; /* Sits just below the video frame */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transform: scale(1.2);
}

/* --- ABOUT SECTION MASTER --- */
.about-section {
    padding: 100px 5%;
    background: #080808; /* Deep black to match your aesthetic */
    border-top: 1px solid #1a1a1a;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50/50 split */
    gap: 80px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Invisible State --- */

.project-card-link.hidden-project {
    display: none; 
}

.load-more-container {
    width: 100%;
    margin-top: 50px;
    padding-bottom: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

#loadMoreBtn {
    padding: 15px 40px;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* --- ABOUT LEFT COLUMN: PHOTO & BIO --- */

.about-left-column {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
}

/* The Photo Container */
.image-frame {
    position: relative;
    border: 1px solid #222;
    padding: 10px;
    background: #000;
    line-height: 0;
    overflow: hidden; /* Keeps the zoom effect contained */
}

.profile-img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) contrast(110%);
    transition: filter 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s ease;
    z-index: 1;
}

/* HOVER LOGIC: Color turns on when the frame is touched */
.image-frame:hover .profile-img {
    filter: grayscale(0%) contrast(100%) saturate(1.1);
    transform: scale(1.03);
}

/* Tech Overlays (Pointer-events: none ensures they don't block the hover) */
.frame-corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--accent);
    z-index: 2;
    pointer-events: none; 
}

.top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.top-right { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.bottom-left { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.scanline-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.3;
    z-index: 3;
}

/* The Biography Section */
.intro-block {
    margin-top: 60px; /* The gap you requested */
    padding-top: 25px;
    border-top: 1px solid #1a1a1a;
}

.status-tag {
    font-family: 'Space Mono', monospace;
    color: var(--accent);
    font-size: 0.75rem;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.intro-block h3 {
    font-size: 2.2rem;
    margin: 10px 0 20px 0;
    letter-spacing: -1px;
    color: #fff;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #a0a0a0;
}

.bio-text strong {
    color: var(--accent);
}

/* Location & Pulse */
.location-tag {
    margin-top: 30px;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    letter-spacing: 1px;
}

.pulse {
    display: block;
    width: 8px;
    height: 8px;
    background-color: #ff3e3e;
    border-radius: 50%;
    flex-shrink: 0;
    animation: record-blink 1.2s infinite ease-in-out;
    box-shadow: 0 0 8px rgba(255, 62, 62, 0.8);
}

@keyframes record-blink {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- RIGHT COLUMN: THE TERMINAL --- */
.spec-terminal {
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
    padding: 40px;
    font-family: 'Space Mono', monospace;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.terminal-header {
    font-size: 0.7rem;
    color: #444;
    margin-bottom: 30px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 15px;
    letter-spacing: 2px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    font-size: 0.85rem;
    border-bottom: 1px solid #151515;
    padding-bottom: 12px;
}

.spec-item .label {
    color: #666;
}

.spec-item .value {
    color: #fff;
    text-align: right;
    font-weight: 500;
}

.available {
    color: var(--accent) !important;
    text-shadow: 0 0 8px var(--accent);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .about-left-column {
        max-width: 100%;
    }
    .spec-terminal {
        padding: 30px 20px;
    }
}

/* --- CONTACT SECTION --- */
.contact-section {
    padding: 100px 5% 150px 5%; /* Extra bottom padding for the nav dock */
    background: var(--bg-dark);
    min-height: 60vh; /* Ensures the footer feels substantial */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-line {
    height: 1px;
    width: 100%;
    background: linear-gradient(to right, var(--accent), transparent);
    margin-bottom: 80px;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 50px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-header h2 {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: #fff;
    margin: 10px 0 20px 0;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 300px;
}
.contact-item {
    display: grid;
    /* This creates two columns: the first one fits the text, 
       the second one takes the rest of the space. */
    grid-template-columns: auto 1fr; 
    align-items: center;
    width: 100%;
    padding: 20px 0;
    text-decoration: none;
    border-bottom: 1px solid #222;
}

.contact-item .label {
    /* This is the magic number. Adjust this to whatever gap you want */
    margin-right: 40px; 
    
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #555;
    white-space: nowrap;
    display: inline-block; /* Ensures the margin is respected */
}

.contact-item .value {
    text-align: right;
    font-family: 'Inter', sans-serif;
    color: #fff;
    /* This pushes the email all the way to the right side of the 1fr column */
    margin-left: auto; 
}
.contact-item:hover {
    border-bottom-color: var(--accent);
}

.contact-item:hover .value {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.copyright {
    margin-top: 100px;
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 2px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .contact-header h2 { font-size: 2rem; }
    .contact-container { flex-direction: column; }
}

.contact-item {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid #1a1a1a;
    transition: 0.3s;
    position: relative; /* Ensures it stays in the flow */
    z-index: 10;        /* Pulls it above any background overlays */
    pointer-events: auto !important; /* Forces it to be clickable */
}

/* Optional: Make the email address stand out a bit more on hover */
.email-link:hover .value {
    color: var(--accent);
}

/* Lightbox CSS */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
}

.lightbox-content iframe {
    width: 100%;
    height: 100%;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.2); /* Subtle cyan glow */
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.close-lightbox:hover {
    color: var(--accent);
}
