@font-face {
    font-family: 'Array';
    src: url('assets/array.woff2') format('woff2');
    font-display: swap;
}

:root {
    color-scheme: dark;
    --theme-text: #e8e6e3;
    --theme-muted: rgba(232, 230, 227, 0.72);
    --theme-card: rgba(38, 39, 43, 0.74);
    --theme-card-border: rgba(190, 183, 216, 0.22);
    --theme-panel: rgba(11, 12, 16, 0.87);
    --theme-purple: #3d0bc9;
    --theme-purple-soft: #8c72ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url('assets/cursor.png') 16 16, auto !important;
    font-family: 'Inter', sans-serif;
}

html {
    width: 100%;
    min-height: 100%;
    background: transparent;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background: transparent;
    color: var(--theme-text);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 0;
}

body:not(.entered) { overflow: hidden; }
[hidden] { display: none !important; }
:where(a, button, [tabindex]):focus-visible { outline: 2px solid #b6a2ff; outline-offset: 4px; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    background: #000;
}

#splash-screen {
    flex-direction: column;
    gap: 16px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    transition: opacity 0.8s ease;
}

.splash-text {
    margin: 0;
    position: relative;
    display: inline-block;
    font-family: 'Array', sans-serif;
    font-size: 1.45rem;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 2px;
    text-transform: lowercase;
    animation: breathe 2s infinite ease-in-out;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.03, 0.98, 0.52, 0.99);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.splash-emote { display: block; width: 80px; height: 82px; object-fit: contain; pointer-events: none; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    body[data-motion] .card.show {
        transition: transform 480ms cubic-bezier(.18,.85,.28,1), box-shadow 480ms ease;
    }
    body[data-motion] .card.show:hover {
        z-index: 30;
        box-shadow: 0 24px 42px rgba(0,0,0,.65), 0 8px 14px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.1);
        border-color: var(--theme-card-border);
    }
    body[data-motion="lift"] .card.show:hover {
        transform: perspective(1100px) translate3d(0,-6px,22px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));
    }
    body[data-motion="spring"] .card.show {
        transition: transform 650ms cubic-bezier(.2,1.45,.35,1), box-shadow 480ms ease;
    }
    body[data-motion="spring"] .card.show:hover {
        transform: perspective(1100px) translate3d(var(--magnet-x,0px),calc(var(--magnet-y,0px) - 5px),28px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));
    }
    body[data-motion="depth"] .card.show:hover {
        transform: perspective(850px) translate3d(0,-5px,20px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));
    }
    body[data-motion="depth"] .card > * {
        transition: translate 480ms cubic-bezier(.18,.85,.28,1);
    }
    body[data-motion="depth"] .card.show:hover > * {
        translate: var(--magnet-x,0px) var(--magnet-y,0px);
    }
    body[data-motion="impact"] .card.show {
        transition: transform 750ms cubic-bezier(.18,1.4,.3,1), box-shadow 500ms ease;
    }
    body[data-motion="impact"] .card.show:hover {
        transform: perspective(1200px) translate3d(0,-12px,70px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));
        box-shadow: 0 45px 65px rgba(0,0,0,.8), 0 14px 22px rgba(0,0,0,.5);
    }
    body[data-motion="impact"] .card > * {
        transition: translate 650ms cubic-bezier(.16,1.5,.3,1);
    }
    body[data-motion="impact"] .card.show:hover > * {
        translate: var(--magnet-x,0px) var(--magnet-y,0px);
    }
    body[data-motion="impact"] .card.show:hover .profile-copy,
    body[data-motion="impact"] .card.show:hover .contact-details {
        translate: calc(var(--magnet-x,0px) * 1.4) calc(var(--magnet-y,0px) * 1.4);
    }
}

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

.fade-out { opacity: 0; pointer-events: none; }

#main-container {
    width: min(1180px, 94%);
    max-width: 1180px;
    display: none;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.1fr);
    grid-template-rows: repeat(4, auto) 174px;
    align-items: start;
    gap: 12px;
    z-index: 10;
    animation: fadeIn 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

