:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #dbe3ee;
    --line-strong: #c8d4e3;
    --text: #152235;
    --muted: #5e7087;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --success-bg: #ecfdf5;
    --success-line: #c2f0da;
    --user-bg: #eff6ff;
    --user-line: #bfdbfe;
    --danger-bg: #fff1f2;
    --danger-line: #fda4af;
    --shadow: 0 12px 32px rgba(21, 34, 53, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
}

.site-shell {
    overflow-x: clip;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(245, 247, 251, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .container,
.hero-section .container,
.simulator-section .container,
.content-section .container,
.simple-page .container,
.site-footer .container {
    max-width: 1180px;
}

.brand-mark,
.brand-mark:hover {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--text);
}

.brand-mark-badge {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}

.brand-mark-text strong,
.brand-mark-text span {
    display: block;
    line-height: 1.05;
}

.brand-mark-text strong {
    font-weight: 800;
}

.brand-mark-text span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.navbar-toggler {
    border: 0;
}

.nav-link {
    color: var(--muted);
    font-weight: 700;
    border-radius: 999px;
    padding: 0.65rem 0.95rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: #eaf1fb;
}

.btn {
    border-radius: 999px;
    font-weight: 800;
    padding: 0.9rem 1.3rem;
}

.btn-brand {
    color: #fff;
    background: var(--brand);
    border: 1px solid var(--brand);
}

.btn-brand:hover,
.btn-brand:focus,
.btn-brand:active {
    color: #fff;
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-ghost {
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line-strong);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: #f8fbff;
    border-color: #b9c8db;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.9rem;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.display-title,
.section-title,
.footer-title,
.panel-heading h3,
.info-card h2,
.info-card h3,
.hero-aside-title {
    font-family: "DM Serif Display", serif;
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.display-title {
    max-width: 11ch;
    margin-bottom: 1rem;
    font-size: clamp(2.8rem, 6vw, 4.8rem);
}

.section-title {
    font-size: clamp(2.1rem, 4.5vw, 3.4rem);
    margin-bottom: 0.9rem;
}

.hero-section,
.simulator-section,
.content-section,
.simple-page {
    padding: 4.5rem 0;
}

.hero-copy,
.section-copy,
.lead-copy,
.panel-heading p,
.interview-subtitle,
.field-help,
.chat-status,
.typing-label,
.info-card p,
.footer-copy {
    color: var(--muted);
    line-height: 1.75;
}

.hero-copy,
.lead-copy,
.section-copy {
    max-width: 62ch;
    font-size: 1.02rem;
}

.hero-card,
.hero-aside,
.glass-card,
.info-card,
.simple-page-shell,
.simple-hero-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2rem;
}

.hero-actions {
    margin: 2rem 0 1.25rem;
}

.hero-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.summary-item {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.summary-item strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.hero-aside {
    padding: 2rem;
    height: 100%;
}

.hero-aside-title {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.hero-list {
    display: grid;
    gap: 0.8rem;
    margin: 0;
    padding-left: 1.15rem;
    color: var(--muted);
}

.hero-list li {
    padding-left: 0.2rem;
}

.section-intro {
    max-width: 760px;
    margin-bottom: 2rem;
}

.glass-card {
    padding: 1.5rem;
    height: 100%;
}

.panel-heading {
    margin-bottom: 1.25rem;
}

.panel-heading h3 {
    margin: 0 0 0.35rem;
    font-size: 1.9rem;
}

.form-stack,
.field-shell {
    display: grid;
    gap: 0.5rem;
}

.form-stack {
    gap: 1rem;
}

.form-label {
    margin-bottom: 0;
    font-weight: 800;
    color: var(--text);
}

.form-control,
.form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    padding: 0.95rem 1rem;
}

.form-control::placeholder {
    color: #8a99ac;
}

.form-control:focus,
.form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.12);
}

textarea.form-control {
    resize: vertical;
}

.alert-danger {
    border-radius: var(--radius-md);
    background: var(--danger-bg);
    border: 1px solid var(--danger-line);
    color: #9f1239;
}

.interview-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
}

.interview-header,
.chat-toolbar,
.chat-actions {
    display: flex;
    gap: 1rem;
}

.interview-header,
.chat-toolbar {
    justify-content: space-between;
    align-items: flex-start;
}

.interview-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.interview-title {
    color: var(--text);
}

.chat-toolbar {
    align-items: center;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.chat-status {
    margin: 0;
}

.processing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--brand);
    font-weight: 700;
    white-space: nowrap;
}

.processing-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: var(--brand);
    animation: pulse 1.4s infinite;
}

.chat-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 360px;
    max-height: 640px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.chat-bubble {
    max-width: min(100%, 42rem);
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble.assistant {
    align-self: flex-start;
    background: var(--success-bg);
    border: 1px solid var(--success-line);
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--user-bg);
    border: 1px solid var(--user-line);
}

.chat-meta {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.typing-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 0.95rem;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.typing-bubble span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--brand);
    animation: bounce 1.2s infinite ease-in-out;
}

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

.typing-bubble span:nth-child(3) {
    animation-delay: 0.3s;
}

.chat-actions {
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

#candidate-message {
    min-height: 140px;
}

#end-interview-btn {
    color: var(--text);
    background: #fff;
    border-color: var(--line-strong);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.info-card {
    padding: 1.5rem;
    height: 100%;
}

.info-card h2,
.info-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.45rem;
}

.simple-page {
    min-height: 65vh;
}

.simple-page-shell {
    padding: 2rem;
}

.simple-hero-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.simple-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.site-footer {
    background: #fff;
    border-top: 1px solid var(--line);
}

.footer-title {
    max-width: 12ch;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.footer-heading {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-links li + li {
    margin-top: 0.65rem;
}

.footer-links a,
.site-footer a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover,
.site-footer a:hover {
    color: var(--brand);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.28);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

@keyframes bounce {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.65;
    }

    40% {
        transform: translateY(-0.25rem);
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .display-title {
        max-width: none;
    }

    .hero-summary,
    .feature-grid,
    .simple-grid {
        grid-template-columns: 1fr 1fr;
    }

    .navbar-collapse {
        margin-top: 1rem;
        padding: 0.9rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        background: #fff;
    }
}

@media (max-width: 767.98px) {
    .hero-section,
    .simulator-section,
    .content-section,
    .simple-page {
        padding: 3rem 0;
    }

    .hero-card,
    .hero-aside,
    .glass-card,
    .info-card,
    .simple-page-shell,
    .simple-hero-card {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .hero-actions {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .hero-actions .btn,
    .chat-actions .btn,
    #end-interview-btn {
        width: 100%;
    }

    .hero-summary,
    .feature-grid,
    .simple-grid {
        grid-template-columns: 1fr;
    }

    .interview-header,
    .chat-toolbar,
    .chat-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .chat-feed {
        min-height: 280px;
        max-height: 520px;
    }
}
