/* --- VARIABLES & RESET --- */
:root {
    --bg-dark: #0a0a0f;
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --text-main: #e0e0e0;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Space Mono', monospace;
    overflow-x: hidden;
}

/* --- BACKGROUND FX --- */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 9999;
    pointer-events: none;
}

h1,
h2 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

/* --- HERO SECTION --- */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(10, 10, 15, 0.8), rgba(10, 10, 15, 0.9)), url('./img/mainbackground.avif');
    background-size: cover;
    background-position: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 90%;
}

.hero-title {
    font-size: 5rem;
    line-height: 1;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--neon-cyan);
    letter-spacing: 5px;
    margin-top: 1rem;
}

/* --- DNA HELIX --- */
.dna-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 300px;
    height: 600px;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.strand {
    position: relative;
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    animation: rotateStrand 3s ease-in-out infinite;
}

.strand::before,
.strand::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: -4px;
    box-shadow: 0 0 10px currentColor;
}

.strand::before {
    left: 0;
    background-color: var(--neon-cyan);
    animation: sizePulse 3s ease-in-out infinite;
}

.strand::after {
    right: 0;
    background-color: var(--neon-purple);
    animation: sizePulse 3s ease-in-out infinite reverse;
}

/* Strand Animations Delay */
.strand:nth-child(1) {
    animation-delay: -0.2s;
}

.strand:nth-child(1)::before,
.strand:nth-child(1)::after {
    animation-delay: -0.2s;
}

.strand:nth-child(2) {
    animation-delay: -0.4s;
}

.strand:nth-child(2)::before,
.strand:nth-child(2)::after {
    animation-delay: -0.4s;
}

.strand:nth-child(3) {
    animation-delay: -0.6s;
}

.strand:nth-child(3)::before,
.strand:nth-child(3)::after {
    animation-delay: -0.6s;
}

.strand:nth-child(4) {
    animation-delay: -0.8s;
}

.strand:nth-child(4)::before,
.strand:nth-child(4)::after {
    animation-delay: -0.8s;
}

.strand:nth-child(5) {
    animation-delay: -1.0s;
}

.strand:nth-child(5)::before,
.strand:nth-child(5)::after {
    animation-delay: -1.0s;
}

.strand:nth-child(6) {
    animation-delay: -1.2s;
}

.strand:nth-child(6)::before,
.strand:nth-child(6)::after {
    animation-delay: -1.2s;
}

.strand:nth-child(7) {
    animation-delay: -1.4s;
}

.strand:nth-child(7)::before,
.strand:nth-child(7)::after {
    animation-delay: -1.4s;
}

.strand:nth-child(8) {
    animation-delay: -1.6s;
}

.strand:nth-child(8)::before,
.strand:nth-child(8)::after {
    animation-delay: -1.6s;
}

.strand:nth-child(9) {
    animation-delay: -1.8s;
}

.strand:nth-child(9)::before,
.strand:nth-child(9)::after {
    animation-delay: -1.8s;
}

.strand:nth-child(10) {
    animation-delay: -2.0s;
}

.strand:nth-child(10)::before,
.strand:nth-child(10)::after {
    animation-delay: -2.0s;
}

.strand:nth-child(11) {
    animation-delay: -2.2s;
}

.strand:nth-child(11)::before,
.strand:nth-child(11)::after {
    animation-delay: -2.2s;
}

.strand:nth-child(12) {
    animation-delay: -2.4s;
}

.strand:nth-child(12)::before,
.strand:nth-child(12)::after {
    animation-delay: -2.4s;
}

.strand:nth-child(13) {
    animation-delay: -2.6s;
}

.strand:nth-child(13)::before,
.strand:nth-child(13)::after {
    animation-delay: -2.6s;
}

.strand:nth-child(14) {
    animation-delay: -2.8s;
}

.strand:nth-child(14)::before,
.strand:nth-child(14)::after {
    animation-delay: -2.8s;
}

.strand:nth-child(15) {
    animation-delay: -3.0s;
}

.strand:nth-child(15)::before,
.strand:nth-child(15)::after {
    animation-delay: -3.0s;
}

/* --- INTRO SECTION --- */
.team-intro {
    padding: 6rem 1rem 1rem 1rem;
    text-align: center;
    position: relative;
    background: var(--bg-dark);
}

.intro-text {
    font-size: 3rem;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 10 10px rgba(0, 243, 255, 0.5);
    margin-bottom: 1rem;
}

.intro-line {
    width: 100px;
    height: 4px;
    background: var(--neon-purple);
    margin: 0 auto;
    box-shadow: 0 0 10px var(--neon-purple);
    border-radius: 2px;
}


.team-showcase-container {
    padding: 2rem 2rem;
    margin-bottom: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    position: relative;
    min-height: 80vh;
    perspective: 1000px;
}

/* 1. TEXT LAYER */
.masked-text-wrapper {
    position: relative;
    z-index: 10;
    text-align: center;
    pointer-events: none;
    transition: transform 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.masked-title {
    font-size: 8rem;
    font-weight: 900;
    margin: 0;
    line-height: 0.9;
    text-transform: uppercase;
    background-image: url('./img/dna.png');
    background-size: 300% auto;
    background-position: 0% center;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
    animation: moveMaskBackground 10s linear infinite;
}

/* 2. PHOTO FRAME LAYER */
.team-photo-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6) rotate(5deg);
    width: 100%;
    max-width: 800px;
    z-index: 5;
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.team-photo-frame img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(0, 243, 255, 0.3);
    filter: grayscale(100%) brightness(0.5) blur(10px);
    transition: filter 1s ease;
}

