:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: rgba(18, 18, 20, 0.7);
    --text-primary: #fafafa;
    --text-secondary: #888891;
    --text-muted: #555560;
    --accent: #ff3d5a;
    --accent-glow: rgba(255, 61, 90, 0.4);
    --accent-secondary: #7b5cff;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --gradient-1: #ff3d5a;
    --gradient-2: #7b5cff;
    --gradient-3: #00d4aa;
}

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


html {
    font-size: 16px;
    zoom: 1.2;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Syne', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    touch-action: pan-y;
    -webkit-touch-callout: none;
}

a, button, input {
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.intro-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-content {
    text-align: center;
}

.intro-text {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: var(--text-primary);
    animation: pulse-text 2s ease-in-out infinite;
}

.intro-hint {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.main-content {
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.main-content.visible {
    opacity: 1;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 1000;
    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");
}

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

.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--gradient-1);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--gradient-2);
    bottom: 20%;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--gradient-3);
    bottom: -50px;
    right: 20%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.container {
    position: relative;
    z-index: 10;
    max-width: 420px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.container:has(.projects-grid) {
    max-width: 1200px;
}

.profile-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: slideUp 0.6s ease-out;
}

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

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

.avatar-glow {
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    border-radius: 50%;
    animation: rotate 4s linear infinite;
    opacity: 0.8;
}

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

.avatar {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-primary);
    z-index: 1;
}

.status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.profile-info {
    text-align: center;
    margin-bottom: 0;
}

.username {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #7b5cff 0%, #3b82f6 50%, #8b5cf6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.at {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    color: var(--accent);
    margin-right: 2px;
}

.bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.bio-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.bio-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 1;
    min-width: 0;
}

.bio-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.bio-link svg {
    flex-shrink: 0;
}

.now-playing-section {
    width: 100%;
    padding-top: 14px;
}

.now-playing-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: #1DB954;
    margin-bottom: 14px;
}

.listening-indicator {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.listening-indicator .bar {
    width: 3px;
    background: #1DB954;
    border-radius: 1px;
    animation: soundBar 0.8s ease-in-out infinite;
}

.listening-indicator .bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.listening-indicator .bar:nth-child(2) { height: 80%; animation-delay: 0.2s; }
.listening-indicator .bar:nth-child(3) { height: 60%; animation-delay: 0.4s; }

@keyframes soundBar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.4); }
}

.now-playing-content {
    display: flex;
    gap: 14px;
    align-items: center;
}

.now-playing-art {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.now-playing-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.now-playing-track {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.now-playing-track:hover {
    color: #1DB954;
}

.now-playing-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-container {
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1DB954;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease-out;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.not-playing {
    text-align: center;
    padding: 12px 0 0 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.bg-music-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    animation: slideUp 0.6s ease-out 0.08s backwards;
}

.bg-music-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 14px;
}

.bg-music-indicator {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.bg-music-indicator .bar {
    width: 3px;
    background: var(--accent);
    border-radius: 1px;
    animation: soundBar 0.8s ease-in-out infinite;
}

.bg-music-indicator .bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.bg-music-indicator .bar:nth-child(2) { height: 80%; animation-delay: 0.2s; }
.bg-music-indicator .bar:nth-child(3) { height: 60%; animation-delay: 0.4s; }

.bg-music-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bg-music-art {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.bg-music-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-music-details {
    flex: 1;
    min-width: 0;
}

.bg-music-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bg-music-artist {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.bg-progress-container {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bg-progress-time {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.bg-progress-bar {
    position: relative;
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    overflow: visible;
}

.bg-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.bg-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
    pointer-events: none;
}

.bg-progress-bar:hover .bg-progress-thumb {
    transform: translate(-50%, -50%) scale(1);
}

.bg-music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.control-btn.play-pause-btn {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border: none;
    color: white;
}

.control-btn.play-pause-btn:hover {
    box-shadow: 0 0 15px var(--accent-glow);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
}

.volume-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.volume-btn:hover {
    color: var(--text-primary);
}

.volume-slider-wrap {
    width: 70px;
    display: flex;
    align-items: center;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.spotify-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    animation: slideUp 0.6s ease-out 0.1s backwards;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.spotify-tracks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.spotify-tracks iframe {
    display: none;
}

.spotify-tracks iframe.loaded {
    display: block;
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.spotify-tracks iframe.loaded:nth-child(1) { animation-delay: 0.15s; }
.spotify-tracks iframe.loaded:nth-child(2) { animation-delay: 0.2s; }
.spotify-tracks iframe.loaded:nth-child(3) { animation-delay: 0.25s; }
.spotify-tracks iframe.loaded:nth-child(4) { animation-delay: 0.3s; }
.spotify-tracks iframe.loaded:nth-child(5) { animation-delay: 0.35s; }

.skeleton-track {
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    border-radius: 12px;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-track.hidden {
    display: none;
}

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

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


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

@media (max-width: 480px) {
    .container {
        padding: 20px 16px;
        gap: 20px;
    }
    
    .profile-card {
        padding: 24px 18px;
        gap: 14px;
    }
    
    .username {
        font-size: 1.5rem;
    }
    
    .bio {
        font-size: 0.85rem;
    }
    
    .bio-links {
        gap: 6px;
    }
    
    .bio-link {
        padding: 6px 10px;
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .bio-link svg {
        width: 16px;
        height: 16px;
    }
    
    .bg-music-section {
        padding: 12px;
    }
    
    .bg-music-controls {
        gap: 4px;
    }
    
    .control-btn {
        width: 28px;
        height: 28px;
    }
    
    .control-btn.play-pause-btn {
        width: 36px;
        height: 36px;
    }
    
    .volume-control {
        gap: 4px;
    }
    
    .volume-btn {
        width: 28px;
        height: 28px;
    }
    
    .volume-slider-wrap {
        width: 50px;
    }
    
    .spotify-section {
        padding: 16px;
    }
    
    .spotify-tracks {
        gap: 8px;
    }
    
    .cursor-glow {
        display: none;
    }
}

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

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

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    animation: slideUp 0.6s ease-out;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateX(-2px);
}

.projects-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #7b5cff 0%, #3b82f6 50%, #8b5cf6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    animation: slideUp 0.6s ease-out 0.1s backwards;
}

.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.6s ease-out backwards;
}

.project-card:nth-child(1) { animation-delay: 0.15s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.25s; }
.project-card:nth-child(4) { animation-delay: 0.3s; }
.project-card:nth-child(5) { animation-delay: 0.35s; }
.project-card:nth-child(6) { animation-delay: 0.4s; }

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

.project-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card:hover .project-image img {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 10;
    pointer-events: none;
}

.project-card:hover .project-overlay {
    opacity: 1;
    pointer-events: auto;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.project-link:hover {
    background: rgba(123, 92, 255, 0.9);
    border-color: rgba(123, 92, 255, 1);
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(123, 92, 255, 0.4);
}

.project-content {
    padding: 20px;
}

.project-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.project-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .projects-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .project-image {
        height: 160px;
    }
    
    .project-content {
        padding: 16px;
    }
}

