/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Coral Pixels', monospace, Arial, sans-serif;
    background: transparent;
    color: #fff;
    cursor: none;
    -webkit-text-size-adjust: 100%; /* Prevent iOS text scaling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    /* iOS Safari fixes */
    position: relative;
}

/* iOS Safari viewport fix */
@supports (height: 100dvh) {
    html, body {
        height: 100dvh;
        min-height: 100dvh;
    }
    
    #pixi-canvas {
        height: 100dvh !important;
    }
    
    .content {
        min-height: 100dvh;
    }
}

/* Fallback for older iOS versions */
@supports not (height: 100dvh) {
    html, body {
        height: calc(100vh - env(keyboard-inset-height, 0px));
        min-height: calc(100vh - env(keyboard-inset-height, 0px));
    }
    
    #pixi-canvas {
        height: calc(100vh - env(keyboard-inset-height, 0px)) !important;
    }
    
    .content {
        min-height: calc(100vh - env(keyboard-inset-height, 0px));
    }
}

/* Custom Cursor */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
}

/* PixiJS Canvas */
#pixi-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    z-index: -1;
    background: transparent;
}

/* Main Content */
.content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    flex-direction: column;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Info - Top Right */
.header-info {
    position: absolute;
    top: 2rem;
    right: 2rem;
    text-align: right;
    z-index: 10;
}

.name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: normal;
    line-height: 1.1;
    margin: 0 0 0.5rem 0;
    color: #fff;
    letter-spacing: 0.1em;
    text-shadow: 
        0 0 5px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.6),
        2px 2px 0px rgba(0, 0, 0, 0.9);
    position: relative;
    overflow: hidden;
}

.name::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 68, 68, 0.15) 25%,
        rgba(170, 68, 255, 0.2) 50%,
        rgba(255, 68, 170, 0.15) 75%,
        transparent 100%);
    z-index: -1;
    animation: nameBackgroundFlow 8s ease-in-out infinite;
}

@keyframes nameBackgroundFlow {
    0%, 100% { 
        left: -100%;
        opacity: 0;
    }
    15%, 85% {
        opacity: 1;
    }
    50% { 
        left: 100%;
    }
}



.position {
    font-family: 'Cutive Mono', monospace;
    font-size: clamp(1.2rem, 2.8vw, 1.8rem);
    font-weight: normal;
    margin: 0.5rem 0;
    color: #fff;
    letter-spacing: 0.1em;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.6),
        0 0 10px rgba(255, 255, 255, 0.3),
        1px 1px 0px rgba(0, 0, 0, 1);
    position: relative;
}





/* Main Description - Center */
.main-description {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 800px;
    width: 90%;
}

.tagline {
    font-family: 'Cutive Mono', monospace;
    font-size: clamp(1.4rem, 3.2vw, 2.4rem);
    font-weight: normal;
    line-height: 1.4;
    margin: 0;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.6),
        0 0 10px rgba(255, 255, 255, 0.3),
        1px 1px 0px rgba(0, 0, 0, 1);
    position: relative;
}





/* Skills Section - Bottom */
.skills-section {
    position: absolute;
    bottom: 3rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cta-text {
    font-family: 'Cutive Mono', monospace;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: normal;
    color: #fff;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.6),
        0 0 10px rgba(255, 255, 255, 0.3),
        1px 1px 0px rgba(0, 0, 0, 1);
}

.cta-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.cta-text:hover {
    opacity: 1;
    color: #fff;
    text-shadow: 
        0 0 8px rgba(255, 255, 255, 0.8),
        0 0 15px rgba(255, 255, 255, 0.5),
        1px 1px 0px rgba(0, 0, 0, 1);
}

.cta-text:hover::after {
    width: 100%;
    background: #fff;
}

.skill-item {
    font-family: 'Cutive Mono', monospace;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: normal;
    color: #fff;
    letter-spacing: 0.1em;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.6),
        0 0 10px rgba(255, 255, 255, 0.3),
        1px 1px 0px rgba(0, 0, 0, 1);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(0deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.03) 100%);
    z-index: -1;
    transition: height 0.5s ease;
}

