/* devarber.dev — celestial night */
:root {
    --bg: #070b14;
    --bg-elev: #121a2a;
    --bg-soft: #182236;
    --bg-nav: rgba(7, 11, 20, 0.82);
    --text: #e8eef7;
    --muted: #8b9bb4;
    --faint: #5c6b82;
    --star: #7eb8c9;
    --gold: #c9a86c;
    --moon: #f2e9d8;
    --line: rgba(126, 184, 201, 0.2);
    --ok: #8fbf88;
    --danger: #d98989;
    --shadow: rgba(0, 0, 0, 0.35);
    --font-sans: "Outfit", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --moon-scale: 1;
    --constellation-opacity: 0.35;
    --radius: 14px;
}

html[data-mode="l"] {
    --star: #c5d9e6;
    --gold: #e4d5b3;
    --moon: #fff6e8;
    --bg-elev: #101820;
    --moon-scale: 1.55;
}

html.sky-name .sky-moon {
    box-shadow:
        0 0 70px rgba(255, 246, 232, 0.5),
        0 0 160px rgba(201, 168, 108, 0.32);
    filter: brightness(1.12);
}

html.light {
    --bg: #eef2f7;
    --bg-elev: #ffffff;
    --bg-soft: #f7f4ee;
    --bg-nav: rgba(238, 242, 247, 0.88);
    --text: #1b2434;
    --muted: #5b6b82;
    --faint: #8a97ab;
    --star: #3d7a8c;
    --gold: #9a7a3a;
    --moon: #c9a86c;
    --line: rgba(27, 36, 52, 0.12);
    --shadow: rgba(27, 36, 52, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    overflow-x: hidden;
    min-height: 100vh;
}
::selection { background: var(--gold); color: var(--bg); }
strong { color: var(--gold); font-weight: 600; }
a { color: var(--star); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--gold); }

#skyCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.sky-moon {
    position: fixed;
    top: 7.5rem;
    right: 8%;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: auto;
    cursor: pointer;
    transform-origin: center;
    transition: box-shadow 0.7s ease, filter 0.4s ease;
    background:
        radial-gradient(circle at 32% 32%, #fff 0%, var(--moon) 38%, #d4c4a8 72%, #b7a48a 100%);
    box-shadow:
        0 0 40px rgba(242, 233, 216, 0.25),
        0 0 90px rgba(201, 168, 108, 0.12);
}
html[data-mode="l"] .sky-moon {
    box-shadow:
        0 0 60px rgba(255, 246, 232, 0.45),
        0 0 140px rgba(201, 168, 108, 0.28);
}
html.light .sky-moon {
    opacity: 0.55;
    filter: saturate(0.8);
}
.sky-moon::after {
    content: "";
    position: absolute;
    inset: 18% 22% auto auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(120, 100, 80, 0.18);
}

#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    z-index: 1001;
    background: linear-gradient(90deg, var(--gold), var(--star));
}

.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
}
.nav-logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.nav-logo:hover { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 1.35rem; }
.nav-links a {
    color: var(--faint);
    font-size: 0.82rem;
    position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: var(--gold);
}
.nav-sep { color: var(--faint); user-select: none; opacity: 0.5; }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.35rem;
    cursor: pointer;
}
.lang-btn, .theme-btn {
    font-family: var(--font-mono);
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}
.lang-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.7rem;
}
.lang-btn:hover { color: var(--star); border-color: var(--star); }
.lang-btn.active {
    background: var(--star);
    color: var(--bg);
    border-color: var(--star);
}
.theme-btn {
    width: 32px; height: 32px;
    font-size: 0.95rem;
    display: grid;
    place-items: center;
}
.theme-btn:hover { color: var(--gold); border-color: var(--gold); }

