:root {
    --primary: #FF3366; /* Vibrant Pink/Red */
    --secondary: #00E5FF; /* Cyan/Electric Blue */
    --accent: #FFD700; /* Gold */
    --bg-dark: #0a0a0a;
    --surface: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --gradient-1: linear-gradient(45deg, #FF3366, #FF9933);
    --gradient-2: linear-gradient(45deg, #00E5FF, #2979FF);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy */
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    perspective: 1000px; /* Global depth */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 51, 102, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 229, 255, 0.08), transparent 25%);
}

/* Code Rain / Grid Background */
.code-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3; /* behind canvas */
    background-image: 
        linear-gradient(rgba(10, 10, 10, 0.9) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 10, 10, 0.9) 1px, transparent 1px);
    background-size: 50px 50px;
    background-color: transparent;
    opacity: 0.2;
    transform: perspective(500px) rotateX(60deg) scale(2);
    transform-origin: top center;
    animation: grid-scroll 20s linear infinite;
}

@keyframes grid-scroll {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark); 
}
::-webkit-scrollbar-thumb {
    background: var(--primary); 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary); 
}

h1, h2, h3, .logo {
    font-family: 'Cinzel', serif;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between; /* Push logo left, links right */
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 20px rgba(0, 229, 255, 0.2);
}

.logo {
    position: relative; /* Reset to normal flow */
    left: auto;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main); /* Match body text */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem; /* Restore left margin only */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 10px;
}

.nav-links a:hover {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary);
}

.nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--gradient-2);
    transition: width 0.3s ease;
    margin-top: 5px;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
    position: relative; /* Reset */
    right: auto;
}

/* Background Canvas */
#bgCanvas {
    opacity: 0.6; /* More visible */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.hero-content {
    z-index: 2;
    background: rgba(0,0,0,0.4);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 30px rgba(0,229,255,0.1);
    backdrop-filter: blur(5px);
    transform: translateZ(50px);
    display: flex; /* Flex layout */
    flex-direction: column; /* Vertical stack */
    align-items: center; /* Horiz center */
    justify-content: center; /* Vert center if height was set */
    max-width: 90%;
    margin: 0 auto; /* Safety */
}

/* CSS Mandala/Pattern Effect - kept but subtle */
.mandala-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    background-image: 
        radial-gradient(circle at center, transparent 0%, transparent 10%, var(--accent) 10.5%, transparent 11%),
        radial-gradient(circle at center, transparent 0%, transparent 20%, var(--primary) 20.5%, transparent 21%),
        radial-gradient(circle at center, transparent 0%, transparent 30%, var(--secondary) 30.5%, transparent 31%);
    opacity: 0.1;
    z-index: -1;
    animation: spin 60s linear infinite;
    border-radius: 50%;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Profile Image */
.profile-container {
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
    transition: var(--transition);
}

.profile-container::after {
    content: '';
    position: absolute;
    width: 170px; /* Fixed size larger than img */
    height: 170px;
    border-radius: 50%;
    border: 2px dashed var(--primary);
    animation: spin 30s linear infinite;
    z-index: -1;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%); /* Center the ring */
}
 @keyframes spin { 
    0% { transform: translate(-50%, -50%) rotate(0deg); } 
    100% { transform: translate(-50%, -50%) rotate(360deg); } 
} 

.profile-container:hover .profile-img {
    box-shadow: 0 0 40px rgba(255, 51, 102, 0.8);
    transform: scale(1.05);
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #ffffff; /* Explicit white for contrast */
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.highlight {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.6); /* Stronger glow */
    filter: drop-shadow(0 0 5px rgba(0,229,255,0.5));
}

.roles {
    font-size: 1.8rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
    min-height: 1.5em; /* Prevent jump when empty */
}

/* Typing Effect Cursor */
.typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
    color: var(--secondary);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Button with Glow */
.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: none;
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--gradient-2);
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.btn-primary:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.8);
    background-color: transparent;
    color: white;
}

.btn-primary:hover::before {
    opacity: 1;
}

/* Sections */
.section {
    padding: 5rem 10%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-main);
    position: relative;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.section-title::after {
    content: '◈';
    display: block;
    margin-top: 10px;
    font-size: 1.5rem;
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary);
}

.alt-bg {
    background: transparent; /* Remove solid background */
    border: none;
    position: relative;
}

.alt-bg::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60%; height: 60%;
    background: radial-gradient(circle, rgba(255, 51, 102, 0.1), transparent 70%);
    z-index: -1;
    filter: blur(50px);
}

/* Cards Upgrade */
.card {
    background: rgba(255, 255, 255, 0.05); /* Glassmorphism */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    /* 3D Tilt is in JS, but base style here */
    transform-style: preserve-3d;
    perspective: 1000px;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
    transform: translateY(-10px);
}

.icon {
    font-size: 3.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 51, 102, 0.5));
    margin-bottom: 1.5rem;
    transform: translateZ(30px);
    display: inline-block;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--secondary);
    transform: translateZ(20px);
}

.card p {
    color: var(--text-muted);
    transform: translateZ(20px);
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Portfolio Hover */
.portfolio-item {
    transition: var(--transition);
    text-align: center;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
}

.portfolio-item h3 {
    margin-top: 1rem;
    color: var(--primary);
}

.placeholder-img {
    background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.placeholder-img::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-20deg) translateX(-150%);
    transition: 0.5s;
}

.portfolio-item:hover .placeholder-img::before {
    transform: skewX(-20deg) translateX(150%);
}

/* Cursor Update */
.cursor-dot {
    background-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
    width: 8px; height: 8px;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.cursor-outline {
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.3);
    width: 40px; height: 40px;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%); /* Correct centering */ 
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    opacity: 1;
}

/* Footer */
.footer-section {
    background: linear-gradient(to top, #000, var(--bg-dark));
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 5rem 10%;
    text-align: center;
    color: var(--light-text);
}

.contact-links {
    margin: 2rem 0;
}

.contact-btn {
    display: inline-block;
    margin: 0 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
    border: 1px solid var(--secondary);
    padding: 10px 20px;
    border-radius: 5px;
}

.contact-btn:hover {
    background: var(--secondary);
    color: #000;
    box-shadow: 0 0 20px var(--secondary);
    border-color: var(--secondary);
}

footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.heart {
    color: var(--primary);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }

    .hamburger {
        display: block;
        color: var(--text-main);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        width: 100%;
        left: 0;
        background-color: var(--bg-dark);
        flex-direction: column;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 2px solid var(--primary);
    }

    .nav-links.active {
        max-height: 300px;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}
