/* --- VARIABLES & SETUP --- */
:root {
    --bg-color: #2e2d2d;       /* Industrial Dark Gray */
    --text-color: #e0e0e0;     /* Off-white text */
    --terminal-green: #33ff33; /* The Matrix/Terminal Green */
    --glass-panel: rgba(0, 0, 0, 0.2);
    
    --font-header: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- UTILITIES --- */
.green-text { color: var(--terminal-green); }
.blink { animation: blink 1s infinite; }

/* --- CRT SCANLINE EFFECT --- */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.05) 50%, 
        rgba(0,0,0,0.05)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

/* --- NAVIGATION HUD --- */
.hud-nav {
    position: fixed;
    top: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 20px 50px;
    background: rgba(46, 45, 45, 0.95);
    border-bottom: 1px solid var(--terminal-green);
    z-index: 100;
}

.logo {
    font-family: var(--font-header);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--terminal-green);
    text-shadow: 0 0 10px var(--terminal-green);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--terminal-green);
    text-shadow: 0 0 5px var(--terminal-green);
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 120px 5%;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

.system-msg {
    color: var(--terminal-green);
    font-size: 1rem;
    margin-bottom: 15px;
    animation: blink 2s infinite;
    letter-spacing: 2px;
}

.hero h1 {
    font-family: var(--font-header);
    font-size: 3rem;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 15px;
    word-spacing: 5px;
}

.role {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 25px;
    border-left: 3px solid var(--terminal-green);
    padding-left: 15px;
    letter-spacing: 1px;
}

.tagline {
    font-size: 1rem;
    color: #aaa;
    font-style: italic;
    margin-bottom: 10px;
}

.mission-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* --- BUTTONS --- */
.cta-group {
    margin-top: 35px;
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    font-family: var(--font-header);
    text-decoration: none;
    border: 1px solid var(--terminal-green);
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--terminal-green);
    color: #000;
    font-weight: 900;
}

.btn-primary:hover {
    background: transparent;
    color: var(--terminal-green);
    box-shadow: 0 0 15px var(--terminal-green);
    cursor: pointer;
}

.btn-secondary {
    background: transparent;
    color: var(--terminal-green);
}

.btn-secondary:hover {
    background: rgba(51, 255, 51, 0.1);
    color: #fff;
    box-shadow: 0 0 15px var(--terminal-green);
}

/* --- CLASSIFIED DOSSIER STYLES --- */
.dossier-box {
    background: #050505;
    border: 1px solid var(--terminal-green);
    padding: 0; /* Padding handled inside */
    width: 90%;
    max-width: 600px;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Decryption Animation Layer */
#decryption-overlay {
    padding: 100px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loader-text {
    color: var(--terminal-green);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    margin-bottom: 20px;
    animation: blink 0.5s infinite;
}

.progress-bar {
    width: 80%;
    height: 10px;
    background: #333;
    border: 1px solid #555;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--terminal-green);
    width: 0%;
    transition: width 2s ease-in-out; /* The animation duration */
}

/* The Facts Grid */
#dossier-content {
    padding: 40px;
    animation: fadeIn 1s;
}

.dossier-title {
    color: #fff;
    border-bottom: 1px dashed var(--terminal-green);
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-family: var(--font-header);
}

.dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.fact-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border: 1px solid #333;
}

.fact-card h3 {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
}

.dossier-footer {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* --- AWARDS TICKER --- */
.awards-ticker {
    margin-top: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #d4d4d4;
    border-top: 1px solid #555;
    padding-top: 15px;
    width: fit-content;
}

.awards-ticker i { color: gold; }

/* --- HERO IMAGE HUD --- */
.hero-image-container {
    position: relative;
    width: 350px;
    height: 450px;
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    border: 1px solid #444;
}

.reticle {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--terminal-green);
    transition: 0.5s;
}

