@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Manrope:wght@400;500;700;800&display=swap');

:root {
    --bg-main: #12091f;
    --bg-layer: #190d2f;
    --panel: rgba(26, 14, 45, 0.78);
    --panel-strong: rgba(36, 18, 62, 0.9);
    --ink: #efe8ff;
    --muted: #b9abd9;
    --accent: #9d4edd;
    --accent-soft: #c77dff;
    --line: rgba(184, 147, 255, 0.28);
    --shadow: 0 18px 46px rgba(4, 1, 10, 0.5);
    --glow: 0 0 30px rgba(180, 118, 255, 0.35);
}

body[data-theme="light"] {
    --bg-main: #f2ebff;
    --bg-layer: #e6d8ff;
    --panel: rgba(255, 252, 255, 0.82);
    --panel-strong: rgba(252, 247, 255, 0.95);
    --ink: #26143c;
    --muted: #6f5c89;
    --accent: #7b2cbf;
    --accent-soft: #9d4edd;
    --line: rgba(123, 44, 191, 0.22);
    --shadow: 0 14px 38px rgba(74, 40, 121, 0.22);
    --glow: 0 0 28px rgba(150, 76, 224, 0.25);
}

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

html,
body {
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 12%, #2b1450 0%, transparent 32%),
        radial-gradient(circle at 90% 88%, #47206f 0%, transparent 30%),
        linear-gradient(140deg, var(--bg-main) 0%, var(--bg-layer) 100%);
    display: grid;
    place-items: center;
    padding: 1.2rem 0.9rem 1.8rem;
    overflow-x: hidden;
    transition: background 0.2s ease, color 0.2s ease;
    isolation: isolate;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02));
    mix-blend-mode: soft-light;
    opacity: 0.35;
    z-index: -2;
}

body::before {
    content: "";
    position: fixed;
    inset: -20%;
    z-index: -3;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(157, 78, 221, 0.2) 0%, transparent 26%),
        radial-gradient(circle at 80% 18%, rgba(110, 64, 201, 0.16) 0%, transparent 22%),
        radial-gradient(circle at 70% 78%, rgba(199, 125, 255, 0.12) 0%, transparent 26%);
    filter: blur(12px);
    animation: none;
}

body[data-theme="light"] {
    background:
        radial-gradient(circle at 12% 14%, rgba(181, 129, 255, 0.46) 0%, transparent 32%),
        radial-gradient(circle at 85% 18%, rgba(255, 214, 243, 0.55) 0%, transparent 24%),
        radial-gradient(circle at 84% 88%, rgba(198, 171, 255, 0.52) 0%, transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 22%),
        linear-gradient(140deg, var(--bg-main) 0%, var(--bg-layer) 100%);
}

body[data-theme="light"]::after {
    background:
        repeating-linear-gradient(135deg,
            rgba(123, 44, 191, 0.03) 0,
            rgba(123, 44, 191, 0.03) 2px,
            transparent 2px,
            transparent 14px);
    mix-blend-mode: normal;
    opacity: 0.8;
}

body[data-theme="light"]::before {
    background:
        radial-gradient(circle at 18% 26%, rgba(173, 124, 248, 0.22) 0%, transparent 24%),
        radial-gradient(circle at 84% 24%, rgba(255, 196, 236, 0.28) 0%, transparent 20%),
        radial-gradient(circle at 74% 76%, rgba(199, 125, 255, 0.14) 0%, transparent 26%);
    filter: blur(8px);
}

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

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    z-index: 9998;
    background: linear-gradient(90deg, #9d4edd 0%, #c77dff 100%);
    box-shadow: 0 0 18px rgba(199, 125, 255, 0.8);
}

body[data-theme="light"] .scroll-progress {
    background: linear-gradient(90deg, #7b2cbf 0%, #c77dff 100%);
    box-shadow: 0 0 14px rgba(123, 44, 191, 0.35);
}

.fx-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.cursor-glow {
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    left: 0;
    top: 0;
    z-index: -1;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.18) 0%, rgba(157, 78, 221, 0.07) 28%, rgba(157, 78, 221, 0) 72%);
    transform: translate3d(-50%, -50%, 0);
    filter: blur(18px);
    opacity: 0.8;
    transition: opacity 0.16s ease;
    display: block;
}

