/* Alishanty Signature Font */
@font-face {
    font-family: 'Alishanty Signature';
    src: url('../fonts/Alishanty Signature.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}


.hero-bg-layer {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background:
        radial-gradient(ellipse 55% 90% at 0% 50%, rgba(173, 187, 29, 0.45) 0%, transparent 70%),
        radial-gradient(ellipse 30% 50% at 100% 50%, rgba(173, 187, 29, 0.10) 0%, transparent 65%),
        radial-gradient(circle at 50% 50%, #0e110e 0%, #000 70%);
    z-index: -1;
    transform: translateZ(-50px);
    backdrop-filter: blur(0px);
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    transform-style: preserve-3d;
}

/* Hero Text Wrapper — animated selection box */
.hero-text-wrapper {
    --dot-size: 7px;
    --line-weight: 1px;
    --line-color: rgba(173, 187, 29, 0.8);
    --dot-color: #adbb1d;
    --speed: 0.5s;
    --loop-delay: 3s;
    flex: 1;
    position: relative;
    padding: 2.5rem 2.5rem;
    display: inline-block;
}

/* Lines */
.hero-text-wrapper .line {
    position: absolute;
    pointer-events: none;
}

.hero-text-wrapper .line.horizontal {
    height: var(--line-weight);
    width: 100%;
    left: 0;
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0 3px,
        var(--line-color) 3px 7px
    );
}

.hero-text-wrapper .line.vertical {
    width: var(--line-weight);
    height: 100%;
    top: 0;
    background-image: repeating-linear-gradient(
        180deg,
        transparent 0 3px,
        var(--line-color) 3px 7px
    );
}

/*
  Total cycle = 4 lines × 0.5s draw + 2s hold + 0.4s fadeout = 4.4s
  Each line occupies ~11.4% of the total (0.5/4.4)
  Hold starts at 45.5% (2/4.4 from end)
  Fade at 90%
*/

.hero-text-wrapper .line.top {
    top: 0;
    transform-origin: top left;
    animation: draw-top 5.5s ease-in-out infinite;
}
/*
  Total = 8 steps × 0.5s + 1.5s hold = 5.5s
  Each step = 0.5/5.5 = ~9%
  Draw:  top 0-9%, right 9-18%, bottom 18-27%, left 27-36%
  Hold:  36-63%
  Erase: top 63-72%, right 72-81%, bottom 81-90%, left 90-100%
*/

@keyframes draw-top {
    0%   { transform: scaleX(0); }
    9%   { transform: scaleX(1); }
    63%  { transform: scaleX(1); }
    72%  { transform: scaleX(0); }
    100% { transform: scaleX(0); }
}

.hero-text-wrapper .line.right {
    right: 0;
    transform-origin: top right;
    animation: draw-right 5.5s ease-in-out infinite;
}
@keyframes draw-right {
    0%   { transform: scaleY(0); }
    9%   { transform: scaleY(0); }
    18%  { transform: scaleY(1); }
    72%  { transform: scaleY(1); }
    81%  { transform: scaleY(0); }
    100% { transform: scaleY(0); }
}

.hero-text-wrapper .line.bottom {
    bottom: 0;
    transform-origin: bottom right;
    animation: draw-bottom 5.5s ease-in-out infinite;
}
@keyframes draw-bottom {
    0%   { transform: scaleX(0); }
    18%  { transform: scaleX(0); }
    27%  { transform: scaleX(1); }
    81%  { transform: scaleX(1); }
    90%  { transform: scaleX(0); }
    100% { transform: scaleX(0); }
}

.hero-text-wrapper .line.left {
    left: 0;
    transform-origin: bottom left;
    animation: draw-left 5.5s ease-in-out infinite;
}
@keyframes draw-left {
    0%   { transform: scaleY(0); }
    27%  { transform: scaleY(0); }
    36%  { transform: scaleY(1); }
    90%  { transform: scaleY(1); }
    100% { transform: scaleY(0); }
}

/* Corner dots */
.hero-text-wrapper .dot {
    position: absolute;
    width: var(--dot-size);
    height: var(--dot-size);
    background: var(--dot-color);
    border: 1.5px solid #fff;
    border-radius: 1px;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
}

/* top-left: appears at start */
.hero-text-wrapper .dot.top.left {
    top: calc(var(--dot-size) * -0.5);
    left: calc(var(--dot-size) * -0.5);
    animation: dot-seq 4.4s ease-out infinite;
    animation-delay: 0s;
}
/* top-right: appears when top line finishes (11%) */
.hero-text-wrapper .dot.top.right {
    top: calc(var(--dot-size) * -0.5);
    right: calc(var(--dot-size) * -0.5);
    animation: dot-seq 4.4s ease-out infinite;
    animation-delay: 0.48s; /* 11% of 4.4s */
}
/* bottom-right: appears when right line finishes (22%) */
.hero-text-wrapper .dot.bottom.right {
    bottom: calc(var(--dot-size) * -0.5);
    right: calc(var(--dot-size) * -0.5);
    animation: dot-seq 4.4s ease-out infinite;
    animation-delay: 0.97s; /* 22% of 4.4s */
}
/* bottom-left: appears when bottom line finishes (34%) */
.hero-text-wrapper .dot.bottom.left {
    bottom: calc(var(--dot-size) * -0.5);
    left: calc(var(--dot-size) * -0.5);
    animation: dot-seq 4.4s ease-out infinite;
    animation-delay: 1.5s; /* 34% of 4.4s */
}

@keyframes dot-seq {
    0%   { opacity: 0; transform: scale(0); }
    4%   { opacity: 1; transform: scale(1.3); }
    8%   { opacity: 1; transform: scale(1); }
    88%  { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0); }
}

/* Hero Text */
.hero-text {
    z-index: 2;
    position: relative;
}

.greeting {
    font-family: var(--font-mono);
    color: var(--color-primary);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 0.2rem;
}

/* Name block: stacks YUVRAJ + cursive overlay */
.name-block {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.cursive-role {
    font-family: 'Alishanty Signature', cursive;
    font-size: 3.8rem;
    font-weight: normal;
    color: var(--color-primary);
    position: absolute;
    bottom: -2.2rem;
    right: -2rem;
    line-height: 1;
    pointer-events: none;
    z-index: 3;
    /* dark stroke so it reads over white YUVRAJ letters */
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.6);
    text-shadow:
        0 0 8px rgba(0, 0, 0, 0.9),
        2px 2px 0px rgba(0, 0, 0, 0.8),
        -1px -1px 0px rgba(0, 0, 0, 0.5);
    paint-order: stroke fill;
}

/* Hero Text Glitch */
/* Hero Text Glitch (Cinematic Signal) */
.glitch-name {
    font-size: 8rem;
    line-height: 0.9;
    color: white;
    position: relative;
    margin-bottom: 0;
    /* Clean, high-end base */
}

.glitch-name::before,
.glitch-name::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* No more black blocks */
    opacity: 0.8;
}

