/* =========================================
   VARIABLES & GLOBAL STYLES
   ========================================= */
:root {
    --bg-color: #0b0f19;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --primary-color: #00f0ff;
    --secondary-color: #7000ff;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Animations */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #111827 0%, #030712 100%);
}

.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    top: -150px;
    left: -150px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #ff007f;
    top: 40%;
    right: -50px;
    animation: float 25s infinite alternate;
    opacity: 0.3;
}

.orb-4 {
    width: 350px;
    height: 350px;
    background: #00ff88;
    bottom: 20%;
    left: -50px;
    animation: float 22s infinite alternate-reverse;
    opacity: 0.2;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 80px) scale(1.2); }
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.glass-card {
    background: rgba(10, 15, 30, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        600px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
        rgba(0, 240, 255, 0.1),
        transparent 40%
    );
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.glass-card > * {
    position: relative;
    z-index: 1;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.1);
}

.icon-color {
    color: var(--primary-color);
    margin-right: 10px;
}

/* =========================================
   ANIMATIONS (SCROLL REVEAL)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* =========================================
   NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

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

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 150px;
    padding-bottom: 50px;
}

.hero-content {
    max-width: 1100px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-image-container {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
    animation: pulse-glow 3s infinite alternate;
    flex-shrink: 0;
}

.hero-image-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.3); }
    100% { box-shadow: 0 0 50px rgba(112, 0, 255, 0.7); }
}

.greeting {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 5.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(270deg, var(--primary-color), var(--secondary-color), #ff007f, var(--primary-color));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    animation: gradientFlow 8s ease infinite;
}

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

.role {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.highlight {
    color: var(--secondary-color);
    font-weight: bold;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.3);
}

.primary-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(112, 0, 255, 0.5);
}

.secondary-btn {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--glass-border);
}

.secondary-btn:hover {
    border-color: var(--primary-color);
    color: #fff;
    background: rgba(0, 240, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.2);
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-card {
    text-align: center;
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
}

.about-card strong {
    color: var(--primary-color);
}

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

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.skill-category p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   EXPERIENCE SECTION
   ========================================= */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-item {
    padding: 2rem;
    position: relative;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.4rem;
    color: #fff;
}

.timeline-date {
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-item h4 {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.timeline-item ul {
    list-style-position: inside;
    color: var(--text-muted);
}

.timeline-item li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

/* =========================================
   PROJECTS SECTION
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    overflow: hidden;
}

.project-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.project-subtitle {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-card ul {
    list-style-position: inside;
    color: var(--text-muted);
}

.project-card li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

/* =========================================
   EDUCATION SECTION
   ========================================= */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.edu-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.edu-card ul {
    list-style-type: none;
}

.edu-card li, .edu-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.edu-card strong {
    color: #fff;
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.languages {
    font-weight: 600;
    color: #fff;
    margin-top: 1rem;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: rgba(11, 15, 25, 0.8);
    color: var(--text-muted);
}

/* =========================================
   FIXED SIDE CHAT WIDGET
   ========================================= */
.side-chat-widget {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99997;
    display: flex;
    align-items: center;
}

.side-chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 30px 0 0 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    transition: padding-right 0.3s ease;
}

.side-chat-toggle:hover {
    padding-right: 10px;
}

.side-chat-window {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: right center;
}

.side-chat-window.hidden {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
    pointer-events: none;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .name {
        font-size: 3rem;
    }
    
    .role {
        font-size: 1.1rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        gap: 2rem;
    }
    
    .hero-image-container {
        width: 250px;
        height: 250px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(11, 15, 25, 0.95);
        backdrop-filter: blur(10px);
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .section {
        padding: 60px 0;
    }

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

    .glass-card {
        padding: 1.5rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

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

    #cat-chat-window {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        bottom: 90px;
    }

    .side-chat-window {
        position: fixed;
        right: 10px;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: auto;
        margin: 0;
    }
}

/* =========================================
   INTERACTIVE CAT COMPANION
   ========================================= */
.cat-companion {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    z-index: 99999;
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
    transform-origin: center center;
    will-change: transform;
}

.cat-companion:active {
    cursor: grabbing;
}

.cat-body {
    transform-origin: bottom center;
    transition: transform 0.2s ease;
    will-change: transform;
}

/* Animations */
.cat-companion.squash .cat-body {
    animation: squash 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes squash {
    0% { transform: scale(1, 1) translateY(0); }
    40% { transform: scale(1.4, 0.6) translateY(10px); }
    100% { transform: scale(1, 1) translateY(0); }
}

.cat-companion.walk .cat-body {
    animation: walk 0.4s infinite alternate ease-in-out;
}

@keyframes walk {
    0% { transform: translateY(0) rotate(-5deg); }
    100% { transform: translateY(-8px) rotate(5deg); }
}

.cat-companion.run .cat-body {
    animation: run 0.2s infinite alternate ease-in-out;
}

@keyframes run {
    0% { transform: translateY(0) rotate(-10deg) scaleX(1.05); }
    100% { transform: translateY(-15px) rotate(10deg) scaleX(0.95); }
}

.cat-companion.sleep .cat-body {
    transform: scale(1.05, 0.6) translateY(20px);
}

.cat-companion.sit .cat-body {
    transform: scale(1.02, 0.85) translateY(5px);
}

.cat-companion.drag .cat-body {
    transform: scale(1.2) translateY(-10px);
    animation: dangle 0.5s infinite alternate ease-in-out;
}

@keyframes dangle {
    0% { transform: scale(1.2) translateY(-10px) rotate(-15deg); }
    100% { transform: scale(1.2) translateY(-10px) rotate(15deg); }
}

.cat-companion.fall .cat-body {
    transform: rotate(15deg) scale(0.9, 1.1);
}

.cat-companion.jump .cat-body {
    transform: scale(0.9, 1.1);
}

/* =========================================
   CAT CHAT WINDOW
   ========================================= */
#cat-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    z-index: 99998;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
}

#cat-chat-window.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

.cat-chat-header {
    background: rgba(0, 240, 255, 0.1);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
}

#close-cat-chat {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
}

#close-cat-chat:hover {
    color: #fff;
}

.cat-chat-body {
    padding: 20px 15px;
    height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-chat-body p {
    padding: 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: inline-block;
    max-width: 85%;
    margin: 0;
}

.chat-msg-bot {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    align-self: flex-start;
    margin-right: auto;
    border-top-left-radius: 0;
    border-top-right-radius: 10px;
}

.chat-msg-user {
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary-color);
    align-self: flex-end;
    margin-left: auto;
    border-top-right-radius: 0;
    border-top-left-radius: 10px;
}

.cat-chat-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 15px 15px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    max-height: 150px;
    overflow-y: auto;
}

.chat-q-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 15px;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-q-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--primary-color);
}
