:root {
    --noise-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.45' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Consolas', 'Courier New', monospace; 
    background-color: #0b1120; 
    width: 100%;
    min-height: 100vh;
}

.bento-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative; 
    z-index: 10;
}

.monitor-wide {
    /* Spans two columns on large screens */
    grid-column: span 2; 
}

.monitor-tall {
    /* Spans two rows on large screens */
    grid-row: span 2; 
}

/* --- THE STATIONARY MONITOR HARDWARE --- */
.monitor-bezel {
    background-color: #111827; 
    padding: 16px; 
    border-radius: 16px;
    width: 100%;
    min-height: 250px;
    box-sizing: border-box;
    text-decoration: none; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 
                inset 0 1px 1px rgba(255, 255, 255, 0.05); 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
}

/* 2. THE CUSTOM DIGITAL CURSOR (Standard Arrow) */
.crt-cursor {
    position: absolute;
    left: var(--mouse-x, -100px);
    top: var(--mouse-y, -100px);
    
    /* Standard cursor size */
    width: 24px;
    height: 24px;
    
    /* A standard white arrow with a black outline encoded as an SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='white' stroke='black' stroke-width='1.2' d='M5.5 3.21V20.8c0 .45.54.67.85.35l4.86-4.86a.5.5 0 0 1 .35-.15h6.87c.45 0 .67-.54.35-.85L5.5 3.21z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    
    /* Keeps the actual "clicking" point perfectly aligned with the top-left tip of the arrow */
    transform: translate(0, 0); 
    
    /* CRUCIAL Z-INDEX TRICK */
    z-index: 5; /* Sits ABOVE the glow (3), but UNDER the scanlines (10) */
    pointer-events: none; 
    
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* --- THE FLUSH GLASS SCREEN --- */
.monitor-screen {
    background-color: rgba(31, 41, 55, 0.6); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 100%;
    
    /* THE FIX: Forces the screen to grow and fill the bezel */
    flex-grow: 1; 
    
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.8s ease-in-out 0.1s, border 0.8s ease-in-out 0.1s;
    cursor: none; 
}

/* 1. CRT Scanlines Overlay */
.monitor-screen::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    
    /* A very faint alternating dark line (low opacity) */
    background: linear-gradient(rgba(18, 24, 36, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 100% 4px; /* Space between the lines */
    
    z-index: 10;
    pointer-events: none;
    
    /* Slowly scrolls the lines down to make the monitor feel "alive" */
    animation: scrollLines 1.2s linear infinite;
}

/* --- PERMANENT DUAL CORNER GLARES --- */
.monitor-screen::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
    z-index: 11;
    pointer-events: none;
    border-radius: 8px;
    
    background-image: var(--noise-texture);
    
    /* 
        Stacked Masks:
        1. Top-Left Glare (135deg) - tighter % makes it smaller/tucked in the corner
        2. Bottom-Right Glare (315deg) - opposite angle for the bottom corner
    */
    -webkit-mask-image: 
        linear-gradient(135deg, black 0%, transparent 14%),
        linear-gradient(315deg, black 0%, transparent 14%);
        
    mask-image: 
        linear-gradient(135deg, black 0%, transparent 14%),
        linear-gradient(315deg, black 0%, transparent 14%);
    
    opacity: 0.5; /* Adjust this to make both glares more or less subtle */
}

.screen-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* 1. FORCE THE INVISIBLE BOX TO FILL THE WHOLE SCREEN */
    width: 100%;
    height: 100%;
    
    /* 2. RE-CENTER THE TEXT VERTICALLY */
    justify-content: center; 
    
    transform-style: preserve-3d;
    will-change: transform;
}

.monitor-bezel:hover .crt-cursor {
    opacity: 1;
}

/* --- THE DATA TEXT (Pushed forward for 3D depth) --- */
.terminal-text {
    color: #0078D4; 
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.5rem); 
    text-shadow: 0 0 12px rgba(0, 120, 212, 0.4); 
    transform: translateZ(30px); /* Floats above the tilting surface */
}

.screen-data {
    color: #9CA3AF; 
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    margin-top: 12px;
    transform: translateZ(15px); /* Floats slightly less for layered depth */
}

/* --- THE SIMPLIFIED EDGE BLEED --- */
.glass-edge-bleed {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
    z-index: 6; 
    
    /* 1. A permanent, solid inner white glow on all 4 edges */
    box-shadow: inset 0 0 6px 2px rgba(255, 255, 255, 0.4);
        
    /* 2. The Magic: A mask that hides the entire border EXCEPT right where your mouse is */
    -webkit-mask-image: radial-gradient(circle 100px at calc(var(--mouse-x, -500px) + 10px) calc(var(--mouse-y, -500px) + 10px), black 0%, transparent 100%);
    mask-image: radial-gradient(circle 100px at calc(var(--mouse-x, -500px) + 10px) calc(var(--mouse-y, -500px) + 10px), black 0%, transparent 100%);
    
    opacity: 0; 
    transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1); 
}

