* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #0080ff, #d400ff);
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333;
    --glow-color: rgba(0, 128, 255, 0.3);
    --glow-color-alt: rgba(212, 0, 255, 0.3);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.backslash {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 700;
    margin-right: 0.2rem;
}

.domain {
    color: var(--text-primary);
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
}

.nav-icon {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
}

.nav-icon:hover {
    color: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Bio Section */
.bio-section {
    max-width: 800px;
}

.name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 0 20px var(--glow-color), 0 0 40px var(--glow-color-alt);
}

.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bio-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.skills-section {
    margin-top: 2rem;
}

.skills-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skills-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Projects Section */
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1200px;
}

/* Force 3 equal columns when there are exactly 3 items */
.projects-grid:has(.project-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

/* Fallback for browsers without :has() support */
@supports not selector(:has(*)) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: #0080ff;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px var(--glow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-card:nth-child(even):hover {
    border-color: #d400ff;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px var(--glow-color-alt),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.project-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* See More Button */
.see-more {
    text-align: center;
}

.see-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid;
    border-image: var(--primary-gradient) 1;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.see-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.see-more-btn:hover {
    color: white;
    box-shadow: 0 0 20px var(--glow-color);
    transform: translateY(-2px);
}

.see-more-btn:hover::before {
    left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Override 3-column layout on mobile */
    .projects-grid:has(.project-card:nth-child(3):last-child) {
        grid-template-columns: 1fr;
    }
    
    @supports not selector(:has(*)) {
        .projects-grid {
            grid-template-columns: 1fr;
        }
    }
    
    .nav-icons {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.5rem;
    }
    
    .bio-text {
        font-size: 1rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0066cc, #b300cc);
}

/* Cursor Follower Cube */
.cursor-cube {
    position: fixed;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 9999;
    animation: cubeRotate 4s linear infinite;
    opacity: 0.8;
    transition: transform 0.1s ease-out;
}

.cursor-cube::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    border: 2px solid;
    border-image: var(--primary-gradient) 1;
    border-radius: 2px;
    box-shadow: 
        0 0 10px rgba(0, 128, 255, 0.4),
        0 0 20px rgba(212, 0, 255, 0.3),
        inset 0 0 10px rgba(0, 128, 255, 0.2);
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes cubeRotate {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

@keyframes glowPulse {
    0% {
        box-shadow: 
            0 0 10px rgba(0, 128, 255, 0.4),
            0 0 20px rgba(212, 0, 255, 0.3),
            inset 0 0 10px rgba(0, 128, 255, 0.2);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(0, 128, 255, 0.6),
            0 0 30px rgba(212, 0, 255, 0.5),
            inset 0 0 15px rgba(0, 128, 255, 0.3);
    }
}
