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

:root {
    --bg: #ffffff;
    --bg2: #f7f7f8;
    --bg3: #f0f0f2;
    --border: #e5e5e8;
    --text: #000000;
    --muted: #000000;
    --muted2: #000000;
    --accent: #000000;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] {
    --bg: #0d0d0f;
    --bg2: #161619;
    --bg3: #1c1c20;
    --border: #26262a;
    --text: #ffffff;
    --muted: #ffffff;
    --muted2: #ffffff;
    --accent: #ffffff;
}

html.theme-loaded {
    visibility: visible;
}

html:not(.theme-loaded) {
    visibility: hidden;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition), color var(--transition);
    position: relative;
}

/* Glassmorphism Background Blobs */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle 600px at 15% 25%, rgba(99, 102, 241, 0.07), transparent),
        radial-gradient(circle 500px at 85% 55%, rgba(16, 185, 129, 0.05), transparent),
        radial-gradient(circle 400px at 50% 85%, rgba(244, 63, 94, 0.04), transparent);
}

html[data-theme="dark"] body::before {
    background:
        radial-gradient(circle 600px at 15% 25%, rgba(99, 102, 241, 0.1), transparent),
        radial-gradient(circle 500px at 85% 55%, rgba(16, 185, 129, 0.07), transparent),
        radial-gradient(circle 400px at 50% 85%, rgba(244, 63, 94, 0.05), transparent);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

* {
    transition: border-color var(--transition), background-color var(--transition), color var(--transition);
}

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

.site-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

.hero {
    padding: 44px 0 40px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

.hero-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg3);
    border: 2px solid var(--border);
    object-fit: cover;
}

.hero-info {
    flex: 1;
    min-width: 0;
}

.hero-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.hero-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.4px;
}

.hero-verified {
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-verified svg {
    display: block;
}

.hero-location {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-roles {
    font-size: 14px;
    color: var(--muted2);
    margin-bottom: 16px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #111113;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background: #333;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    color: var(--muted2);
    font-size: 13px;
    font-weight: 500;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
}

.btn-ghost:hover {
    background: var(--bg2);
    color: var(--text);
}

.btn-ghost-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--muted2);
    transition: all 0.15s;
}

.btn-ghost-icon:hover {
    background: var(--bg2);
    color: var(--text);
}

.body-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    padding: 40px 0;
    align-items: start;
}

.sec-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sec-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.sec-link {
    font-size: 13px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.sec-link:hover {
    color: var(--text);
}

.about-section {
    margin-bottom: 44px;
}

.about-text {
    font-size: 14px;
    color: var(--muted2);
    line-height: 1.8;
}

.about-text p+p {
    margin-top: 14px;
}

.stack-section {
    margin-bottom: 44px;
}

.stack-group {
    margin-bottom: 16px;
}

.stack-group:last-child {
    margin-bottom: 0;
}

.stack-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stack-pill {
    font-size: 13px;
    color: var(--muted2);
    padding: 6px 12px;
    background: var(--bg2);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stack-pill:hover {
    color: var(--text);
    background: var(--bg3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-stack-view {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-stack-view:hover {
    background: var(--bg2);
    border-color: var(--text);
    color: var(--text);
    transform: translateX(4px);
}

.btn-stack-view svg {
    transition: transform var(--transition);
}

.btn-stack-view:hover svg {
    transform: translateX(2px);
}

.projects-section {
    margin-bottom: 44px;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.project-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: rgba(var(--bg-rgb, 255, 255, 255), 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--muted);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.12);
    transform: translateY(-4px) scale(1.02);
}

html[data-theme="dark"] .project-card:hover {
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.18);
}

.project-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-card-name::after {
    content: '→';
    font-size: 14px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card-name::after {
    opacity: 1;
    transform: translateX(0);
}

.project-card-desc {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.project-card-url {
    display: inline-block;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--muted2);
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 5px;
}

.right-col {
    position: sticky;
    top: 24px;
}

.exp-section {
    margin-bottom: 32px;
}

.exp-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
    margin: 0 -16px;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-left: 2px solid transparent;
}

.exp-item:hover {
    background: var(--bg2);
    border-left-color: var(--text);
    cursor: pointer;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .exp-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.exp-item:hover .exp-checkbox {
    background: var(--text);
    border-color: var(--text);
}

.exp-checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    background: var(--bg);
    position: relative;
}

.exp-checkbox.filled {
    background: var(--text);
    border-color: var(--text);
}

.exp-info {
    flex: 1;
    min-width: 0;
}

.exp-role {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1px;
}

.exp-place {
    font-size: 12px;
    color: var(--muted);
}

.exp-year {
    font-size: 12px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    padding-top: 2px;
}

.footer-sections {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.member-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.member-name {
    font-size: 13px;
    color: var(--muted2);
    line-height: 1.4;
}

.member-link {
    font-size: 13px;
    color: var(--muted);
    flex-shrink: 0;
    transition: color 0.15s;
}

.member-link:hover {
    color: var(--text);
}

.social-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted2);
    transition: color 0.15s;
}

.social-item:hover {
    color: var(--text);
}

.social-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--muted2);
    background: var(--bg);
}

