/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Orbitron:wght@500;700&display=swap');

/* --- Theme Variables --- */
:root {
    --bg-color: rgba(255, 255, 255, 0.5);
    --text-color: #333333;
    --card-bg: #f8f9fa;
    --primary: #007bff;
    --accent: #6c5ce7;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --border-color: #999;
    --blob-opacity: 0.1;
}

[data-theme="dark"] {
    --bg-color: #0a0a0c;
    --text-color: #e0e0e0;
    --card-bg: #16161a;
    --primary: #00ff9d;
    --accent: #ff0055;
    --nav-bg: rgba(10, 10, 12, 0.8);
    --border-color: #999;
    --blob-opacity: 0.25;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    padding-top: 100px;
}

/* --- Background RGB Animation --- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: var(--blob-opacity);
    animation: float 10s infinite alternate;
}

.blob-1 { width: 300px; height: 300px; background: var(--primary); top: -50px; left: -50px; animation-delay: 0s; }
.blob-2 { width: 400px; height: 400px; background: var(--accent); bottom: -100px; right: -50px; animation-delay: 2s; }
.blob-3 { width: 250px; height: 250px; background: #006aff; top: 40%; left: 40%; animation-delay: 4s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* --- Navbar Styles --- */
.navbar {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo { font-family: 'Orbitron'; color:var(--primary); font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; z-index: 1002; }
.dot { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 20px; z-index: 1002; }

/* Desktop Menu */
#main-nav ul { display: flex; list-style: none; gap: 30px; }
#main-nav a { text-decoration: none; color: var(--text-color); font-weight: 500; position: relative; padding: 5px 0;  }
#main-nav a::after { content: ''; position: absolute; width: 0; height: 2px; background: var(--primary); bottom: 0; left: 0; transition: width 0.3s; }
#main-nav a:hover::after, #main-nav a.active::after { width: 100%; }

#theme-btn { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: var(--text-color); }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-color); cursor: pointer; z-index: 1002;}

/* --- Hero Section --- */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding: 0 8%;
}

.hero-text h3 { font-size: 1.2rem; margin-bottom: 5px; color: var(--primary); }
.hero-text h1 { font-size: 3rem; margin-bottom: 10px; line-height: 1.1; }
.glow-text { text-shadow: 0 0 15px rgba(0, 255, 157, 0.2); }
.tagline { font-size: 1.1rem; margin-bottom: 20px; font-weight: 600; }
.bio { margin-bottom: 30px; max-width: 500px; opacity: 0.9; }

/* Buttons */
.cta-group { display: flex; gap: 15px; }
.btn { padding: 12px 25px; border-radius: 50px; text-decoration: none; font-weight: 600; text-align: center; transition: 0.3s; }
.btn-primary { background: linear-gradient(45deg, var(--primary), var(--accent)); color: white; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.4); }
.btn-outline { border: 2px solid var(--border-color); color: var(--text-color); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* Image Box */
.img-box {
    box-shadow: 0 0 4px #555; width: 300px; height: 300px; border-radius: 50%; padding: 4px;
    background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff);
    background-size: 400%; animation: rgb-glow 20s linear infinite;
}
.img-box img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid var(--card-bg); }
@keyframes rgb-glow { 0% {background-position: 0 0;} 100% {background-position: 400% 0;} }

/* --- Shared Card Styles --- */
.section-heading { text-align: center; font-size: 2.2rem; margin-bottom: 50px; margin-top: 50px; }
.highlight { color: var(--accent); }

.skills-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 0 8%; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; padding: 0 8%; }

/* --- UPDATED RGB ROTATING BORDER LOGIC --- */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

.hover-rgb {
    position: relative;
    border-radius: 12px;
    padding: 3px; /* Acts as the border width */
    background: transparent;
    overflow: hidden;
    transition: transform 0.3s;
    isolation: isolate;
}

/* The Content Box inside the Border */
.card-content {
    background: var(--card-bg);
    border-radius: 9px; /* Slightly less than outer radius */
    padding: 25px;
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    border: 1px solid #999999;
    border-left: 4px solid green;
    box-shadow: 0 0 4px #888;
}