.top-left { top: -10px; left: -10px; border-right: none; border-bottom: none; }
.top-right { top: -10px; right: -10px; border-left: none; border-bottom: none; }
.bottom-left { bottom: -10px; left: -10px; border-right: none; border-top: none; }
.bottom-right { bottom: -10px; right: -10px; border-left: none; border-top: none; }

.hero-image-container:hover .reticle {
    width: 100%; height: 100%;
    top: 0; left: 0;
    opacity: 0.5;
}

.ai-core-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--terminal-green);
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
    z-index: 2; /* Sit on top of real photo */
}

/* ON HOVER: Reveal the AI Core */
.hero-image-container:hover .ai-core-img {
    opacity: 1;
}

/* --- SECTIONS GENERAL --- */
.section { padding: 100px 10%; }

.section-title {
    font-family: var(--font-header);
    font-size: 2rem;
    margin-bottom: 50px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    color: #fff;
}

/* --- FEATURED PROJECT --- */
.featured-project-container {
    display: flex;
    gap: 40px;
    background: #383838;
    border: 1px solid var(--terminal-green);
    padding: 40px;
    align-items: center;
    box-shadow: 0 0 20px rgba(51, 255, 51, 0.05);
}

.featured-content { flex: 1; }

.featured-content h3 {
    font-family: var(--font-header);
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #fff;
}

.status-badge {
    background: var(--terminal-green);
    color: black;
    font-size: 0.7rem;
    padding: 2px 8px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
}

.tech-specs { list-style: none; margin: 20px 0 30px 0; }

.tech-specs li { margin-bottom: 10px; color: #ccc; }

.tech-specs i { color: var(--terminal-green); margin-right: 10px; }

.project-actions { display: flex; gap: 15px; }

.featured-visual {
    flex: 1;
    height: 300px;
    background: #222;
    border: 1px dashed #555;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.schematic-placeholder { text-align: center; color: #555; }
.schematic-placeholder i { font-size: 3rem; display: block; margin-bottom: 10px; }

/* --- ARCHITECTURE DIAGRAM STYLES --- */
.featured-visual {
    flex: 1;
    height: 350px; /* Increased height slightly for better visibility */
    background: #111; /* Darker background for the chart */
    border: 1px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden; /* Keeps image inside the border */
}

.architecture-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures the whole diagram is visible without cropping */
    cursor: zoom-in; /* Changes mouse to magnifying glass */
    transition: transform 0.3s ease;
    padding: 10px; /* Space between border and diagram */
}

.architecture-img:hover {
    transform: scale(1.02); /* Subtle zoom effect on hover */
    opacity: 0.9;
}

/* The "CLICK TO ENHANCE" Overlay */
.arch-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: var(--terminal-green);
    text-align: center;
    font-size: 0.7rem;
    padding: 5px 0;
    font-family: var(--font-mono);
    opacity: 0; /* Hidden by default */
    transition: 0.3s;
    pointer-events: none; /* Let clicks pass through to the image */
}

.featured-visual:hover .arch-overlay {
    opacity: 1; /* Show on hover */
}

/* --- SKILLS GRID --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    padding: 20px;
    transition: 0.3s;
}

.skill-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--terminal-green);
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.2);
    transform: translateY(-5px);
}

.skill-card h3 { color: #fff; margin-bottom: 10px; }
.skill-card i { font-size: 2rem; color: var(--terminal-green); margin-bottom: 15px; }

/* --- TIMELINE --- */
.timeline {
    border-left: 2px solid var(--terminal-green);
    margin-left: 20px;
    padding-left: 30px;
}

.timeline-item { margin-bottom: 40px; position: relative; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 2px solid var(--terminal-green);
    border-radius: 50%;
}