body[data-theme="light"] .cursor-glow {
    background: radial-gradient(circle, rgba(166, 98, 233, 0.16) 0%, rgba(255, 208, 236, 0.12) 26%, rgba(166, 98, 233, 0) 72%);
    filter: blur(14px);
    opacity: 0.7;
}

.fx-particles span {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(211, 158, 255, 0.8) 0%, rgba(211, 158, 255, 0) 70%);
    animation: particleFloat 12s linear infinite;
}

body[data-theme="light"] .fx-particles span {
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(151, 87, 232, 0.45) 0%, rgba(151, 87, 232, 0) 72%);
    filter: blur(0.2px);
}

.fx-particles::after {
    content: "";
    position: absolute;
    width: 34vw;
    height: 34vw;
    min-width: 220px;
    min-height: 220px;
    right: -8vw;
    top: 12vh;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.2) 0%, rgba(157, 78, 221, 0) 72%);
    filter: blur(10px);
    animation: none;
}

body[data-theme="light"] .fx-particles::after {
    right: auto;
    left: -6vw;
    top: auto;
    bottom: 8vh;
    background: radial-gradient(circle, rgba(255, 202, 238, 0.28) 0%, rgba(157, 78, 221, 0.06) 38%, rgba(157, 78, 221, 0) 74%);
    filter: blur(2px);
}

#loading-screen {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, #3f1e73 0%, transparent 45%),
        #0d0618;
    display: grid;
    place-content: center;
    gap: 0.9rem;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-screen[data-theme="light"] {
    background:
        radial-gradient(circle at 30% 20%, #d7b7ff 0%, transparent 45%),
        #f0e5ff;
}

#loading-screen[data-theme="light"] p {
    color: #6b4699;
}

#loading-screen[data-theme="light"] .loader-brand {
    border-color: rgba(123, 44, 191, 0.3);
    box-shadow: 0 0 0 1px rgba(123, 44, 191, 0.08) inset;
}

#loading-screen[data-theme="light"] .loader-line {
    background: rgba(123, 44, 191, 0.16);
}

.loader-brand {
    width: 78px;
    height: 78px;
    border-radius: 14px;
    border: 1px solid rgba(209, 183, 255, 0.55);
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    background: transparent;
}

.loader-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(199, 125, 255, 0.28));
    animation: roseSpin 1.7s linear infinite;
}

.loader-line {
    width: min(62vw, 280px);
    height: 6px;
    border-radius: 999px;
    background: rgba(209, 183, 255, 0.18);
    overflow: hidden;
}

.loader-fill {
    width: 10%;
    height: 100%;
    background: linear-gradient(90deg, #9d4edd 0%, #c77dff 100%);
    border-radius: inherit;
    box-shadow: var(--glow);
    transition: width 0.22s ease;
}

#loading-screen p {
    color: #dbc6ff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.7rem;
    text-align: center;
}

.page-shell {
    width: 100%;
    max-width: 560px;
    position: relative;
    display: grid;
    gap: 0.75rem;
    margin-inline: auto;
}

.page-shell,
.page-shell>* {
    min-width: 0;
}

.page-shell::before {
    content: "";
    position: absolute;
    inset: -18px;
    z-index: -1;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.08), transparent 35%, rgba(157, 78, 221, 0.08));
    filter: blur(14px);
    animation: none;
}

body[data-theme="light"] .page-shell::before {
    background: linear-gradient(135deg, rgba(173, 124, 248, 0.1), transparent 35%, rgba(255, 201, 234, 0.1));
}

.shape {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(190, 149, 255, 0.25);
    border-radius: 999px;
    animation: float 9s ease-in-out infinite;
}

.shape-left {
    width: 260px;
    height: 260px;
    left: -140px;
    top: 8%;
}

.shape-right {
    width: 190px;
    height: 190px;
    right: -90px;
    bottom: 18%;
    animation-delay: -3s;
}

body[data-theme="light"] .shape {
    border-color: rgba(138, 85, 214, 0.18);
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 72%);
}

.top-actions,
.bio-card,
.service-lab,
.spotlight,
.mini-footer,
.link-card {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.top-actions::before,
.bio-card::before,
.service-lab::before,
.spotlight::before,
.mini-footer::before,
.github-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.05) 24%, transparent 48%);
    transform: translateX(-140%);
    pointer-events: none;
}

