:root {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    /* Dark Cyberpunk Anime City Background */
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)),
        url('https://image.pollinations.ai/prompt/cyberpunk%20anime%20city%20night%20rain%20neon%20lights%20purple%20blue%20highly%20detailed?width=1920&height=1080&nologo=true');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* For stars */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Neon Star Cursor Trail */
.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    /* Will be overridden by JS for colors */
    border-radius: 50%;
    pointer-events: none;
    animation: fadeOut 0.8s linear forwards;
    z-index: 9999;
    box-shadow: 0 0 10px currentColor;
    /* Glows with the element's color */
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0) translate(10px, 10px);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Typography & Utilities */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: var(--glass-border);
    margin-left: 15px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo .highlight {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    padding: 10px 5px;
    /* Increase vertical padding for better touch target */
}

.nav-links li a:hover {
    color: var(--text-primary);
}

.nav-links .btn-primary {
    padding: 10px 25px;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: var(--accent-color);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.2;
    z-index: -1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-text h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero-text h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 30px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.glow-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent-gradient);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.2;
    animation: pulse 5s infinite ease-in-out;
}

.avatar-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    z-index: 10;
}

.ai-avatar-container {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.5);
    overflow: hidden;
    animation: float 4s ease-in-out infinite;
}

.ai-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    filter: contrast(1.1) brightness(1.1) drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
    opacity: 0.95;
    transition: var(--transition);
}

/* Hover Effect: Fully Real */
.ai-avatar-container:hover .ai-avatar-img {
    filter: brightness(1) contrast(1) drop-shadow(0 0 5px rgba(59, 130, 246, 0.8));
    opacity: 1;
    transform: scale(1.05);
}

.ai-speech-bubble {
    position: absolute;
    top: -10px;
    /* Pull it down closer to the avatar */
    right: -20px;
    /* Pull it closer to the avatar */
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    padding: 6px 12px;
    border-radius: 15px 15px 15px 0;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(5px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    pointer-events: none;
    white-space: nowrap;
}

.ai-speech-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Removed old .ai-icon styles as we use an image now */

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: var(--glass-border);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 41, 59, 0.9);
}

.about-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.about-card h3 {
    margin-bottom: 15px;
}

.about-card p {
    color: var(--text-secondary);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-list li {
    background: rgba(59, 130, 246, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Work Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: var(--glass-border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 200px;
    background: #2d3748;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.placeholder-img {
    color: var(--text-secondary);
    font-weight: 600;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 5px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.project-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    text-decoration: underline;
    color: white;
}

.tags {
    display: flex;
    gap: 10px;
}

.coming-soon-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 1px;
    opacity: 0.8;
}

.tags span {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 10px;
    color: var(--text-secondary);
}

/* Future Section */
.roadmap {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.roadmap-item {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    border: var(--glass-border);
    text-align: center;
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.roadmap-item .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 50px 0 20px;
    border-top: var(--glass-border);
}

.footer-content {
    text-align: center;
    margin-bottom: 30px;
}

.contact-info h2 {
    margin-bottom: 15px;
}

.email-link {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1);
        opacity: 0.2;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Responsive Design */

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .about-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Ultra-Small Devices (iPhone SE, etc.) */
@media (max-width: 320px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Tablet & Mobile Large */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 60px;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }

    .hero-text p {
        margin: 0 auto 30px;
    }

    .nav-links {
        position: fixed;
        background: rgba(15, 23, 42, 0.98);
        height: 100vh;
        width: 100%;
        top: 0;
        left: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateY(-100%);
        transition: transform 0.4s ease-in-out;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .cta-group {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .btn-secondary {
        margin-left: 0;
    }
}

/* Laptop */
@media (min-width: 1024px) {
    .container {
        padding: 0 40px;
    }
}

/* Ultra-wide Resolution */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero-text h1 {
        font-size: 5rem;
    }
}

/* Floating Logo */
.floating-logo {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5), inset 0 0 10px rgba(59, 130, 246, 0.3);
    /* remove overflow: hidden to allow bubble to show outside */
    z-index: 1000;
    pointer-events: auto;
    user-select: none;
    will-change: transform, opacity;
    background: transparent;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, opacity 0.5s ease;
    animation: pulseGlow 2s infinite alternate;
}

.floating-logo.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.floating-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Ensure the image itself is round */
}

.floating-bubble {
    position: absolute;
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    padding: 6px 14px;
    border-radius: 15px 15px 0 15px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 1001;
}

.floating-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    }

    to {
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.8), 0 0 35px rgba(59, 130, 246, 0.4);
    }
}


.floating-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    cursor: pointer;
}

.floating-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}