/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:          #000000;
    --surface:     #080808;
    --border:      rgba(0, 255, 135, 0.12);
    --border-dim:  rgba(0, 255, 135, 0.06);
    --text:        #e0ffe0;
    --muted:       #4a6a4a;
    --accent:      #00ff87;
    --accent-dim:  rgba(0, 255, 135, 0.08);
    --accent-glow: rgba(0, 255, 135, 0.25);
    --red:         #ff4466;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Scanline CRT overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.018) 2px,
        rgba(0, 0, 0, 0.018) 4px
    );
    pointer-events: none;
    z-index: 9990;
}

/* ── Custom cursor ── */
@media (pointer: fine) {
    body, a, button, .skill-tag { cursor: none; }
}

.cursor-dot,
.cursor-ring {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.cursor-ring {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(0, 255, 135, 0.5);
    z-index: 9998;
    transition: width 0.2s, height 0.2s, border-color 0.2s;
}

.cursor-ring.hover {
    width: 40px;
    height: 40px;
    border-color: var(--accent);
}

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* ── Atmospheric background (depth-0 / depth-1) ── */
.scene-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0,255,135,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.orb-1 {
    width: 650px;
    height: 650px;
    top: -250px;
    right: -150px;
    background: radial-gradient(circle, rgba(0,255,135,0.05) 0%, transparent 65%);
    filter: blur(70px);
    animation: orb-drift-1 22s ease-in-out infinite;
}

.orb-2 {
    width: 450px;
    height: 450px;
    bottom: 10%;
    left: -180px;
    background: radial-gradient(circle, rgba(0,255,135,0.035) 0%, transparent 65%);
    filter: blur(60px);
    animation: orb-drift-2 28s ease-in-out infinite;
}

.orb-3 {
    width: 280px;
    height: 280px;
    top: 50%;
    right: 8%;
    background: radial-gradient(circle, rgba(0,255,135,0.025) 0%, transparent 65%);
    filter: blur(50px);
    animation: orb-drift-3 18s ease-in-out infinite;
}

@keyframes orb-drift-1 {
    0%,100% { transform: translate(0,0); }
    33%      { transform: translate(-35px, 45px); }
    66%      { transform: translate(20px, -25px); }
}
@keyframes orb-drift-2 {
    0%,100% { transform: translate(0,0); }
    50%      { transform: translate(45px, -35px); }
}
@keyframes orb-drift-3 {
    0%,100% { transform: translate(0,0); }
    40%      { transform: translate(-18px, 28px); }
    80%      { transform: translate(14px, -14px); }
}

/* ── Nav ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 56px;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-dim);
}

.nav-logo {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-logo .prompt { color: var(--muted); font-weight: 400; }

.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.88rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.nav-links a::before { content: '//'; margin-right: 0.3em; opacity: 0.4; }

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

.nav-links a.active::before { opacity: 1; }

/* ── Sections ── */
section {
    max-width: 740px;
    margin: 0 auto;
    padding: 96px 5% 56px;
}

.section-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 2rem;
    display: inline-block;
    transform-origin: left center;
}

.section-label::before {
    content: '// ';
    color: var(--accent);
    font-weight: 700;
}

/* ── Hero ── */
#hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    min-height: calc(100vh - 56px);
    justify-content: center;
    padding-top: 56px;
    position: relative;
}

.hero-prompt {
    font-size: 1rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.hero-prompt .prompt-char { color: var(--accent); }

/* depth-3: avatar */
.hero-avatar-wrap {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 0.5rem;
}

.avatar-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,255,135,0.18) 0%, transparent 70%);
    filter: blur(16px);
    animation: glow-pulse 3.5s ease-in-out infinite;
    z-index: 0;
}

.profile-pic {
    position: relative;
    z-index: 1;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent);
    display: block;
    animation: float-loop 8s ease-in-out infinite;
    filter: saturate(0.7) brightness(0.9);
    will-change: transform;
}

.profile-pic:hover {
    filter: saturate(1) brightness(1);
    transition: filter 0.4s ease;
}

@keyframes float-loop {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

@keyframes glow-pulse {
    0%,100% { opacity: 0.4; transform: translate(-50%,-50%) scale(1); }
    50%      { opacity: 0.9; transform: translate(-50%,-50%) scale(1.2); }
}

/* depth-4: hero text */
.hero-name {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #ffffff;
    min-height: 1.2em;
}

.blink-cursor {
    display: inline-block;
    color: var(--accent);
    font-weight: 300;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%,100% { opacity: 1; }
    50%      { opacity: 0; }
}

.hero-tagline {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 440px;
    line-height: 1.8;
    letter-spacing: 0.01em;
}

.hero-tagline .hl { color: var(--text); }
.hero-tagline .hl-accent { color: var(--accent); }

.hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    opacity: 0;
}

