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

:root {
    --color-primary: #FF5373;
    --color-secondary: #17E7FF;
    --color-accent: #FFC858;
    --color-purple: #6D3BFF;
    --color-white: #ffffff;
    --color-dark: #003FFF;
    --color-text: #161616;
    --color-text-light: #666666;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100vw;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    color: var(--color-text);
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

/* Hide any library branding */
a[href*="firecms"],
a[href*="neat"],
div[class*="neat-"],
span[class*="neat-"] {
    display: none !important;
}

/* Hero Container */
.hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin-top: 0;
}

/* Gradient Canvas */
#gradient-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Cursor Trail Canvas */
#trail-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
}

/* Ghost Cursor */
.ghost-cursor {
    position: fixed;
    width: 16px;
    height: 16px;
    border: 2px solid var(--cursor-color, #17E7FF);
    border-radius: 50%;
    pointer-events: none;
    box-shadow:
        0 0 10px var(--cursor-glow, rgba(23, 231, 255, 0.8)),
        0 0 20px var(--cursor-glow, rgba(23, 231, 255, 0.6)),
        0 0 30px var(--cursor-glow, rgba(23, 231, 255, 0.4)),
        inset 0 0 8px var(--cursor-glow, rgba(23, 231, 255, 0.3));
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    will-change: transform, box-shadow;
}

.ghost-cursor.visible {
    opacity: 1;
}

/* Main Content */
.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 90%; /* Add a width to prevent text from overflowing on small screens */
}

/* Typewriter Text */
.typewriter {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    min-height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Email Button */
.email-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.email-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.email-button svg {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .typewriter {
        font-size: clamp(2rem, 12vw, 4rem);
    }

    .email-button {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .content {
        gap: 2rem;
    }
}

/* ============================================
   GLASSMORPHISM NAVIGATION
   ============================================ */

.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 900;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--color-white);
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */

.glass-card {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.glass-card > * {
    position: relative;
    z-index: 1;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px 0 rgba(31, 38, 135, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.12);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.glass-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-white);
}

.glass-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* ============================================
   KINETIC TYPOGRAPHY ANIMATIONS
   ============================================ */

.kinetic-slide {
    animation: kinetic-slide-in 0.8s ease-out forwards;
}

@keyframes kinetic-slide-in {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.kinetic-scale {
    animation: kinetic-scale-in 0.8s ease-out forwards;
}

@keyframes kinetic-scale-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .hero-container {
        height: 80vh;
    }

    .content {
        gap: 1.5rem;
    }

    .typewriter {
        font-size: clamp(2rem, 8vw, 4rem);
    }

    .email-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .about-section,
    .skills-section,
    .contact-section {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 2rem;
    }

    .about-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .glass-card,
    .skill-card {
        padding: 1.5rem;
    }

    .skill-tags {
        gap: 0.25rem;
    }

    .skill-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .contact-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .parallax-content {
        padding: 0 20px;
    }

    .parallax-content h2 {
        font-size: clamp(2rem, 12vw, 4rem);
        margin-bottom: 0.3rem;
    }

    .parallax-content p {
        font-size: clamp(1rem, 6vw, 2rem);
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.25rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .hero-container {
        height: 70vh;
    }

    .typewriter {
        font-size: clamp(1.5rem, 6vw, 3rem);
    }

    .email-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .glass-card,
    .skill-card,
    .nav-link,
    .email-button,
    .contact-button {
        transition: none;
    }

    .kinetic-slide,
    .kinetic-scale {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   FOCUS STYLES FOR ACCESSIBILITY
   ============================================ */

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
    border-radius: 4px;
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: more) {
    .glass-card {
        border-width: 2px;
    }

    .skill-card {
        border-width: 2px;
    }

    .nav-link::after {
        height: 3px;
    }
}