body[data-theme="light"] .top-actions::before,
body[data-theme="light"] .bio-card::before,
body[data-theme="light"] .service-lab::before,
body[data-theme="light"] .spotlight::before,
body[data-theme="light"] .mini-footer::before,
body[data-theme="light"] .github-panel::before {
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.28) 24%, transparent 48%);
}

body[data-theme="light"] .top-actions,
body[data-theme="light"] .bio-card,
body[data-theme="light"] .service-lab,
body[data-theme="light"] .spotlight,
body[data-theme="light"] .mini-footer,
body[data-theme="light"] .link-card,
body[data-theme="light"] .github-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(249, 241, 255, 0.9) 100%);
    box-shadow:
        0 12px 24px rgba(112, 70, 173, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: none;
}

.top-actions {
    padding: 0.65rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 78px;
    padding: 0.35rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    box-shadow: 0 10px 20px rgba(80, 36, 140, 0.14);
}

.brand-chip-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(199, 125, 255, 0.28));
}

.brand-chip-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(199, 125, 255, 0.35);
}

body[data-theme="light"] .brand-chip {
    box-shadow: 0 10px 18px rgba(123, 44, 191, 0.1);
}

.theme-toggle {
    border: 1px solid var(--line);
    background: var(--panel-strong);
    color: var(--ink);
    border-radius: 999px;
    height: 38px;
    padding: 0 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    animation: buttonBreath 6s ease-in-out infinite;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(199, 125, 255, 0.65);
}

body[data-theme="light"] .theme-toggle {
    box-shadow: 0 10px 20px rgba(140, 90, 210, 0.12);
}

body[data-theme="light"] .theme-toggle:hover {
    border-color: rgba(123, 44, 191, 0.4);
    box-shadow: 0 12px 22px rgba(140, 90, 210, 0.16);
}

.micro-copy {
    font-size: 0.78rem;
    color: var(--muted);
}

.bio-card {
    padding: 0.95rem;
    display: grid;
    gap: 0.75rem;
}

.bio-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.avatar {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid rgba(199, 125, 255, 0.45);
    box-shadow: var(--glow);
    animation: avatarAura 6s ease-in-out infinite;
}

body[data-theme="light"] .avatar {
    border-color: rgba(157, 78, 221, 0.32);
    box-shadow:
        0 10px 24px rgba(140, 90, 210, 0.16),
        0 0 0 6px rgba(255, 255, 255, 0.45);
}

.tagline {
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--muted);
}

.bio-card h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 6.5vw, 2.95rem);
    line-height: 0.95;
    letter-spacing: 0.03em;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 42ch;
}

.status-line {
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
    border: 1px dashed rgba(199, 125, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.87rem;
    font-weight: 600;
    background: rgba(93, 53, 150, 0.18);
}

body[data-theme="light"] .status-line {
    background: linear-gradient(90deg, rgba(153, 84, 225, 0.12) 0%, rgba(255, 255, 255, 0.52) 100%);
    border-color: rgba(123, 44, 191, 0.26);
}

.focus-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.focus-pills span {
    border: 1px solid var(--line);
    background: rgba(141, 84, 220, 0.16);
    border-radius: 999px;
    padding: 0.32rem 0.62rem;
    font-size: 0.72rem;
    color: var(--muted);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.focus-pills span:hover {
    transform: translateY(-2px);
    border-color: rgba(199, 125, 255, 0.55);
}

body[data-theme="light"] .focus-pills span,
body[data-theme="light"] .social-chip,
body[data-theme="light"] .metric-card,
body[data-theme="light"] .service-grid article {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(243, 232, 255, 0.86) 100%);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-soft);
    box-shadow: 0 0 0 0 rgba(199, 125, 255, 0.6);
    animation: pulse 1.6s infinite;
}

.social-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.social-chip {
    min-height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    background: rgba(123, 60, 194, 0.15);
    font-size: 0.82rem;
    color: var(--muted);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.social-chip:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(199, 125, 255, 0.5);
    box-shadow: 0 12px 24px rgba(95, 43, 157, 0.2);
}

