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

html {
    background: #0a0a0f;
    color-scheme: dark;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    padding: 2rem 0 120px 0;
    position: relative;
}

/* Ensure background covers full scrollable area */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0f;
    z-index: -2;
}

/* Particle Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Animated Gradient Blobs - replaced by particle system */

/* Entrance Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.8) rotate(-5deg); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.scale-in {
    animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid rgba(200, 214, 229, 0.5);
    animation: 
        typing 1.5s steps(20, end),
        blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.delay-1 { animation-delay: 0.3s; opacity: 0; }
.delay-2 { animation-delay: 0.6s; opacity: 0; }
.delay-3 { animation-delay: 0.75s; opacity: 0; }
.delay-4 { animation-delay: 0.9s; opacity: 0; }
.delay-5 { animation-delay: 1.2s; opacity: 0; }

.container {
    text-align: center;
    padding: 2rem;
    max-width: 900px;
    width: 100%;
    margin: auto 0;
}

.logo {
    font-size: 3.5rem;
    font-weight: 200;
    letter-spacing: 0.3em;
    text-transform: lowercase;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #c8d6e5, #8fa8c8, #a08fc8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    display: inline-block;
}

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

.tagline {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 4rem;
}

.portfolios {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

/* Card with Glow Effect */
.card {
    display: block;
    width: 220px;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-decoration: none;
    color: #c8d6e5;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(200, 214, 229, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover, .card:active {
    border-color: rgba(200, 214, 229, 0.2);
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(200, 214, 229, 0.1);
}

.card:hover .card-glow, .card:active .card-glow {
    opacity: 1;
}

.card-name {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.card-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #555;
    position: relative;
    z-index: 1;
}

.card:hover .card-name, .card:active .card-name {
    color: #fff;
}

.card:hover .card-label, .card:active .card-label {
    color: #888;
}

/* GitHub Activity Section */
.github-section {
    margin-top: 2rem;
    width: 100%;
}

.section-title {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.chart-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    overflow-x: auto;
    transition: all 0.3s ease;
}

.chart-container:hover {
    border-color: rgba(200, 214, 229, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.contribution-chart {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.9;
    forced-color-adjust: none;
    -webkit-forced-color-adjust: none;
}

/* Floating Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
    animation: slideUpNav 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s forwards;
    opacity: 0;
}

@keyframes slideUpNav {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #666;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 20px;
    position: relative;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item span {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.nav-item:hover, .nav-item:active, .nav-item.active {
    color: #c8d6e5;
    background: rgba(200, 214, 229, 0.1);
    transform: translateY(-2px);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #c8d6e5;
    border-radius: 50%;
}

@media (max-width: 768px) {
    .logo { 
        font-size: 2.5rem; 
        letter-spacing: 0.2em;
    }
    .portfolios { 
        flex-direction: column; 
        align-items: center;
        gap: 1.5rem;
    }
    .card { 
        width: 100%;
        max-width: 300px;
    }
    .chart-container {
        padding: 1rem;
    }
    .bottom-nav {
        width: calc(100% - 40px);
        max-width: 400px;
        justify-content: space-around;
    }
    .nav-item {
        padding: 0.5rem 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo, .card, .activity-item, .bottom-nav {
        animation: none !important;
    }
    .fade-in, .scale-in {
        opacity: 1 !important;
        animation: none !important;
    }
}
