/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --text-primary: #e4e4e7;
    --text-secondary: #71717a;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.15);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ========================================
   Particles Background
   ======================================== */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ========================================
   Ambient Glow Effect
   ======================================== */
.ambient-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vh;
    background: radial-gradient(
        ellipse at center,
        var(--accent-glow) 0%,
        transparent 70%
    );
    z-index: 0;
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ========================================
   Main Container
   ======================================== */
.container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.content {
    text-align: center;
    position: relative;
}

/* ========================================
   Name Typography
   ======================================== */
.name {
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    gap: 0.1em;
}

.name-first {
    font-size: clamp(3rem, 12vw, 8rem);
    color: var(--text-primary);
    opacity: 0;
    animation: fadeSlideIn 1s ease forwards;
    animation-delay: 0.3s;
}

.name-last {
    font-size: clamp(3rem, 12vw, 8rem);
    background: linear-gradient(
        135deg,
        var(--accent-primary) 0%,
        var(--accent-secondary) 50%,
        var(--text-primary) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeSlideIn 1s ease forwards, gradientShift 6s ease infinite;
    animation-delay: 0.5s, 0s;
}

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

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

/* ========================================
   Typewriter Effect
   ======================================== */
.typewriter-container {
    margin-top: 2rem;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 1.2s;
}

.typewriter-text {
    font-family: var(--font-mono);
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.typewriter-cursor {
    font-family: var(--font-mono);
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    color: var(--accent-primary);
    animation: cursorBlink 1s step-end infinite;
    margin-left: 2px;
}

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ========================================
   Social Links
   ======================================== */
.social-links {
    margin-top: 3rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeSlideIn 0.8s ease forwards 1.5s;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: var(--transition-smooth);
    border-radius: 50%;
}

.social-link:hover {
    color: var(--text-primary);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link svg {
    position: relative;
    z-index: 1;
    transition: var(--transition-fast);
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* ========================================
   Hover Interactions
   ======================================== */
.name-first,
.name-last {
    transition: var(--transition-smooth);
    cursor: default;
}

.name:hover .name-first {
    letter-spacing: 0.02em;
}

.name:hover .name-last {
    letter-spacing: 0.02em;
    filter: brightness(1.2);
}

/* ========================================
   Subtle Grid Overlay
   ======================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .ambient-glow {
        width: 90vw;
        height: 50vh;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    body::before {
        background-size: 30px 30px;
    }
    
    .typewriter-container {
        padding: 0 1rem;
    }
}

/* ========================================
   Selection Styling
   ======================================== */
::selection {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

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

/* ========================================
   Scrollbar (if needed)
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}