.skill-item:nth-child(2) { animation-delay: 0s; }
.skill-item:nth-child(3) { animation-delay: 1.3s; }
.skill-item:nth-child(4) { animation-delay: 2.6s; }

.skill-item:nth-child(2)::before { animation: skillWave1 7s ease-in-out infinite; }
.skill-item:nth-child(3)::before { animation: skillWave2 6s ease-in-out infinite 1.5s; }
.skill-item:nth-child(4)::before { animation: skillWave3 8s ease-in-out infinite 3s; }

@keyframes skillWave1 {
    0%, 100% { height: 10%; }
    50% { height: 60%; }
}

@keyframes skillWave2 {
    0%, 100% { height: 15%; }
    50% { height: 50%; }
}

@keyframes skillWave3 {
    0%, 100% { height: 5%; }
    50% { height: 70%; }
}

.skill-item:hover {
    color: #fff;
    transform: translateX(10px);
}

/* Remove old navigation, CTA, social, and scroll styles since they're no longer needed */

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loading-text {
    font-family: 'Coral Pixels', monospace;
    font-size: 2rem;
    font-weight: normal;
    letter-spacing: 0.3em;
    margin-bottom: 2rem;
    animation: loading-pulse 1.5s infinite;
}

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

.loading-bar {
    width: 300px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    width: 100px;
    animation: loading-progress 2s infinite;
}

@keyframes loading-progress {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(300px); }
}

/* White Glow Shimmer Animation */
@keyframes whiteGlowShimmer {
    0%, 100% {
        text-shadow: 
            0 0 5px rgba(255, 255, 255, 0.6),
            0 0 10px rgba(255, 255, 255, 0.3),
            1px 1px 0px rgba(0, 0, 0, 1);
        opacity: 0.9;
    }
    50% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.9),
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(255, 255, 255, 0.3),
            1px 1px 0px rgba(0, 0, 0, 1);
        opacity: 1;
    }
}

/* Rainbow Shimmer Animation */
@keyframes rainbowShimmer {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg) brightness(1) saturate(1.2);
    }
    25% {
        filter: hue-rotate(45deg) brightness(1.1) saturate(1.4);
    }
    50% {
        background-position: 100% 50%;
        filter: hue-rotate(90deg) brightness(1.2) saturate(1.6);
    }
    75% {
        filter: hue-rotate(135deg) brightness(1.1) saturate(1.4);
    }
    100% {
        background-position: 0% 50%;
        filter: hue-rotate(180deg) brightness(1) saturate(1.2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .header-info {
        top: 1rem;
        right: 1rem;
    }
    
    .name {
        font-size: clamp(2rem, 7vw, 3.5rem);
    }
    
    .affiliation, .position {
        font-size: clamp(1rem, 3vw, 1.4rem);
    }
    
    .main-description {
        width: 95%;
        max-width: 600px;
    }
    
    .tagline {
        font-size: clamp(1.4rem, 5vw, 2.8rem);
    }
    
    .skills-section {
        bottom: 2rem;
        left: 1rem;
    }
    
    .skill-item {
        font-size: clamp(1.1rem, 4vw, 1.8rem);
    }
}

@media (max-width: 480px) {
    .header-info {
        position: absolute;
        top: 1rem;
        right: 1rem;
        text-align: right;
    }
    
    .main-description {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        width: 90%;
    }
    
    .skills-section {
        position: absolute;
        bottom: 1rem;
        right: 1rem;
        left: auto;
        align-items: flex-end;
        text-align: right;
    }
    
    .content {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
        padding: 1rem;
    }
    
    .name {
        font-size: clamp(1.8rem, 6vw, 2.8rem);
    }
    
    .position {
        font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    }
    
    .tagline {
        font-size: clamp(1.1rem, 4vw, 1.8rem);
    }
    
    .cta-text {
        font-size: clamp(1rem, 2.5vw, 1.3rem);
    }
    
    .skill-item {
        font-size: clamp(1rem, 3vw, 1.5rem);
    }
}

/* Hide loading screen when loaded */
.loaded .loading-screen {
    opacity: 0;
    pointer-events: none;
}

/* Text selection */
::selection {
    background: rgba(255, 0, 128, 0.3);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