/* Cyan Layer with subtle drift (Idle) */
.glitch-name::before {
    color: #0ff;
    z-index: -1;
    animation: chromatic-drift 4s infinite alternate;
    opacity: 0.4;
}

/* Magenta Layer with subtle drift (Idle) */
.glitch-name::after {
    color: #f0f;
    z-index: -2;
    animation: chromatic-drift 4s infinite alternate-reverse;
    opacity: 0.4;
}

/* HARD GLITCH (Triggered by JS) */
.glitch-name.hard-glitch::before {
    animation: glitch-anim-burst 0.2s infinite linear alternate-reverse;
    opacity: 1;
    transform: translate(-5px, 0);
}

.glitch-name.hard-glitch::after {
    animation: glitch-anim-burst-2 0.2s infinite linear alternate-reverse;
    opacity: 1;
    transform: translate(5px, 0);
}

/* ANIMATIONS */

/* Smooth, breathing RGB separation */
@keyframes chromatic-drift {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-2px, 1px);
    }

    100% {
        transform: translate(1px, -1px);
    }
}

/* Violent Burst for Intro */
@keyframes glitch-anim-burst {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
        transform: translate(-5px, -2px);
    }

    20% {
        clip: rect(80px, 9999px, 10px, 0);
        transform: translate(5px, 2px);
    }

    40% {
        clip: rect(40px, 9999px, 90px, 0);
        transform: translate(-5px, 5px);
    }

    60% {
        clip: rect(20px, 9999px, 20px, 0);
        transform: translate(5px, -5px);
    }

    100% {
        clip: rect(60px, 9999px, 60px, 0);
        transform: translate(-2px, 2px);
    }
}

@keyframes glitch-anim-burst-2 {
    0% {
        clip: rect(90px, 9999px, 20px, 0);
        transform: translate(4px, 3px);
    }

    20% {
        clip: rect(10px, 9999px, 100px, 0);
        transform: translate(-4px, -3px);
    }

    40% {
        clip: rect(50px, 9999px, 30px, 0);
        transform: translate(3px, -4px);
    }

    60% {
        clip: rect(30px, 9999px, 50px, 0);
        transform: translate(-3px, 4px);
    }

    100% {
        clip: rect(70px, 9999px, 80px, 0);
        transform: translate(2px, -2px);
    }
}

/* Removed old twitch animation in favor of burst */

/* 3D PFP Card */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    background: transparent !important;
}

.hero-visual .js-tilt-glare {
    display: none !important;
}

.pfp-card {
    position: relative;
    width: 400px;
    height: 500px;
    background: transparent;
    border-radius: 20px;
    border: 3px solid var(--color-primary);
    box-shadow: 0 0 25px rgba(173, 187, 29, 0.5), inset 0 0 15px rgba(173, 187, 29, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    overflow: hidden;
}

.pfp-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
    transform: translateZ(50px);
}

/* Holographic Border Effect */
.card-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(20px);
    width: 95%;
    height: 95%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    pointer-events: none;
}

.card-doodles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    transform: translateZ(80px);
    /* Highest Z for parallax */
}

.doodle {
    position: absolute;
    width: 60px;
    height: 60px;
    color: white;
    opacity: 0.8;
    filter: drop-shadow(0 0 5px var(--color-primary));
}

.d-eye {
    top: 30%;
    right: -20px;
    width: 100px;
    transform: rotate(10deg);
}

.d-arrow {
    bottom: 10%;
    left: -30px;
    transform: rotate(-20deg);
}

/* Role Scroller */
.role-scroller {
    font-family: var(--font-mono);
    height: 30px;
    overflow: hidden;
    position: relative;
}

.role {
    display: block;
    height: 30px;
    color: var(--color-text);
    font-size: 1.5rem;
    animation: scrollRoles 6s infinite steps(1);
    /* Ideally we'd use JS or keyframes to slide them up */
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 10px;
        opacity: 1;
    }

    100% {
        top: 30px;
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .glitch-name {
        font-size: 4rem;
    }

    .cursive-role {
        font-size: 1.8rem;
        right: -0.5rem;
        bottom: -0.4rem;
    }

    .hero-visual {
        margin-top: 3rem;
    }

    .pfp-card {
        width: 300px;
        height: 380px;
    }
}