.timeline-date { font-size: 0.9rem; color: var(--terminal-green); margin-bottom: 5px; }
.timeline-content h3 { color: #fff; }
.bullet { color: var(--terminal-green); margin-right: 10px; }

/* --- JOB PROJECT SUB-SECTIONS --- */
.job-project {
    margin-top: 20px;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 1px dashed #555; /* Subtle dotted line to group project */
}

.project-name {
    font-family: var(--font-mono);
    color: #888; /* Dimmed color to differentiate from Job Title */
    font-size: 0.95rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hover Effect: Highlights the project name in green */
.job-project:hover .project-name {
    color: var(--terminal-green);
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.3);
}

/* Adjust list spacing inside projects */
.job-project ul {
    margin-left: 5px;
}

/* --- PROJECT GRID --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    border: 1px solid #444;
    background: #383838;
    padding: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.project-card:hover { border-color: var(--terminal-green); }

.card-header h3 { color: #fff; }

.tags span {
    display: inline-block;
    font-size: 0.8rem;
    border: 1px solid #555;
    padding: 2px 8px;
    margin-right: 5px;
    margin-top: 10px;
    color: #bbb;
}

/* --- PROJECT CARD LINKS --- */
.card-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #444; /* Subtle separator line */
    display: flex;
    gap: 15px;
}

.card-links a {
    color: #bbbbbb;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-links a:hover {
    color: var(--terminal-green); /* Turns green on hover */
    text-shadow: 0 0 5px var(--terminal-green);
}

