/* ==========================================
   GLOBAL VARIABLES & RESET
=========================================== */
:root {
    --bg-black: #000000;
    --text-light: #f1f5f9;
    --neon-start: #39ff14; 
    --neon-end: #ccff00;   
    --neon-gradient: linear-gradient(to right, var(--neon-start), var(--neon-end));
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-light);
    margin: 0;
    overflow-x: hidden;
    scroll-behavior: smooth; 
}

.text-bright { color: #e2e8f0 !important; line-height: 1.6; }

/* ==========================================
   PRELOADER
=========================================== */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.loaded { opacity: 0; visibility: hidden; }

.loader-logo { width: 80px; margin-bottom: 30px; animation: pulseGlow 1.5s infinite alternate; }
.loader-track { width: 200px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; position: relative; }
.loader-fill { width: 0%; height: 100%; background: var(--neon-gradient); animation: loadFill 2s ease-in-out forwards; }

@keyframes loadFill { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes pulseGlow { 
    0% { filter: drop-shadow(0 0 5px rgba(57,255,20,0.2)); transform: scale(1); } 
    100% { filter: drop-shadow(0 0 20px var(--neon-start)); transform: scale(1.05); } 
}

/* ==========================================
   NAVIGATION BAR
=========================================== */
.navbar { padding: 20px 0; transition: all 0.4s ease-in-out; background-color: transparent; }
.glass-nav {
    padding: 10px 0; background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(57, 255, 20, 0.3);
}

.nav-logo { height: 45px; width: auto; transition: all 0.3s ease; filter: drop-shadow(0 0 5px rgba(57, 255, 20, 0.2)); }
.nav-logo:hover { transform: scale(1.05); filter: drop-shadow(0 0 10px var(--neon-start)); }
.navbar-toggler { border-color: rgba(57, 255, 20, 0.5); }

/* FIX: Navbar links now support hover underline gracefully on both Desktop & Mobile */
.navbar-nav .nav-link { 
    position: relative; 
    padding-bottom: 5px; 
    margin: 0 5px; 
    color: var(--text-light) !important; 
    transition: color 0.3s ease; 
    display: inline-block; /* Forces the underline to only wrap the text length */
}
.navbar-nav .nav-link::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 50%;
    background: var(--neon-gradient); transition: all 0.3s ease; transform: translateX(-50%); opacity: 0;
}
.navbar-nav .nav-link:hover { color: var(--neon-start) !important; }
.navbar-nav .nav-link:hover::after { width: 100%; opacity: 1; }

@media (max-width: 991px) {
    /* Right aligns the mobile dropdown text to match standard UI */
    .navbar-nav { align-items: flex-end; padding-right: 15px; }
}

/* ==========================================
   HERO SECTION & LAYERS
=========================================== */
.hero-section {
    height: 100vh; width: 100%; position: relative; background-color: var(--bg-black); 
    overflow: hidden; border-bottom: 4px solid transparent; border-image: var(--neon-gradient) 1;
}
.hero-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-position: right 50%; background-size: auto 250%; background-repeat: no-repeat; }

.hero-base-bg { background-image: url('../images/hero-bg.png'); z-index: 1; opacity: 0; animation: layerReveal 2s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.hero-green-sweep-bg {
    background-image: url('../images/hero-bg.png');
    filter: sepia(100%) hue-rotate(70deg) saturate(250%) brightness(0.7);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 65%, rgba(0,0,0,0) 100%);
    -webkit-mask-size: 400% 100%; -webkit-mask-repeat: no-repeat;
    animation: greenSweepAnim 12s ease-in-out infinite; z-index: 2;
}

.hero-subject { background-image: url('../images/hero-cutout.png'); z-index: 4; opacity: 0; animation: layerReveal 2s cubic-bezier(0.25, 1, 0.5, 1) 0.3s forwards; }
.hero-fade-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 85%); z-index: 5; pointer-events: none; }
.particles-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 3; pointer-events: none; }
.particle { position: absolute; bottom: -10px; background-color: var(--neon-start); border-radius: 50%; box-shadow: 0 0 15px var(--neon-start); animation: floatUp linear infinite; }