body.entered #main-container { display: grid; }
#main-container > * { min-width: 0; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    --card-glow: rgba(61, 11, 201, 0.2);
    background: var(--theme-card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--theme-card-border);
    border-radius: 22px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(28px) scale(0.975);
    transform-style: flat;
    contain: layout style;
    transition: transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1), border-color 240ms ease;
}

.card.show {
    opacity: 1;
    transform: none;
    animation: card-reveal 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card::before {
    content: '';
    position: absolute;
    inset: -120% 35% auto -75%;
    height: 210%;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.18) 50%, transparent 58%);
    opacity: 0;
    pointer-events: none;
    transform: rotate(12deg) translateX(-35%);
}

.card.show::before { display: none; }

.card > * {
    position: relative;
    z-index: 1;
}

@keyframes card-reveal {
    0% { opacity: 0; transform: translateY(28px) scale(0.975); }
    65% { opacity: 1; transform: translateY(-3px) scale(1.008); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes card-shimmer {
    from { opacity: 0; transform: rotate(12deg) translateX(-35%); }
    35% { opacity: 1; }
    to { opacity: 0; transform: rotate(12deg) translateX(150%); }
}

@media (hover: hover) and (pointer: fine) {
    .card.show:hover {
        transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
        border-color: rgba(255, 255, 255, 0.28);
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.46), 0 0 18px var(--card-glow), inset 0 1px rgba(255, 255, 255, 0.16);
        z-index: 30;
    }
}

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

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-info h1 {
    font-size: 36.5px;
    font-weight: 400;
    line-height: 41px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Array', sans-serif;
    color: rgb(224, 224, 224);
    text-shadow: none;
    width: fit-content;
    position: relative;
}

.profile-info h1 * {
    font-family: 'Array', sans-serif;
}

#profile-name-typing::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: url('assets/sparkle.gif') center / 100% 100% no-repeat;
    mix-blend-mode: screen;
    pointer-events: none;
}

#profile-name-typing {
    position: relative;
    display: inline-block;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2rem;
    background-color: #fff;
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

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

.bio {
    font-size: 0.85rem;
    color: var(--theme-muted);
    margin-bottom: 13px;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.07);
    transition: transform 180ms ease, background 180ms ease;
    opacity: 0.9;
}

.social-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(1.2);
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.github-timeline-card {
    padding: 0;
    grid-column: 2;
    grid-row: 1 / span 5;
    min-height: 0;
    align-self: stretch;
    contain: size layout paint style;
    display: flex;
    flex-direction: column;
    background: var(--theme-panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.github-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.github-timeline-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.github-timeline-title i {
    font-size: 1rem;
}

.github-timeline-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: invert(1);
}

.github-profile-link {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    text-decoration: none;
    transition: color 180ms ease;
}

.github-profile-link:hover,
.github-profile-link:focus-visible {
    color: #fff;
}

.github-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.github-update {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 14px 12px 14px 26px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background 180ms ease;
}

.github-update::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 16px;
    width: 7px;
    height: 7px;
    border: 2px solid var(--theme-purple-soft);
    border-radius: 50%;
    background: var(--theme-purple);
    box-shadow: 0 0 12px rgba(61, 11, 201, 0.72);
}

.github-update:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 27px;
    bottom: -7px;
    width: 1px;
    background: rgba(61, 11, 201, 0.42);
}

.github-update:hover,
.github-update:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.github-update-repository {
    color: var(--theme-purple-soft);
    font-size: 0.72rem;
    font-weight: 600;
}

.github-update-message {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    line-height: 1.4;
}

.github-update-meta,
.github-timeline-state {
    color: var(--theme-muted);
    font-size: 0.68rem;
}

