:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #6366f1;
    --accent: #2dd4bf;
    --success: #10b981;
    --warning: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; scroll-behavior: smooth; }
body { background-color: var(--bg-dark); color: var(--text-main); font-family: var(--font-body); overflow-x: hidden; }

/* 1. LAYOUT & CONTAINERS */
.container { max-width: 1100px; margin: 0 auto; position: relative; }
.small-container { max-width: 700px; } /* Only used for contact form now */

/* 2. PRELOADER */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 99999; display: flex; align-items: center; justify-content: center; font-family: 'Courier New', monospace; }
.loader-content { width: 300px; text-align: center; }
.loader-text { color: var(--accent); margin-bottom: 10px; font-weight: bold; font-size: 0.9rem; }
.loader-bar { width: 100%; height: 4px; background: #333; position: relative; overflow: hidden; }
.bar-fill { width: 0%; height: 100%; background: var(--primary); animation: loadBar 2s ease-in-out forwards; }
.loader-logs { margin-top: 10px; color: #555; font-size: 0.7rem; text-align: left; height: 60px; overflow: hidden; }
@keyframes loadBar { 0% { width: 0; } 40% { width: 50%; } 100% { width: 100%; } }

/* 3. OVERLAYS */
.crt-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03)); background-size: 100% 3px, 3px 100%; pointer-events: none; z-index: 9998; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--primary); width: 0%; z-index: 101; box-shadow: 0 0 10px var(--primary); }
#cyber-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: -1; }

/* 4. CURSOR */
.cursor-dot { width: 5px; height: 5px; background-color: var(--accent); position: fixed; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999; pointer-events: none; }
.cursor-outline { width: 30px; height: 30px; border: 1px solid var(--primary); position: fixed; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999; pointer-events: none; transition: 0.1s; }

/* 5. NAV */
.glass-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; position: fixed; width: 100%; top: 0; z-index: 100; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; letter-spacing: -1px; }
.dot { color: var(--primary); }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: 0.3s; }
.nav-links a:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }
.mobile-only { display: none; }

/* 6. CYBER BUTTONS */
.cyber-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border: none; text-decoration: none; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: 0.3s; }
.cyber-btn:hover { background: #fff; color: #000; transform: translateY(-2px); box-shadow: 0 0 15px var(--primary); }
.cyber-btn.secondary { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--text-main); }
.cyber-btn.secondary:hover { border-color: var(--primary); color: var(--primary); background: rgba(99, 102, 241, 0.1); }
.cyber-btn-tag { position: absolute; bottom: 2px; right: 2px; font-size: 0.5rem; opacity: 0.5; }

