/* DEFAULT Cyberpunk Theme */
:root {
    --bg-dark: #050505;
    --text-light: #e0e0e0;
    --text-dim: #888;
    --neon-accent: #00ffcc;
    --neon-purple: #b829ff; 
    --neon-pink: #ff2994; 
    --card-bg: rgba(17, 17, 17, 0.7);
    --font-main: 'Poppins', Tahoma, Geneva, Verdana, sans-serif;
    --font-terminal: 'Fira Code', monospace;
}

/* THEME 2: Hacker / Matrix */
[data-theme="hacker"] {
    --bg-dark: #020a02;
    --text-light: #e0ffe0;
    --text-dim: #669966;
    --neon-accent: #00ff00;
    --neon-purple: #00cc00; 
    --neon-pink: #00ff33; 
    --card-bg: rgba(0, 15, 0, 0.8);
}

/* THEME 3: Synthwave / Miami Retro */
[data-theme="synthwave"] {
    --bg-dark: #120424;
    --text-light: #fbeaff;
    --text-dim: #b898d9;
    --neon-accent: #ffaa00;
    --neon-purple: #ff007f; 
    --neon-pink: #cc00ff; 
    --card-bg: rgba(20, 5, 40, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    cursor: none; 
}

/* --- Global Loading Screen --- */
#global-loader {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: var(--bg-dark); z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    transition: background-color 0.5s ease, opacity 0.5s ease, visibility 0.5s ease;
}
#global-loader.hidden { opacity: 0; visibility: hidden; }

