:root {
    --bg: #050505;
    --text: #e0e0e0;
    --accent: #00aaff; /* Azure Blue for Data */
    --card-bg: #0a0a0a;
    --border: #333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg); color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh; padding-bottom: 5rem;
    overflow-x: hidden;
}

/* --- CYBERPUNK BACKGROUNDS --- */

/* --- INTRO PANEL (Recruiter Context) --- */
.intro-panel {
    width: 90%;
    max-width: 800px;
    margin: 0 auto 4rem auto; /* Spacing between header and grid */
    position: relative;
    z-index: 2;
    display: flex;
}

.panel-decor {
    width: 4px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    margin-right: 20px;
    flex-shrink: 0;
}

.panel-content {
    font-family: 'Space Mono', monospace;
    color: #aaa;
    background: rgba(10, 10, 10, 0.6);
    padding: 20px;
    border: 1px solid #222;
    backdrop-filter: blur(2px);
    width: 100%;
}

.panel-content h3 {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.panel-content p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.panel-content strong {
    color: #fff;
    font-weight: bold;
}

/* Status Line (The "Open to Work" bit) */
.status-line {
    font-size: 0.75rem;
    border-top: 1px dashed #333;
    padding-top: 10px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.status-line .label {
    color: #666;
}

.status-line .value {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.status-line .separator {
    color: #333;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .intro-panel {
        flex-direction: column;
        border-left: 2px solid var(--accent);
    }
    .panel-decor { display: none; } /* Hide separate bar, use border instead */
    .intro-panel { padding-left: 15px; border: none; border-left: 4px solid var(--accent);}
    .panel-content { border: none; padding: 0; background: none; }
}

/* 1. The Grid Pattern */
.grid-bg {
    background-image: 
        linear-gradient(rgba(0, 170, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 170, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed; /* Parallax feel */
}

/* 2. The Scanline Overlay */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    z-index: 990; /* Below transition (9999) but above content? No, needs to be above bg */
    background-size: 100% 3px, 3px 100%;
    pointer-events: none; /* Let clicks pass through */
    opacity: 0.6;
}

/* NAV & HEADER */
.top-nav { padding: 20px; position: relative; z-index: 995; }
.nav-back {
    font-family: 'Space Mono', monospace; font-size: 0.8rem;
    color: var(--text); text-decoration: none; opacity: 0.6;
    transition: opacity 0.2s;
}
.nav-back:hover { opacity: 1; color: var(--accent); }

.portfolio-header {
    text-align: center; margin: 4rem 0 3rem;
    position: relative; z-index: 2;
}
.portfolio-header h1 {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem; letter-spacing: -2px; margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}
.portfolio-header p {
    color: #777; font-size: 0.9rem;
}

/* GRID */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 30px;
    width: 90%; max-width: 1400px; margin: 0 auto;
    position: relative; z-index: 2;
}

/* CARDS */
.card {
    background: rgba(10, 10, 10, 0.8); /* Semi-transparent */
    border: 1px solid var(--border);
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.1);
}

.card-thumb {
    width: 100%; aspect-ratio: 16/9;
    background: #000;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.card-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.8; transition: opacity 0.3s;
}
.card:hover .card-thumb img { opacity: 1; }

.card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 170, 255, 0.1);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}
.card:hover .card-overlay { opacity: 1; }

.play-btn {
    font-family: 'Space Mono', monospace;
    background: #000; color: var(--accent);
    border: 1px solid var(--accent);
    padding: 10px 20px; font-size: 0.8rem;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.4);
}

.card-content { padding: 1.5rem; }
.card-content h2 { font-size: 1.2rem; margin-bottom: 0.5rem; color: #fff; }
.card-content p { font-size: 0.85rem; color: #888; line-height: 1.4; margin-bottom: 1rem; }

.tech-stack { display: flex; gap: 8px; flex-wrap: wrap; }
.tech-pill {
    font-family: 'Space Mono', monospace; font-size: 0.65rem;
    background: #111; color: #aaa;
    padding: 3px 6px; border: 1px solid #333;
    border-radius: 4px;
}

/* MODAL (THE HOLODECK) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-window {
    width: 95%; height: 90%;
    background: #000; border: 1px solid var(--border);
    display: flex; flex-direction: column;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.modal-bar {
    height: 40px; background: #111; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 15px; font-family: 'Space Mono', monospace; font-size: 0.8rem; color: #666;
}

.modal-actions button, .modal-actions a {
    background: none; border: none; color: #fff;
    font-size: 1.2rem; cursor: pointer; margin-left: 15px;
    text-decoration: none;
}
.modal-actions a:hover, .modal-actions button:hover { color: var(--accent); }

.iframe-container {
    flex-grow: 1; position: relative; background: #000;
}

#report-frame {
    width: 100%; height: 100%; border: none;
    position: relative; z-index: 2;
}

.loader {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: var(--accent); font-family: 'Space Mono', monospace;
    z-index: 1; letter-spacing: 2px; animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; } 100% { opacity: 1; }
}

@media (max-width: 768px) {
    .grid-container { grid-template-columns: 1fr; }
}