.scroll-hint-label {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.scroll-hint-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-line 2.2s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes scroll-line {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    font-weight: 700;
}

.btn-primary:hover {
    background: #33ffaa;
    box-shadow: 0 0 16px var(--accent-glow);
}

.btn-ghost {
    border: 1px solid var(--border);
    color: var(--accent);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 12px var(--accent-dim);
}

.btn::before { content: '> '; opacity: 0.5; }

/* ── Divider ── */
.divider {
    border: none;
    border-top: 1px solid var(--border-dim);
    max-width: 740px;
    margin: 0 auto;
}

/* ── About ── */
#about p {
    font-size: 1rem;
    color: #8aaa8a;
    line-height: 1.9;
    margin-bottom: 0.9rem;
    letter-spacing: 0.01em;
}

#about p:last-child { margin-bottom: 0; }

/* ── Skills — terminal tag style ── */
.skill-group { margin-bottom: 1.5rem; }
.skill-group:last-child { margin-bottom: 0; }

.skill-group-label {
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}

.skill-group-label::before { content: '> '; color: var(--accent); }

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 0.35rem 0.65rem;
    background: var(--accent-dim);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    letter-spacing: 0.02em;
}

.skill-tag::before { content: '['; opacity: 0.45; margin-right: 0.2em; }
.skill-tag::after  { content: ']'; opacity: 0.45; margin-left: 0.2em; }

.skill-tag:hover {
    border-color: var(--accent);
    background: rgba(0,255,135,0.12);
    box-shadow: 0 0 10px var(--accent-dim);
}

/* ── Vibe Coding ── */
.vibe-terminal {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    overflow: hidden;
}

.vibe-terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-dim);
    background: rgba(0,255,135,0.03);
}

.term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.term-dot-red    { background: #ff5f57; }
.term-dot-yellow { background: #febc2e; }
.term-dot-green  { background: #28c840; }

.term-title {
    font-size: 0.68rem;
    color: var(--muted);
    margin-left: 0.5rem;
    letter-spacing: 0.06em;
}

.vibe-terminal-body {
    padding: 1.25rem 1.5rem;
    font-size: 0.92rem;
    line-height: 1.9;
    color: #5a7a5a;
}

.term-line { display: block; }
.term-line .p  { color: var(--muted); user-select: none; }
.term-line .cmd { color: #ffffff; }
.term-line .out { color: #5a7a5a; padding-left: 1.2em; }
.term-line .hl  { color: var(--accent); }
.term-line .dim { color: var(--muted); opacity: 0.6; }
.term-line.gap  { margin-top: 0.4rem; }

.vibe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.vibe-tag {
    font-size: 0.85rem;
    color: var(--accent);
    border: 1px solid rgba(0,255,135,0.3);
    border-radius: 2px;
    padding: 0.3rem 0.6rem;
    background: rgba(0,255,135,0.06);
    letter-spacing: 0.03em;
    text-decoration: none;
}

.vibe-tag-link:hover {
    border-color: var(--accent);
    background: rgba(0,255,135,0.14);
    box-shadow: 0 0 10px var(--accent-dim);
}

.vibe-tag-link::after { content: ' ↗'; font-size: 0.65rem; opacity: 0.6; }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
    display: grid;
    grid-template-columns: 1px 1fr;
    gap: 0 1.5rem;
    padding-bottom: 2.25rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-line {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: var(--bg);
    flex-shrink: 0;
    margin-top: 5px;
    transition: background 0.2s, box-shadow 0.2s;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.timeline-track {
    flex: 1;
    width: 1px;
    background: var(--border-dim);
    margin-top: 5px;
}

.timeline-item:last-child .timeline-track { display: none; }

.timeline-content { padding-bottom: 0.25rem; }

.timeline-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
    letter-spacing: 0.04em;
}

.timeline-meta::before { content: '// '; color: var(--accent); opacity: 0.6; }

.timeline-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.15rem;
    letter-spacing: -0.01em;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 0.55rem;
    font-weight: 500;
    opacity: 0.8;
}

.timeline-desc {
    font-size: 0.95rem;
    color: #5a7a5a;
    line-height: 1.75;
}

/* ── Timeline: grouped company block (promotions) ── */
.timeline-group .timeline-dot.main { background: var(--accent); }

.timeline-company-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.1rem;
    letter-spacing: -0.01em;
}

.timeline-range {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.timeline-role {
    position: relative;
    padding-left: 0.4rem;
    margin-bottom: 1.4rem;
}

.timeline-role:last-child { margin-bottom: 0; }

/* sub-dot sitting on the vertical track */
.timeline-role::before {
    content: '';
    position: absolute;
    left: calc(-1.5rem - 4.5px);
    top: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--muted);
    background: var(--bg);
    z-index: 1;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* horizontal connector from track to role text */
.timeline-role::after {
    content: '';
    position: absolute;
    left: calc(-1.5rem + 3px);
    top: 9px;
    width: calc(1.5rem - 8px);
    height: 1px;
    background: var(--border-dim);
}

.timeline-role.current::before,
.timeline-role.head::before { border-color: var(--accent); }

.timeline-role.current::before { background: var(--accent); }

.timeline-role:hover::before {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.timeline-promoted { color: var(--accent); opacity: 0.9; }

/* ── Contact ── */
#contact { padding-bottom: 96px; }

#contact > p {
    font-size: 1rem;
    color: #6a8a6a;
    line-height: 1.8;
    letter-spacing: 0.01em;
}

.contact-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    opacity: 1 !important;
    transform: none !important;
}

/* ── Footer ── */
footer {
    text-align: center;
    padding: 1.75rem 5%;
    border-top: 1px solid var(--border-dim);
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.06em;
}

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

/* ── Hamburger button ── */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    nav { padding: 0 1.25rem; }

    .nav-toggle { display: block; }

    .nav-links {
        display: none;
        position: fixed;
        top: 56px;
        left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(0, 0, 0, 0.97);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 0;
        z-index: 99;
    }

    .nav-links.open { display: flex; }

    .nav-links li { width: 100%; }

    .nav-links a {
        display: block;
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
        border-bottom: 1px solid var(--border-dim);
    }

    .nav-links li:last-child a { border-bottom: none; }

    .nav-links a::before { content: '//'; margin-right: 0.5em; opacity: 0.4; }

    section { padding: 72px 1.25rem 48px; }

    #hero {
        min-height: auto;
        padding-top: 72px;
    }

    .hero-name { font-size: 1.8rem; }
    .scroll-hint { display: none; }
}

/* ═══════════════════════════════════════════════
   Pill choice gateway (Matrix intro)
   ═══════════════════════════════════════════════ */
.pill-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    transition: opacity 0.6s ease;
}

