:root {
    --primary: #00f2ff;
    --secondary: #bd00ff;
    --bg-dark: #050505;
    --glass: rgba(255, 255, 255, 0.05);
    --text: #ffffff;
    --nav-bg: rgba(0, 0, 0, 0.9);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; }
body { background-color: var(--bg-dark); color: var(--text); overflow-x: hidden; min-height: 100vh; position: relative; }

#bg-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* PRELOADER */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 99999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease-out; }
.terminal-loader { font-family: 'Courier New', monospace; color: var(--primary); width: 300px; }
.terminal-header { border-bottom: 1px solid var(--primary); padding-bottom: 5px; margin-bottom: 10px; font-weight: bold; }
.terminal-text p { margin: 5px 0; opacity: 0; animation: textAppear 0.5s forwards; }
.terminal-text p:nth-child(1) { animation-delay: 0.2s; }
.terminal-text p:nth-child(2) { animation-delay: 0.8s; }
.terminal-text p:nth-child(3) { animation-delay: 1.4s; }
.terminal-text p:nth-child(4) { animation-delay: 2.0s; }
.loader-bar { width: 100%; height: 5px; background: #333; margin-top: 15px; }
.loader-progress { height: 100%; background: var(--primary); width: 0%; animation: loadBar 2.5s forwards; }
@keyframes textAppear { from { opacity: 0; } to { opacity: 1; } }
@keyframes loadBar { 0% { width: 0; } 100% { width: 100%; } }
.blink { animation: blinker 1s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

/* SCROLL BAR */
.scroll-progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 10000; }
.scroll-progress-bar { height: 100%; background: var(--primary); width: 0%; box-shadow: 0 0 10px var(--primary); }

/* SETTINGS */
.settings-panel { position: fixed; top: 100px; right: -220px; z-index: 5000; transition: 0.3s; display: flex; }
.settings-panel.open { right: 0; }
.settings-toggle { background: var(--glass); width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; cursor: pointer; border-radius: 10px 0 0 10px; border: 1px solid var(--primary); border-right: none; color: var(--primary); font-size: 1.5rem; backdrop-filter: blur(5px); }
.settings-content { width: 220px; background: rgba(0,0,0,0.9); border: 1px solid var(--primary); padding: 20px; backdrop-filter: blur(10px); }
.colors { display: flex; gap: 10px; margin-top: 5px; }
.color-btn { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: 0.2s; }
.color-btn:hover { transform: scale(1.1); border-color: white; }
.lang-switch button { background: transparent; border: 1px solid var(--primary); color: white; padding: 5px 10px; cursor: pointer; margin-right: 5px; margin-top: 5px; }
.lang-switch button.active-lang { background: var(--primary); color: black; }
.fa-spin-hover:hover { animation: spin 2s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* NAVIGATION */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 50px; background: var(--nav-bg); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(0, 242, 255, 0.1); }
.logo { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: 700; letter-spacing: 2px; text-shadow: 0 0 10px var(--primary); cursor: pointer; }
.highlight { color: var(--primary); }
.nav-links { display: flex; gap: 30px; list-style: none; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; text-transform: uppercase; font-size: 0.9rem; font-weight: bold; transition: 0.3s; position: relative; padding: 5px 10px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); text-shadow: 0 0 15px var(--primary); }
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: white; }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* MAIN CONTENT */
.page { display: none; padding: 100px 20px; max-width: 1200px; margin: 0 auto; animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.active-page { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }

.hero-content { text-align: center; margin-top: 50px; min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.hero-text h1 { font-family: 'Orbitron', sans-serif; font-size: 4rem; color: var(--primary); margin: 20px 0; text-shadow: 0 0 30px var(--primary); min-height: 80px; }
.hero-text h4 { letter-spacing: 5px; text-transform: uppercase; color: #888; margin-bottom: 10px; }

.btn-group { margin-top: 40px; display: flex; justify-content: center; gap: 20px; }
.btn { padding: 15px 40px; font-size: 1.1rem; text-transform: uppercase; cursor: pointer; font-family: 'Orbitron', sans-serif; border-radius: 5px; font-weight: bold; transition: 0.3s; }
.neon-btn { background: transparent; border: 2px solid var(--primary); color: var(--primary); box-shadow: 0 0 10px rgba(0, 242, 255, 0.2); }
.neon-btn:hover { background: var(--primary); color: #000; box-shadow: 0 0 30px var(--primary); }
.outline-btn { background: transparent; border: 2px solid var(--secondary); color: var(--secondary); }
.outline-btn:hover { background: var(--secondary); color: #fff; box-shadow: 0 0 30px var(--secondary); }

/* CARDS & GLITCH */
.section-title { text-align: center; font-family: 'Orbitron', sans-serif; font-size: 2.5rem; margin-bottom: 50px; color: var(--text); border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 10px; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.project-card { background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); padding: 20px; border-radius: 15px; position: relative; overflow: hidden; transition: transform 0.3s; }
.project-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 0 20px var(--primary); }

.project-image { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 15px; border: 1px solid #333; transition: 0.3s; }
.project-card:hover .project-image { animation: glitch 0.3s infinite; filter: drop-shadow(0 0 5px var(--primary)); }
@keyframes glitch { 0% { transform: translate(0) } 20% { transform: translate(-2px, 2px) } 40% { transform: translate(-2px, -2px) } 60% { transform: translate(2px, 2px) } 80% { transform: translate(2px, -2px) } 100% { transform: translate(0) } }

.project-info h3 { font-family: 'Orbitron', sans-serif; color: var(--primary); margin-bottom: 10px; }
.project-btn { background: transparent; border: 1px solid var(--primary); color: var(--text); padding: 8px 15px; cursor: pointer; margin-top: 10px; transition: 0.3s; font-family: 'Orbitron', sans-serif; }
.project-btn:hover { background: var(--primary); color: black; }

/* SKILLS */
.skills-wrapper { max-width: 800px; margin: 0 auto; }
.skill-item { margin-bottom: 25px; }
.skill-info { width: 100%; display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: bold; font-family: 'Orbitron', sans-serif; }
.progress-bar-bg { width: 100%; height: 12px; background: rgba(255,255,255,0.1); border-radius: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); width: 0%; border-radius: 6px; box-shadow: 0 0 10px var(--primary); transition: width 2s cubic-bezier(0.1, 0.7, 1.0, 0.1); }

/* CONTACT */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.glass-panel { background: rgba(20, 20, 20, 0.6); backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,0.1); padding: 30px; border-radius: 20px; height: 100%; }
.centered-info { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.input-group { display: flex; align-items: center; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); margin-bottom: 15px; padding: 10px; border-radius: 8px; transition: 0.3s; }
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 10px var(--primary); }
.input-group i { color: var(--primary); margin-right: 15px; }
.input-group input, .input-group textarea { background: transparent; border: none; color: #fff; width: 100%; outline: none; }
.full-width { width: 100%; margin-top: 10px; }
.highlight-row { margin: 30px 0; padding: 15px 30px; border: 1px solid var(--primary); border-radius: 50px; background: rgba(0, 242, 255, 0.1); box-shadow: 0 0 15px rgba(0, 242, 255, 0.2); }
.social-icons a { color: #fff; font-size: 2rem; margin: 0 15px; transition: 0.3s; }
.social-icons a:hover { color: var(--primary); transform: scale(1.2); }
footer { text-align: center; padding: 20px; margin-top: 50px; color: #555; font-size: 0.8rem; }

/* MODAL & CURSOR & MEDIA */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content { margin: 5% auto; width: 80%; max-width: 600px; position: relative; animation: slideUp 0.4s; background: #111; border: 1px solid var(--primary); box-shadow: 0 0 50px rgba(0, 242, 255, 0.2); }
.close-modal { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.close-modal:hover { color: var(--primary); }
.modal-img { width: 100%; border-radius: 10px; margin-bottom: 20px; border: 1px solid var(--secondary); }
.modal-title { font-family: 'Orbitron', sans-serif; color: var(--primary); margin-bottom: 15px; }
.modal-desc { line-height: 1.6; color: #ddd; }

.cursor-dot, .cursor-outline { position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999; pointer-events: none; }
.cursor-dot { width: 8px; height: 8px; background-color: var(--primary); }
.cursor-outline { width: 40px; height: 40px; border: 1px solid var(--primary); transition: width 0.2s, height 0.2s, background-color 0.2s; }
body:hover .cursor-outline { opacity: 1; }
@media (max-width: 768px) { .cursor-dot, .cursor-outline { display: none; } .settings-panel { top: 80px; } .contact-wrapper { grid-template-columns: 1fr; } .hero-text h1 { font-size: 2.5rem; } .hamburger { display: block; } .nav-links { position: fixed; left: -100%; top: 70px; gap: 0; flex-direction: column; background-color: var(--nav-bg); width: 100%; text-align: center; transition: 0.3s; border-bottom: 1px solid var(--primary); } .nav-links.active { left: 0; } .nav-item { margin: 16px 0; display: block; } }