/* 3. SHINE EFFECT */
.team-photo-frame::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(0deg, var(--neon-cyan) 0%, rgba(0, 243, 255, 0) 100%);
    z-index: -1;
    filter: blur(50px);
    opacity: 0;
    transition: all 1.5s ease 0.5s;
}

/* Active State */
.team-showcase-container.active .masked-text-wrapper {
    transform: translateY(-150%) scale(0.9);
}

.team-showcase-container.active .team-photo-frame {
    opacity: 1;
    z-index: 20;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

.team-showcase-container.active .team-photo-frame img {
    filter: grayscale(20%) brightness(0.9) blur(0px) contrast(1.1);
}

.team-showcase-container.active .team-photo-frame::after {
    height: 120%;
    opacity: 0.6;
}


/* --- CHARACTER SECTIONS --- */
.character-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.content-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-top: 200px;
}

.text-panel {
    position: relative;
    z-index: 10;
    background-color: var(--bg-dark);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    width: 100%;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.card-wrapper {
    position: absolute;
    width: 260px;
    top: 0;
    left: 50%;
    transform: translate(-50%, 20%) scale(0.5);
    z-index: 1;
    opacity: 0;
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--neon-cyan);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.8s ease 0.2s;
}

.card-wrapper img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.8));
    transition: filter 0.5s ease;
    padding-bottom: 6px;
}

.active .text-panel {
    opacity: 1;
    transform: translateY(0);
}

.image-pop-out {
    opacity: 1;
    transform: translate(-50%, -115%) scale(2.5);
    z-index: 20;
}

.image-pop-out img {
    filter: drop-shadow(0 0 1px var(--neon-cyan)) contrast(1.1);
}

.image-pop-out::after {
    opacity: 0.5;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.role-text {
    color: var(--neon-cyan);
    margin-bottom: 1rem;
}

.desc {
    color: #aaa;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.stat-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.stat-bar .fill {
    height: 100%;
    background: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
}

.social-links a {
    flex: 1;
    padding: 10px;
    text-decoration: none;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    text-align: center;
    font-size: 0.8rem;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--neon-cyan);
    color: #000;
}

.marquee-container {
    padding: 60px 0;
    background: #000;
    border-top: 1px solid var(--neon-cyan);
    border-bottom: 1px solid var(--neon-cyan);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: scroll 20s linear infinite;
}

.marquee-content span {
    font-size: 80px;
    font-weight: 800;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px #fff;
    padding-right: 50px;
    white-space: nowrap;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes rotateStrand {
    0% {
        transform: scaleX(1);
        z-index: 10;
    }

    50% {
        transform: scaleX(0);
        z-index: 0;
    }

    100% {
        transform: scaleX(1);
        z-index: 10;
    }
}

@keyframes sizePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.5);
        opacity: 0.3;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes moveMaskBackground {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 100% center;
    }
}

.animated-text {
    background-image: linear-gradient(90deg, var(--neon-purple) 0%, var(--neon-cyan) 50%, var(--neon-purple) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: textShine 3s linear infinite;
}

@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

footer {
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
    background-color: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    color: #fff;
}

.highlight {
    color: var(--neon-purple);
    font-weight: bold;
}


@media (max-width: 768px) {

    /* Hero Text Sizing */
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    /* Team Intro */
    .intro-text {
        font-size: 2rem;
    }

    /* Team Showcase */
    .team-showcase-container {
        padding-bottom: 4rem;
        min-height: 60vh;
        margin-bottom: 100px;
    }

    .masked-title {
        font-size: 3rem;
    }

    /* Animation Adjustment for Team Photo */
    .team-showcase-container.active .masked-text-wrapper {
        transform: translateY(-200%) scale(0.8);
    }

    .team-showcase-container.active .team-photo-frame {
        width: 90%;
    }

    /* Character Cards */
    .character-section {
        padding: 4rem 1rem;
        min-height: auto;
    }

    .content-container {
        margin-top: 100px;
    }

    .card-wrapper {
        width: 180px;
        transform: translate(-50%, 0) scale(0.5);
    }

    .image-pop-out {
        transform: translate(-50%, -80%) scale(1.8);
    }

    .text-panel {
        padding: 1.5rem;
    }

    .panel-header h2 {
        font-size: 1.5rem;
    }

    /* Marquee Text */
    .marquee-content span {
        font-size: 40px;
        padding-right: 20px;
    }
}

/* --- EXTRA LINKS --- */
.extra-links-container {
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    align-items: center;
    /* Center them */
    gap: 1.5rem;
    /* Spacing between buttons */
    padding: 3rem 0;
    background: var(--bg-dark);
    margin-bottom: 20px;
}

.nav-btn {
    width: 300px;
    /* Fixed width for uniformity */
    padding: 1rem 0;
    /* Vertical padding, horizontal handled by width */
    text-align: center;
    /* Center text */
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    letter-spacing: 2px;
}

.nav-btn:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
    transform: translateY(-2px);
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .extra-links-container {
        gap: 1rem;
    }

    .nav-btn {
        width: 80%;
        max-width: 300px;
    }
}

/* --- LIGHTBOX MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    border-radius: 10px;
    animation: zoomIn 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--neon-cyan);
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}