:root {
    --bg-dark: #0a0a1a;
    --bg-darker: #050510;
    --primary: #a855f7; /* Purple 500 */
    --primary-glow: rgba(168, 85, 247, 0.5);
    --pink: #db2777;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --card-bg: rgba(0, 0, 0, 0.4);
    --border-color: rgba(168, 85, 247, 0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to bottom, var(--bg-dark), #1a1a2e);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- BACKGROUND CANVAS --- */
#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- LAYOUT --- */
main {
    position: relative;
    z-index: 10;
    max-width: 1024px;
    margin: 0 auto;
    padding: 4rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

/* --- ANIMATIONS --- */
@keyframes fadeInZoom {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

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

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

.animate-enter { animation: fadeInZoom 1s ease-out forwards; }
.animate-slide-up { opacity: 0; animation: slideUp 1s ease-out 0.3s forwards; }
.animate-slide-up-delay { opacity: 0; animation: slideUp 1s ease-out 0.5s forwards; }

/* --- HERO SECTION --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.avatar-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 1rem;
}

.avatar-glow {
    position: absolute;
    inset: -4px;
    background: linear-gradient(to right, var(--primary), var(--pink));
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0.75;
    transition: opacity 0.3s;
}

.avatar-img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #000;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #c084fc, #f472b6, #c084fc);
    background-size: 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientMove 3s linear infinite;
}

.subtitle {
    font-size: 1.125rem;
    color: #d1d5db;
    line-height: 1.6;
    max-width: 40rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    height: 36px;
}

.btn-github {
    background: transparent;
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #d8b4fe;
}
.btn-github:hover {
    background: rgba(168, 85, 247, 0.2);
    color: #f3e8ff;
}

.btn-discord {
    background: #5865F2;
    color: white;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
    border: none;
}
.btn-discord:hover {
    background: #4752C4;
}

/* --- TABS & PROJECTS --- */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e9d5ff;
    margin-bottom: 1.5rem;
}

.projects-container {
    width: 100%;
    max-width: 56rem; /* 4xl */
}

.tabs-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.tab-btn:hover:not(.active) {
    color: #d8b4fe;
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
.tab-content.active {
    display: flex;
}

/* --- CARDS --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    backdrop-filter: blur(4px);
}

.card:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f3e8ff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-desc {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.badge-alpha {
    background: rgba(88, 28, 135, 0.5);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-tech {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 5px;
}

/* --- GRID SECTION --- */
.grid-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 56rem;
}

@media (min-width: 768px) {
    .grid-split {
        grid-template-columns: 1fr 1fr;
    }
    h1 { font-size: 3.75rem; }
}

.lanyard-card {
    background: black;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 220px;
}

.lanyard-card img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s;
}

.lanyard-card:hover img {
    transform: scale(1.05);
}

.lanyard-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #9333ea, #2563eb);
    opacity: 0.2;
    filter: blur(20px);
    transition: opacity 0.5s;
}

.lanyard-card:hover .lanyard-glow {
    opacity: 0.6;
}

.highlight-purple { color: #d8b4fe; font-weight: 500; }
.highlight-pink { color: #f9a8d4; font-weight: 500; }

footer {
    margin-top: 2rem;
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    z-index: 10;
}

.pulse-text {
    color: rgba(216, 180, 254, 0.6);
    font-size: 0.875rem;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    text-align: center;
    margin-top: 2rem;
}

.stack-container {
    width: 100%;
    max-width: 56rem;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stack-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stack-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
    background: rgba(168, 85, 247, 0.08);
}

.stack-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.7;
    transition: color 0.3s;
}

.stack-card:hover .stack-tag {
    color: #f3e8ff;
}

.stack-icons {
    display: flex;
    gap: 1.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stack-icons img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    opacity: 0.4; 
    filter: grayscale(1) brightness(1.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stack-card:hover .stack-icons img {
    opacity: 0.7;
    filter: grayscale(0.5) brightness(1.2);
}

.stack-icons img:hover {
    opacity: 1 !important;
    filter: grayscale(0) brightness(1.5) !important;
    transform: scale(1.3) translateY(-2px);
    filter: drop-shadow(0 0 8px var(--primary-glow)) !important;
}

.badge-npm {
    background: rgba(203, 56, 55, 0.1);
    border: 1px solid rgba(203, 56, 55, 0.3);
    color: #ff6b6b;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.npm-stats {
    margin-top: 1rem;
    background: #1a1a1a;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #cb3837;
}