/* --- 1. GLOBAL SETTINGS --- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap');

:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 30, 0.8);
    --primary-neon: #00f3ff;
    --secondary-neon: #bc13fe;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --font-main: "Orbitron", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor globally */
}

/* Re-enable pointer cursor for interactive elements */
a, button, .btn, .side-dot, input, textarea {
    cursor: pointer; 
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- 2. CANVAS & CURSOR --- */
#trail-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; 
    z-index: 9990; /* Below the cursor dot, above background */
}

.cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 35px; height: 35px;
    background-color: white;
    /* Star Shape Clip Path */
    clip-path: polygon(50% 0%, 63% 38%, 100% 50%, 63% 62%, 50% 100%, 37% 62%, 0% 50%, 37% 38%);
    pointer-events: none; 
    z-index: 10000; /* Highest Layer */
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
    transition: opacity 0.3s ease;
    display: block; /* Ensure it is visible */
}

/* Mobile: Hide custom cursor stuff */
@media (hover: none) {
    #trail-canvas { display: none; }
    .cursor-dot { display: none !important; }
    * { cursor: auto; } /* Restore default cursor on touch */
}

/* --- 3. BACKGROUND GALAXY --- */
.galaxy-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background-color: var(--bg-color);
    display: flex; justify-content: center; align-items: center;
    overflow: hidden;
}

.orb-system {
    width: 70vw; height: 70vw; position: relative;
    animation: spin-galaxy 20s linear infinite;
    will-change: transform;
    transform: translateZ(0); 
}

.orb {
    position: absolute; width: 555px; height: 555px; border-radius: 50%;
    filter: blur(100px); opacity: 0.15;
}
.orb-1 { background: var(--primary-neon); top: -100px; left: 10%; }
.orb-2 { background: var(--secondary-neon); bottom: -100px; right: 10%; }

@keyframes spin-galaxy {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- 4. NAVIGATION --- */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 40px; 
    background: rgba(5, 5, 5, 0.9); backdrop-filter: blur(10px);
    position: fixed; width: 100%; z-index: 9995;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    transition: top 0.4s ease-in-out; top: 0;
}
nav.nav-hidden { top: -100px; }

.nav-socials a {
    color: var(--text-main); font-size: 1.4rem; margin-right: 20px; transition: 0.3s;
}
.nav-socials a:hover { color: var(--primary-neon); transform: scale(1.1); }

.nav-links { display: flex; align-items: center; }
.nav-links a {
    color: var(--text-main); text-decoration: none; transition: color 0.3s;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 1px;
    text-transform: uppercase; margin: 0; padding: 0 15px; position: relative;
}
.nav-links a:hover { color: var(--primary-neon); text-shadow: 0 0 10px var(--primary-neon); }
.nav-num { color: var(--primary-neon); margin-right: 4px; }
.nav-links a:not(:last-child)::after {
    content: '|'; position: absolute; right: 0; color: rgba(255,255,255,0.3);
    font-weight: 100; font-size: 0.7rem; top: 1px;
}
@media (max-width: 900px) { .nav-links { display: none; } }

/* --- 5. HERO SECTION (Left Aligned) --- */
.hero {
    min-height: 100vh; width: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    padding-left: 10%; padding-right: 10%;
    position: relative; text-align: left;
}

.hero-name {
    font-size: 5rem; /* Large Size */
    font-weight: 700; margin-bottom: 10px; color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
    line-height: 1.1;
}

.hero-typewriter-container {
    font-size: 3.5rem; /* Sub-heading Size */
    font-weight: 500; color: var(--primary-neon);
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
    height: 60px; display: flex; align-items: center;
}

.hero-cursor {
    color: #fff; margin-left: 5px;
    animation: blink-hero 0.8s step-end infinite;
}
@keyframes blink-hero { 50% { opacity: 0; } }

.hero-static-sub {
    font-size: 1.2rem; color: var(--text-muted);
    max-width: 600px; margin-bottom: 40px; line-height: 1.6;
}

