@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
    --bg: #050508;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.06);
    --text: #e8e6e3;
    --text-dim: rgba(255, 255, 255, 0.4);
    --accent: #c4b5fd;
    --accent-bright: #a78bfa;
    --accent-glow: rgba(167, 139, 250, 0.15);
    --spotify-green: #1DB954;
    --online: #23a55a;
    --idle: #f0b232;
    --dnd: #f23f43;
    --offline: #80848e;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-bright);
    color: var(--bg);
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cursor-glow.active {
    opacity: 1;
}

.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-bright);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.cursor-dot.clicking {
    transform: translate(-50%, -50%) scale(0.5);
}

/* ── Music Toggle ── */

.music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-dim);
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.music-toggle:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--accent-bright);
    transform: scale(1.05);
}

.music-toggle.playing {
    border-color: rgba(167, 139, 250, 0.3);
    color: var(--accent-bright);
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.15);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 16px rgba(167, 139, 250, 0.15); }
    50% { box-shadow: 0 0 24px rgba(167, 139, 250, 0.3); }
}

/* ── Container ── */

.container {
    position: relative;
    z-index: 2;
    max-width: 440px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* ── Profile Section ── */

.profile-section {
    text-align: center;
    margin-bottom: 16px;
}

.avatar-wrapper {
    margin-bottom: 20px;
    display: inline-block;
}

.avatar-ring {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-bright), transparent, var(--accent-bright));
    animation: ring-rotate 8s linear infinite;
}

@keyframes ring-rotate {
    0% { background: linear-gradient(0deg, var(--accent-bright), transparent 60%, var(--accent-bright)); }
    25% { background: linear-gradient(90deg, var(--accent-bright), transparent 60%, var(--accent-bright)); }
    50% { background: linear-gradient(180deg, var(--accent-bright), transparent 60%, var(--accent-bright)); }
    75% { background: linear-gradient(270deg, var(--accent-bright), transparent 60%, var(--accent-bright)); }
    100% { background: linear-gradient(360deg, var(--accent-bright), transparent 60%, var(--accent-bright)); }
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--bg);
    border: 3px solid var(--bg);
}

.status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--offline);
    border: 3px solid var(--bg);
    z-index: 3;
    transition: background 0.3s ease;
}

.status-indicator.online { background: var(--online); }
.status-indicator.idle { background: var(--idle); }
.status-indicator.dnd { background: var(--dnd); }
.status-indicator.offline { background: var(--offline); }

.username {
    font-family: 'Syne', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.2;
}

.realname {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.status-text {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 20px;
}

.status-emoji {
    font-size: 0.9rem;
}

/* ── Bio Section ── */

.bio-section {
    width: 100%;
    text-align: center;
    margin-bottom: 24px;
}

.bio-text {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* ── Section Label ── */

.section-label {
    width: 100%;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    opacity: 0.5;
    margin-bottom: 12px;
    margin-top: 8px;
    padding-left: 2px;
}

/* ── Cards Base ── */

.discord-activity,
.spotify-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.discord-activity:hover,
.spotify-card:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* ── Discord Activity Card ── */

.activity-header {
    margin-bottom: 12px;
}

.activity-type {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.activity-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.activity-image {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface);
}

.activity-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-name {
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-details,
.activity-state {
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Spotify Card ── */

.spotify-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.spotify-header span {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--spotify-green);
}

.spotify-icon {
    flex-shrink: 0;
}

.spotify-content {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.spotify-album {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface);
}

.spotify-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spotify-song {
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-artist {
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-album-name {
    font-size: 0.7rem;
    color: var(--text-dim);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spotify-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.spotify-bar-fill {
    height: 100%;
    background: var(--spotify-green);
    border-radius: 2px;
    width: 0%;
    transition: width 1s linear;
}

.spotify-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--text-dim);
    opacity: 0.6;
}

/* ── Social Links ── */

.social-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transition: left 0.5s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.social-link .arrow {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.3s ease;
}

.social-link:hover .arrow {
    opacity: 0.5;
    transform: translateX(0);
}

.social-link.discord:hover {
    border-color: rgba(88, 101, 242, 0.3);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.08);
}

.social-link.spotify:hover {
    border-color: rgba(29, 185, 84, 0.3);
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.08);
}

.social-link.github:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

.social-link svg:not(.arrow) {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.social-link:hover svg:not(.arrow) {
    opacity: 1;
}

/* ── Tech Stack ── */

.tech-stack {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}

.tech-item {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: none;
}

.tech-item:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.tech-item::after {
    content: attr(data-name);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(20, 20, 28, 0.95);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.tech-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tech-item svg {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.tech-item:hover svg {
    opacity: 1;
}

/* ── Projects Grid ── */

.projects-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: none;
}

.project-card:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.project-name {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-desc {
    font-size: 0.65rem;
    color: var(--text-dim);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.project-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    color: var(--text-dim);
}

.lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.project-stars {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.6rem;
    color: var(--text-dim);
}

.project-stars svg {
    opacity: 0.5;
}

/* ── Project Skeleton ── */

.project-skeleton {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    position: relative;
}

.project-skeleton::before {
    content: '';
    display: block;
    width: 60%;
    height: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}

.project-skeleton::after {
    content: '';
    display: block;
    width: 90%;
    height: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.project-skeleton .skel-line {
    width: 40%;
    height: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.project-skeleton {
    background: var(--surface);
    background-image: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s ease-in-out infinite;
}

/* ── Sparkle Effects ── */

.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-bright);
    animation: sparkle-fly 0.6s ease-out forwards;
}

@keyframes sparkle-fly {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(var(--tx), var(--ty));
    }
}

/* ── Footer ── */

.footer {
    text-align: center;
    padding: 20px 0;
    width: 100%;
}

.footer p {
    font-size: 0.65rem;
    color: var(--text-dim);
    opacity: 0.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Fade In Animation ── */

.fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in:nth-child(1) { transition-delay: 0s; }
.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in:nth-child(4) { transition-delay: 0.24s; }
.fade-in:nth-child(5) { transition-delay: 0.32s; }
.fade-in:nth-child(6) { transition-delay: 0.4s; }
.fade-in:nth-child(7) { transition-delay: 0.48s; }
.fade-in:nth-child(8) { transition-delay: 0.56s; }
.fade-in:nth-child(9) { transition-delay: 0.64s; }
.fade-in:nth-child(10) { transition-delay: 0.72s; }
.fade-in:nth-child(11) { transition-delay: 0.8s; }
.fade-in:nth-child(12) { transition-delay: 0.88s; }

/* ── Responsive ── */

@media (max-width: 480px) {
    body {
        cursor: auto;
    }

    .cursor-glow,
    .cursor-dot {
        display: none !important;
    }

    .container {
        padding: 60px 16px 32px;
    }

    .username {
        font-size: 1.5rem;
    }

    .social-link:hover {
        transform: none;
    }

    .tech-item:hover {
        transform: none;
    }

    .project-card:hover {
        transform: none;
    }

    .music-toggle {
        cursor: auto;
    }

    .tech-item {
        cursor: auto;
    }

    .project-card {
        cursor: auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Scrollbar ── */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
