:root,
[data-theme="dark"] {
    --bg: #07080d;
    --bg-elevated: #0e1017;
    --bg-card: #131620;
    --bg-card-hover: #181c28;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f5f7fa;
    --text-muted: #9ca3b5;
    --accent: #e11d48;
    --accent-dark: #aa012a;
    --accent-soft: rgba(225, 29, 72, 0.14);
    --accent-text: #fda4af;
    --cyan: #22d3ee;
    --emerald: #10b981;
    --nav-bg: rgba(7, 8, 13, 0.85);
    --terminal-bg: #0b0d14;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    --radius: 18px;
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.2);
    --text: #0f172a;
    --text-muted: #475569;
    --accent: #be123c;
    --accent-dark: #9f1239;
    --accent-soft: rgba(190, 18, 60, 0.09);
    --accent-text: #9f1239;
    --cyan: #0284c7;
    --emerald: #059669;
    --nav-bg: rgba(248, 250, 252, 0.88);
    --terminal-bg: #0f172a;
    --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(var(--border) 1px, transparent 1px),
        radial-gradient(ellipse 80% 45% at 50% -10%, var(--accent-soft), transparent);
    background-size: 28px 28px, 100% 100%;
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

code, pre, .mono {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.06rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-select {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-cta {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--accent-dark);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.15s ease;
}

.nav-cta:hover {
    background: var(--accent);
}

.menu-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 16px 24px 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px 0;
}

/* Hero */
.hero {
    padding: 64px 0 44px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: center;
}

.hero-profile-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.hero-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: var(--shadow);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald);
    font-size: 0.84rem;
    font-weight: 600;
}

.status-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(1.25); }
}

.hero h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: 12px;
}

.hero .roles {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--accent-text);
    margin-bottom: 14px;
}

.hero .summary {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 24px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(170, 1, 42, 0.3);
}

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

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

/* Terminal Card */
.terminal-card {
    background: var(--terminal-bg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.terminal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
    display: flex;
    gap: 7px;
}

.terminal-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-amber { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
    font-size: 0.78rem;
    color: #9ca3b5;
}

.terminal-body {
    padding: 20px;
    font-size: 0.84rem;
    line-height: 1.75;
    color: #e2e8f0;
}

.t-prompt { color: #34d399; font-weight: 600; }
.t-key { color: #38bdf8; }
.t-val { color: #f8fafc; }
.t-accent { color: #fda4af; font-weight: 600; }

/* Stats Strip */
.bento-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 34px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Sections */
.section {
    padding: 52px 0;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.eyebrow {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-text);
    margin-bottom: 4px;
}

.section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-head p {
    color: var(--text-muted);
    font-size: 0.94rem;
}

/* Grids & Cards */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(225, 29, 72, 0.4);
}

/* Org Logo Presentation */
.org-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.org-logo-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    flex-shrink: 0;
    overflow: hidden;
}

.org-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.org-monogram {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-soft);
    border: 1px solid rgba(225, 29, 72, 0.35);
    color: var(--accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.timeline {
    position: relative;
    display: grid;
    gap: 18px;
    padding-left: 24px;
    border-left: 2px solid var(--border);
}

.timeline-card {
    position: relative;
}

.timeline-card::before {
    content: "";
    position: absolute;
    left: -31px;
    top: 28px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--bg);
}

.timeline-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.timeline-role {
    font-size: 1.12rem;
    font-weight: 700;
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
}

.timeline-org {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.timeline-org a:hover {
    color: var(--accent-text);
    text-decoration: underline;
}

.timeline-points {
    list-style: none;
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.91rem;
    margin-top: 10px;
}

.timeline-points li::before {
    content: "› ";
    color: var(--accent);
    font-weight: 700;
}

.verify-note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Featured Project */
.featured-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: center;
    background: linear-gradient(140deg, var(--accent-soft), var(--bg-card) 58%);
    border: 1px solid rgba(225, 29, 72, 0.38);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.featured-logo {
    width: 108px;
    height: 108px;
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(170, 1, 42, 0.35);
}

/* Filter Tabs & Badges */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-soft);
    border-color: rgba(225, 29, 72, 0.45);
    color: var(--accent-text);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.tag,
.skill-chip {
    font-size: 0.82rem;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.lang-badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    white-space: nowrap;
}

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

.link-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid var(--border);
}

.link-pill.primary {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
}

.form-group {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: inherit;
    font-size: 0.94rem;
}

.form-control:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

.form-status {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-status.ok { color: var(--emerald); }
.form-status.err { color: var(--accent); }

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 36px 0;
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

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

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

@media (max-width: 960px) {
    .hero-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .bento-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: inline-flex;
    }
}

@media (max-width: 680px) {
    .featured-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .featured-logo {
        margin: 0 auto;
    }
    .tag-row,
    .featured-actions {
        justify-content: center;
    }
}