/* Style for Private/Locked projects */
.private-link {
    color: #b8b5b5; /* Dark gray to show it's inactive */
    font-size: 0.85rem;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- RESEARCH SECTION --- */
.research-container { border-left: 2px solid var(--terminal-green); padding-left: 30px; }
.research-item h3 { font-family: var(--font-header); margin-bottom: 10px; color: #fff; }
.link-arrow {
    color: var(--terminal-green);
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    display: inline-block;
}

/* --- EDUCATION GRID --- */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.edu-card { background: rgba(0,0,0,0.2); border: 1px solid #444; padding: 25px; }
.edu-place { color: var(--terminal-green); font-size: 0.9rem; display: block; margin-bottom: 10px; }

/* --- CERTIFICATE INTERACTION --- */
.cert-card { border-left: 3px solid var(--terminal-green) !important; cursor: pointer; position: relative; }

.view-indicator {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--terminal-green);
    opacity: 0.7;
    transition: 0.3s;
}

.cert-card:hover .view-indicator {
    opacity: 1;
    text-shadow: 0 0 5px var(--terminal-green);
    letter-spacing: 1px;
}

/* --- MODAL (POPUP) STYLES --- */
.modal {
    display: none;
    position: fixed; 
    z-index: 2000;
    padding-top: 60px; 
    left: 0; top: 0; width: 100%; height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    border: 2px solid var(--terminal-green);
    box-shadow: 0 0 30px rgba(51, 255, 51, 0.2);
    animation: zoomIn 0.3s;
}

.close-modal {
    position: absolute;
    top: 30px; right: 50px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover { color: var(--terminal-green); }

@keyframes zoomIn { from {transform:scale(0)} to {transform:scale(1)} }

@media only screen and (max-width: 700px){
    .modal-content { width: 95%; }
    .close-modal { top: 20px; right: 20px; }
}

/* --- CONTACT MODAL STYLES --- */
.contact-box {
    background: #0f0f0f; /* Darker than normal modal */
    border: 2px solid var(--terminal-green);
    padding: 40px;
    text-align: center;
    max-width: 500px; /* Compact size */
    box-shadow: 0 0 50px rgba(51, 255, 51, 0.15);
}

.comms-title {
    font-family: var(--font-header);
    color: var(--terminal-green);
    margin-bottom: 30px;
    border-bottom: 1px dashed #333;
    padding-bottom: 15px;
    animation: blink 1.5s infinite;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    transition: 0.3s;
}

.contact-option i {
    color: var(--terminal-green);
    font-size: 1.2rem;
}

.contact-option:hover {
    border-color: var(--terminal-green);
    background: rgba(51, 255, 51, 0.1);
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(51, 255, 51, 0.2);
}

.comms-status {
    margin-top: 30px;
    font-size: 0.8rem;
    color: #555;
    letter-spacing: 2px;
}

/* --- HONOR CARDS --- */
.honor-card {
    border-top: 3px solid var(--terminal-green); /* Top accent to look like a medal ribbon */
}

.honor-card .fa-trophy { color: gold; margin-right: 10px; }
.honor-card .fa-medal { color: silver; margin-right: 10px; }
.honor-card .fa-gavel { color: var(--terminal-green); margin-right: 10px; }

/* --- TESTIMONIAL / LOG CARDS --- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.log-card {
    background: rgba(0, 20, 0, 0.2); /* Very dark green tint */
    border: 1px solid #333;
    padding: 30px;
    position: relative;
    border-left: 3px solid var(--terminal-green); /* Green accent on left */
}

.log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px dashed #444;
    padding-bottom: 10px;
}

.log-id {
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 1px;
}

.log-message {
    font-style: italic;
    color: #ccc;
    font-family: var(--font-mono);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.log-author {
    font-size: 0.9rem;
    color: #fff;
}

.author-role {
    font-size: 0.8rem;
    color: #888;
    margin-left: 15px; /* Indent role slightly */
}

/* Hover Effect */
.log-card:hover {
    background: rgba(51, 255, 51, 0.05);
    border-color: var(--terminal-green);
    box-shadow: 0 0 15px rgba(51, 255, 51, 0.1);
}

/* --- FOOTER (FIXED COLLISION) --- */
footer {
    text-align: center;
    padding: 80px 0;
    background: #222;
    border-top: 1px solid #444;
}

.footer-content h2 {
    font-family: var(--font-header);
    color: var(--terminal-green);
    margin-bottom: 30px;
}

/* NEW: FLEXBOX LAYOUT TO PREVENT COLLISION */
.resume-link {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allows buttons to drop to next line */
    gap: 20px; /* Consistent spacing */
    padding: 0 20px;
}

.resume-link a {
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    border: 1px solid #555;
    padding: 10px 20px;
    transition: 0.3s;
    display: inline-block;
    min-width: 140px; /* Ensures buttons have shape */
}

.resume-link a:hover {
    background: var(--terminal-green);
    color: black;
    border-color: var(--terminal-green);
}

/* --- ANIMATIONS --- */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* ------------------------------------------------ */
/* --- RESPONSIVE FIXES (MOBILE OPTIMIZED) --- */
/* ------------------------------------------------ */

@media (max-width: 1024px) {
    /* TABLET & LAPTOP */
    .hero {
        flex-direction: column-reverse;
        padding-top: 100px;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; 
    }

    .role { 
        border-left: none; 
        border-bottom: 2px solid var(--terminal-green); 
        padding-bottom: 10px;
        margin-bottom: 20px;
        display: inline-block;
    }
}

@media (max-width: 768px) {
    /* MOBILE PHONES */
    
    .hero {
        padding: 80px 20px 40px 20px;
        gap: 25px;
        min-height: auto; 
    }

    /* Fix Huge Image */
    .hero-image-container {
        width: 240px; 
        height: 300px;
        margin-bottom: 10px;
    }

    /* Fix Text Wrapping */
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .system-msg { font-size: 0.9rem; }
    .role { font-size: 0.9rem; border-bottom-width: 2px; }
    
    /* Stack Buttons */
    .cta-group { 
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .btn { width: 100%; display: block; padding: 15px 0; }

    /* Fix Footer Collision on Mobile */
    .resume-link {
        flex-direction: column; /* Stack vertically on small phones */
        align-items: center;
    }
    
    .resume-link a { width: 100%; max-width: 300px; } /* Full width buttons */

    .awards-ticker {
        flex-direction: column;
        gap: 10px;
        margin-top: 30px;
        text-align: center;
    }
    
    .section { padding: 50px 20px; }
    
    .featured-project-container { flex-direction: column; padding: 20px; }
    
    .featured-visual { width: 100%; height: 180px; }

    .timeline { margin-left: 10px; padding-left: 25px; }
    .timeline-item::before { left: -33px; }

    .hud-nav { display: none; }
}
