@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #0b1220;
    --surface: #0f1a2d;
    --surface-2: #14223a;
    --border: rgba(255, 255, 255, 0.08);
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.70);
    --accent: #4ea1ff;

    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.35);
    --shadow-elevated: 0 18px 42px rgba(0, 0, 0, 0.45);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Plus Jakarta Sans", "Segoe UI", "Helvetica Neue", sans-serif;
}

main {
    min-height: calc(100vh - 176px);
}

a {
    color: var(--accent);
}

a:hover {
    color: #8dc4ff;
}

.site-navbar {
    background-color: rgba(8, 14, 24, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.navbar-brand {
    color: var(--text);
    letter-spacing: 0.01em;
}

.brand-logo {
    height: 87px;
    width: auto;
    display: block;
}

.nav-link {
    color: var(--text);
    font-weight: 500;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background-color: rgba(78, 161, 255, 0.18);
}

.site-footer {
    border-top: 1px solid var(--border);
    background-color: rgba(8, 14, 24, 0.96);
}

.footer-text {
    color: var(--text);
}

.footer-link {
    color: var(--text);
    text-decoration: none;
}

.footer-link:hover {
    color: #8dc4ff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
}

.hero-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: var(--shadow-elevated);
}

.hero-inner {
    padding: clamp(1.5rem, 2.5vw, 3rem);
}

.hero-title {
    max-width: 920px;
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    max-width: 860px;
    font-size: 1.06rem;
    line-height: 1.55;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.hero-portrait {
    width: min(100%, 280px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(78, 161, 255, 0.72);
    box-shadow:
        0 0 0 6px rgba(78, 161, 255, 0.2),
        0 14px 30px rgba(0, 0, 0, 0.42);
}

.pill {
    display: inline-block;
    background-color: rgba(78, 161, 255, 0.14);
    border: 1px solid rgba(78, 161, 255, 0.38);
    color: #d8ebff;
    border-radius: 999px;
    padding: 0.36rem 0.8rem;
    font-size: 0.84rem;
    font-weight: 600;
}

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.project-card:hover {
    border-color: rgba(78, 161, 255, 0.45);
}

.project-card,
.info-card,
.detail-card {
    background-color: var(--surface);
}

.project-card h2,
.project-card h3,
.project-card .h5,
.project-card a {
    color: var(--text) !important;
}

.info-card h2,
.info-card .h5 {
    color: var(--text) !important;
}

.detail-card .card-body {
    background-color: var(--surface-2);
    border-radius: inherit;
}

.detail-card h2,
.detail-card .h5 {
    color: #fff !important;
}

.stack-badge {
    background-color: rgba(78, 161, 255, 0.16);
    border: 1px solid rgba(78, 161, 255, 0.5);
    color: #e6f3ff;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    padding: 0.36rem 0.7rem;
}

.link-light {
    color: var(--text) !important;
}

.text-body-secondary {
    color: var(--text) !important;
}

.about-list {
    color: var(--text);
    padding-left: 1.1rem;
}

.about-list li {
    margin-bottom: 0.45rem;
}

.focus-avatar-wrap {
    display: flex;
    justify-content: center;
}

.focus-avatar {
    width: 118px;
    height: 118px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(78, 161, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(78, 161, 255, 0.15), 0 10px 20px rgba(0, 0, 0, 0.35);
}

.form-control,
.form-check-input {
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
}

.contact-form .form-label {
    color: #fff;
    font-weight: 600;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.82);
}

.form-control:focus {
    background-color: var(--surface-2);
    color: var(--text);
    border-color: rgba(78, 161, 255, 0.7);
    box-shadow: 0 0 0 0.18rem rgba(78, 161, 255, 0.28);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.page-link {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.page-link:hover {
    background-color: var(--surface-2);
    color: var(--text);
    border-color: rgba(78, 161, 255, 0.45);
}

.page-item.disabled .page-link {
    color: var(--muted);
    background-color: var(--surface);
    border-color: var(--border);
}

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

.btn-primary:hover {
    background-color: #3b94f7;
    border-color: #3b94f7;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.24);
    color: var(--text);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.34);
    color: var(--text);
}

.alert-success {
    background-color: rgba(24, 175, 117, 0.2);
    color: #d5ffe8;
}

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

.chat-toggle-btn {
    min-width: 108px;
    border: 1px solid rgba(78, 161, 255, 0.58);
    box-shadow: 0 0 0 1px rgba(78, 161, 255, 0.2), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.chat-panel {
    width: min(410px, calc(100vw - 1.5rem));
    height: min(520px, calc(100vh - 2rem));
    display: flex;
    flex-direction: column;
    margin-top: 0.8rem;
    border: 1px solid rgba(78, 161, 255, 0.56) !important;
    background-color: var(--surface);
    box-shadow:
        0 0 0 1px rgba(78, 161, 255, 0.22),
        0 18px 44px rgba(0, 0, 0, 0.58),
        0 0 26px rgba(78, 161, 255, 0.2);
}

.chat-panel .card-header,
.chat-panel .card-footer {
    background-color: var(--surface);
    border-color: var(--border);
}

.chat-panel .card-header strong {
    font-size: 1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    background-color: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.95rem;
}

.chat-bubble {
    max-width: 92%;
    border-radius: 12px;
    padding: 0.62rem 0.78rem;
    line-height: 1.48;
    font-size: 0.96rem;
}

.chat-assistant {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.chat-user {
    align-self: flex-end;
    background-color: var(--accent);
    color: #021225;
    font-weight: 600;
}

.chat-loader-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.chat-loader-dots {
    display: inline-flex;
    gap: 0.28rem;
}

.chat-loader-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a9d3ff;
    animation: chat-dot-bounce 1.1s infinite ease-in-out;
}

.chat-loader-dots span:nth-child(2) {
    animation-delay: 0.16s;
}

.chat-loader-dots span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes chat-dot-bounce {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

#chatInput {
    min-height: 74px;
    max-height: 140px;
    resize: vertical;
    background-color: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

#chatInput:focus {
    border-color: rgba(78, 161, 255, 0.72);
}

#chatStatus {
    color: var(--muted) !important;
}

@media (max-width: 768px) {
    .hero-inner {
        padding: 1.25rem;
    }

    .hero-subtitle {
        font-size: 0.98rem;
    }

    .hero-portrait {
        width: min(72vw, 220px);
    }

    .chat-panel {
        width: calc(100vw - 1rem);
        height: min(520px, calc(100vh - 1.2rem));
    }
}
