@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --bg: #050712;
    --panel: rgba(15, 18, 31, 0.75);
    --panel-strong: rgba(23, 28, 45, 0.85);
    --text: #e5ecff;
    --muted: #9aacd6;
    --accent: #66e0e5;
    --accent-strong: #8b5cf6;
    --card: #0b1020;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    --radius: 18px;
}

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

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
    position: relative;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    margin: 0;
    color: #f3f4ff;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
    color: var(--muted);
}

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

.background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(102, 224, 229, 0.1), transparent 25%),
                radial-gradient(circle at 90% 10%, rgba(139, 92, 246, 0.12), transparent 25%),
                radial-gradient(circle at 50% 70%, rgba(46, 174, 255, 0.08), transparent 28%),
                #050712;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 120px 120px;
    mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 65%);
}

.bg-blob {
    position: absolute;
    width: 420px;
    height: 420px;
    filter: blur(90px);
    opacity: 0.3;
}

.blob-1 {
    background: #66e0e5;
    top: -80px;
    right: -60px;
}

.blob-2 {
    background: #8b5cf6;
    bottom: -120px;
    left: -80px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 38px;
    max-width: 1200px;
    margin: 0 auto;
    backdrop-filter: blur(18px);
    background: rgba(5, 7, 18, 0.75);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #66e0e5, #8b5cf6);
    display: grid;
    place-items: center;
    color: #050712;
    font-weight: 700;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.brand-role {
    color: var(--muted);
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.pill-link {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pill-link:hover {
    background: linear-gradient(135deg, rgba(102, 224, 229, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(255, 255, 255, 0.15);
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    background: linear-gradient(145deg, rgba(15, 18, 31, 0.8), rgba(23, 28, 45, 0.9));
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero-copy h1 {
    font-size: 2.6rem;
    margin: 6px 0 14px;
}

.eyebrow {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b8c4ff;
}

.lede {
    font-size: 1.05rem;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #66e0e5, #8b5cf6);
    color: #050712;
    box-shadow: 0 15px 35px rgba(102, 224, 229, 0.25);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: var(--border);
}

.btn:hover {
    transform: translateY(-2px);
}

.hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #dfe6ff;
    font-size: 0.95rem;
}

.chip.soft {
    background: rgba(255, 255, 255, 0.08);
}

.hero-visual {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 16px;
    align-items: center;
}

.portrait {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(102, 224, 229, 0.2), rgba(139, 92, 246, 0.2));
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
}

.portrait img {
    width: 82%;
    height: 82%;
    object-fit: cover;
    border-radius: 16px;
    position: relative;
    z-index: 2;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.halo {
    position: absolute;
    inset: 10%;
    border-radius: 16px;
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.2), transparent 60%);
    filter: blur(12px);
}

.hero-card {
    background: var(--panel-strong);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.hero-card-title {
    font-size: 1.2rem;
    margin: 4px 0;
}

.hero-card-sub {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

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

.section-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2rem;
}

.subhead {
    color: var(--muted);
    font-size: 1rem;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.panel.light {
    background: rgba(255, 255, 255, 0.04);
}

.panel.accent {
    background: linear-gradient(145deg, rgba(102, 224, 229, 0.08), rgba(139, 92, 246, 0.08));
}

.typewriter textarea {
    width: 100%;
    height: 170px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: #e8eeff;
    font-size: 1rem;
    padding: 16px;
    resize: vertical;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(102, 224, 229, 0.4);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.project-card ul {
    padding-left: 18px;
    margin: 0;
    color: var(--muted);
    display: grid;
    gap: 4px;
}

.project-desc {
    color: #dbe5ff;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(102, 224, 229, 0.12);
    color: #66e0e5;
    font-weight: 600;
    width: fit-content;
}

.hobby-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.hobby-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    background: rgba(102, 224, 229, 0.12);
    border-radius: 12px;
}

.chat-section {
    position: relative;
    overflow: hidden;
}

.chat-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(102, 224, 229, 0.14), transparent 34%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.18), transparent 36%);
    pointer-events: none;
}

.qa-container {
    position: relative;
    z-index: 1;
    display: grid;
    max-width: 760px;
}

.chat-shell {
    display: grid;
    gap: 18px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.82), rgba(12, 17, 31, 0.94));
    box-shadow: 0 26px 55px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
}

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

.chat-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #66e0e5, #8b5cf6);
    color: #08101b;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.chat-title {
    color: #f3f4ff;
    font-weight: 600;
    line-height: 1.2;
}

.chat-status {
    font-size: 0.92rem;
    color: #9fe8d7;
}

.chat-thread {
    display: grid;
    gap: 12px;
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.chat-message {
    max-width: min(88%, 560px);
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.chat-message p {
    color: #e8eeff;
    line-height: 1.6;
    white-space: pre-wrap;
}

.chat-message.assistant {
    justify-self: start;
    background: rgba(255, 255, 255, 0.06);
    border-top-left-radius: 6px;
}

.chat-message.user {
    justify-self: end;
    background: linear-gradient(135deg, rgba(102, 224, 229, 0.2), rgba(139, 92, 246, 0.22));
    border-color: rgba(102, 224, 229, 0.18);
    border-top-right-radius: 6px;
}

.chat-message.pending {
    opacity: 0.8;
}

.message-meta {
    margin-bottom: 4px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b8c4ff;
}

.chat-composer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

#question-input {
    width: 100%;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#question-input:focus {
    border-color: rgba(102, 224, 229, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 224, 229, 0.15);
}

#ask-button {
    padding: 16px 20px;
    border-radius: 16px;
    border: none;
    font-weight: 700;
    background: linear-gradient(135deg, #66e0e5, #8b5cf6);
    color: #050712;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#ask-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(102, 224, 229, 0.25);
}

#ask-button:disabled,
#question-input:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

footer {
    margin-top: 12px;
    padding: 24px;
    border-top: 1px solid var(--border);
    background: rgba(5, 7, 18, 0.85);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.footer-content a {
    color: #66e0e5;
    font-weight: 600;
}

.publication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.publication-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.pub-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 10px;
}

.experience-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.experience-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.experience-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 4px;
}

.section-subgrid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.section-header.compact {
    margin-bottom: 2px;
}

@media (max-width: 960px) {
    .topbar {
        gap: 12px;
        padding: 14px 18px;
    }

    .nav-links {
        gap: 10px;
    }

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

    .hero-visual {
        grid-template-rows: auto;
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .topbar {
        position: static;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        width: 100%;
        flex-wrap: wrap;
    }

    .hero {
        padding: 20px;
    }

    .page {
        padding: 18px 16px 48px;
    }

    .chat-shell {
        padding: 16px;
    }

    .chat-thread {
        min-height: 220px;
    }

    .chat-message {
        max-width: 100%;
    }

    .chat-composer {
        grid-template-columns: 1fr;
    }
}