.social-chip i {
    font-size: 1rem;
    color: var(--accent-soft);
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.metric-card {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(123, 60, 194, 0.12);
    display: grid;
    gap: 0.2rem;
    padding: 0.65rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -60% auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(199, 125, 255, 0.18) 0%, rgba(199, 125, 255, 0) 70%);
}

.metric-card strong {
    font-size: 1.2rem;
    color: var(--accent-soft);
    text-shadow: 0 0 12px rgba(199, 125, 255, 0.18);
}

.metric-card span {
    font-size: 0.73rem;
    color: var(--muted);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: rgba(199, 125, 255, 0.48);
    box-shadow: 0 16px 28px rgba(73, 33, 121, 0.24);
}

.links-grid {
    display: grid;
    gap: 0.85rem;
}

.link-card {
    padding: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: transform 0.24s ease, border-color 0.24s ease;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: "";
    position: absolute;
    top: -120%;
    left: -30%;
    width: 60%;
    height: 280%;
    transform: rotate(22deg);
    background: linear-gradient(180deg, transparent 0%, rgba(226, 187, 255, 0.22) 50%, transparent 100%);
    transition: transform 0.45s ease;
}

body[data-theme="light"] .link-card::before {
    background: linear-gradient(180deg, transparent 0%, rgba(173, 110, 238, 0.14) 48%, rgba(255, 255, 255, 0.55) 54%, transparent 100%);
}

.link-card .label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.link-card h2 {
    margin: 0.2rem 0;
    font-size: 1.18rem;
    transition: letter-spacing 0.22s ease, transform 0.22s ease;
    overflow-wrap: anywhere;
}

.link-card p {
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.link-card i {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(157, 78, 221, 0.18);
    color: #ddbdff;
    flex-shrink: 0;
}

body[data-theme="light"] .link-card i {
    background: linear-gradient(180deg, rgba(157, 78, 221, 0.12) 0%, rgba(255, 255, 255, 0.7) 100%);
    color: #7b2cbf;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.link-card:hover {
    transform: translateY(-3px);
    border-color: rgba(199, 125, 255, 0.5);
}

.link-card:hover h2 {
    letter-spacing: 0.02em;
    transform: translateX(2px);
}

body[data-theme="light"] .link-card:hover {
    border-color: rgba(123, 44, 191, 0.34);
    box-shadow:
        0 18px 32px rgba(112, 70, 173, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.link-card:hover::before {
    transform: rotate(22deg) translateX(260%);
}

.service-lab {
    padding: 0.9rem;
}

.spot-title {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.07em;
    font-size: 1.45rem;
    margin-bottom: 0.55rem;
}

.service-grid {
    display: grid;
    gap: 0.55rem;
}

.service-grid article {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem;
    background: rgba(115, 66, 182, 0.14);
    position: relative;
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.service-grid article::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(199, 125, 255, 0.16), transparent 40%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.service-grid h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.service-grid p {
    font-size: 0.85rem;
    color: var(--muted);
}

.service-grid article:hover {
    transform: translateY(-3px);
    border-color: rgba(199, 125, 255, 0.46);
    box-shadow: 0 12px 20px rgba(74, 34, 121, 0.16);
}

.service-grid article:hover::before {
    opacity: 1;
}

.spotlight {
    padding: 0.9rem;
}

.spotlight ul {
    padding-left: 1rem;
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
}

#rotating-quote {
    margin-top: 0.8rem;
    border-left: 3px solid var(--accent-soft);
    padding-left: 0.7rem;
    color: var(--ink);
    font-weight: 500;
}

.quote-animated {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2.2rem;
    position: relative;
    overflow: hidden;
}

#quote-text {
    transform-origin: left center;
    transition: transform 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.quote-cursor {
    color: var(--accent-soft);
    animation: blink 0.8s steps(1, end) infinite;
}

.quote-animated.switching #quote-text {
    opacity: 0.2;
    filter: blur(1px);
    transform: translateY(-6px) scale(0.98);
}

.quote-animated::after {
    content: "";
    position: absolute;
    left: -0.2rem;
    right: 0;
    bottom: -0.35rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(199, 125, 255, 0.65) 0%, rgba(199, 125, 255, 0) 100%);
}

body[data-theme="light"] .quote-animated::after {
    background: linear-gradient(90deg, rgba(123, 44, 191, 0.34) 0%, rgba(123, 44, 191, 0) 100%);
}

.github-panel {
    padding: 0.9rem;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 24px;
}

.github-copy {
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 0.65rem;
}

.github-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.github-grid img {
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(110, 62, 175, 0.18);
    object-fit: contain;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#github-stats-card {
    order: 1;
}

#github-langs-card {
    order: 2;
}

