:root {
    --bg: #070006;
    --pink-1: rgba(255, 105, 180, 1);
    --pink-2: #ff6ad5;
    --pink-3: rgba(255, 105, 180, 0.5);
    --pink-4: #ab2267;
    --accent: #ff69b4;
    --glass: rgba(255, 255, 255, 0.04);
    --muted: rgba(255, 255, 255, 0.55);
    --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));

    --pill-h: 40px;
    --pill-padding: 6px;
    --pill-gap: 10px;
}
html,
body {
    height: 100%;
    margin: 0;
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: var(--bg);
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
iframe {
    max-width: 100%;
    height: auto;
}
.scene {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 20px;
    overflow: hidden;
}
canvas#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    pointer-events: none;
    z-index: 0;
}
.vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(700px 400px at 10% 10%, rgba(255, 0, 120, 0.06), transparent 6%), radial-gradient(600px 350px at 90% 90%, rgba(255, 90, 180, 0.04), transparent 6%);
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: screen;
}
.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    align-items: start;
}
.sidebar {
    padding: 26px;
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 80px rgba(255, 50, 150, 0.03) inset;
    border: 1px solid rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px) saturate(110%);
}
.main {
    max-width: 50vw;
    padding: 32px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.01));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
}
.logo {
    font-family: "Press Start 2P", monospace;
    font-size: 20px;
    letter-spacing: 1px;
    color: var(--pink-2);
    text-transform: uppercase;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255, 58, 149, 0.06), rgba(255, 30, 140, 0.02));
    box-shadow: 0 6px 20px rgba(255, 40, 140, 0.06);
}
.logo .elite {
    color: #fff;
    background: linear-gradient(90deg, var(--pink-1), var(--pink-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.profile {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}
.avatar {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    overflow: hidden;
    flex: 0 0 96px;
    background: linear-gradient(90deg, var(--pink-1), var(--pink-2));
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.who {
    text-align: left;
}
h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.05;
    letter-spacing: 0.6px;
    background: linear-gradient(90deg, var(--pink-1), #ffd6f2 60%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}
.badges {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.badge-img {
    height: 22px;
}
.section-title {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 18px 0 10px 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}
.info-table td,
.info-table th {
    vertical-align: top;
    padding: 6px 8px;
    color: #fff;
    font-size: 13px;
}
.about-list code {
    background: rgba(255, 255, 255, 0.02);
    padding: 4px 6px;
    border-radius: 6px;
    margin-right: 8px;
}
.skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
}
.skill-card {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    text-align: center;
}
.icons img {
    height: 40px;
    margin: 6px;
}
.links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.links a {
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--pink-1);
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.15), rgba(255, 182, 193, 0.1));
    border: 1px solid rgba(255, 105, 180, 0.3);
    box-shadow: 0 2px 6px rgba(255, 105, 180, 0.15);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: inline-block;
}

.links a:hover {
    transform: scale(1.07) rotate(-1deg);
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.25), rgba(255, 182, 193, 0.18));
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}
.main h2 {
    font-size: 20px;
    margin: 0 0 12px 0;
    background: linear-gradient(90deg, var(--pink-1), var(--pink-2));
    -webkit-background-clip: text;
    color: transparent;
}
.card {
    display: flex;
    flex-direction: column;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.01);
    margin-bottom: 14px;
}
.card.wakatime img {
    max-width: 100%;
    height: auto;
    display: block;
}
.spotify,
.lastfm,
.wakatime {
    text-align: center;
}
.repos {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.repo img {
    height: 120px;
    border-radius: 8px;
}
footer {
    margin-top: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.12);
    font-size: 12px;
}
.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pill-gap);
    justify-content: center;
    margin-top: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pill-icon {
    width: calc(var(--pill-h));
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pill-padding);
    padding-left: calc(var(--pill-padding) * 1.5);
    padding-right: calc(var(--pill-padding) * 1.5);
    box-sizing: border-box;
    background: var(--pink-3);
    flex: 0 0 var(--pill-h);
}

