:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.2);
    --border-color: #334155;
    --nav-height: 80px;
}

* {
    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-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.logo-tag {
    color: var(--text-secondary);
}

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

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    background: radial-gradient(circle at top right, var(--accent-glow), transparent);
}

.hero .container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.hero-content {
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    min-height: 3.2em;
    /* Height for ~2 lines to prevent vertical shift */
}

#typing-text::after {
    content: '|';
    margin-left: 5px;
    color: var(--accent-color);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.hero-cta .btn {
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-secondary:hover {
    background: var(--accent-glow);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 4px;
    background: var(--accent-color);
}

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

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.skill-card h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.skill-card li::before {
    content: '→';
    margin-right: 10px;
    color: var(--accent-color);
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -5px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-date {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px var(--accent-glow);
}

.project-info {
    padding: 2rem;
}

.tech-stack {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.project-link:hover {
    color: var(--accent-color);
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
}

.contact-details h3 {
    margin-bottom: 1rem;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
}

.social-links a {
    text-decoration: none;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 100px;
    right: 2rem;
    z-index: 1001;
}

.flash {
    padding: 1rem 2rem;
    border-radius: 8px;
    background: var(--accent-color);
    color: #000;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer .social-icons {
    margin-top: 1.5rem;
}

.footer .social-icons a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s;
}

.footer .social-icons a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        word-wrap: break-word;
    }

    .tagline {
        font-size: 1.1rem;
        min-height: auto;
        margin-bottom: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
        margin: 0;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }
}

/* AI Chatbot Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-bubble i {
    font-size: 1.5rem;
    color: #000;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    padding: 1rem 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 1rem;
    font-family: 'Consolas', monospace;
    color: var(--accent-color);
}

.chat-header button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.ai-message {
    align-self: flex-start;
    background: var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.user-message {
    align-self: flex-end;
    background: var(--accent-color);
    color: #000;
    border-bottom-right-radius: 2px;
}

.loading-indicator {
    align-self: flex-start;
    padding: 0.5rem 1rem;
}

.loading-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    margin-right: 3px;
    animation: bounce 1s infinite alternate;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    to {
        transform: translateY(-5px);
    }
}

.suggested-questions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.suggestion {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion:hover {
    background: var(--accent-glow);
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    outline: none;
}

.chat-input-area button {
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: #000;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 2rem);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: -1rem;
    }

    .chat-widget {
        bottom: 1rem;
        right: 1rem;
    }
}