body[data-theme="light"] .github-grid img {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(243, 232, 255, 0.9) 100%);
    box-shadow: 0 8px 16px rgba(140, 90, 210, 0.08);
}

.github-grid img:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow);
}

body[data-theme="light"] .github-grid img:hover {
    box-shadow: 0 12px 20px rgba(123, 44, 191, 0.12);
}

body[data-theme="light"] .top-actions::before,
body[data-theme="light"] .bio-card::before,
body[data-theme="light"] .service-lab::before,
body[data-theme="light"] .spotlight::before,
body[data-theme="light"] .mini-footer::before,
body[data-theme="light"] .github-panel::before {
    animation: none;
    opacity: 0.45;
}

body[data-theme="light"] .fx-particles {
    opacity: 0.65;
}

body[data-theme="light"] .fx-particles span:nth-child(n+10) {
    display: none;
}

body[data-theme="light"] .page-shell::before,
body[data-theme="light"]::before {
    animation: none;
}

.mini-footer {
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    color: var(--muted);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(199, 125, 255, 0.26));
}

.mini-footer strong {
    display: inline-block;
    animation: footerPulse 4.6s ease-in-out infinite;
}

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

@keyframes particleFloat {
    from {
        transform: translateY(8vh) scale(0.92);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    to {
        transform: translateY(-8vh) scale(1.05);
        opacity: 0;
    }
}

@keyframes buttonBreath {
    0%,
    100% {
        box-shadow: 0 0 0 rgba(157, 78, 221, 0);
    }
    50% {
        box-shadow: 0 6px 12px rgba(157, 78, 221, 0.12);
    }
}

@keyframes avatarAura {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(199, 125, 255, 0.08), var(--glow);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(199, 125, 255, 0.03), 0 0 24px rgba(199, 125, 255, 0.22);
    }
}

@keyframes footerPulse {
    0%,
    100% {
        transform: translateY(0);
        text-shadow: 0 0 0 rgba(199, 125, 255, 0);
    }
    50% {
        transform: translateY(-1px);
        text-shadow: 0 0 6px rgba(199, 125, 255, 0.18);
    }
}

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

    .top-actions::before,
    .bio-card::before,
    .service-lab::before,
    .spotlight::before,
    .mini-footer::before,
    .github-panel::before {
        display: none;
    }

    .shape,
    .avatar,
    .theme-toggle,
    .mini-footer strong,
    .fx-particles span {
        animation: none;
    }
}

.easter-egg {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 11, 0.84);
    display: grid;
    place-items: center;
    z-index: 9997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.easter-egg.show {
    opacity: 1;
    pointer-events: auto;
}

.egg-box {
    width: min(92vw, 380px);
    border: 1px solid rgba(201, 164, 255, 0.5);
    background: linear-gradient(160deg, rgba(18, 9, 31, 0.96) 0%, rgba(36, 18, 62, 0.96) 100%);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: var(--glow);
    color: #f2e9ff;
    animation: eggPop 0.28s ease;
}

img {
    max-width: 100%;
    display: block;
}

.egg-title {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.06em;
    font-size: 1.5rem;
}

.egg-tip {
    margin-top: 0.45rem;
    color: #d8c2ff;
    font-size: 0.86rem;
}

#close-egg {
    margin-top: 0.9rem;
    border: 1px solid rgba(201, 164, 255, 0.5);
    background: rgba(157, 78, 221, 0.2);
    color: #f2e9ff;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduz custo de renderizacao em Android de menor desempenho mantendo a mesma direcao visual. */
body.perf-android {
    --shadow: 0 10px 22px rgba(4, 1, 10, 0.34);
    --glow: 0 0 14px rgba(180, 118, 255, 0.2);
}

body.perf-android::before,
body.perf-android::after,
body.perf-android .page-shell::before {
    filter: blur(6px);
}

body.perf-android .fx-particles {
    opacity: 0.45;
}

body.perf-android .fx-particles span {
    animation-duration: 20s;
}

