:root {
    color-scheme: light dark;
    --bg: #0f172a;
    --card: #ffffff;
    --card-dark: #1e293b;
    --text: #0f172a;
    --muted: #475569;
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.08);
    --border: rgba(15, 23, 42, 0.1);
    --cli-bg: #050912;
    --cli-text: #e2e8f0;
    --header-height: 88px;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html,
body {
    margin: 0;
    background: #f8fafc;
    color: var(--text);
    min-height: 100%;
}

body {
    transition: background 0.4s ease;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 3vw;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
}

.menu-toggle::before,
.menu-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--text);
    border-radius: 999px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.menu-toggle::before {
    width: 20px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.menu-toggle::after {
    width: 2px;
    height: 20px;
    transform: translate(-50%, -50%);
}

.menu-toggle.open::before,
.menu-toggle.open::after {
    width: 20px;
    height: 2px;
}

.menu-toggle.open::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.menu-toggle.open::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
}

.name {
    font-weight: 600;
    margin: 0;
}

.title {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-weight: 500;
    flex: 1;
    justify-content: center;
}

.site-nav a {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: var(--text);
}

.site-nav a:hover {
    background: var(--accent-soft);
}

.mode-toggle {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #1d4ed8;
    color: white;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.mode-toggle:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

main {
    padding: 3rem 3vw 4rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.web-view {
    scroll-margin-top: calc(var(--header-height) + 16px);
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    background: linear-gradient(135deg, #eef2ff, #fefce8);
    padding: 2.5rem;
    border-radius: 32px;
    border: 1px solid var(--border);
}

.hero-content h1 {
    margin-top: 0.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-card {
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    border: 1px solid var(--border);
}

.stat-label {
    text-transform: uppercase;
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin: 0;
}

.stat-value {
    margin: 0.35rem 0 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.stat-sub {
    margin: 0;
    color: var(--muted);
}

.card {
    background: var(--card);
    border-radius: 28px;
    padding: 2.25rem;
    border: 1px solid var(--border);
    box-shadow: 0 15px 55px rgba(15, 23, 42, 0.06);
}

.glow-focus {
    animation: focusGlaze 1.4s ease-out;
}

@keyframes focusGlaze {
    0% {
        box-shadow: 0 0 0 rgba(79, 70, 229, 0);
        transform: translateY(-3px);
    }
    20% {
        box-shadow: 0 20px 45px rgba(79, 70, 229, 0.25);
        transform: translateY(-6px);
    }
    100% {
        box-shadow: 0 15px 55px rgba(15, 23, 42, 0.06);
        transform: translateY(0);
    }
}

.section-heading {
    margin-bottom: 1rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.25rem;
}

.pill-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pill-list li {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-weight: 500;
}

.timeline article + article {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.role {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.company {
    margin: 0.25rem 0 1rem;
    color: var(--muted);
}

.timeline ul {
    padding-left: 1.2rem;
    margin: 0;
    color: #1f2937;
}

.list {
    margin: 0;
    padding-left: 1.2rem;
    color: #1f2937;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.education-grid article {
    padding: 1rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.contact-card {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.35rem;
}

.contact-cta {
    background: #0f172a;
    color: white;
    padding: 1.5rem;
    border-radius: 20px;
    flex: 1;
    min-width: 240px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.2);
    text-decoration: none;
}

.site-footer {
    text-align: center;
    padding: 3rem 1rem 4rem;
    color: var(--muted);
}

/* CLI Mode */
.cli-view {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background: var(--cli-bg);
    color: var(--cli-text);
    padding: 2rem;
    border-radius: 28px;
    border: 1px solid #172554;
    font-family: 'Space Mono', monospace;
    min-height: 60vh;
}

.cli-banner {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #38bdf8;
}

.cli-output {
    flex: 1;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 18px;
    padding: 1.5rem;
    overflow-y: auto;
    border: 1px solid #1d4ed8;
}

.cli-output .line {
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
}

.line.input {
    color: #a5b4fc;
}

.line.response {
    color: #e2e8f0;
}

.line.system {
    color: #67e8f9;
}

.cli-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cli-form label {
    color: #38bdf8;
    font-size: 0.9rem;
}

.cli-form input {
    background: transparent;
    border: none;
    border-bottom: 2px solid #1d4ed8;
    padding: 0.5rem 0;
    color: var(--cli-text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.cli-form input::placeholder {
    color: rgba(226, 232, 240, 0.5);
}

.mode-cli {
    background: #010409;
    color: var(--cli-text);
}

.mode-cli main {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    gap: 0;
}

.mode-cli .site-header {
    background: rgba(1, 4, 9, 0.95);
    border-color: #1d4ed8;
}

.mode-cli .mode-toggle {
    background: #020617;
    color: var(--cli-text);
    border-color: #1d4ed8;
}

.mode-cli .mode-toggle:hover {
    background: #1d4ed8;
    color: white;
}

.mode-cli .web-view {
    display: none;
}

.mode-cli .cli-view {
    display: flex;
    width: 100%;
    border-radius: 0;
    border: none;
    min-height: calc(100vh - var(--header-height));
    margin: 0;
}

.mode-cli .site-footer {
    display: none;
}

@media (max-width: 600px) {
    main {
        padding: 2rem 5vw 3rem;
    }

    .hero,
    .card,
    .cli-view {
        padding: 1.75rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 1rem;
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 1rem;
        flex-direction: column;
        flex: none;
        justify-content: flex-start;
        width: min(260px, calc(100vw - 2rem));
        box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
        display: none;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        background-clip: padding-box;
        z-index: 120;
    }

    .site-nav.open {
        display: flex;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

}
.counter-major {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    padding: 0 0.35rem;
    font-size: 1.4rem;
}

.counter-major small {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.counter-time {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.08);
    font-family: 'Space Mono', monospace;
    font-weight: 600;
}
