/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    --bg-color: #050505;       /* Deep Black */
    --text-color: #00ff41;     /* Terminal Green */
    --dim-color: #008f11;      /* Darker Green for borders/secondary text */
    --glow: 0 0 10px rgba(0, 255, 65, 0.4); /* Phosphor Glow */
    --font-stack: 'Courier New', Courier, monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    line-height: 1.6;
    font-size: 19px;
    /* Adds a subtle global glow to all text */
    text-shadow: 0 0 4px rgba(0, 255, 65, 0.2); 
    min-height: 100vh;
}

/* =========================================
   2. BACKGROUND EFFECTS (The Office Vibe)
   ========================================= */

/* The Scanline Overlay (TV Screen Effect) */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px; 
    z-index: -1; /* Behind text, above background image */
    pointer-events: none; /* Allows clicking through it */
}

/* BACKGROUND IMAGE (Natural Colors) */
.monitor-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    
    /* Just the image, no green gradient overlay */
    background-image: url('bg55.jpg'); 
    
    background-size: cover;      
    background-position: center; 
    background-repeat: no-repeat;
    
    /* Keeps pixel art sharp */
    image-rendering: pixelated; 
    
    /* SIMPLIFIED FILTERS:
       We only use brightness to darken the image so your 
       green text remains readable. No sepia or hue-rotation. */
    filter: brightness(0.8); 
    
    /* Ensure no residual blending happens */
    background-blend-mode: normal;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--dim-color);
    position: sticky;
    top: 0;
    /* Semi-transparent black backing so nav is readable over content */
    background-color: rgba(5, 5, 5, 0.9); 
    backdrop-filter: blur(5px);
    z-index: 100;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.links a {
    text-decoration: none;
    color: var(--dim-color);
    margin-left: 30px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.links a:hover {
    color: var(--text-color);
    text-shadow: var(--glow);
}

/* =========================================
   4. LAYOUT & SECTIONS
   ========================================= */
main {
    max-width: 900px;
    margin: 60px auto; 
    padding: 0 20px;
}

section {
    margin-bottom: 120px;
    scroll-margin-top: 100px; /* Fixes jumpy scrolling */
}

/* Typography */
h1 {
    font-size: 4rem;
    font-weight: normal;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    animation: flicker 4s infinite; 
}

h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--dim-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-weight: normal;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--dim-color);
    margin-bottom: 30px;
}

/* =========================================
   5. COMPONENT: BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 24px;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s;
    background: rgba(0,0,0,0.5); /* Slight dark background */
}

.btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    box-shadow: var(--glow);
}

/* =========================================
   6. GLOBAL PANELS (Readability Layers)
   ========================================= */
/* This handles the look of ALL content boxes:
   - Dark semi-transparent background
   - Green border
   - Drop shadow to lift off the background art */
.card, 
.bio-grid, 
#blog-container {
    background-color: rgba(0, 0, 0, 0.85); 
    padding: 40px;                        
    border: 1px solid var(--dim-color);   
    box-shadow: 0 0 30px rgba(0, 0, 0, 1); 
    backdrop-filter: blur(3px);           
    margin-bottom: 20px;
    
    /* Ensure text alignment is standard */
    text-align: left;
}

/* =========================================
   7. COMPONENT: BLOG
   ========================================= */
/* Specific behavior for the scrolling window.
   We only add properties here that are UNIQUE to the blog. */
#blog-container {
    height: 400px;              /* Fixed height */
    overflow-y: auto;           /* Scroll vertically */
    padding: 20px;              /* Overrides the 40px above for a tighter list */
    
    /* OPTIONAL: If you still want the "sunken" terminal look,
       you can combine the outer shadow (from above) with an inner shadow here: */
    /* box-shadow: 0 0 30px rgba(0, 0, 0, 1), inset 0 0 20px rgba(0,0,0,0.8); */
}

