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

:root {
    --bg: #0a0f1c;
    --surface: #0f1830;
    --surface-2: #142140;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f2f4f8;
    --muted: rgba(242, 244, 248, 0.68);
    --accent: #6f9ee0;
    --accent-deep: #3b5fa0;
    --gold: #d4a94e;
    --gold-soft: rgba(212, 169, 78, 0.14);

    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.45);
    --shadow-elevated: 0 20px 50px rgba(0, 0, 0, 0.55);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 12% -8%, rgba(111, 158, 224, 0.09), transparent 42%),
        radial-gradient(circle at 100% 0%, rgba(212, 169, 78, 0.07), transparent 40%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: "Plus Jakarta Sans", "Segoe UI", "Helvetica Neue", sans-serif;
}

p {
    line-height: 1.65;
}

::selection {
    background: rgba(212, 169, 78, 0.35);
    color: #fff;
}

/* Scroll-reveal: progressively enhanced, no-op without JS or with reduced motion */
.js-reveal .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.js-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.row.g-4 > *:nth-child(1) { --reveal-delay: 0ms; }
.row.g-4 > *:nth-child(2) { --reveal-delay: 70ms; }
.row.g-4 > *:nth-child(3) { --reveal-delay: 140ms; }
.row.g-4 > *:nth-child(4) { --reveal-delay: 210ms; }
.row.g-4 > *:nth-child(5) { --reveal-delay: 280ms; }
.row.g-4 > *:nth-child(6) { --reveal-delay: 350ms; }
.row.g-4 > *:nth-child(7) { --reveal-delay: 420ms; }

/* Accessibility: skip link + visible focus states */
.skip-link {
    position: absolute;
    top: -48px;
    left: 1rem;
    z-index: 2000;
    background: var(--accent);
    color: #051022;
    font-weight: 700;
    padding: 0.6rem 1rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    color: #051022;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

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

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

a:hover {
    color: var(--gold);
}

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

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

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

.site-navbar .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--text) !important;
    background-color: var(--gold-soft);
}

.site-footer {
    border-top: 1px solid var(--border);
    background-color: rgba(7, 11, 22, 0.96);
}

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

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

.footer-link:hover {
    color: var(--gold);
}

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

.hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 85% 0%, rgba(212, 169, 78, 0.08), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(111, 158, 224, 0.08), transparent 50%),
        var(--surface);
    box-shadow: var(--shadow-elevated);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: clamp(1.5rem, 2.5vw, 3rem);
}

/* AI accent: gradient text */
@keyframes gradient-flow {
    to {
        background-position: 200% 50%;
    }
}

.text-gradient-ai {
    background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent-deep));
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-flow 6s linear infinite;
}

/* AI pill (opens chat widget) */
.ai-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gold-soft);
    border: 1px solid rgba(212, 169, 78, 0.4);
    border-radius: 999px;
    padding: 0.42rem 0.9rem 0.42rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.ai-pill:hover {
    border-color: rgba(212, 169, 78, 0.75);
    transform: translateY(-1px);
}

.ai-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 rgba(212, 169, 78, 0.55);
    animation: ai-pulse 2.2s infinite;
    flex-shrink: 0;
}

@keyframes ai-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 169, 78, 0.55);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(212, 169, 78, 0);
    }
}

.btn-ai {
    border: 1px solid rgba(212, 169, 78, 0.5);
    color: var(--text);
    background: var(--gold-soft);
}

.btn-ai:hover {
    background: rgba(212, 169, 78, 0.22);
    border-color: rgba(212, 169, 78, 0.85);
    color: var(--text);
    transform: translateY(-1px);
}

.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(212, 169, 78, 0.75);
    box-shadow:
        0 0 0 6px rgba(212, 169, 78, 0.18),
        0 14px 30px rgba(0, 0, 0, 0.5);
}

.hero-stats {
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.hero-stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.1;
}

.hero-stat-label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
}

.pill {
    display: inline-block;
    background-color: rgba(59, 95, 160, 0.22);
    border: 1px solid rgba(111, 158, 224, 0.4);
    color: #dce8fb;
    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);
    transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.project-card:hover {
    border-color: rgba(212, 169, 78, 0.5);
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevated);
}

.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;
}

.project-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px;
}

.project-logo-lg {
    width: 56px;
    height: 56px;
}

.project-logo-inline {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 5px;
    vertical-align: -4px;
    margin-right: 0.3rem;
}

.stack-badge {
    background-color: rgba(59, 95, 160, 0.22);
    border: 1px solid rgba(111, 158, 224, 0.5);
    color: #dce8fb;
    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;
}

/* Founder / venture elements */
.founder-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--gold-soft);
    border: 1px solid rgba(212, 169, 78, 0.4);
    border-radius: 999px;
    padding: 0.38rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.founder-badge a {
    color: var(--gold);
    text-decoration: none;
}

.founder-badge a:hover {
    color: #e8c877;
}

.founder-tag {
    background: linear-gradient(135deg, rgba(212, 169, 78, 0.22), rgba(59, 95, 160, 0.24));
    border: 1px solid rgba(212, 169, 78, 0.45);
    color: #f0dfb0;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.7rem;
    text-transform: uppercase;
}

.venture-highlight-card {
    background: linear-gradient(135deg, var(--surface) 60%, rgba(212, 169, 78, 0.07));
    border: 1px solid rgba(212, 169, 78, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.75rem;
    box-shadow: 0 6px 24px rgba(212, 169, 78, 0.1), var(--shadow-soft);
    transition: border-color var(--transition-base);
}

.venture-highlight-card:hover {
    border-color: rgba(212, 169, 78, 0.55);
}

.venture-inline-card {
    background: linear-gradient(135deg, var(--surface-2) 60%, rgba(212, 169, 78, 0.07));
    border: 1px solid rgba(212, 169, 78, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    transition: border-color var(--transition-base);
}

.venture-inline-card:hover {
    border-color: rgba(212, 169, 78, 0.55);
}

.venture-title-link {
    color: var(--gold) !important;
    font-weight: 700;
}

.venture-title-link:hover {
    color: #e8c877 !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(212, 169, 78, 0.7);
    box-shadow: 0 0 0 4px rgba(212, 169, 78, 0.16), 0 10px 20px rgba(0, 0, 0, 0.4);
}

.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;
}

.hp-field-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-control::placeholder {
    color: rgba(242, 244, 248, 0.8);
}

.form-control:focus {
    background-color: var(--surface-2);
    color: var(--text);
    border-color: rgba(111, 158, 224, 0.75);
    box-shadow: 0 0 0 0.18rem rgba(111, 158, 224, 0.28);
}

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

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

.page-link:hover {
    background-color: var(--surface-2);
    color: var(--text);
    border-color: rgba(212, 169, 78, 0.5);
}

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

.btn {
    transition: background-color var(--transition-base), border-color var(--transition-base), color var(--transition-base), transform var(--transition-base);
}

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

.btn-primary:hover {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #14100a;
    transform: translateY(-1px);
}

.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.08);
    border-color: rgba(212, 169, 78, 0.55);
    color: var(--text);
    transform: translateY(-1px);
}

.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(212, 169, 78, 0.6);
    box-shadow: 0 0 0 1px rgba(212, 169, 78, 0.22), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.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(111, 158, 224, 0.5) !important;
    background-color: var(--surface);
    box-shadow: var(--shadow-elevated), 0 0 24px rgba(111, 158, 224, 0.16);
}

.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-deep);
    color: #f2f4f8;
    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: var(--gold);
    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(111, 158, 224, 0.75);
}

#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));
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