.pill-icon img,
.pill-icon svg {
    max-width: calc(var(--pill-h) * 0.5);
    max-height: calc(var(--pill-h) * 0.5);
    display: block;
    margin: auto;
    object-fit: contain;
}

.pill-icon svg {
    width: auto;
    height: auto;
    fill: white;
}

.pill-icon .emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--pill-h) * 0.5);
    line-height: 1;
    height: 100%;
    width: 100%;
    margin: 0;
}

.pill-text {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    background: linear-gradient(90deg, var(--pink-1), var(--pink-2));
    font-weight: 600;
    font-size: 14px;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.pill-text.fav {
    color: #fdff7d;
}

.pill-text.new {
    color: #a4ff92;
}

.pill:hover,
.pill:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.36);
    outline: none;
}

.username-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.username-list span {
    background: rgba(255, 105, 180, 0.15);
    color: #ff69b4;
    border: 1px solid rgba(255, 105, 180, 0.4);
    border-radius: 8px;
    padding: 4px 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

.username-list span:hover {
    background: rgba(255, 105, 180, 0.3);
    transform: scale(1.05);
}

.project-grid {
    display: grid;
    grid-auto-flow: row; /* fill row first */
    gap: 14px;
    margin: 20px auto;
    max-width: 900px;
    grid-template-columns: repeat(3, 1fr); /* desktop: max 3 per row */
}

.project-card {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.08), rgba(255, 182, 193, 0.04));
    border: 1px solid rgba(255, 105, 180, 0.25);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 3px 8px rgba(255, 105, 180, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(255, 105, 180, 0.2);
}

.project-grid > .project-card:nth-last-child(1):nth-child(3n + 1) {
    grid-column: span 3;
}

.project-grid > .project-card:nth-last-child(2):nth-child(3n + 1),
.project-grid > .project-card:nth-last-child(2):nth-child(3n + 2) {
    grid-column: span 2;
}

@media (max-width: 1300px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-grid > .project-card:nth-last-child(1):nth-child(2n + 1) {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-grid > .project-card:nth-last-child(1):nth-child(3n + 1) {
        grid-column: span 1;
    }

    .project-grid > .project-card:nth-last-child(2):nth-child(3n + 1),
    .project-grid > .project-card:nth-last-child(2):nth-child(3n + 2) {
        grid-column: span 1;
    }
}

.project-header {
    margin-bottom: 2px;
}

.project-name {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--pink-1) !important;
    margin: 0 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
    -webkit-background-clip: none !important;
    background: none !important;
}

.project-author {
    font-size: 0.75rem;
    color: rgba(255, 105, 180, 0.75);
    margin: -2px 0 0;
    font-style: italic;
}

.project-desc {
    margin: 6px 0 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    flex-grow: 1;
}

.project-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.project-divider {
    height: 1px;
    background: rgba(255, 105, 180, 0.2);
    width: 100%;
    margin: 2px 0;
}

.project-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.language-pill {
    background-color: rgba(255, 105, 180, 0.15);
    border: 1px solid rgba(255, 105, 180, 0.3);
    color: var(--pink-1);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.language-pill:hover {
    background-color: rgba(255, 105, 180, 0.25);
    transform: scale(1.05);
}

.wakatime-badge {
    height: 20px;
    align-self: flex-start;
    filter: hue-rotate(-10deg) saturate(1.3) brightness(1.2);
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.wakatime-badge:hover {
    opacity: 1;
    transform: scale(1.05);
}

.project-card.abandoned {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.04), rgba(255, 182, 193, 0.02));
    border: 1px solid rgba(255, 105, 180, 0.15);
    box-shadow: 0 2px 6px rgba(255, 105, 180, 0.06);
    color: rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.project-card.abandoned::after {
    content: "Abandoned";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 105, 180, 0.9);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-card.abandoned .project-name {
    color: rgba(255, 105, 180, 0.5) !important;
}

.project-card.abandoned .project-author {
    color: rgba(255, 105, 180, 0.4);
}

.project-card.abandoned .project-desc {
    color: rgba(255, 255, 255, 0.5);
}

.project-card.abandoned .project-divider {
    background: rgba(255, 105, 180, 0.1);
}

.project-card.abandoned .language-pill {
    background-color: rgba(255, 105, 180, 0.08);
    border: 1px solid rgba(255, 105, 180, 0.2);
    color: rgba(255, 105, 180, 0.5);
}

.project-card.abandoned .wakatime-badge {
    filter: hue-rotate(-10deg) saturate(0.6) brightness(0.9);
    opacity: 0.6;
}

.project-card.abandoned:hover {
    transform: none; /* optional: keep hover subtle */
    box-shadow: 0 2px 6px rgba(255, 105, 180, 0.06);
}

@media (max-width: 520px) {
    .pill-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        flex: 0 0 36px;
    }
    .pill-text {
        padding: 7px 10px;
        font-size: 13px;
    }
}