/* Button Styling */
.btn {
    padding: 15px 40px;
    background: transparent;
    color: var(--primary-neon);
    font-weight: bold; text-decoration: none; text-transform: uppercase;
    letter-spacing: 2px; transition: all 0.3s ease;
    cursor: pointer; position: relative; border: none;
    display: inline-block; /* Ensure it appears */
    
    /* Corner Borders */
    background-image:
        linear-gradient(to right, var(--primary-neon) 2px, transparent 2px),
        linear-gradient(to bottom, var(--primary-neon) 2px, transparent 2px),
        linear-gradient(to left, var(--primary-neon) 2px, transparent 2px),
        linear-gradient(to bottom, var(--primary-neon) 2px, transparent 2px),
        linear-gradient(to left, var(--primary-neon) 2px, transparent 2px),
        linear-gradient(to top, var(--primary-neon) 2px, transparent 2px),
        linear-gradient(to right, var(--primary-neon) 2px, transparent 2px),
        linear-gradient(to top, var(--primary-neon) 2px, transparent 2px);
    background-position: top left, top left, top right, top right, bottom right, bottom right, bottom left, bottom left;
    background-size: 15px 15px; background-repeat: no-repeat;
}
.btn:hover {
    background-color: var(--primary-neon); background-image: none; 
    color: #000; box-shadow: 0 0 25px var(--primary-neon);
}

@media (max-width: 768px) {
    .hero { align-items: center; text-align: center; padding: 0 20px; }
    .hero-name { font-size: 3.5rem; }
    .hero-typewriter-container { font-size: 1.8rem; justify-content: center; height: auto; flex-wrap: wrap;}
}