body.perf-android .top-actions,
body.perf-android .bio-card,
body.perf-android .service-lab,
body.perf-android .spotlight,
body.perf-android .mini-footer,
body.perf-android .link-card,
body.perf-android .github-panel {
    backdrop-filter: blur(3px);
}

body.perf-android .shape,
body.perf-android .avatar,
body.perf-android .theme-toggle,
body.perf-android .mini-footer strong,
body.perf-android .dot,
body.perf-android .quote-cursor,
body.perf-android .loader-brand img {
    animation-duration: 8.5s;
}

body.perf-android .dot {
    animation-duration: 2.4s;
}

body.perf-android .quote-cursor {
    animation-duration: 1.15s;
}

body.perf-android.perf-l1 .fx-particles {
    opacity: 0.5;
}

body.perf-android.perf-l2 {
    --shadow: 0 8px 16px rgba(4, 1, 10, 0.3);
    --glow: 0 0 10px rgba(180, 118, 255, 0.16);
}

body.perf-android.perf-l2::before,
body.perf-android.perf-l2::after,
body.perf-android.perf-l2 .page-shell::before {
    filter: blur(4px);
}

body.perf-android.perf-l2 .fx-particles {
    opacity: 0.34;
}

body.perf-android.perf-l2 .fx-particles span {
    animation-duration: 26s;
}

body.perf-android.perf-l2 .top-actions,
body.perf-android.perf-l2 .bio-card,
body.perf-android.perf-l2 .service-lab,
body.perf-android.perf-l2 .spotlight,
body.perf-android.perf-l2 .mini-footer,
body.perf-android.perf-l2 .link-card,
body.perf-android.perf-l2 .github-panel {
    backdrop-filter: blur(2px);
}

body.perf-android.perf-l2 .shape,
body.perf-android.perf-l2 .avatar,
body.perf-android.perf-l2 .theme-toggle,
body.perf-android.perf-l2 .mini-footer strong,
body.perf-android.perf-l2 .loader-brand img {
    animation-duration: 10s;
}

body.perf-android.perf-l2 .dot {
    animation-duration: 2.8s;
}

body.perf-android.perf-l2 .quote-cursor {
    animation-duration: 1.25s;
}

body.perf-android .quote-animated.switching #quote-text {
    filter: none;
}

body.perf-android .social-chip:hover,
body.perf-android .metric-card:hover,
body.perf-android .service-grid article:hover,
body.perf-android .github-grid img:hover,
body.perf-android .link-card:hover {
    box-shadow: 0 8px 14px rgba(73, 33, 121, 0.14);
}

body.perf-android .link-card:hover h2 {
    transform: translateX(1px);
}

@keyframes roseSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


@keyframes eggPop {
    from {
        transform: scale(0.94) translateY(8px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}


@media (max-width: 920px) {
    .page-shell {
        width: min(100%, 560px);
    }

    .shape-left {
        width: 200px;
        height: 200px;
        left: -110px;
    }

    .shape-right {
        width: 150px;
        height: 150px;
        right: -70px;
    }

    .github-grid {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
    }

    body {
        padding: 1rem 0.85rem 2rem;
        display: block;
    }

    .page-shell {
        width: 100%;
        max-width: 100%;
        gap: 0.85rem;
        margin-inline: 0;
    }

    .page-shell::before {
        inset: 0;
        filter: blur(10px);
    }

    .top-actions,
    .bio-card,
    .service-lab,
    .spotlight,
    .mini-footer,
    .github-panel,
    .link-card {
        border-radius: 20px;
        width: 100%;
        max-width: 100%;
    }

    .top-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem;
    }

    .theme-toggle {
        justify-content: center;
        width: 100%;
    }

    .micro-copy {
        text-align: center;
    }

    .brand-chip {
        align-self: center;
    }

    .bio-card,
    .service-lab,
    .spotlight,
    .github-panel {
        padding: 0.95rem;
    }

    .bio-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .avatar {
        width: 76px;
        height: 76px;
    }

    .social-row,
    .metric-row,
    .links-grid,
    .service-grid,
    .github-grid {
        grid-template-columns: 1fr;
    }

    .github-grid img {
        height: auto;
        max-height: none;
    }

    .metric-card,
    .social-chip,
    .service-grid article {
        min-width: 0;
    }

    .link-card {
        padding: 0.9rem;
    }

    .link-card i {
        width: 40px;
        height: 40px;
    }

    .mini-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.9rem;
    }

    .footer-brand {
        width: 100%;
        justify-content: flex-start;
    }

    .shape-left,
    .shape-right,
    .cursor-glow {
        display: none;
    }

    .page-shell::before,
    .fx-particles::after {
        pointer-events: none;
    }

    .fx-particles::after {
        width: 48vw;
        height: 48vw;
        min-width: 160px;
        min-height: 160px;
        right: -14vw;
        top: auto;
        bottom: 18vh;
    }
}

