:root {
    color-scheme: dark;
    --bg: #050505;
    --panel: rgba(18, 18, 21, 0.76);
    --line: rgba(255, 255, 255, 0.1);
    --muted: #a1a1aa;
    --soft: #71717a;
    --text: #f4f4f5;
    --emerald: #34d399;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --rose: #fb7185;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 20% 6%, rgba(16, 185, 129, 0.12), transparent 28rem),
        radial-gradient(circle at 86% 22%, rgba(34, 211, 238, 0.09), transparent 30rem),
        linear-gradient(180deg, #050505 0%, #08080a 46%, #050505 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.08;
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 4px);
    mix-blend-mode: soft-light;
}

.section-shell {
    position: relative;
    padding: clamp(5rem, 8vw, 8.5rem) clamp(1rem, 4vw, 5rem);
    overflow: clip;
}

.section-shell::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
}

.container {
    width: min(100%, 1180px);
    margin-inline: auto;
}

.glass {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(24,24,27,0.78), rgba(10,10,12,0.72));
    box-shadow: 0 20px 80px rgba(0,0,0,0.28);
    backdrop-filter: blur(18px);
}

.hairline {
    border-color: var(--line);
}

.hero-title {
    max-width: 100%;
    font-size: clamp(2.35rem, 8vw, 6.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    overflow-wrap: normal;
}

.hero-kicker {
    font-size: clamp(1.65rem, 5vw, 4.5rem);
    line-height: 1;
    letter-spacing: 0;
}

.headline {
    font-size: clamp(2rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.subhead {
    font-size: clamp(1.85rem, 4.2vw, 3.6rem);
    line-height: 1;
    letter-spacing: 0;
}

.mono-label {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-link.is-active {
    color: var(--emerald);
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.28);
}

.mobile-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: max-height 260ms ease, opacity 220ms ease, transform 220ms ease;
}

.mobile-panel.is-open {
    max-height: 440px;
    opacity: 1;
    transform: translateY(0);
}

.skill-fill {
    transform-origin: left;
    transform: scaleX(0);
}

.terminal-output {
    scrollbar-width: thin;
    scrollbar-color: #3f3f46 transparent;
}

.terminal-output::-webkit-scrollbar {
    width: 7px;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 999px;
}

.svg-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.progress-bar {
    transform-origin: left;
    transform: scaleX(0);
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: 84px;
    }

    .section-shell {
        padding-block: 4.75rem;
    }

    .hero-title {
        font-size: clamp(2.35rem, 12.8vw, 3.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .skill-fill,
    .progress-bar {
        transform: none;
    }
}

/* Terminal Status Indicators */
.status-line {
    min-height: 1.5em;
}

.status-thinking {
    color: #f59e0b;
}

.status-typing {
    color: #34d399;
}

.status-dot {
    display: inline;
    animation: statusDotPulse 1.4s infinite ease-in-out;
}

.status-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.status-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes statusDotPulse {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

/* Fullscreen Terminal Mode */
.terminal-wrapper.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    margin: 0 !important;
    border-radius: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    display: flex;
    flex-direction: column;
    padding: 1.5rem !important;
    background: #050505 !important;
}

.terminal-wrapper.is-fullscreen .terminal-output {
    flex: 1;
    height: auto !important;
    max-height: none !important;
}