/* Spinning Gradient Layer */
.hover-rgb::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%; /* Make it large enough to cover corners when spinning */
    height: 250%;
    background: conic-gradient(from var(--angle), #ff4545, #00ff99, #006aff, #ff0095, #ff4545);
    transform: translate(-50%, -50%);
    animation: spin 3s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.hover-rgb:hover { transform: translateY(-5px); }
.hover-rgb:hover::before { opacity: 1; }

@keyframes spin { from { --angle: 0deg; } to { --angle: 360deg; } }

/* Skill Card Specifics */
.skill-card .card-content { flex-direction: row; align-items: center; gap: 10px; padding: 15px 25px; font-weight: 600;
border: 1px solid #999999; box-shadow: 0 0 4px #888;
  
}
.card-content h3 { margin-bottom: 10px; color: var(--primary); font-size: 1.3rem; 
}
.card-content p { font-size: 0.9rem; color: var(--text-color); opacity: 0.8; margin-bottom: 20px; flex-grow: 1; }
.link-btn { text-decoration: none; color: var(--accent); font-weight: 600; font-size: 0.9rem; }

.contact-wrapper { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-bottom: 40px; }
.contact-item {font-weight:600; display: flex; align-items: center; gap: 10px; padding: 10px 20px; border: 1px solid var(--border-color); border-radius: 50px; }
.footer-bottom { position:fixed; background-color: var(--bg-color); backdrop-filter: blur(10px); color:#999;
    -webkit-backdrop-filter: blur(10px);
     bottom: 0; left:0; right:0; box-shadow: 0 0 3px #888; text-align: center; padding: 3px; font-size: 0.8rem; border-top: 1px solid #666;}

/* Animations */
.reveal-up { opacity: 0; transform: translateY(50px); transition: 0.8s; }
.active { opacity: 1; transform: translate(0); }

/* --- Mobile Responsiveness UPDATED --- */
@media (max-width: 768px) {
    /* Navbar Grid for Mobile: Toggle | Logo | ThemeBtn */
    .navbar {
        display: grid;
        grid-template-columns: auto 1fr auto; /* Left, Center-ish, Right */
        align-items: center;
        padding: 15px 5%;
    }

    .menu-toggle { display: block; justify-self: start; }
    .logo { justify-self: center; } /* Logo Center mein */
    .nav-right { justify-self: end; } 

    .hero-container { flex-direction: column-reverse; text-align: center; padding-top: 20px; }
    .hero-text { margin-top: 30px; }
    .hero-text h1 { font-size: 2.2rem; }
    .img-box { width: 250px; height: 250px; margin: 0 auto; }

    .cta-group { flex-direction: column; width: 100%; gap: 15px; }
    .btn { width: 100%; display: block; }

    /* Mobile Menu - Left Side Slide-in & Glass Effect */
    #main-nav {
        position: fixed; 
        top: 0; 
        left: -100%; /* Hidden on the LEFT */
        width: 70%; /* Covers 75% of screen */
        height: 100vh;
        /* Blur and Transparency */
        background: rgba(10, 10, 12, 0.80); /* Dark semi-transparent */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 5px 0 15px rgba(0,0,0,0.3);
        text-shadow: 0 0 3px #999999;
        display: flex; 
        flex-direction: column;
        align-items: flex-start; /* Left Align Text */
        justify-content: center;
        padding-left: 40px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    /* Light Theme Adjustment for Menu */
    [data-theme="light"] #main-nav {
        background: rgba(255, 255, 255, 0.9);
    }

    #main-nav.open { left: 0; /* Slide in to View */ }
    
    #main-nav ul { 
        flex-direction: column; 
        gap: 30px; 
        text-align: left; 
        width: 100%;
        
    }

    #main-nav a { 
        font-size: 1.4rem; 
        display: block;
    }

    /* Staggered Animation for Links */
    #main-nav.open li {
        animation: slideInLeft 0.5s forwards;
        opacity: 0;
        border-bottom:1px solid #999 ;
        transform: translateX(-20px);
    }
    
    #main-nav.open li:nth-child(1) { animation-delay: 0.1s; }
    #main-nav.open li:nth-child(2) { animation-delay: 0.2s; }
    #main-nav.open li:nth-child(3) { animation-delay: 0.3s; }
    #main-nav.open li:nth-child(4) { animation-delay: 0.4s; }

    @keyframes slideInLeft {
        to { opacity: 1; transform: translateX(0); }
    }
}
a{color:#167DFF; text-decoration: none;}
