/* =====================================================
   GLOBAL RESET
===================================================== */

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

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: #f7f8fb;
    color: #111;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

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

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* =====================================================
   NAVBAR
===================================================== */

.site-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid #eee;
    z-index: 100;
}

.navbar {
    max-width: 1100px;
    margin: auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 700;
    font-size: 1.05rem;
}

.menu-toggle {
    display: none;
    border: 1px solid #e4e4e7;
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
}

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

.nav-link {
    text-decoration: none;
    color: #444;
}

.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

/* =====================================================
   HERO
===================================================== */

.hero {
    padding: 80px 20px;
}

.container {
    max-width: 1100px;
    margin: auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.hero-cta {
    color: #555;
    margin-bottom: 16px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.hero-actions {
    margin-bottom: 10px;
}

.hero-hint {
    font-size: 0.9rem;
    color: #666;
}

.hero-profile {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.hero-profile img {
    width: 100%;
    border-radius: 14px;
}

/* =====================================================
   SECTIONS
===================================================== */

.section {
    padding: 70px 20px;
}

.section-inner {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.section-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.section-divider {
    height: 1px;
    background: #eee;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 20px;
}

.project-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.05);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

/* =====================================================
   BUTTONS
===================================================== */

.btn {
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-secondary {
    background: #f1f3f5;
}

.tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 600;
}

.contact-intro {
    color: #555;
    margin-bottom: 14px;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.contact-label {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6b7280;
}

.contact-value {
    font-weight: 600;
    color: #111;
}

.site-footer {
    padding: 30px 20px 50px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* =====================================================
   CHATBOT LAUNCHER
===================================================== */

.chatbot-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.chatbot-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    font-size: 16px;
}

.chatbot-text {
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* =====================================================
   CHATBOT PANEL (FIXED SIZE)
   SAME SIZE ON DESKTOP + LAPTOP
===================================================== */

.chatbot-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;

    width: 360px;
    height: 440px;       /* ✅ constant size */

    background: white;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,.2);

    display: flex;
    flex-direction: column;

    overflow: hidden;    /* ⭐ prevents expansion */
    z-index: 9999;
}

.chatbot-panel[hidden] {
    display: none;
}

/* =====================================================
   HEADER
===================================================== */

.chatbot-header {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    background: #fafafa;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 20px;
    border-radius: 8px;
}

.chatbot-close:hover {
    background: #eef2f7;
    color: #111;
}

/* =====================================================
   MESSAGE AREA (SCROLLABLE)
===================================================== */

.chatbot-messages {
    flex: 1;
    overflow-y: auto;

    padding: 16px;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =====================================================
   MESSAGE BUBBLES
===================================================== */

.chatbot-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
}

.chatbot-msg.bot {
    background: #f1f3f5;
    align-self: flex-start;
}

.chatbot-msg.user {
    background: #2563eb;
    color: white;
    align-self: flex-end;
}

.chatbot-msg p {
    margin: 0;
    word-break: break-word;
}

/* =====================================================
   INPUT AREA
===================================================== */

.chatbot-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eee;
}

.chatbot-form input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.chatbot-send {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
}

/* =====================================================
   TYPING INDICATOR
===================================================== */

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: typing 1.2s infinite;
}

.typing-indicator span:nth-child(2){animation-delay:.2s}
.typing-indicator span:nth-child(3){animation-delay:.4s}

@keyframes typing {
    0%,80%,100%{opacity:.3;transform:scale(.7)}
    40%{opacity:1;transform:scale(1)}
}

/* =====================================================
   MOBILE ONLY
===================================================== */

@media (max-width: 900px) {
    .container {
        padding: 0 18px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-profile {
        max-width: 360px;
        margin: 0 auto;
    }
}

@media (max-width: 760px) {
    .menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        right: 16px;
        top: 58px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
    }

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

    .section {
        padding: 56px 18px;
    }

    .section-inner {
        padding: 22px;
    }

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

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

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .hero {
        padding: 64px 18px;
    }

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

    .chatbot-panel {
        right: 12px;
        bottom: 76px;
        width: min(320px, 92vw);
        height: 460px;
        border-radius: 16px;
    }
}