/* Syncs with your other glows to power on slowly when the mouse enters */
.monitor-bezel:hover .glass-edge-bleed {
    opacity: 1;
}

@keyframes scrollLines {
    0% { background-position: 0 0; }
    /* Moves exactly one "line height" down to create an infinite loop */
    100% { background-position: 0 4px; } 
}


/* --- SURFACE IMPERFECTIONS (Dust/Grain) --- */
/* --- SURFACE IMPERFECTIONS (High-Visibility Version) --- */
.glass-imperfections {
    position: absolute;
    inset: 0;
    z-index: 11; 
    pointer-events: none;
    border-radius: 8px;
    
    /* 
       1. Changed baseFrequency from '0.85' to '0.45' (Makes the dust chunks bigger)
       2. Changed SVG opacity from '0.15' to '0.4' (Makes the dust brighter)
    */
    background-image: var(--noise-texture);
    
    /* --- THE NUDGED DUST MASK --- */
    -webkit-mask-image: radial-gradient(circle 50px at calc(var(--mouse-x, -500px) + 10px) calc(var(--mouse-y, -500px) + 10px), black 0%, transparent 100%);
    mask-image: radial-gradient(circle 50px at calc(var(--mouse-x, -500px) + 10px) calc(var(--mouse-y, -500px) + 10px), black 0%, transparent 100%);
    
    opacity: 0;
    transition: opacity .2s ease;
}

.monitor-bezel:hover .glass-imperfections {
    /* Bumped this up to 1 so the dust shines brightly under your cursor */
    opacity: 1; 
}

.monitor-screen .shine {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 2s;
}

.monitor-screen .shine::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 55%;
    width: 150%;
    padding-bottom: 150%;
    transform: translateX(-50%);
    filter: blur(35px);
    background-image: conic-gradient(from 205deg at 50% 50%, transparent 0deg, #0078D4 25deg, rgba(0, 120, 212, 0.18) 295deg, transparent 360deg);
}

.monitor-screen .background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    mask-image: radial-gradient(circle at 60% 5%, black 0%, black 15%, transparent 60%);
}

/* --- THE HOVER TRIGGERS --- */
.monitor-screen:hover .shine {
    opacity: 1;
}
/* --- PARTICLES BACKGROUND --- */
#particles-js {
    position: fixed; 
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    
    /* Changed from -1 to 0 so it sits ON TOP of the body background */
    z-index: 0; 
}

/* --- RESUME PAGE SPECIFIC LAYOUT --- */
.resume-layout {
    display: grid;
    /* Forces the PDF to take up all available space (1fr), locking the sidebar to exactly 350px wide */
    grid-template-columns: 1fr 350px; 
    gap: 32px;
    padding: 40px 40px;
    max-width: 1600px; /* Widened to give the PDF maximum breathing room */
    margin: 0 auto;
    box-sizing: border-box;
    height: 100vh; /* Fills the vertical screen */
    align-items: start;
    position: relative;
    z-index: 10;
}

/* The clean, borderless PDF container */
.pdf-container {
    width: 100%;
    height: 85vh; /* Stretches massive vertically */
    background-color: #323639; /* The standard dark gray of a native PDF viewer */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 20; 
}

.pdf-object {
    width: 100%;
    height: 100%;
    border: none;
}

.resume-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Mobile Responsiveness: Stacks the buttons under the PDF on small screens */
@media (max-width: 1024px) {
    .resume-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .pdf-container {
        height: 75vh;
    }
}

/* --- ABOUT PAGE LAYOUT --- */
.about-layout {
    display: grid;
    grid-template-columns: 300px 1fr; /* 300px sidebar, the rest stretches */
    gap: 32px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    align-items: start;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* OVERRIDE: For screens meant to be read, not played with */
.static-screen {
    justify-content: flex-start; /* Aligns content to the top */
    text-align: left;
}

/* The Image Placeholder */
.profile-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1; /* Keeps it a perfect square */
    border: 2px dashed rgba(0, 120, 212, 0.5); /* Azure blue dashed line */
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.placeholder-text {
    color: rgba(0, 120, 212, 0.7);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.article-screen {
    padding: 40px;
}

.article-content {
    width: 100%;
    position: relative;
    z-index: 2; /* Sits above the glare */
}

.article-header {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0, 120, 212, 0.3);
    padding-bottom: 5px;
}

.article-header:first-child {
    margin-top: 0;
}

.article-text {
    color: #D1D5DB; /* A soft, readable gray */
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.article-list {
    color: #D1D5DB;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-list li {
    margin-bottom: 10px;
}

.article-list strong {
    color: #0078D4; /* Highlights the bold words in Azure blue */
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .about-layout {
        grid-template-columns: 1fr; /* Stacks the columns on mobile */
    }
}

.monitor-bezel,
.monitor-bezel .terminal-text,
.monitor-bezel .screen-data {
    cursor: none !important;
}