/* 7. HERO SECTION */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: space-between; padding: 0 10%; padding-top: 80px; }
.hero-content { max-width: 600px; z-index: 2; }
.badge { display: inline-block; padding: 6px 12px; background: rgba(99, 102, 241, 0.1); color: var(--primary); border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; border: 1px solid rgba(99, 102, 241, 0.2); }
.hero-title { font-family: var(--font-head); font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; }
.gradient-text { background: linear-gradient(135deg, var(--text-main), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px; max-width: 500px; }
.hero-actions { display: flex; gap: 15px; margin-bottom: 30px; }
.social-mini { display: flex; gap: 20px; font-size: 1.2rem; }
.social-mini a { color: var(--text-muted); transition: 0.3s; }
.social-mini a:hover { color: var(--accent); }

/* 8. INTERACTIVE TERMINAL */
.hero-visual { width: 100%; max-width: 500px; }
.terminal-window { background: #0d1117; border-radius: 6px; border: 1px solid #30363d; box-shadow: 0 10px 30px rgba(0,0,0,0.5); font-family: 'Courier New', monospace; overflow: hidden; height: 320px; display: flex; flex-direction: column; cursor: text; }
.terminal-header { background: #161b22; padding: 8px 12px; display: flex; align-items: center; border-bottom: 1px solid #30363d; flex-shrink: 0; }
.terminal-btns { display: flex; gap: 6px; margin-right: 15px; }
.circle { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
.terminal-title { color: #8b949e; font-size: 0.75rem; flex-grow: 1; text-align: center; }
.terminal-body { padding: 15px; color: #c9d1d9; font-size: 0.9rem; overflow-y: auto; flex-grow: 1; display: flex; flex-direction: column; }
.terminal-output { margin-bottom: 5px; line-height: 1.4; }
.command-line { color: var(--text-main); }
.response { color: #8b949e; margin-bottom: 10px; white-space: pre-wrap; }
.response.success { color: var(--success); }
.response.error { color: var(--warning); }
.input-line { display: flex; align-items: center; }
.prompt { color: var(--accent); font-weight: bold; margin-right: 8px; white-space: nowrap; }
#terminal-input { background: transparent; border: none; color: #fff; font-family: 'Courier New', monospace; font-size: 0.9rem; flex-grow: 1; outline: none; caret-color: var(--primary); }

/* 9. SECTIONS GENERAL */
.section-padding { padding: 100px 10%; }
.section-heading { font-family: var(--font-head); font-size: 2.2rem; margin-bottom: 10px; text-align: center; }
.section-sub { color: var(--text-muted); font-size: 1rem; margin-bottom: 50px; text-align: center; }

/* 10. GRIDS & CARDS */
.methodology-grid, .projects-wrapper, .labs-flex, .certs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.tilt-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05); padding: 30px; border-radius: 12px; position: relative; transition: transform 0.1s; transform-style: preserve-3d; perspective: 1000px; }
.tilt-card:hover { border-color: var(--primary); }
.tilt-card h3, .tilt-card p, .tilt-card span, .tilt-card i { transform: translateZ(20px); }

/* METHODOLOGY */
.step-num { font-family: var(--font-head); font-size: 3rem; font-weight: 700; color: rgba(255,255,255,0.03); position: absolute; top: 10px; right: 20px; transform: translateZ(0px); }
.method-step h3 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 10px; color: var(--accent); }
.method-step p { color: var(--text-muted); font-size: 0.9rem; }

/* SKILLS */
.layout-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; padding: 100px 10%; align-items: start; }
.skill-category { margin-bottom: 40px; }
.skill-category h3 { font-size: 1.2rem; margin-bottom: 15px; color: var(--text-main); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tags span { background: rgba(255,255,255,0.05); padding: 8px 16px; border-radius: 4px; font-size: 0.9rem; color: var(--text-muted); border: 1px solid transparent; transition: 0.3s; }
.skill-tags span:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px rgba(45, 212, 191, 0.2); }

/* LABS & CERTS */
.lab-item, .cert-card { display: flex; flex-direction: column; align-items: center; width: 100%; text-align: center; }
.lab-item i, .cert-icon { font-size: 2rem; color: var(--text-main); margin-bottom: 10px; }
.cert-icon { color: var(--accent); }
.lab-stat, .cert-issuer { font-size: 0.85rem; color: var(--accent); margin-top: 5px; }
.cert-issuer { color: var(--text-muted); }

/* PROJECTS & BLOG */
.project-content h3 { font-family: var(--font-head); font-size: 1.4rem; margin: 15px 0; }
.project-content p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.95rem; }
.badge-row { display: flex; gap: 10px; margin-bottom: 10px; }
.status-badge { padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.status-badge.live { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-badge.wip { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.status-badge.completed { background: rgba(99, 102, 241, 0.1); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.2); }
.status-badge-secondary { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; border: 1px solid rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 4px; display: inline-block; margin-bottom: 10px; }
.tags { display: flex; gap: 10px; margin-bottom: 25px; }
.tags span { font-size: 0.8rem; background: rgba(255,255,255,0.05); padding: 5px 12px; border-radius: 20px; color: var(--text-muted); }
.project-link { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: 0.3s; display: inline-flex; align-items: center; gap: 5px; }
.project-link:hover { color: #fff; text-shadow: 0 0 10px var(--primary); }

/* 11. TIMELINE & EXPERIENCE (FIXED) */
.timeline { position: relative; padding-left: 30px; margin-top: 50px; border-left: 2px solid rgba(255, 255, 255, 0.1); }
.timeline-item { position: relative; margin-bottom: 50px; }
.timeline-marker { position: absolute; left: -39px; top: 20px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-dark); border: 2px solid var(--text-muted); transition: 0.3s; box-shadow: 0 0 0 4px var(--bg-dark); }
.timeline-marker.current { background: var(--success); border-color: var(--success); box-shadow: 0 0 0 4px var(--bg-dark), 0 0 15px var(--success); }
.timeline-content { width: 100%; transition: all 0.3s ease; }

.timeline-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.timeline-title-group h3 { font-family: var(--font-head); font-size: 1.3rem; color: var(--text-main); margin-bottom: 5px; }
.timeline-title-group h4 { font-size: 1rem; color: var(--primary); font-weight: 400; }
.date-badge { font-family: 'Courier New', monospace; font-size: 0.85rem; background: rgba(16, 185, 129, 0.1); color: var(--success); padding: 6px 12px; border-radius: 4px; border: 1px solid rgba(16, 185, 129, 0.2); white-space: nowrap; }

/* Fixed Job Tags */
.job-tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.job-tags span { font-size: 0.75rem; background: rgba(99, 102, 241, 0.1); color: var(--primary); padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(99, 102, 241, 0.2); }

/* 12. PGP MODAL */
.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content { background-color: #0f172a; border: 1px solid var(--primary); margin: 10% auto; padding: 40px; width: 80%; max-width: 600px; border-radius: 12px; position: relative; color: var(--text-main); }
.close-modal { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.close-modal:hover { color: var(--danger); }
.modal h3 { font-family: var(--font-head); color: var(--primary); margin-bottom: 10px; }
.modal-sub { color: var(--text-muted); margin-bottom: 20px; font-size: 0.9rem; }
.pgp-block { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 6px; font-family: 'Courier New', monospace; font-size: 0.75rem; overflow-x: auto; color: #a5b4fc; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; max-height: 200px; }

/* 13. CONTACT & FOOTER */
.contact-wrapper { background: var(--bg-card); padding: 40px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); }
.form-group { margin-bottom: 20px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 15px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; color: var(--text-main); font-family: var(--font-body); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 15px rgba(99, 102, 241, 0.2); }
.full-width { width: 100%; }
.direct-contact { text-align: center; margin-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.email-link { color: var(--text-main); text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.copyright { text-align: center; margin-top: 50px; color: var(--text-muted); font-size: 0.8rem; }
.footer-socials { display: flex; justify-content: center; gap: 20px; margin-top: 15px; }
.footer-socials a { color: var(--text-muted); font-size: 1.2rem; transition: 0.3s; }
.footer-socials a:hover { color: var(--accent); }

/* 14. MOBILE */
@media (max-width: 900px) {
    .hamburger { display: block; } .desktop-only { display: none; } .mobile-only { display: block; margin-top: 20px; text-align: center; }
    .nav-links { position: fixed; top: 0; right: -100%; height: 100vh; width: 70%; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); flex-direction: column; justify-content: center; align-items: center; transition: 0.4s ease; border-left: 1px solid rgba(255,255,255,0.1); }
    .nav-links.active { right: 0; }
    .hero { flex-direction: column; text-align: center; padding-top: 120px; gap: 60px; }
    .hero-content { margin: 0 auto; } .hero-visual { width: 100%; margin: 0 auto; }
    .layout-grid { grid-template-columns: 1fr; gap: 30px; }
    .cursor-dot, .cursor-outline, .crt-overlay { display: none; } 
    * { cursor: auto; }
    .date-badge { float: none; display: inline-block; margin-bottom: 10px; }
    .timeline { padding-left: 20px; }
    .timeline-marker { left: -29px; }
}