.blog-post {
    border-bottom: 1px dashed var(--dim-color);
    border-left: none; 
    padding: 20px 0;   
    margin-bottom: 0;
    background: transparent; 
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-date {
    color: var(--dim-color);
    font-size: 1.2rem; /* Adjusted for hierarchy */
    margin-bottom: 5px;
    display: block;
}

.blog-inspiration {
    color: var(--dim-color);      
    font-size: 1.2rem;
    font-style: italic;           
    margin-bottom: 15px;          
    display: block;
    opacity: 0.8;
}
/* CUSTOM SCROLLBAR (Webkit browsers like Chrome/Safari/Edge) */
#blog-container::-webkit-scrollbar {
    width: 15px;               /* Width of the scrollbar area */
}

#blog-container::-webkit-scrollbar-track {
    background: #000;          /* Black background for the track */
    border-left: 1px solid var(--dim-color);
}

#blog-container::-webkit-scrollbar-thumb {
    background-color: var(--dim-color); /* The slider handle is dark green */
    border: 2px solid #000;    /* Black border creates a "blocky" retro look */
}

#blog-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color); /* Bright green when you grab it */
    cursor: pointer;
}



/* =========================================
   8. FOOTER & ANIMATIONS
   ========================================= */
footer {
    text-align: center;
    color: var(--dim-color);
    font-size: 0.8rem;
    padding-bottom: 40px;
    margin-top: 100px;
    border-top: 1px solid var(--dim-color);
    padding-top: 20px;
}

@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
        text-shadow: var(--glow);
    }
    20%, 24%, 55% {
        opacity: 0.5;
        text-shadow: none;
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .bio-grid { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
    nav { flex-direction: column; gap: 10px; }
    .links a { margin: 0 10px; }
}

/* =========================================
   NEW PAGE: INTERACTIVE UI STAGE
   ========================================= */

/* The Container: Keeps the image and buttons together */
.ui-stage {
    position: relative; /* Essential: Anchor point for the buttons */
    width: 100%;
    max-width: 1000px;  /* Adjust based on your image size */
    margin: 0 auto;     /* Centers the stage */
    display: block;
}

/* The Image: The base layer */
.ui-image {
    width: 100%;
    height: auto;       /* Maintains aspect ratio */
    display: block;
    
    /* Optional: A border to match your retro theme */
    border: 1px solid var(--dim-color); 
    
    /* Optional: Apply the green filter to this image too? */
    /* filter: grayscale(100%) sepia(100%) hue-rotate(70deg) saturate(300%) brightness(0.6); */
}

/* The Hotspots: The clickable areas */
.hotspot {
    position: absolute; /* Allows you to use 'top' and 'left' */
    z-index: 10;        /* Sits on top of the image */
    display: block;
    
    /* DEBUGGING MODE: 
       Keep this border RED so you can see the boxes to position them.
       Once finished, change 'red' to 'transparent'. */
    border: 2px solid red; 
    
    transition: all 0.2s ease;
}

/* Hover Effects: Makes it feel like a game */
.hotspot:hover {
    border-color: var(--text-color);        /* Light up green */
    box-shadow: 0 0 15px var(--text-color); /* Glow effect */
    background-color: rgba(0, 255, 65, 0.1); /* Faint green fill */
    cursor: crosshair; /* Retro cursor style */
}

/* The Tooltip: The text that appears on hover */
.tooltip {
    display: none;      /* Hidden by default */
    position: absolute;
    
    /* Positions text below the button */
    bottom: -35px;      
    left: 50%;
    transform: translateX(-50%); /* Centers text */
    
    /* Style the text box */
    background: black;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    padding: 5px 10px;
    font-size: 0.8rem;
    white-space: nowrap; /* Forces text to one line */
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    pointer-events: none; /* Prevents text from blocking clicks */
}

.hotspot:hover .tooltip {
    display: block; /* Reveal on hover */
}

/* =========================================
   POSITION YOUR ITEMS HERE
   (Adjust percentages until they fit your image)
   ========================================= */

/* Position for the Bio Button */
#spot-bio {
    top: 40%;    /* Distance from top */
    left: 15%;   /* Distance from left */
    width: 20%;  /* Size of box */
    height: 25%;
}

/* Position for the Blog Button */
#spot-blog {
    top: 20%;
    right: 15%;  /* You can also use 'right' instead of 'left' */
    width: 25%;
    height: 30%;
}

/* Position for External Link */
#spot-external {
    bottom: 10%;
    left: 45%;
    width: 10%;
    height: 10%;
}