/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    cursor: url('./content/cursor_normal.png') 15 15, auto;
}

/* Custom Scrollbar Styling */
/* For Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1a0a00; /* Hyper-dark orange */
    border-radius: 0;
    margin: 0;
}

::-webkit-scrollbar-thumb {
    background: #EB5E28; /* Solid orange */
    border-radius: 0;
    border: none;
    outline: none;
    box-shadow: none;
    cursor: url('./content/cursor_hovering.png') 15 15, pointer;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b35; /* Slightly brighter on hover */
    border-radius: 0;
    cursor: url('./content/cursor_hovering.png') 15 15, pointer;
}

::-webkit-scrollbar-thumb:active {
    background: #d94e1f; /* Darker orange when clicked */
    border-radius: 0;
    cursor: url('./content/cursor_hovering.png') 15 15, pointer;
}

::-webkit-scrollbar-corner {
    background: #1a0a00; /* Match track color */
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #EB5E28 #1a0a00; /* thumb track */
}

/* Page transition overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.page-transition-overlay.fade-in {
    opacity: 1;
    pointer-events: all;
}

.page-transition-overlay.fade-out {
    opacity: 0;
}

/* Global Loading System */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.15s ease;
}

.global-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loader-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFCF2;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

.loader-bar-container {
    width: 400px;
    height: auto;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    line-height: 1;
}

.loader-bar {
    width: 100%;
    height: auto;
    background: transparent;
    border-radius: 0;
    transition: none;
    position: relative;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 1px;
}

.loader-percentage {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: #EB5E28;
    margin-top: 1rem;
    letter-spacing: 2px;
}

/* Parallax background */
.parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    clip-path: inset(50% 0 50% 0);
    transition: clip-path 0.5s ease-out;
}

.parallax-container.tv-on {
    clip-path: inset(0% 0 0% 0);
}

.parallax-background {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: url('./content/artwork.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    transform: scale(1.1);
}

.parallax-background.tv-on {
    transition: none;
}

.parallax-background.glitch {
    background-image: url('./content/artwork_glitch.png');
    transform: scale(1.15) !important;
    transition: transform 0.01s ease-out;
}

@keyframes tvRubberBand {
    0% {
        transform: scaleY(0.9);
    }
    60% {
        transform: scaleY(1.25);
    }
    100% {
        transform: scaleY(1);
    }
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    backdrop-filter: blur(1px);
}

/* Main content */
.content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
}

/* Corner Ticks Layer */
.corner-ticks-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.corner-tick {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: url('./content/cornertick.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.corner-tick.top-left {
    top: 120px;
    left: 120px;
    transform: rotate(0deg);
}

.corner-tick.top-right {
    top: 120px;
    right: 120px;
    transform: rotate(90deg);
}

.corner-tick.bottom-left {
    bottom: 120px;
    left: 120px;
    transform: rotate(270deg);
}

.corner-tick.bottom-right {
    bottom: 120px;
    right: 120px;
    transform: rotate(180deg);
}

/* Typewriter text */
.typewriter-text {
    position: fixed;
    top: 180px;
    left: 200px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #dadada;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    font-weight: 400;
}

.typewriter-text.typing {
    opacity: 1;
    transition: opacity 2s ease-out;
}

.typewriter-text.fade-out {
    opacity: 0;
}

.typewriter-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Layer 2: Header stack */
.header-stack {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    width: 100%;
    text-align: center;
}

/* Layer 3: Name layer */
.name-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 100%;
    text-align: center;
    transition: transform 0.8s ease;
}

.name-layer.move-up {
    transform: translate(-50%, -50%) translateY(-75px);
}