/* --- 6. ABOUT SECTION --- */
.section { width: 100%; padding: 100px 10%; display: flex; flex-direction: column; justify-content: center; }
.section-title { font-size: 2rem; margin-bottom: 50px; border-left: 4px solid var(--primary-neon); padding-left: 20px; color: var(--text-main); }
section { position: relative; }
section::after {
    content: ''; position: absolute; bottom: 0; left: 90px; right: 90px; height: 3px; 
    background: linear-gradient(90deg, transparent 0%, rgba(0, 243, 255, 0.3) 20%, rgba(0, 243, 255, 0.3) 80%, transparent 100%);
    pointer-events: none; z-index: 10;
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: flex-start; }
.about-details { margin-bottom: 30px; border-left: 2px solid var(--primary-neon); padding-left: 20px; font-size: 0.95rem; }
.highlight { color: var(--primary-neon); font-weight: bold; }
.about-bio p { margin-bottom: 20px; color: var(--text-muted); font-size: 1rem; }
.about-quote { color: #fff; font-style: italic; margin-top: 25px; border-left: 3px solid #bc13fe; padding-left: 15px; }
.skills-container { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; }
.skill-tag { background: rgba(0, 243, 255, 0.1); border: 1px solid var(--primary-neon); color: var(--primary-neon); padding: 8px 15px; border-radius: 5px; font-size: 0.9rem; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* --- 7. PROJECTS --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; justify-content: center; }
.project-card {
    background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px; border-radius: 10px; transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
    transform: translateY(-10px); border-color: var(--primary-neon);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}
.project-card h3 { margin-bottom: 15px; color: var(--primary-neon); }
.project-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.card-link { color: #fff; text-decoration: none; font-size: 0.9rem; border-bottom: 1px solid var(--primary-neon); }

/* --- 8. CERTIFICATIONS --- */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; justify-content: center; }
.cert-card {
    background: rgba(20, 20, 30, 0.6); border: 1px solid rgba(0, 243, 255, 0.2); 
    border-radius: 12px; padding: 30px; position: relative;
    transition: all 0.4s; overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.cert-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-neon), transparent);
    transform: translateX(-100%); transition: 0.5s;
}
.cert-card:hover {
    transform: translateY(-10px); border-color: var(--primary-neon);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1), inset 0 0 20px rgba(0, 243, 255, 0.05);
    background: rgba(20, 20, 30, 0.95);
}
.cert-card:hover::before { transform: translateX(100%); transition: 0.8s; }
.cert-icon { font-size: 2.5rem; color: var(--secondary-neon); margin-bottom: 20px; transition: 0.4s; }
.cert-card:hover .cert-icon { color: var(--primary-neon); transform: rotateY(360deg); }
.cert-name { font-size: 1.2rem; margin-bottom: 8px; color: #fff; line-height: 1.3; }
.cert-issuer { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.cert-date { font-size: 0.8rem; color: rgba(255,255,255,0.3); margin-bottom: 25px; }
.cert-link {
    font-size: 0.9rem; color: var(--primary-neon); text-decoration: none; font-weight: bold;
    display: inline-flex; align-items: center; gap: 8px; transition: 0.3s; margin-top: auto; 
}
.cert-link:hover { gap: 15px; text-shadow: 0 0 10px var(--primary-neon); }

/* --- 9. QUOTE SECTION (Restored Glow) --- */
.quote-section {
    min-height: 100vh; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 0 20px; background: transparent;
}
.quote-text {
    font-size: 5vw; font-weight: 100; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px;
    background: linear-gradient(90deg, #fff, var(--primary-neon));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.3)); /* Base Glow */
    display: block !important; text-align: center; min-height: 120px;
    cursor: default; transition: filter 0.3s;
}
.quote-text:hover {
    /* Hover Glow Effect */
    filter: drop-shadow(0 0 25px rgba(0, 243, 255, 0.9));
}
.quote-author { font-size: 1.5rem; color: var(--text-muted); font-weight: 300; letter-spacing: 4px; }
.typing-active::after {
    content: '|'; display: inline-block; margin-left: 5px; color: var(--primary-neon);
    animation: blink-caret 0.75s step-end infinite; text-shadow: 0 0 10px var(--primary-neon);
}
@keyframes blink-caret { 50% { opacity: 0; } }

/* --- 10. CONTACT SECTION --- */
.contact-section { min-height: 100vh; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 20px; }
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; width: 100%; max-width: 1000px; margin: 0 auto; align-items: center; }
.contact-title { font-size: 4rem; margin-bottom: 20px; color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.1); }
.contact-sub { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; line-height: 1.8; }
.highlight-bold { color: var(--primary-neon); font-weight: bold; }
.social-row { display: flex; align-items: center; margin-bottom: 20px; font-size: 1.2rem; color: #fff; }
.social-row i { color: var(--text-main); width: 30px; margin-right: 15px; font-size: 1.5rem; }
.closing-brace { color: var(--primary-neon); font-size: 4rem; }

.contact-form { display: flex; flex-direction: column; gap: 25px; }
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-group label { color: var(--text-muted); font-size: 0.9rem; letter-spacing: 1px; }
.contact-form input, .contact-form textarea {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px; color: #fff; font-family: var(--font-main); font-size: 1rem; border-radius: 5px; transition: 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--primary-neon); box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}
.submit-btn {
    margin-top: 10px; padding: 15px; background: var(--primary-neon); color: #000;
    font-weight: bold; border: none; font-size: 1.1rem; letter-spacing: 2px; transition: 0.3s; text-transform: uppercase;
}
.submit-btn:hover { background: #fff; box-shadow: 0 0 20px var(--primary-neon); transform: scale(1.02); }

/* --- 11. FOOTER --- */
footer { width: 100%; padding: 50px 0; text-align: center; border-top: none; color: var(--text-muted); }

/* --- 12. SIDE NAV --- */
/* --- SIDE NAV --- */
.side-nav {
    /* Add this line to hide it initially */
    display: none; 
    
    position: fixed; top: 50%; right: 15px; transform: translateY(-50%);
    flex-direction: column; gap: 20px; z-index: 99999;
}
/* ... rest of your side-nav styles ... */
.side-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease; position: relative;
}
.side-dot:hover { background: #fff; transform: scale(1.3); }
.side-dot.active { background: var(--primary-neon); box-shadow: 0 0 15px var(--primary-neon); transform: scale(1.5); border-color: var(--primary-neon); }

/* --- 13. TERMINAL LOADER (Fixed Layout) --- */
#terminal-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #0d0d0d; z-index: 99999; padding: 40px;
    display: flex; flex-direction: column; align-items: flex-start; text-align: left;
    cursor: default !important;
}
.terminal-header {
    display: flex; justify-content: space-between; width: 100%; margin-bottom: 20px;
    border-bottom: 1px solid #333; padding-bottom: 10px;
}
.terminal-title { color: #555; font-family: 'Courier New', monospace; font-size: 0.9rem; }
#skip-btn {
    background: transparent; border: 1px solid var(--primary-neon); color: var(--primary-neon);
    padding: 5px 15px; font-family: 'Courier New', monospace; font-weight: bold;
    text-transform: uppercase; font-size: 0.8rem; cursor: pointer !important; transition: 0.3s;
}
#skip-btn:hover { background: var(--primary-neon); color: #000; }

.terminal-body {
    width: 100%; color: #0f0; font-size: 1.3rem; line-height: 1.6;
    font-family: 'Courier New', Courier, monospace; font-weight: 600; 
    white-space: pre-wrap; text-shadow: 0 0 2px rgba(0, 255, 0, 0.4);
}
.term-user { color: #00f3ff; font-weight: 800; }
.term-path { color: #bc13fe; font-weight: 700; }
.term-cmd { color: #fff; font-weight: normal; }
.term-error { color: #ff5555; font-weight: bold; }
.term-muted { color: #666; }

/* --- 14. SMOOTH LOAD ANIMATIONS --- */
.section, .hero, .quote-section, .contact-section, footer {
    opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.section-visible { opacity: 1; transform: translateY(0); }

/* Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--primary-neon); outline-offset: 3px;
}