.speaking-text {
    font-size: 13px;
    color: var(--muted2);
    line-height: 1.7;
    margin-bottom: 14px;
}

.get-in-touch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: opacity 0.15s;
}

.get-in-touch:hover {
    opacity: 0.7;
}

.gallery-section {
    border-top: 1px solid var(--border);
    padding: 48px 0;
    margin-top: 24px;
}

.gallery-header {
    margin-bottom: 24px;
}

.gallery-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.3px;
}

.gallery-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gallery-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.gallery-scroll::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--bg-rgb), 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: var(--bg);
    border-color: var(--muted);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.nav-btn.prev {
    left: -22px;
}

.nav-btn.next {
    right: -22px;
}

.gallery-item {
    width: 300px;
    height: 220px;
    border-radius: 14px;
    flex-shrink: 0;
    background: var(--bg3);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    scroll-snap-align: center;
    transition: all var(--transition);
    cursor: pointer;
}

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

.gallery-item:hover {
    border-color: var(--muted);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-label {
    color: white;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.theme-toggle-btn {
    margin-left: auto;
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    width: 54px;
    height: 28px;
    transition: all var(--transition);
}

.theme-toggle-btn:hover {
    border-color: var(--muted);
}

.toggle-icons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 4px;
    pointer-events: none;
    z-index: 1;
}

.sun-icon,
.moon-icon {
    color: var(--muted);
    transition: color var(--transition);
}

html[data-theme="light"] .sun-icon {
    color: #f59e0b;
}

html[data-theme="dark"] .moon-icon {
    color: #6366f1;
}

.toggle-pill {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--bg);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

html[data-theme="dark"] .toggle-pill {
    transform: translateX(26px);
}

html[data-theme="dark"] .btn-primary {
    background: #f0f0f5;
    color: #0d0d0f;
}

html[data-theme="dark"] .btn-primary:hover {
    background: #ffffff;
}

@media (max-width: 900px) {
    .nav-btn.prev {
        left: 4px;
    }

    .nav-btn.next {
        right: 4px;
    }
}

@media (max-width: 820px) {
    .site-wrap {
        padding: 0 24px;
    }

    .body-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .right-col {
        position: static;
    }

    .footer-sections {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

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

@media (max-width: 650px) {
    .footer-sections {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 520px) {
    .site-wrap {
        padding: 0 20px;
    }

    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .hero-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

    .hero-actions .btn-primary,
    .hero-actions .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .nav-btn.prev {
        left: 8px;
    }

    .nav-btn.next {
        right: 8px;
    }
}

/* Stack Overlay */
.stack-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    overflow-y: auto;
    padding: 40px 32px;
}

.stack-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.overlay-content {
    max-width: 1000px;
    width: 100%;
    color: var(--text);
}

.overlay-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    transition: opacity var(--transition);
}

.back-home-btn:hover {
    opacity: 0.7;
}

.overlay-main-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
}

.overlay-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.overlay-grid .stack-group {
    margin-bottom: 0;
}

.overlay-grid .stack-label {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
    letter-spacing: -0.5px;
}

.overlay-grid .stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.overlay-grid .stack-pill {
    background: transparent;
    color: var(--muted2);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.1s;
    cursor: default;
}

.overlay-grid .stack-pill:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    transform: none;
    box-shadow: none;
}