.pill-gate.hidden {
    opacity: 0;
    pointer-events: none;
}

body.gate-open { overflow: hidden; }

/* Show the real cursor over the gate (custom cursor sits behind it) */
.pill-gate,
.pill-gate * { cursor: default; }
.pill-gate .pill { cursor: pointer; }

/* Faint matrix-green rain wash behind the choice */
.pill-rain {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(0, 255, 135, 0.06), transparent 60%),
        repeating-linear-gradient(90deg, transparent, transparent 22px, rgba(0, 255, 135, 0.03) 22px, rgba(0, 255, 135, 0.03) 23px);
    animation: pill-drift 12s linear infinite;
    pointer-events: none;
}

@keyframes pill-drift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 0, 0 400px; }
}

.pill-inner {
    position: relative;
    text-align: center;
    padding: 2rem;
    max-width: 640px;
    animation: pill-fade-in 0.9s ease both;
}

@keyframes pill-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pill-prompt {
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
    opacity: 0.8;
}

.pill-line {
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 2.6rem;
    text-shadow: 0 0 18px rgba(0, 255, 135, 0.25);
}

.pill-choices {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 1.6rem 1.8rem;
    min-width: 190px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    color: var(--text);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pill-cap {
    display: block;
    width: 88px;
    height: 34px;
    border-radius: 17px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Two-tone capsule look */
.pill-red .pill-cap {
    background: linear-gradient(135deg, #ff4466 0%, #ff4466 50%, #b31537 50%, #b31537 100%);
    box-shadow: 0 0 16px rgba(255, 68, 102, 0.35);
}

.pill-blue .pill-cap {
    background: linear-gradient(135deg, #4488ff 0%, #4488ff 50%, #1a4fb3 50%, #1a4fb3 100%);
    box-shadow: 0 0 16px rgba(68, 136, 255, 0.35);
}

.pill-cap::after {
    content: '';
    position: absolute;
    inset: 6px 14px auto 14px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.35);
}

.pill-label {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.pill-sub {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.pill-red:hover,
.pill-red:focus-visible {
    border-color: var(--red);
    box-shadow: 0 0 26px rgba(255, 68, 102, 0.25);
    transform: translateY(-4px);
    outline: none;
}
.pill-red:hover .pill-cap,
.pill-red:focus-visible .pill-cap {
    transform: scale(1.06);
    box-shadow: 0 0 26px rgba(255, 68, 102, 0.6);
}

.pill-blue:hover,
.pill-blue:focus-visible {
    border-color: #4488ff;
    box-shadow: 0 0 26px rgba(68, 136, 255, 0.25);
    transform: translateY(-4px);
    outline: none;
}
.pill-blue:hover .pill-cap,
.pill-blue:focus-visible .pill-cap {
    transform: scale(1.06);
    box-shadow: 0 0 26px rgba(68, 136, 255, 0.6);
}

@media (max-width: 560px) {
    .pill-line { font-size: 1.05rem; }
    .pill-choices { gap: 1rem; }
    .pill { min-width: 150px; padding: 1.3rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pill-rain { animation: none; }
    .pill-inner { animation: none; }
}
