/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border_box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: #0f172a;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.15), transparent 25%);
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
}

/* Cursor Glow Effect */
#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
    transition: transform 0.1s ease-out;
    filter: blur(50px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    /* Don't squash logo */
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    /* Flexible gap */
    align-items: center;
    flex-wrap: wrap;
    /* Allow links to wrap if needed */
}

.nav-links a {
    text-decoration: none;
    color: #94a3b8;
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
    position: relative;
    white-space: nowrap;
    /* Prevent individual link wrapping */
}

.nav-links a:hover {
    color: #38bdf8;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #38bdf8;
    transition: width 0.3s;
}

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

@media (max-width: 1024px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 20px;
        height: auto;
    }

    .nav-links {
        justify-content: center;
        width: 100%;
        gap: 20px;
        flex-wrap: wrap;
    }

    .nav-links a {
        font-size: 1rem;
        margin: 5px;
    }
}

/* Sections Global */
.section {
    padding: 100px 10%;
}

.section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* Add a subtle glow under headers */
.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    margin: 10px auto 0;
    border-radius: 2px;
}

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

/* Background Glow Orb behind Hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    z-index: 0;
    filter: blur(60px);
}

.hero-content {
    width: 100%;
    max-width: 700px;
    /* Slightly wider */
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.hero-content .subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 40px;
    font-weight: 400;
}

.hint-text {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 25px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
        border-color: rgba(56, 189, 248, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
        border-color: rgba(56, 189, 248, 0.5);
    }
}

/* Chat Container (AI Terminal Look) */
.chat-container.independent-chat {
    width: 100%;
    height: 550px;
    background: rgba(30, 41, 59, 0.7);
    /* Glassmorphism */
    border-radius: 16px;
    box-shadow:
        0 20px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    /* Subtle white border */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(15, 23, 42, 0.5);
}

.chat-header .name {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.chat-header .status-text {
    font-size: 0.8rem;
    color: #38bdf8;
    font-weight: 500;
}

.quota-text {
    font-size: 0.75rem;
    color: #ef4444;
    /* Red color */
    margin-left: 10px;
    font-weight: 600;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.status-dot {
    height: 8px;
    width: 8px;
    background-color: #38bdf8;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #38bdf8;
}

.avatar img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    /* Squrcle */
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.chat-history {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: transparent;
    text-align: left;
}

.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.bot-message {
    background: rgba(51, 65, 85, 0.5);
    color: #f8fafc;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 2px;
}

.user-message {
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

.chat-footer {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
}

input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
    color: white;
    transition: 0.3s;
}

input:focus {
    border-color: #38bdf8;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

input::placeholder {
    color: #64748b;
}

button {
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
}

button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* About & Projects - Glassmorphism Cards */
.about-section {
    background: transparent;
}

.bio-content,
.beliefs {
    color: #cbd5e1;
}

.bio-content .lead {
    color: white;
}

.beliefs {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-left: 4px solid #38bdf8;
}

.beliefs h3 {
    color: white;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* Slightly wider cards */
    gap: 30px;
    width: 100%;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.project-card {
    background: rgba(30, 41, 59, 0.4);
    /* Glass Dark */
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.5);
}

.project-card h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 15px;
}

.project-card .project-desc {
    color: #94a3b8;
    margin-bottom: 30px;
    flex-grow: 1;
    /* Pushes tech-stack to bottom */
}

.project-desc a {
    color: #f59e0b;
    /* Orange accent */
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.project-desc a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    /* Fixes the overlap! */
    gap: 10px;
    /* Adds space between tags */
}

.tech-tag {
    font-size: 0.75rem;
    color: #38bdf8;
    /* Cyan text */
    background: rgba(56, 189, 248, 0.1);
    /* Cyan glass bg */
    padding: 6px 14px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.skill-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
    /* Purple hover border */
}

.skill-card h3 {
    margin-bottom: 20px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    font-size: 1.2rem;
}

.skill-card li {
    color: #cbd5e1;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.skill-card li::before {
    content: "▹";
    color: #818cf8;
    /* Indigo bullet */
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.4rem;
}

/* Awards */
.award-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 16px;
    border-left: 4px solid #f59e0b;
    /* Amber/Gold accent for Awards */
    box-shadow: none;
    margin-bottom: 20px;
}

.award-item h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.award-item p {
    color: #94a3b8;
}

/* Contact */
.contact-section {
    background: transparent;
}

.contact-section p {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: transparent;
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: 0.3s;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #38bdf8;
    z-index: -1;
    transition: width 0.3s;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    color: #0f172a;
    /* Dark text on hover */
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 14px 18px;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    width: fit-content;
    margin-bottom: 10px;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}