@media (max-width: 600px) {
    .stack-overlay {
        padding: 40px 20px;
    }

    .overlay-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }

    .overlay-main-title {
        font-size: 28px;
    }

    .overlay-grid .stack-label {
        font-size: 18px;
        margin-bottom: 16px;
    }
}

/* Chatbot Styles */
.chatbot-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #111113;
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
}

html[data-theme="dark"] .chatbot-toggle {
    background: #ffffff;
    color: #111113;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 32px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 140px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.chatbot-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chatbot-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.chatbot-header-info {
    display: flex;
    flex-direction: column;
}

.chatbot-header-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.chatbot-header-status {
    font-size: 12px;
    color: var(--muted2);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.chatbot-close-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close-btn:hover {
    color: var(--text);
}

.chatbot-messages {
    flex: 1;
    padding: 24px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--bg);
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

/* Message Groups */
.msg-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 85%;
    animation: fadeInMsg 0.3s ease-out forwards;
}

.msg-container.ai {
    align-self: flex-start;
}

.msg-container.user {
    align-self: flex-end;
    align-items: flex-end;
}

.msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.msg-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.msg-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.chat-msg {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.ai-msg {
    background: var(--bg2);
    color: var(--text);
    border: 1px solid var(--border);
    border-top-left-radius: 2px;
}

/* The Tail/Arrow */
.ai-msg::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent var(--border) transparent transparent;
}

.ai-msg::after {
    content: '';
    position: absolute;
    top: 0;
    left: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 7px 7px 0;
    border-color: transparent var(--bg2) transparent transparent;
}

.user-msg {
    background: #111113;
    color: #ffffff;
    border-top-right-radius: 2px;
}

html[data-theme="dark"] .user-msg {
    background: #ffffff;
    color: #111113;
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg2);
    border-radius: 12px;
    border-top-left-radius: 2px;
    align-self: flex-start;
    width: fit-content;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes typingBounce {

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

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

.chatbot-footer {
    padding: 16px 20px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

#chatbot-input {
    flex: 1;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: var(--muted);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--bg3);
    color: var(--text);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-send-btn:hover:not(:disabled) {
    background: var(--bg2);
    color: var(--text);
}

.chatbot-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chatbot-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-hint {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.chatbot-counter {
    font-size: 11px;
    color: var(--muted2);
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 500px) {
    .chatbot-window {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 90px;
        height: 550px;
    }

    .chatbot-toggle {
        right: 16px;
        bottom: 24px;
    }
}

/* Certificate Section Styles */
.cert-section {
    margin-bottom: 32px;
}

.cert-card {
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    background: #111113;
    /* Dark background as seen in screenshot */
    display: flex;
    flex-direction: column;
}

.cert-card:hover {
    border-color: var(--muted);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.cert-image-container {
    position: relative;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    background: #fff;
}

.cert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.cert-card:hover .cert-img {
    transform: scale(1.05);
}

.cert-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
    color: white;
    z-index: 1;
}

.cert-card:hover .cert-overlay {
    opacity: 1;
}

.cert-content {
    padding: 12px 14px;
    color: #ffffff;
}

.cert-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.cert-issuer {
    font-size: 13px;
    color: #a1a1aa;
    margin-bottom: 12px;
}

.cert-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cert-year {
    font-size: 12px;
    color: #ffffff;
    font-weight: 600;
    opacity: 0.8;
}

.cert-status {
    font-size: 10px;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 8px;
    border-radius: 5px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Image Modal Styles */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.image-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    max-width: 100%;
    max-height: 90vh;
    position: relative;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2100;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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