@media (max-width: 980px) {
    .scene {
        width: 100vw;
        padding: 56px 0px;
        justify-content: center;
    }

    .container {
        display: flex;
        flex-direction: column;
        max-width: 90%;
        margin: auto 0;
        padding: 10px 0;
    }

    .sidebar {
        margin: 0;
        order: 1;
        width: calc(100% - 52px);
    }

    .main {
        margin: 0;
        max-width: 100%;
        order: 2;
        width: calc(100% - 52px);
    }

    .card {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        padding: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.02);
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        flex-direction: column;
        justify-content: center;
    }

    .pill-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pill {
        flex: 0 1 auto;
        white-space: nowrap;
    }

    img,
    iframe {
        max-width: 100%;
        width: auto;
        height: auto;
        aspect-ratio: auto;

        .section-title {
            margin: 8px 0;
            font-size: 1.1rem;
            text-align: center; /* center headings on mobile */
        }

        body {
            font-size: 0.95rem;
            line-height: 1.5;
        }
    }
}

.discord-presence-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 105, 180, 0.25);
    word-break: break-word;
}

.discord-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.discord-avatar-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
}

.discord-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%; /* Circular avatar */
    box-shadow: 0 0 0 2px var(--bg);
}

.discord-decoration {
    position: absolute;
    max-height: none !important;
    max-width: none !important;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    pointer-events: none;
}

.discord-status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    background: #43b581; /* online */
    box-sizing: border-box;
}

.discord-status-indicator.status-idle {
    background: #faa61a;
}
.discord-status-indicator.status-dnd {
    background: #f04747;
}
.discord-status-indicator.status-offline {
    background: #747f8d;
}

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

.discord-display-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--pink-1);
    margin: 0 0 4px 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.discord-username {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 8px 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.discord-custom-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.discord-custom-status img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    flex-shrink: 0;
}

.discord-activities {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 105, 180, 0.15);
}

.discord-activity {
    display: flex;
    gap: 12px;
}

.discord-activity-images {
    position: relative;
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
}

.discord-activity-large {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.discord-activity-large-poster {
    width: auto;
    height: 80px;
    margin-left: 15%;
    object-fit: contain;
    aspect-ratio: 2 / 3;
}

.discord-activity-small {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg);
}

.discord-activity-text {
    flex: 1;
    min-width: 0;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

.discord-activity-name {
    font-weight: 600;
    color: var(--pink-1);
    margin: 0 0 4px 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.discord-activity-detail,
.discord-activity-state {
    color: var(--muted);
    margin: 2px 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.discord-activity-timestamps {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically center the timestamps */
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.discord-activity-time-elapsed,
.discord-activity-time-total {
    white-space: nowrap;
}

.discord-activity-progressbar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 8px;
    align-self: center; /* Vertically center the progress bar */
}

.discord-activity-progress {
    height: 100%;
    background: var(--pink-1);
    transition: width 0.3s ease;
}

.discord-activity-elapsed {
    color: var(--muted);
    margin-top: 4px;
    font-size: 12px;
}

.discord-error {
    color: #f04747;
    text-align: center;
    padding: 16px;
    font-size: 14px;
}

.discord-loading {
    color: var(--muted);
    text-align: center;
    padding: 16px;
    font-style: italic;
}