/* Layer 4: Content layer */
.content-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(180px);
    z-index: 4;
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.role-text {
    font-size: clamp(8rem, 24vw, 16rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 0.9;
    margin-bottom: 0.2rem;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Consolas', monospace;
    opacity: 0.15;
    user-select: none;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.role-text:last-child {
    margin-bottom: 0;
}

/* Name text */
.name-text {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 600;
    margin: 0;
    color: #EB5E28;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 1s ease;
    font-family: 'Aldrich', monospace;
}

.name-text.visible {
    opacity: 1;
}

/* Bio text */
.bio-text {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    line-height: 1.6;
    margin-bottom: 3rem;
    margin-top: 0;
    color: #b0b0b0;
    max-width: 600px;
    font-weight: 300;
}

/* Fade in bio styling */
.fade-in-bio {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-bio.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Explore button */
.explore-btn {
    background: #0e0d0c;
    border: 2px solid #EB5E28;
    padding: 1rem 2.5rem;
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #EB5E28;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

/* Fade in button styling */
.fade-in-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.explore-btn:hover {
    background: #EB5E28;
    color: #0e0d0c;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(235, 94, 40, 0.3);
}

.explore-btn:active {
    background: #FFFCF2;
    border-color: #FFFCF2;
    color: #0e0d0c;
    transform: translateY(0);
}

.explore-btn:hover .btn-arrow {
    transform: translateX(4px);
    color: #252422;
}

.btn-arrow {
    transition: transform 0.3s ease;
    font-size: 1.5rem;
}

.explore-btn:last-of-type {
    margin-bottom: 23px;
}

/* Social icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.social-icons.visible {
    opacity: 1;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 0;
    background: #0e0d0c;
    color: #EB5E28;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 2px solid #EB5E28;
}

.social-icon:hover {
    background: #EB5E28;
    color: #0e0d0c;
    box-shadow: 0 10px 25px rgba(235, 94, 40, 0.3);
}

.social-icon:active {
    background: #FFFCF2;
    border-color: #FFFCF2;
    color: #0e0d0c;
}

/* Page Footer */
.page-footer {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 2rem;
    background: rgba(14, 13, 12, 0.9);
    border-top: 2px solid #EB5E28;
    margin-top: 4rem;
}

.page-footer .social-icons {
    opacity: 1;
}

.footer-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #CCC5B9;
    text-align: center;
    letter-spacing: 0.1em;
}

/* Mouse coordinates display */
.mouse-coordinates {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #EB5E28;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border: 1px solid #EB5E28;
    backdrop-filter: blur(10px);
    letter-spacing: 0.1em;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Decrypt text animation */
.decrypt-text {
    position: relative;
    overflow: hidden;
}

.decrypt-text.encrypting {
    font-family: 'Consolas', monospace;
    letter-spacing: 0.1em;
}

/* Glitch effect for decrypting */
@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
}

.decrypt-text.decrypting {
    animation: glitch 0.3s linear;
}

/* Responsive design */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .hero-section {
        max-width: 100%;
    }
    
    .header-stack {
        margin-bottom: 2rem;
    }
    
    .role-text {
        font-size: clamp(6rem, 20vw, 12rem);
        line-height: 0.8;
    }
    
    .name-text {
        margin-bottom: 1.5rem;
    }
    
    .bio-text {
        margin-bottom: 2rem;
        font-size: 1rem;
    }
    
    .explore-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
        margin-bottom: 1rem;
        border: 2px solid #EB5E28;
    }
    
    .explore-btn:last-of-type {
        margin-bottom: 2rem;
    }
    
    .social-icons {
        gap: 1rem;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        border-radius: 0;
    }
    
    /* Mobile corner ticks adjustments */
    .corner-tick {
        width: 60px;
        height: 60px;
    }
    
    .corner-tick.top-left {
        top: 60px;
        left: 60px;
    }
    
    .corner-tick.top-right {
        top: 60px;
        right: 60px;
    }
    
    .corner-tick.bottom-left {
        bottom: 60px;
        left: 60px;
    }
    
    .corner-tick.bottom-right {
        bottom: 60px;
        right: 60px;
    }
    
    .typewriter-text {
        top: 80px;
        left: 80px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .role-text {
        font-size: 5rem;
        opacity: 0.1;
    }
    
    .name-text {
        font-size: 2.5rem;
    }
    
    .bio-text {
        font-size: 0.95rem;
    }
    
    /* Small mobile corner ticks adjustments */
    .corner-tick {
        width: 40px;
        height: 40px;
    }
    
    .corner-tick.top-left {
        top: 30px;
        left: 30px;
    }
    
    .corner-tick.top-right {
        top: 30px;
        right: 30px;
    }
    
    .corner-tick.bottom-left {
        bottom: 30px;
        left: 30px;
    }
    
    .corner-tick.bottom-right {
        bottom: 30px;
        right: 30px;
    }
}

/* Custom Cursor Styles */
/* Clickable elements and all their children use hovering cursor */
button, 
button *, 
a, 
a *,
.explore-btn,
.explore-btn *,
.social-icon,
.social-icon *,
input,
textarea,
select,
[role="button"],
[role="button"] *,
[tabindex]:not([tabindex="-1"]),
[tabindex]:not([tabindex="-1"]) * {
    cursor: url('./content/cursor_hovering.png') 15 15, pointer !important;
}

/* Retro Terminal Scanline Effect */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: url('./content/scanlinemask.png');
    background-repeat: repeat;
    background-size: auto;
    opacity: 0.3;
    animation: scanlines 2s linear infinite;
    mix-blend-mode: overlay;
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100px);
    }
}

/* ==================== PAGE NAVIGATION BAR ==================== */
.page-nav-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'JetBrains Mono', monospace;
}

.page-nav-keycode {
    display: none; /* Hidden by default, shown only on desktop */
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #EB5E28;
    color: #EB5E28;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 15px rgba(235, 94, 40, 0.2);
}

.page-nav-keycode:hover {
    opacity: 1;
    box-shadow: 0 0 20px rgba(235, 94, 40, 0.4);
}

/* Show keycodes only on desktop (not mobile) */
@media (min-width: 769px) {
    .page-nav-keycode {
        display: block;
    }
}

.page-nav-container {
    position: relative;
    display: flex;
    gap: 0;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #EB5E28;
    padding: 0;
    box-shadow: 0 0 20px rgba(235, 94, 40, 0.3);
}

.page-nav-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(235, 94, 40, 0.03) 0px,
        rgba(235, 94, 40, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 3;
}

.page-nav-selector {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #EB5E28;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 0 15px rgba(235, 94, 40, 0.5);
    margin: 0;
    padding: 0;
}

.page-nav-btn {
    padding: 12px 30px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    cursor: url('./content/cursor_hover.png') 15 15, pointer;
    transition: color 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    text-align: center;
    margin: 0;
}

.page-nav-btn.active {
    color: #000;
}

.page-nav-btn:hover:not(.active) {
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-nav-bar {
        top: 15px;
        padding: 6px;
    }
    
    .page-nav-btn {
        padding: 10px 20px;
        font-size: 12px;
        letter-spacing: 1.5px;
    }
}