.section {
    position: relative;
    z-index: 1;
    padding: 5rem 1.5rem;
    max-width: 880px;
    margin: 0 auto;
}
.section.terminal-section {
    padding-top: 1.4rem;
    padding-bottom: 3.6rem;
}
.section-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    letter-spacing: 0.01em;
}
.section-title::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--gold);
}
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}
.section-title.terminal-label::before { content: "$"; font-family: var(--font-mono); color: var(--star); }
.reveal { opacity: 0; transform: translateY(24px); transition: 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }
.title-text {
    display: inline-block;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
.reveal.visible .title-text { clip-path: inset(0 0 0 0); }

.hero-section {
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6.5rem 1.5rem 0;
    position: relative;
    z-index: 1;
}
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
}
.hero-avatar {
    width: 260px;
    height: 260px;
    margin: 0.7rem auto 0.25rem;
    padding: 0;
    background: transparent;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.28s forwards;
}
.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.nav-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: transparent;
    flex-shrink: 0;
    display: block;
}
.hero-greeting {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--star);
    margin-bottom: 0.65rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}
.hero-names {
    margin-bottom: 0.45rem;
}
.hero-name {
    font-size: clamp(2.1rem, 6vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 0;
    background: linear-gradient(135deg, var(--moon) 0%, var(--gold) 48%, var(--star) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.15s forwards;
    user-select: none;
}
.hero-name.handle {
    animation-delay: 0.22s;
    cursor: pointer;
}
.hero-title {
    font-size: 1.05rem;
    color: var(--muted);
    font-weight: 400;
    min-height: 1.6em;
    margin-bottom: 0.45rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    font-family: var(--font-mono);
}
.hero-title .cursor {
    border-right: 2px solid var(--star);
    margin-left: 2px;
    animation: blink 0.85s infinite;
}
.hero-title .cursor.typing { animation: none; }
.hero-loc {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 1.1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.38s forwards;
}
.hero-desc {
    font-size: 1.12rem;
    line-height: 1.75;
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 2.25rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.45s forwards;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.75rem;
    margin-bottom: 2.4rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.55s forwards;
    flex-wrap: wrap;
}
.hero-stat-num {
    font-size: 2.15rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--font-mono);
}
.hero-stat-label { font-size: 0.8rem; color: var(--faint); margin-top: 0.2rem; }
.hero-cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.65s forwards;
}
.btn {
    padding: 0.8rem 1.45rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: none;
    cursor: pointer;
    transition: 0.25s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold), #e0c58a);
    color: #1a1408;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201, 168, 108, 0.28); color: #1a1408; }
.btn-secondary {
    background: transparent;
    color: var(--star);
    border: 1px solid var(--star);
}
.btn-secondary:hover { background: rgba(126, 184, 201, 0.12); transform: translateY(-2px); }
.hero-social {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}
.hero-social a {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    display: grid;
    place-items: center;
    color: var(--muted);
}
.hero-social a:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-3px);
}
.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--faint);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    cursor: pointer;
    padding: 1rem 0 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1s forwards;
}
.scroll-down:hover { color: var(--gold); }
.scroll-down .chevron { animation: bounceArrow 1.6s infinite; }

.card, .about-content, .timeline-content, .firma-box, .edu-card, .contact-card, .tool-card, .now-card {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.about-content { padding: 1.75rem 1.85rem; }
.about-text { color: var(--muted); line-height: 1.8; font-size: 0.98rem; }
.about-text p { margin-bottom: 1rem; }
.about-text p:last-child { margin-bottom: 0; }

.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before {
    content: "";
    position: absolute;
    left: 6px; top: 0; bottom: 0;
    width: 1px;
    background: var(--line);
}
.timeline-item {
    position: relative;
    margin-bottom: 1.75rem;
    opacity: 0;
    transform: translateX(-16px);
    transition: 0.55s ease;
}
.timeline-item.visible { opacity: 1; transform: none; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.75rem;
    top: 1.15rem;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--star);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 1px var(--star);
}
.timeline-item.current::before { background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.timeline-content { padding: 1.35rem 1.45rem; }
.timeline-date { font-size: 0.75rem; color: var(--faint); font-family: var(--font-mono); margin-bottom: 0.35rem; }
.timeline-company { font-size: 1.05rem; margin-bottom: 0.2rem; }
.timeline-company .role { color: var(--star); font-weight: 500; }
.timeline-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin: 0.45rem 0 0.7rem; }
.timeline-bullets { list-style: none; }
.timeline-bullets li {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 0.35rem;
    padding-left: 1.05rem;
    position: relative;
}
.timeline-bullets li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--gold);
}