@media (max-width: 560px) {
    body {
        padding: 0.8rem 0.7rem 1.6rem;
    }

    .top-actions,
    .bio-card,
    .service-lab,
    .spotlight,
    .github-panel,
    .mini-footer,
    .link-card {
        border-radius: 18px;
    }

    .bio-card h1 {
        font-size: clamp(1.9rem, 11vw, 2.5rem);
    }

    .subtitle,
    .link-card p,
    .service-grid p,
    .github-copy,
    .spotlight ul,
    .mini-footer,
    .micro-copy {
        font-size: 0.82rem;
    }

    .focus-pills {
        gap: 0.35rem;
    }

    .focus-pills span {
        font-size: 0.68rem;
        padding: 0.3rem 0.55rem;
    }

    .social-chip {
        min-height: 46px;
        padding: 0.55rem 0.65rem;
        font-size: 0.78rem;
    }

    .metric-card {
        padding: 0.75rem 0.7rem;
    }

    .metric-card strong {
        font-size: 1.1rem;
    }

    .link-card {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .link-card h2 {
        font-size: 1.02rem;
    }

    .spot-title {
        font-size: 1.28rem;
    }

    .quote-animated {
        min-height: 3.1rem;
        align-items: flex-start;
    }

    #rotating-quote {
        padding-left: 0.6rem;
    }

    .egg-box {
        width: min(94vw, 360px);
        padding: 0.9rem;
        border-radius: 16px;
    }

    .egg-title {
        font-size: 1.3rem;
    }

    .github-grid img {
        border-radius: 12px;
        height: auto;
        max-height: none;
    }
}

@media (max-width: 420px) {
    body {
        padding-inline: 0.55rem;
    }

    .page-shell {
        gap: 0.7rem;
    }

    .top-actions,
    .bio-card,
    .service-lab,
    .spotlight,
    .github-panel,
    .mini-footer,
    .link-card {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
        width: 100%;
        max-width: 100%;
    }

    .brand-chip {
        padding: 0.32rem 0.42rem;
    }

    .brand-chip-logo,
    .brand-chip-avatar {
        width: 22px;
        height: 22px;
    }

    .status-line {
        font-size: 0.8rem;
        padding: 0.55rem 0.7rem;
    }

    .link-card {
        flex-direction: column;
    }

    .link-card i {
        width: 38px;
        height: 38px;
    }

    .quote-animated {
        min-height: 3.6rem;
    }

    .service-grid article,
    .metric-card,
    .social-chip {
        border-radius: 12px;
    }

    .fx-particles span:nth-child(n+9) {
        display: none;
    }
}

@media (hover: none),
(pointer: coarse) {

    .top-actions::before,
    .bio-card::before,
    .service-lab::before,
    .spotlight::before,
    .mini-footer::before,
    .github-panel::before {
        animation-duration: 12s;
    }

    .link-card:hover,
    .service-grid article:hover,
    .metric-card:hover,
    .social-chip:hover,
    .github-grid img:hover {
        transform: none;
    }

    .link-card:hover h2 {
        transform: none;
        letter-spacing: normal;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(199, 125, 255, 0.6);
    }

    100% {
        box-shadow: 0 0 0 12px rgba(199, 125, 255, 0);
    }
}

@keyframes blink {

    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

@media (min-width: 700px) {
    .links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bio-card {
        padding: 1.35rem;
    }

    .github-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .top-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .bio-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-row {
        grid-template-columns: 1fr;
    }

    .metric-row {
        grid-template-columns: 1fr;
    }

    .link-card {
        padding: 0.9rem;
    }

    .mini-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}