@keyframes floatUp { to { transform: translateY(-110vh); } }
@keyframes layerReveal { 0% { opacity: 0; filter: blur(10px); } 100% { opacity: 1; filter: blur(0); } }

/* ==========================================
   HERO ANIMATION UTILITIES
=========================================== */
.hidden-initially { opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.5s ease-out; }
.fade-in { opacity: 1; visibility: visible; transform: translateY(0); }
.smooth-fade-up { opacity: 0; animation: glideUp 1s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.slide-in-symbol { color: var(--neon-start); margin-right: 15px; display: inline-block; opacity: 0; transform: translateX(-40px); animation: slideInRight 0.6s ease-out forwards; }
.reveal-name { opacity: 1; visibility: visible; animation: cinematicReveal 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.neon-text-gradient { background: var(--neon-gradient); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: gradientShift 3s linear infinite; }
.text-white-solid { color: #ffffff !important; background: none; -webkit-text-fill-color: initial; }

/* ==========================================
   LAYOUT STRUCTURES & TYPOGRAPHY
=========================================== */
.terminal-prompt { font-size: calc(1.8rem + 0.5vw); }
.flickson-block { width: max-content; }
.typewriter-spacer { height: 45px; width: 100%; position: relative; margin-bottom: 1.5rem; }
.typewriter-absolute-box { position: absolute; top: 0; left: 0; white-space: nowrap; }
.typewriter { font-family: 'Fira Code', monospace; font-size: calc(1.2rem + 0.5vw); color: #94a3b8; border-right: 3px solid var(--neon-start); padding-right: 8px; display: inline-block; white-space: nowrap; animation: blink-caret 0.75s step-end infinite; }
.scroll-indicator { color: var(--neon-start); opacity: 0.7; transition: all 0.3s ease; text-decoration: none; }
.scroll-indicator:hover { opacity: 1; color: #fff; text-shadow: 0 0 15px var(--neon-start); }
.neon-icon-bounce { animation: bounceDown 2s infinite; }
.biometric-scanline { position: absolute; top: 0; right: -20vw; width: 25vw; height: 100%; background: linear-gradient(to right, rgba(57,255,20,0) 0%, rgba(57,255,20,0.1) 50%, rgba(57,255,20,0) 100%); animation: scanFaceRightToLeft 7s linear infinite; pointer-events: none; z-index: 6; }

@keyframes scanFaceRightToLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-120vw); } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--neon-start) } }
@keyframes slideInRight { to { transform: translateX(0); opacity: 1; } }
@keyframes glideUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes bounceDown { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }
@keyframes gradientShift { 0% { background-position: 0% center; } 50% { background-position: 100% center; } 100% { background-position: 0% center; } }
@keyframes cinematicReveal { 0% { opacity: 0; transform: translateY(20px) scale(0.95); filter: blur(8px); } 100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes greenSweepAnim { 0% { -webkit-mask-position: 150% 0; opacity: 0; } 5% { opacity: 1; } 45% { -webkit-mask-position: -50% 0; opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }

/* ==========================================
   ABOUT & PORTFOLIO SECTION
=========================================== */
.about-section { background-color: var(--bg-black); min-height: 100vh; position: relative; z-index: 10; }

/* FIX: Restored rigid, clean sticky behavior */
.sticky-sidebar { position: sticky; top: 100px; z-index: 10; }

/* FIX: Shrunk Profile elements down from 220px to 180px to provide more room for the resume button below */
.profile-img-wrapper { position: relative; width: 180px; height: 180px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rotating-border {
    position: absolute; width: 100%; height: 100%; border-radius: 50%;
    background: conic-gradient(transparent 20%, transparent 60%, var(--neon-start) 100%);
    animation: rotateBorder 4s linear infinite; z-index: 0; transition: box-shadow 0.5s ease;
}
.profile-img-inner { position: absolute; width: 172px; height: 172px; border-radius: 50%; background-color: var(--bg-black); z-index: 2; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.profile-img-inner img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease; }

.profile-img-wrapper:hover .profile-img-inner img { transform: scale(1.1); filter: brightness(1.2) contrast(1.1); }
.profile-img-wrapper:hover .rotating-border { box-shadow: 0 0 30px var(--neon-start); }

.profile-particles { position: absolute; width: 220px; height: 220px; top: -20px; left: -20px; z-index: 5; pointer-events: none; transition: all 0.5s ease; }
.p-dot { position: absolute; background: var(--neon-start); border-radius: 50%; box-shadow: 0 0 8px var(--neon-start); animation: orbitFloat 4s ease-in-out infinite; transition: transform 0.5s ease; }
.p-dot-1 { width: 6px; height: 6px; top: 10%; left: 15%; animation-duration: 3s; }
.p-dot-2 { width: 4px; height: 4px; top: 25%; right: 10%; animation-duration: 5s; animation-direction: reverse; }
.p-dot-3 { width: 8px; height: 8px; bottom: 15%; left: 20%; animation-duration: 4s; }
.p-dot-4 { width: 5px; height: 5px; bottom: 25%; right: 15%; animation-duration: 6s; animation-direction: reverse; }

.profile-img-wrapper:hover .p-dot-1 { transform: translate(-15px, -15px) scale(1.5); }
.profile-img-wrapper:hover .p-dot-2 { transform: translate(15px, -10px) scale(1.5); }
.profile-img-wrapper:hover .p-dot-3 { transform: translate(-10px, 15px) scale(1.5); }
.profile-img-wrapper:hover .p-dot-4 { transform: translate(15px, 15px) scale(1.5); }

@keyframes rotateBorder { 100% { transform: rotate(360deg); } }
@keyframes orbitFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* --- Location Badge & Contact Info --- */
.location-badge { color: #94a3b8; font-size: 0.95rem; font-weight: 500; }
.sidebar-email { color: #94a3b8; text-decoration: none; font-size: 0.95rem; font-family: 'Fira Code', monospace; transition: all 0.3s ease; display: inline-block; }
.sidebar-email:hover { color: var(--neon-start); text-shadow: 0 0 10px rgba(57, 255, 20, 0.4); }

.social-links { display: flex; justify-content: center; align-items: center; flex-wrap: nowrap !important; gap: 5px; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(15, 23, 42, 0.6); color: var(--text-light); font-size: 0.88rem; transition: all 0.3s ease; text-decoration: none; border: 1px solid rgba(57, 255, 20, 0.2); flex-shrink: 0; }
.social-icon svg { width: 0.88rem; height: 0.88rem; fill: currentColor; display: block; transition: fill 0.3s ease; }
.social-icon:hover { background: var(--neon-gradient); color: #000; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(57, 255, 20, 0.4); }
.social-icon:hover svg { fill: #000; }

/* --- Terminal Resume Button --- */
.btn-resume {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 30px; background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(57, 255, 20, 0.3); color: var(--neon-start);
    text-decoration: none; border-radius: 50px; font-family: 'Fira Code', monospace;
    font-weight: 600; transition: all 0.4s ease; position: relative; overflow: hidden;
    min-width: 160px; 
}
.btn-resume::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: var(--neon-gradient); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); z-index: 0;
}
.resume-text, .resume-icon { position: relative; z-index: 1; transition: color 0.3s ease; }
.btn-resume:hover { border-color: transparent; box-shadow: 0 0 20px rgba(57, 255, 20, 0.3); }
.btn-resume:hover::before { left: 0; }
.btn-resume:hover .resume-text, .btn-resume:hover .resume-icon { color: #000; }
.btn-resume:hover .resume-icon { animation: downloadBounce 1s infinite; }

@keyframes downloadBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ==========================================
   RIGHT COLUMN: SCROLL PROGRESS TRACK
=========================================== */
.scroll-progress-track {
    position: absolute; top: 0; left: 15px; /* Sits cleanly in the padding gutter */
    width: 2px; height: 100%; background: rgba(255, 255, 255, 0.05);
    display: none; z-index: 5;
}
@media (min-width: 992px) { .scroll-progress-track { display: block; } }
.scroll-progress-thumb {
    width: 100%; height: 0%; background: var(--neon-gradient);
    box-shadow: 0 0 10px var(--neon-start); border-radius: 5px;
}

/* ==========================================
   RIGHT COLUMN MODULAR COMPONENTS 
=========================================== */
.section-title { 
    font-family: 'Fira Code', monospace; color: #fff; font-size: 1.8rem; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 10px; 
    opacity: 0; transform: translateX(-30px); transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.section-title.in-view { opacity: 1; transform: translateX(0); }
.section-title.in-view i { animation: iconPop 0.6s ease 0.3s backwards; }

@keyframes iconPop { 
    0% { transform: scale(1); } 
    50% { transform: scale(1.3); color: #fff; text-shadow: 0 0 10px var(--neon-start); } 
    100% { transform: scale(1); } 
}

.portfolio-card {
    position: relative; background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px; transition: transform 0.4s ease, border-color 0.4s ease; z-index: 1; overflow: hidden;
}
.portfolio-card::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(57, 255, 20, 0.1), transparent);
    transform: skewX(-25deg); transition: 0.5s; pointer-events: none;
}
.portfolio-card:hover { transform: translateY(-5px); border-color: var(--neon-start); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.portfolio-card:hover::before { left: 125%; }

.neon-badge { background: rgba(57, 255, 20, 0.1); color: var(--neon-start); border: 1px solid rgba(57, 255, 20, 0.3); padding: 8px 16px; border-radius: 50px; font-size: 0.9rem; font-weight: 500; display: inline-block; }
.neon-badge-outline { color: var(--neon-end); border: 1px solid var(--neon-end); padding: 4px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; }
.neon-badge-sm { background: rgba(255, 255, 255, 0.05); color: #94a3b8; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; }

/* ==========================================
   FOOTER & BACK TO TOP
=========================================== */
.site-footer { background-color: #050505; border-top: 1px solid rgba(57, 255, 20, 0.2); padding: 40px 0; margin-top: 50px; }
.footer-socials a { color: var(--text-light); font-size: 1.8rem; margin: 0 12px; transition: all 0.3s ease; }
.footer-socials a:hover { color: var(--neon-start); text-shadow: 0 0 15px var(--neon-start); transform: translateY(-3px); display: inline-block; }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; border-radius: 50%;
    background: rgba(15, 23, 42, 0.8); color: var(--neon-start); border: 2px solid var(--neon-start);
    font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer;
    z-index: 999; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); backdrop-filter: blur(5px);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--neon-gradient); color: #000; box-shadow: 0 0 15px var(--neon-start); border-color: transparent; }

/* ==========================================
   MOBILE RESPONSIVENESS
=========================================== */
@media (max-width: 991px) {
    .hero-section { text-align: center; padding-top: 100px; }
    .hero-layer { background-position: right center; background-size: cover; }
    .hero-fade-overlay { background: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 60%, rgba(0,0,0,0) 100%); }
    .typewriter-absolute-box { left: 50%; transform: translateX(-50%); }
    .biometric-scanline { width: 80vw; right: -80vw; animation: scanFaceMobile 7s linear infinite; }
    .sticky-sidebar { position: relative; top: 0; border-right: none; }
    .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 1rem; }
}

@media (max-width: 360px) {
    .social-links { gap: 3px; }
    .social-icon { width: 26px; height: 26px; font-size: 0.78rem; }
    .social-icon svg { width: 0.78rem; height: 0.78rem; }
}

@keyframes scanFaceMobile { 0% { transform: translateX(0); } 100% { transform: translateX(-180vw); } }