.firma-box {
    padding: 0;
    background: transparent;
    border: none;
}
.craft-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.craft-card {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
}
.craft-card.wide { grid-column: 1 / -1; }
.craft-card h3 {
    font-size: 1rem;
    margin-bottom: 0.55rem;
    color: var(--gold);
}
.craft-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.project-card {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    transition: 0.25s ease;
    color: inherit;
}
.music-dock {
    position: fixed;
    right: 1.4rem;
    bottom: 5.2rem;
    z-index: 1100;
    width: min(352px, calc(100vw - 2rem));
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.55rem 0.55rem 0.35rem;
    box-shadow: 0 16px 50px var(--shadow);
    display: none;
}
.music-dock.open { display: block; }
.music-dock iframe { border: 0; border-radius: 10px; width: 100%; height: 152px; }
.music-dock .music-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--faint);
    padding: 0 0.25rem 0.35rem;
}
.music-dock .music-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
}
.project-card.orbit {
    border-style: dashed;
    opacity: 0.85;
}
.project-card.orbit:hover { opacity: 1; }
.project-kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--star);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.project-card h3 { font-size: 1.2rem; }
.project-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; flex: 1; }
.project-stack { font-size: 0.75rem; color: var(--faint); font-family: var(--font-mono); }

.open-role {
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(201, 168, 108, 0.08), var(--bg-elev));
}
.firma-box p, .firma-box li {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
.firma-box p { margin-bottom: 1rem; }
.firma-box ul { list-style: none; }
.firma-box li { margin-bottom: 0.5rem; padding-left: 1.05rem; position: relative; }
.firma-box li::before { content: "▹"; position: absolute; left: 0; color: var(--gold); }
.health-grid { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; }
.health-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.health-bar {
    height: 7px;
    background: var(--bg-soft);
    border-radius: 99px;
    overflow: hidden;
}
.health-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    transition: width 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.health-fill.api { background: var(--star); }
.health-fill.tests { background: var(--ok); }
.health-fill.build { background: var(--gold); }

.stack-filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.4rem; }
.stack-filters button {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
    border-radius: 99px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.stack-filters button.active,
.stack-filters button:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.stack-grid { display: flex; flex-direction: column; gap: 1.2rem; }
.stack-cat-title { font-size: 0.78rem; color: var(--faint); margin-bottom: 0.5rem; font-family: var(--font-mono); }
.stack-badges { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.badge {
    background: var(--bg-soft);
    color: var(--star);
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    border: 1px solid transparent;
}
.badge-lang { color: #e0b4c4; }
.badge-fw { color: var(--star); }
.badge-data { color: var(--gold); }
.badge-cloud { color: var(--ok); }
.badge-ai { color: var(--gold); border-color: rgba(201, 168, 108, 0.35); }
.badge-db { color: #9bb7e0; }
.stack-filter-hidden { display: none; }

.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.edu-card { padding: 1.35rem; }
.edu-card.full { grid-column: 1 / -1; }
.edu-card h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.edu-card .subtitle { font-size: 0.78rem; color: var(--faint); font-family: var(--font-mono); display: block; margin-bottom: 0.55rem; }
.edu-card p, .edu-card li { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.edu-card ul { list-style: none; }
.edu-card li { margin-bottom: 0.3rem; padding-left: 1rem; position: relative; }
.edu-card a { color: var(--star); text-decoration: none; border-bottom: 1px solid transparent; }
.edu-card a:hover { border-bottom-color: var(--gold); color: var(--gold); }
.edu-card li::before { content: "▹"; position: absolute; left: 0; color: var(--gold); }

.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
}
.contact-card {
    width: 180px;
    min-height: 150px;
    padding: 1.35rem 1.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: 0.25s ease;
}
.contact-card:hover { border-color: var(--star); transform: translateY(-3px); }
#emailCard { cursor: pointer; }
.contact-grid.form-open { max-width: 560px; margin: 0 auto; }
.contact-grid.form-open #emailCard { width: 100%; }
.contact-grid.form-open a.contact-card { flex: 1; width: auto; }
.contact-card .icon { width: 28px; height: 28px; margin-bottom: 0.65rem; color: var(--star); }
.contact-card .label { font-size: 0.92rem; margin-bottom: 0.2rem; }
.contact-card .value { font-size: 0.78rem; color: var(--faint); }
.contact-form {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: 0.35s ease;
}
.contact-form.open {
    max-height: 280px;
    margin-top: 1rem;
    opacity: 1;
    visibility: visible;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.45rem;
    outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--star); }
.contact-form textarea { min-height: 64px; resize: vertical; }
.form-actions { display: flex; gap: 0.45rem; justify-content: flex-end; }
.form-actions button {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
}
.form-send { background: var(--gold); border: none; color: #1a1408; }
.form-close { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.terminal-window {
    background: #0a1018;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
html.light .terminal-window { background: #1b2434; }
.term-bar {
    background: rgba(255,255,255,0.03);
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-bottom: 1px solid var(--line);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot.red { background: #ff5f56; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #27c93f; }
.term-title { color: var(--faint); font-size: 0.7rem; margin-left: 0.4rem; }
.term-body { padding: 1rem 1.15rem; height: 320px; overflow-y: auto; }
.term-line { margin-bottom: 0.3rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.term-prompt { color: var(--star); }
.term-cmd, .term-input { color: var(--moon); }
.term-output { color: #a9b7c9; }
.term-cursor {
    display: inline-block;
    width: 7px; height: 13px;
    background: var(--gold);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: termBlink 0.85s step-end infinite;
}

.orbit-badge {
    position: fixed;
    bottom: 1.5rem;
    right: 4.5rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-nav);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--muted);
    opacity: 0;
    transform: translateY(8px);
    transition: 0.5s ease;
    pointer-events: none;
}
.orbit-badge.visible { opacity: 1; transform: none; }
.orbit-badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulseDot 2s infinite;
}

.egg-btn {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #2a3a55, #1a2438);
    border: 1px solid var(--gold);
    border-radius: 99px;
    padding: 0.55rem 1.05rem 0.55rem 0.9rem;
    color: var(--moon);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-16px) scale(0.9);
    pointer-events: none;
    transition: 0.3s ease;
}
.egg-btn.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.egg-btn kbd {
    font-size: 0.68rem;
    border: 1px solid var(--line);
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
    color: var(--muted);
}

#back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    color: var(--muted);
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { color: var(--gold); border-color: var(--gold); }

#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elev);
    color: var(--gold);
    padding: 0.65rem 1.3rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-size: 0.85rem;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    pointer-events: none;
}
#toast.show { opacity: 1; visibility: visible; }

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* Tools */
.tools-hero { padding-top: 7.5rem; text-align: left; }
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
}
.tool-card {
    padding: 1.2rem;
    cursor: pointer;
    transition: 0.2s ease;
    text-align: left;
    color: inherit;
}
.tool-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.tool-card h3 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.tool-card p { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.tool-panel { display: none; margin-top: 1.25rem; }
.tool-panel.active { display: block; }
.tool-back {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: none;
    border: none;
    color: var(--star);
    cursor: pointer;
    margin-bottom: 1rem;
}
.tool-ui label { display: block; font-size: 0.78rem; color: var(--faint); margin: 0.7rem 0 0.3rem; font-family: var(--font-mono); }
.tool-ui input, .tool-ui textarea, .tool-ui select {
    width: 100%;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 0.6rem 0.75rem;
    outline: none;
}
.tool-ui textarea { min-height: 140px; resize: vertical; }
.tool-ui .row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.7rem 0; }
.tool-ui .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.chip {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
    border-radius: 99px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.chip:hover { color: var(--gold); border-color: var(--gold); }
.bpm-pad {
    width: 100%;
    min-height: 140px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-elev);
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 1.6rem;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    cursor: pointer;
}
.bpm-pad:active { border-color: var(--gold); background: var(--bg-soft); }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.diff-out .add { background: rgba(143, 191, 136, 0.15); color: var(--ok); }
.diff-out .del { background: rgba(217, 137, 137, 0.15); color: var(--danger); }
.regex-hit { background: rgba(201, 168, 108, 0.35); color: var(--gold); border-radius: 3px; }

/* Now */
.now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.now-card { padding: 1.35rem 1.45rem; }
.now-card.wide { grid-column: 1 / -1; }
.now-card h3 { font-size: 0.95rem; margin-bottom: 0.55rem; color: var(--gold); }
.now-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }
.now-card a { color: var(--star); text-decoration: none; border-bottom: 1px solid transparent; }
.now-card a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.now-projects { line-height: 2; }
.now-orbit { color: var(--faint); font-style: italic; }
.now-spotify {
    display: block;
    width: 100%;
    height: 152px;
    border: 0;
    border-radius: 10px;
    margin-top: 0.85rem;
}
.flags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.flag {
    font-size: 0.8rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--muted);
}
/* CV */
.cv-page { background: #f6f3ec; color: #1b2434; font-family: var(--font-sans); }
.cv-wrap { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.cv-actions { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; }
.cv-sheet {
    background: #fff;
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(27, 36, 52, 0.08);
}
.cv-sheet h1 { font-size: 1.8rem; letter-spacing: -0.02em; }
.cv-sheet .cv-role { color: #7a6230; margin: 0.2rem 0 0.8rem; }
.cv-meta { color: #5b6b82; font-size: 0.88rem; margin-bottom: 1.5rem; }
.cv-sheet h2 {
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a7a3a;
    border-bottom: 1px solid #eadfc8;
    padding-bottom: 0.3rem;
    margin: 1.4rem 0 0.7rem;
}
.cv-sheet h3 { font-size: 1rem; }
.cv-sheet .when { font-size: 0.8rem; color: #7a8799; }
.cv-sheet ul { margin: 0.4rem 0 0.8rem 1.1rem; color: #334155; font-size: 0.9rem; line-height: 1.55; }
.cv-sheet p { color: #334155; line-height: 1.6; font-size: 0.92rem; }
.cv-sheet a { color: #7a6230; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}
@keyframes blink {
    0%, 50% { border-color: var(--star); }
    51%, 100% { border-color: transparent; }
}
@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}
@keyframes termBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 108, 0.5); }
    50% { box-shadow: 0 0 0 5px transparent; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: var(--bg-nav);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        padding: 1rem;
        gap: 0.65rem;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .nav-sep { display: none; }
    .edu-grid, .now-grid, .diff-grid, .craft-grid, .projects-grid { grid-template-columns: 1fr; }
    .sky-moon { right: 1.2rem; width: 72px; height: 72px; top: 5.5rem; }
    .hero-content { margin-left: 0; padding-right: 0; }
    .hero-avatar { width: 190px; height: 190px; margin: 0.5rem auto 0.1rem; padding: 0; }
    .scroll-down { margin-left: 0; align-items: center; }
    .hero-stats { gap: 1.4rem; }
    .orbit-badge { right: 1.2rem; bottom: 4.2rem; }
    .now-card.wide { grid-column: auto; }
}
@media print {
    .cv-actions, .navbar, #skyCanvas, .sky-moon { display: none !important; }
    .cv-sheet { box-shadow: none; }
}