.loader-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.spinner { position: relative; width: 60px; height: 60px; }
.spinner .circle {
    position: absolute; width: 100%; height: 100%; border-radius: 50%;
    border: 4px solid transparent; border-top-color: var(--neon-accent);
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.spinner .circle:nth-child(2) {
    width: 70%; height: 70%; top: 15%; left: 15%;
    border-top-color: var(--neon-purple); animation-delay: -0.3s;
}
.loader-text {
    font-family: var(--font-terminal); font-size: 1.3rem;
    letter-spacing: 2px; animation: pulse-text 1.5s infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse-text { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* UI/UX Custom Cursor Styles */
.cursor-dot, .cursor-outline {
    position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
    border-radius: 50%; z-index: 99998; pointer-events: none;
}
.cursor-dot { width: 8px; height: 8px; background-color: var(--neon-accent); }
.cursor-outline {
    width: 40px; height: 40px; border: 2px solid var(--neon-purple);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Custom Theme Scrollbar - FIXED FOR MOBILE */
html {
    scrollbar-width: thin; /* Firefox fallback */
    scrollbar-color: var(--neon-purple) var(--bg-dark); /* Firefox fallback */
}

::-webkit-scrollbar { 
    width: 6px; /* Slightly thinner for mobile */
    -webkit-appearance: none; /* Force webkit to apply custom styles on mobile */
}
::-webkit-scrollbar-track { 
    background: var(--bg-dark); 
    border-left: 1px solid rgba(0, 255, 204, 0.1); 
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--neon-accent), var(--neon-purple), var(--neon-pink));
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { 
    background: linear-gradient(to bottom, var(--neon-pink), var(--neon-purple), var(--neon-accent)); 
}

/* Animated Scroll Progress Line - FIXED OVERLAP */
#scroll-progress {
    position: fixed; 
    top: 0; 
    right: 8px; /* Shifted left to avoid overlapping the native scrollbar */
    width: 3px; /* Slightly thinner for a cleaner look */
    height: 0%;
    background: linear-gradient(to bottom, var(--neon-accent), var(--neon-purple), var(--neon-pink));
    z-index: 9999; 
    box-shadow: 0 0 10px var(--neon-accent); 
    transition: height 0.1s ease-out;
}

body {
    background-color: var(--bg-dark); color: var(--text-light);
    font-family: var(--font-main); overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.terminal-text { font-family: var(--font-terminal); }

.gradient-text {
    background: linear-gradient(45deg, var(--neon-accent), var(--neon-purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.bullet-icon { color: var(--neon-accent); margin-right: 8px; font-size: 0.9rem; }

i { transition: all 0.3s ease; }
.animated-icon:hover { transform: scale(1.3) rotate(15deg); color: var(--neon-pink) !important; }

#particle-canvas {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1; pointer-events: none; background-color: transparent;
}

.floating-controls {
    position: fixed; right: 30px; bottom: 30px; 
    display: flex; flex-direction: column; gap: 15px; z-index: 1000;
}

#scrollTopBtn { 
    opacity: 0; visibility: hidden; transform: translateY(20px); 
    width: 50px; height: 50px; 
    border-radius: 50%; background: var(--neon-accent);
    color: var(--bg-dark); font-size: 1.3rem;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 0 15px var(--neon-accent); transition: all 0.3s ease;
    text-decoration: none; position: relative;
}
#scrollTopBtn i { display: block; }
#scrollTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }
#scrollTopBtn:hover { background: #fff; box-shadow: 0 0 25px #fff; transform: translateY(-5px); }
#scrollTopBtn:active { transform: scale(0.8); background: var(--neon-pink); box-shadow: 0 0 20px var(--neon-pink); }

.pulse-dot::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border-radius: 50%;
    border: 2px solid var(--neon-accent);
    animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

header {
    position: fixed; top: 0; width: 100%; padding: 20px 40px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 2000; transition: background 0.3s;
}
header.scrolled {
    background: rgba(var(--bg-dark), 0.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 204, 0.1);
}
.dev-logo { font-size: 1.5rem; font-weight: bold; letter-spacing: 1px; font-family: var(--font-terminal); }
.dev-logo span { color: var(--neon-accent); }

.menu-btn {
    position: relative; display: flex; justify-content: center; align-items: center;
    width: 40px; height: 40px; transition: all .5s ease-in-out; z-index: 2000; cursor: pointer;
}
.menu-btn__burger, .menu-btn__burger::before, .menu-btn__burger::after {
    width: 30px; height: 3px; background: var(--neon-accent); border-radius: 5px;
    transition: all .5s ease-in-out; position: absolute; content: '';
}
.menu-btn__burger::before { transform: translateY(-10px); }
.menu-btn__burger::after { transform: translateY(10px); }
.menu-btn.open .menu-btn__burger { transform: translateX(-50px); background: transparent; }
.menu-btn.open .menu-btn__burger::before { transform: rotate(45deg) translate(35px, -35px); background: var(--neon-purple); }
.menu-btn.open .menu-btn__burger::after { transform: rotate(-45deg) translate(35px, 35px); background: var(--neon-pink); }

.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(5, 5, 5, 0.95); backdrop-filter: blur(15px);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.5s ease-in-out; z-index: 1500;
}
.nav-overlay.active { opacity: 1; visibility: visible; }
.nav-overlay a {
    font-size: 2rem; color: var(--text-light); text-decoration: none; margin: 15px 0;
    text-transform: uppercase; letter-spacing: 3px; transition: all 0.3s; display: flex; align-items: center; gap: 15px;
}
.nav-overlay a:hover { color: var(--neon-purple); transform: scale(1.1); letter-spacing: 5px; }
.nav-overlay a i { color: var(--neon-accent); }

section { padding: 120px 10vw 80px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
h2.section-title { font-size: 2.5rem; margin-bottom: 50px; color: var(--text-light); position: relative; display: inline-flex; align-items: center; gap: 15px; }
h2.section-title i { color: var(--neon-accent); }
h2.section-title::after {
    content: ''; position: absolute; left: 0; bottom: -10px; width: 50%; height: 3px;
    background: linear-gradient(90deg, var(--neon-accent), var(--neon-purple)); border-radius: 2px;
}

.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

.card {
    background: var(--card-bg); backdrop-filter: blur(10px); padding: 30px;
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card:hover { 
    transform: translateY(-12px) scale(1.05); 
    box-shadow: 0 15px 40px rgba(184, 41, 255, 0.2), 0 0 15px rgba(0, 255, 204, 0.1) inset; 
    border-color: var(--neon-purple); 
}
.card:hover h3 i { transform: scale(1.2) rotate(10deg); color: var(--neon-pink); }

.card h3 { color: var(--neon-accent); margin-bottom: 15px; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; transition: color 0.3s ease; }
.card p { color: var(--text-dim); margin-bottom: 8px; line-height: 1.6; }
.card .highlight { color: var(--text-light); font-weight: bold; }
.cert-link-box { margin-top: auto; padding-top: 15px; border-top: 1px solid rgba(0, 255, 204, 0.2); }
.cert-link-box span { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.cert-link-box strong { color: var(--text-light); font-size: 1rem; display: flex; align-items: center; gap: 8px;}

.contact-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: flex-start; }
.tech-form {
    background: var(--card-bg); padding: 35px; border-radius: 12px;
    border: 1px solid rgba(0, 255, 204, 0.1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.input-group { position: relative; margin-bottom: 20px; }
.input-group i { position: absolute; top: 17px; left: 18px; color: var(--neon-accent); font-size: 1.1rem; }
.input-group.align-top i { top: 18px; }

.tech-form input, .tech-form textarea {
    width: 100%; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light); padding: 15px 15px 15px 50px; border-radius: 8px;
    font-family: var(--font-main); font-size: 1rem; transition: all 0.3s; cursor: none; 
}
.tech-form input:focus, .tech-form textarea:focus {
    outline: none; border-color: var(--neon-purple); box-shadow: 0 0 15px rgba(184, 41, 255, 0.2);
}

.btn {
    padding: 12px 28px; background: transparent; color: var(--neon-accent);
    border: 2px solid var(--neon-accent); text-decoration: none; border-radius: 6px;
    font-weight: bold; display: inline-flex; align-items: center; gap: 8px;
    transition: all 0.3s; position: relative; overflow: hidden; z-index: 1; 
}
.btn::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0; height: 100%;
    background: var(--neon-accent); transition: width 0.3s; z-index: -1;
}
.btn:hover::before { width: 100%; }
.btn:hover { color: var(--bg-dark) !important; transform: translateY(-3px); }
.btn-outline { border-color: var(--text-light); color: var(--text-light); }
.btn-outline::before { background: var(--neon-purple); }
.btn-outline:hover { border-color: var(--neon-purple); }
.btn-group { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; }
.view-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; color: var(--text-light); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.view-link:hover { color: var(--neon-accent); }

.social-grid { display: flex; flex-wrap: wrap; gap: 15px; }
.social-box {
    display: flex; align-items: center; gap: 10px; padding: 15px 20px; background: var(--card-bg);
    border-radius: 12px; color: var(--text-light); text-decoration: none;
    border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1 1 calc(50% - 15px); min-width: 140px; justify-content: center;
}
.social-box:hover { border-color: var(--neon-accent); transform: translateY(-8px) scale(1.05); box-shadow: 0 10px 20px rgba(0, 255, 204, 0.2); }
.social-box:active { transform: scale(0.95); box-shadow: 0 5px 10px rgba(0, 255, 204, 0.1); }
.social-box:hover i { transform: rotate(360deg) scale(1.2); color: var(--neon-pink) !important; }

@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-5px); } 100% { transform: translateY(0px); } }
.float-icon { animation: float 3s ease-in-out infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.pulse-icon { animation: pulse 2s infinite; }

footer {
    background: rgba(5,5,5,0.95); border-top: 1px solid rgba(0,255,204,0.1);
    padding: 30px 10vw 40px; color: var(--text-dim);
}
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }

.anim-fade-up { opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; }
.anim-slide-left { opacity: 0; transform: translateX(-50px); transition: all 0.8s ease-out; }
.anim-slide-right { opacity: 0; transform: translateX(50px); transition: all 0.8s ease-out; }
.anim-scale { opacity: 0; transform: scale(0.9); transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.in-view { opacity: 1 !important; transform: translate(0) scale(1) !important; }

.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; } .delay-4 { transition-delay: 0.4s; } .delay-5 { transition-delay: 0.5s; }

@media (max-width: 992px) {
    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
}

/* FIXED MOBILE STYLES */
@media (max-width: 768px) {
    * { cursor: auto; } 
    .cursor-dot, .cursor-outline { display: none; } 
    
    header { padding: 15px 20px; } 
    section { padding: 100px 5vw 60px; }
    h2.section-title { font-size: 2rem; }
    #home h1 { font-size: 3rem !important; }
    .btn-group { flex-direction: column; width: 100%; } .btn { width: 100%; justify-content: center; }
    .social-box { flex: 1 1 100%; justify-content: flex-start; padding-left: 20px; }
    .grid-container { grid-template-columns: 1fr; }
    
    footer { padding-bottom: 120px; } 
    .footer-content { flex-direction: column; text-align: center; justify-content: center; }
    
    .floating-controls { right: 20px; bottom: 20px; }
}

/* --- SECRET EASTER EGG LINK --- */
.secret-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}
.secret-link:hover {
    color: var(--neon-accent);
    text-shadow: 0 0 10px var(--neon-accent);
    cursor: pointer;
}