.github-update-files { display: grid; gap: 6px; margin-top: 5px; }
.github-update-files[hidden] { display: none; }
.github-update-file { border: 1px solid rgba(255,255,255,.07); border-radius: 9px; background: rgba(0,0,0,.22); font-size: .68rem; overflow: hidden; }
.github-file-name { padding: 9px 10px; color: #c9bcff; overflow-wrap: anywhere; cursor: pointer; }
.github-file-stats { color: #8ce99a; margin-left: 6px; }
.github-file-patch { padding: 0 10px 10px; margin: 0; max-height: 220px; overflow: auto; color: rgba(255,255,255,.76); white-space: pre-wrap; overflow-wrap: anywhere; font-family: 'Fira Code', monospace; line-height: 1.65; tab-size: 2; }
.github-update-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.github-expand-button { border: 1px solid rgba(140,114,255,.25); border-radius: 8px; padding: 7px 10px; background: rgba(140,114,255,.1); color: #d8ceff; cursor: pointer; font: inherit; font-size: .7rem; min-height: 32px; }
.github-expand-button:hover, .github-expand-button:focus-visible { background: rgba(61, 11, 201, .55); outline: none; }
.github-commit-link { color: var(--theme-muted); font-size: .7rem; text-decoration: none; padding: 8px 0; }

.github-timeline-state {
    padding: 14px 12px;
    text-align: center;
}

.presence-card {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    min-height: 106px;
}

.presence-avatar-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
}

.presence-avatar-wrap .presence-avatar {
    width: 72px;
    height: 72px;
    position: relative;
    z-index: 1;
    border-radius: 12px;
}

.presence-avatar-wrap .status-indicator {
    right: 1px;
    bottom: 1px;
}

.presence-activity-small {
    position: absolute;
    right: -1px;
    bottom: -1px;
    z-index: 2;
    width: 25px;
    height: 25px;
    padding: 3px;
    border-radius: 50%;
    background: #18191d;
    object-fit: cover;
}

.presence-activity-small[hidden] {
    display: none;
}

.presence-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #747f8d;
    border: 1px solid rgba(12, 13, 15, 0.72);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 3;
}

.discord-profile-popover { position: fixed; z-index: 100; width: min(320px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 24px 18px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; background: #101115; box-shadow: 0 18px 48px rgba(0,0,0,.72); }
.popover-close { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; background: transparent; border: 0; border-radius: 50%; color: var(--theme-muted); font-size: 22px; z-index: 2; }
.discord-profile-popover[hidden] { display: none; }
.discord-profile-header { display: flex; gap: 12px; align-items: flex-end; }
.discord-profile-avatar { position: relative; width: 84px; height: 84px; flex: 0 0 auto; }
.discord-profile-avatar img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.discord-profile-avatar .status-indicator { width: 15px; height: 15px; right: 1px; bottom: 1px; }
.presence-avatar-wrap .avatar-decoration,
.discord-profile-avatar .avatar-decoration { position: absolute; width: 120%; height: 120%; max-width: none; left: -10%; top: -10%; object-fit: contain; border: 0; border-radius: 0; pointer-events: none; z-index: 2; }
.discord-profile-custom-status { margin-bottom: 7px; }
.discord-profile-identity { margin-top: 12px; }
.discord-profile-name-row { display: flex; align-items: center; gap: 7px; }
.discord-profile-name { font-size: 1.05rem; font-weight: 600; }
.discord-profile-handle { margin-top: 2px; color: rgba(255,255,255,.58); font-size: .76rem; }
.discord-profile-bio { margin-top: 12px; padding-left: 10px; border-left: 3px solid #7d5cff; font-size: .76rem; white-space: pre-wrap; }
.discord-profile-bio[hidden] { display: none; }
.discord-profile-activity { margin-top: 13px; padding: 10px; border-radius: 9px; background: #18191d; }
.discord-profile-activity[hidden] { display: none; }
.discord-profile-activity-label { margin-bottom: 7px; color: rgba(255,255,255,.7); font-size: .67rem; font-weight: 600; }
.discord-profile-activity-body { display: flex; align-items: center; gap: 9px; }
.discord-profile-activity-image { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 8px; object-fit: cover; background: #26272b; }
.discord-profile-activity-copy { min-width: 0; }
.discord-profile-activity-name { font-size: .82rem; font-weight: 600; }
.discord-profile-activity-copy p { margin: 2px 0 0; overflow: hidden; color: rgba(255,255,255,.72); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.discord-profile-activity-copy .discord-profile-activity-time { color: #74d99f; font-family: 'Fira Code', monospace; }

.presence-info {
    min-width: 0;
    flex: 1;
}

.presence-activity-type {
    margin: 0 0 7px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.presence-info h2 {
    margin: 0 0 3px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.presence-info p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.presence-activity-state { color: rgba(255, 255, 255, 0.46) !important; }
.presence-activity-time { color: #7ee2a8 !important; font-family: 'Fira Code', monospace; }
.presence-activity-time:empty { display: none; }

.presence-card.has-activity .status-indicator {
    width: 9px;
    height: 9px;
    right: 2px;
    bottom: 2px;
}

.discord-glass-card {
    padding: 10px;
}

.discord-presence-layout {
    min-height: 74px;
    gap: 10px;
}

.discord-presence-layout .presence-avatar-wrap {
    width: 74px;
    height: 74px;
    flex-basis: 74px;
}

.discord-presence-layout .presence-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
}

.discord-presence-layout .presence-info {
    display: grid;
    align-content: center;
    gap: 3px;
}

.discord-identity-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.discord-presence-layout .presence-info h2 {
    margin: 0;
    font-size: 18.5px;
    font-weight: 550;
}

.discord-guild-tag {
    min-width: 47.5px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 1px 4px;
    border: 2px solid rgba(27, 27, 27, 0.04);
    border-radius: 8px;
    background: rgba(27, 27, 27, 0.2);
    color: #e0e0e0;
    font-size: 12px;
    line-height: 1;
}

.discord-guild-tag img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.discord-custom-status {
    width: fit-content;
    max-width: 100%;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid rgba(224, 224, 224, 0.14);
    border-radius: 999px;
    background: rgba(27, 27, 27, 0.28);
}

.discord-custom-status-emoji {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    object-fit: contain;
}

.discord-custom-status-emoji[hidden],
.discord-custom-status-unicode[hidden] {
    display: none;
}

.discord-handle {
    color: var(--theme-muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discord-activity-summary {
    display: none;
}

.discord-presence-layout #presence-activity-type,
.discord-presence-layout #presence-activity-details,
.discord-presence-layout #presence-activity-time {
    display: none;
}

.music-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.music-cover {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.player-controls {
    flex: 1;
    min-width: 0;
}

.music-mute-button {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(8, 10, 11, 0.38);
    color: var(--theme-text);
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.music-mute-button img {
    width: 18px;
    height: 18px;
    filter: invert(1);
    opacity: 0.78;
}

.music-mute-button::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #ff6b6b;
    opacity: 0;
    transform: rotate(-45deg);
}

.music-mute-button.is-muted::after {
    opacity: 1;
}

.music-mute-button:hover,
.music-mute-button:focus-visible {
    border-color: rgba(140, 114, 255, 0.7);
    background: rgba(61, 11, 201, 0.28);
    outline: none;
    transform: scale(1.05);
}

.music-info-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: -6px;
    color: var(--theme-muted);
    font-variant-numeric: tabular-nums;
}

.progress-container {
    width: 100%;
    height: 32px;
    display: flex;
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    touch-action: none;
    outline: none;
    overflow: visible;
    isolation: isolate;
}

.progress-container::before { content: ''; position: absolute; width: 100%; height: 5px; background: rgba(0,0,0,.36); border-radius: 99px; z-index: -1; }

.progress-bar {
    height: 5px;
    background: linear-gradient(90deg, #7152e8, #c0b0ff);
    border-radius: 999px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    pointer-events: none;
    box-shadow: 0 0 9px rgba(140,114,255,.22);
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(180, 152, 255, 0.25);
    opacity: 0;
    transform: translateY(-50%) scale(0.6);
    transition: opacity 160ms ease, transform 160ms ease;
}

.progress-container:hover .progress-bar::after,
.progress-container:focus-visible .progress-bar::after,
.progress-container.is-seeking .progress-bar::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.progress-container:focus-visible {
    box-shadow: 0 0 0 3px rgba(180, 152, 255, 0.45);
}

::selection {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (max-width: 900px) {
    body {
        align-items: flex-start;
        padding: 12px 0 32px;
    }

    #main-container {
        width: min(calc(100% - 24px), 500px);
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    body.entered #main-container { display: flex; }

    #main-container > .card {
        width: 100%;
        min-width: 0;
        grid-column: auto;
        grid-row: auto;
    }

    .github-timeline-card {
        min-height: 0;
        height: auto !important;
        contain: layout paint style;
        order: 6;
    }

    .github-timeline { max-height: min(62svh, 560px); }

    .presence-avatar-wrap {
        width: 76px;
        flex-basis: 76px;
    }

    .card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .presence-card { gap: 8px; }

    .music-card,
    .player-controls,
    .presence-info { min-width: 0; }
}

@media (min-width: 901px) and (max-height: 800px) {
    body { padding: 12px 0; }
    .card { padding: 12px; }
    .github-timeline { max-height: none; }
    #twitter-banner-img { height: 125px !important; }
}

body[data-surface="bare"] .card,
body[data-surface="bare"] .card.show:hover {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body[data-surface="bare"] .card::before,
body[data-surface="bare"] .card::after,
body[data-surface="bare"] .twitter-banner::after { display: none; }
body[data-surface="bare"] .github-timeline-header,
body[data-surface="bare"] .github-update-file { background: transparent; border-color: transparent; }
body[data-surface="bare"] .card { text-shadow: 0 1px 3px #000, 0 2px 10px rgba(0,0,0,.9); }
body[data-surface="bare"] .twitter-banner { border-radius: 18px; }
.discord-inline-activity { background: transparent; padding: 12px 0 0; margin-top: 10px; }
.discord-inline-activity .discord-profile-activity-copy { min-width: 0; }
.discord-inline-activity .discord-profile-activity-copy p { overflow-wrap: anywhere; }
.discord-glass-card .discord-activity-summary { display: none; }
.profile-card { padding: 0 !important; }
.profile-copy { padding: 14px 22px 20px; }
.twitter-banner { overflow: hidden; position: relative; }
.twitter-banner::after { content: ''; position: absolute; inset: auto 0 0; height: 42px; background: linear-gradient(transparent, rgba(26,27,31,.5)); pointer-events: none; }
#twitter-banner-img { display: block; width: 100%; height: 164px; object-fit: cover; opacity: .95; }
.music-title { margin-bottom: 7px; font-size: .8rem; font-weight: 500; letter-spacing: -.01em; }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 22px; }
.contact-details { min-width: 0; }
.contact-details h2 { margin: 0 0 5px; font-size: 16px; }
.contact-details p { margin: 0 0 10px; color: var(--theme-muted); font-size: 12px; }
.contact-details a { display: inline-block; padding: 5px 0; color: var(--theme-text, #eee); font-size: 14px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.server-layout, .server-identity { display: flex; align-items: center; gap: 12px; }
.server-layout { justify-content: space-between; }
.server-identity, .server-identity > div { min-width: 0; }
.server-avatar { border-radius: 12px; flex: 0 0 40px; object-fit: cover; }
.server-card h3 { font-size: .9rem; margin: 0 0 4px; }
.server-card p { color: var(--theme-muted); font-size: .7rem; line-height: 1.55; }
.server-join { display: inline-flex; align-items: center; justify-content: center; padding: 6px 15px; flex-shrink: 0; background: #1026c9; border: 0; border-radius: 5px; color: white; text-decoration: none; font-size: .8rem; font-weight: 500; transition: background 180ms ease; }
.server-join:hover { background: #1934e4; }
@media (pointer: coarse) {
    .social-link { width: 44px; height: 44px; }
    .progress-container { height: 44px; }
    .github-expand-button, .server-join { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    #profile-name-typing::after { display: none; }
    .card.show:hover { transform: none; }
}
