/* CSS Reset & Basics */
:root {
    --bg-main: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --accent: #E50914;
    /* Red like Book Covers */
    --accent-hover: #ff1f2a;
    --border-color: rgba(255, 255, 255, 0.08);

    --font-heading: 'Unbounded', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Playfair Display', serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-600 {
    transition-delay: 0.6s;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Buttons - Unified Glass Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

.btn--primary,
.btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn--primary {
    background: linear-gradient(135deg, var(--accent) 0%, #b30009 100%);
    /* Red Gradient */
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

.btn--secondary:hover {
    background: rgba(212, 175, 55, 0.15);
    /* Gold tint on hover */
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.contacts__icons-row {
    display: flex;
    gap: 60px;
    /* Increased spacing */
    margin-top: 40px;
    align-items: center;
}

/* Contact Icons - Uiverse Style */
.Btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: transparent;
    position: relative;
    border-radius: 7px;
    cursor: pointer;
    transition: all .3s;
    text-decoration: none;
    /* Reset link style */
}

.svgContainer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    backdrop-filter: blur(4px);
    letter-spacing: 0.8px;
    border-radius: 10px;
    transition: all .3s;
    border: 1px solid rgba(156, 156, 156, 0.466);
    color: #fff;
    /* Icon color */
    font-size: 1.2rem;
}

.BG {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            rgba(229, 9, 20, 0.8) 0%,
            rgba(100, 0, 0, 0.8) 100%);
    z-index: -1;
    border-radius: 9px;
    pointer-events: none;
    transition: all .3s;
    opacity: 0;
    /* Hidden by default */
}

.Btn:hover .BG {
    transform: rotate(35deg);
    transform-origin: bottom;
    opacity: 1;
    /* Show on hover */
}

.Btn:hover .svgContainer {
    background-color: rgba(156, 156, 156, 0.2);
    border-color: var(--accent);
}

.btn--outline:hover {
    background: var(--accent);
    color: #000;
}

/* Header */
.header {
    padding: 30px 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Vertical Logo Stack */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 0.8;
}

.nav__list {
    display: flex;
    gap: 40px;
}

.nav__link {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    padding-bottom: 5px;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav__link:hover {
    color: var(--text-primary);
}

.nav__link:hover::after {
    width: 100%;
}

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.burger-menu span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* --- Sticky Header Logic --- */
.header--scrolled {
    position: fixed;
    top: 20px;
    /* Floating slightly from top */
    right: 20px;
    left: auto;
    width: auto;
    padding: 0;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.header--scrolled .header__container {
    display: block;
}

.header--scrolled .logo {
    display: none;
    /* Hide logo on scroll */
}

.header--scrolled .nav {
    display: none;
    /* Hide desktop nav */
}

.header--scrolled .burger-menu {
    display: flex;
    /* Force show burger */
    /* Force show burger */
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    /* Start off-screen */
    width: 450px;
    /* Fixed width for desktop "curtain" look */
    max-width: 100%;
    /* Full width on very small screens */
    height: 100vh;
    background-color: #000;
    /* Solid black for better contrast with masks */
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle edge */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu__list {
    text-align: center;
}

.mobile-menu__list li {
    margin: 24px 0;
}


.mobile-menu__close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
}

/* Hero Section */
/* Hero Section - Suits Style Reference */
.hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(circle at 70% 30%, #1a1a1a 0%, #0a0a0a 70%);
    /* Light shifted right with image */
}

/* Common Text Layer Styling */
/* Common Text Layer Styling */
/* Common Text Layer Styling */
/* Common Text Layer Styling */
/* Common Text Layer Styling */
.hero__layer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* Restored Center Alignment for Full Width */
    top: 50%;
    /* Switched to Russo One (Wide, Thick, Solid) */
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    /* Russo One is naturally thick */
    /* Anton is naturally thick */
    line-height: 0.85;
    /* Tighter line height for big text */
    text-transform: uppercase;
    width: 100%;
    /* Full Width */
    text-align: center;
    pointer-events: none;
    user-select: none;
    transition: all 0.5s ease;
}

/* "АНДРЕЙ" - Outline Style (Behind Everything) */
.hero__layer--back {
    top: 22%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16vw;
    color: rgba(255, 255, 255, 0.1);
    -webkit-text-stroke: 3px rgba(255, 255, 255, 0.5);
    z-index: 0;
}

/* "КРАТКИЙ" - Solid White (BEHIND Image) */
.hero__layer--middle {
    top: 52%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16vw;
    color: #FFFFFF;
    -webkit-text-stroke: 0;
    z-index: 1;
    text-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

/* "КРАТКИЙ" - Outline (FRONT of Image) - Creates Transparency Effect */
.hero__layer--front {
    top: 52%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16vw;
    color: rgba(255, 255, 255, 0.1);
    -webkit-text-stroke: 3px rgba(255, 255, 255, 0.5);
    z-index: 3;
    line-height: 1;
}



/* Hero Content Area - Anchor for Buttons/Status */
.hero__image-container {
    position: absolute;
    bottom: 0;
    right: 0;
    /* Align Right to keep person offset */
    left: auto;
    transform: none;
    width: 85%;
    /* Slightly smaller to not block EVERYTHING */
    max-width: none;
    height: 95%;
    z-index: 2;
    /* Sandwiched: Middle(1) < Image(2) < Front(3) */
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.hero__content {
    position: relative;
    z-index: 5;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    /* Center content horizontally */
    height: 100%;
    padding-bottom: 40px;
    gap: 20px;
    padding-left: 0;
    /* Remove offset */
    pointer-events: none;
    /* Allow clicks to pass through empty areas */
}

/* Status Block - Single Line with Dark Glass Style */
.hero__status-block {
    display: flex;
    flex-wrap: nowrap;
    /* Force Single Line */
    align-items: center;
    gap: 15px;
    padding: 15px 50px;
    margin: 0 auto;
    /* Center the block */
    background: rgba(0, 0, 0, 0.7);
    /* Dark Glass */
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    width: auto;
    min-width: min-content;
    max-width: 90%;
    /* prevent overflow off screen */
    pointer-events: auto;
    margin-top: 0;
    white-space: nowrap;
    margin-top: 0;
    white-space: nowrap;
    /* Prevent text wrapping */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: floatBlock 6s ease-in-out infinite;
    /* Floating Effect */
}

@keyframes floatBlock {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero__buttons {
    display: flex;
    gap: 16px;
    pointer-events: auto;
    margin-bottom: 25px;
    /* More space */
}

/* ... Biography ... */

.status-item {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    /* Larger */
    font-weight: 700;
    /* Bolder */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #FFFFFF;
    /* Pure White */
}

.status-separator {
    color: #E50914 !important;
    /* Forced Red */
    font-weight: 700;
    font-size: 1.2rem;
    opacity: 1;
    animation: pulseRed 2s ease-in-out infinite;
    /* Pulsing Separators */
}

@keyframes pulseRed {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(229, 9, 20, 0.5));
    }

    50% {
        opacity: 0.7;
        transform: scale(0.9);
        filter: drop-shadow(0 0 0 rgba(229, 9, 20, 0));
    }
}


/* Biography Section */
.biography__grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 60px;
    align-items: flex-start;
}

.biography__summary h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 60px;
    /* Increased from 24px for more air */
    color: var(--text-primary);
}

.biography__facts {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #E50914;
    /* Continuous Timeline Line */
    margin-left: 10px;
    /* Offset for the line */
}

.biography__facts li {
    position: relative;
    margin-bottom: 30px;
    /* Spacing between items */
    padding-left: 20px;
    /* Space between dot and text */
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 400;
    list-style: none;
    /* Ensure no default bullets */
}

/* Red Dot on the Timeline */
.biography__facts li::before {
    content: "";
    position: absolute;
    left: -27px;
    /* Center circle on the line (-20px padding - 7px half width) */
    top: 6px;
    /* Optically aligned with text cap height */
    width: 12px;
    height: 12px;
    background-color: #E50914;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
    /* Glow effect */
}

.biography__photo img {
    border-radius: 8px;
    filter: grayscale(100%) contrast(1.2);
    transition: all 0.5s ease;
}

.biography__photo img:hover {
    filter: grayscale(0%) contrast(1);
}

/* Bio Modal Styles */
.bio-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    color: #fff;
    z-index: 2000;
    overflow: hidden;
    /* Native dialog reset */
    margin: 0;
}

/* Books Section */
.books__grid {
    display: flex;
    justify-content: center;
    gap: 100px;
    /* Increased from 40px to separate them more */
    flex-wrap: wrap;
}

.book-card {
    width: 300px;
    height: 450px;
    overflow: visible;
    /* Changed from hidden to visible for 3D pop */
    border-radius: 8px;
    background: transparent;
    perspective: 1000px;
    /* Added perspective context */
}

/* Hover lift effect removed on container, moved to image transform logic */
/* .book-card:hover { transform: translateY(-10px); } */

.book-card__image {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    /* Important for 3D rotation */
    transition: transform 0.1s ease-out;
    /* Smooth follow with mouse */
    border-radius: 20px;
}

.book-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px;
    /* TranslateZ creates depth */
    transform: translateZ(50px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    /* Deep shadow */
    transition: transform 0.2s ease-out;
}

/* LitRes Button - Glass to Red Hover */
.btn--litres {
    background: rgba(255, 255, 255, 0.05);
    /* Glass */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 18px 40px;
    font-size: 1.1rem;
    transition: all 0.4s ease;
}

.btn--litres:hover {
    background: var(--accent);
    /* Red Background */
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4);
    transform: translateY(-3px);
}

/* Doodle Arrows */
.arrow-doodle {
    opacity: 0.8;
    filter: drop-shadow(0 0 5px rgba(229, 9, 20, 0.5));
    animation: floatArrow 3s ease-in-out infinite;
}

.arrow-left {
    animation-delay: 0s;
}

.arrow-right {
    animation-delay: 1.5s;
}

@keyframes floatArrow {

    0%,
    100% {
        transform: translateY(0) rotate(-10deg);
    }

    50% {
        transform: translateY(-10px) rotate(-8deg);
    }
}

/* Right arrow override for transform/animation pairing */
@keyframes floatArrowRight {

    0%,
    100% {
        transform: scaleX(-1) translateY(0) rotate(10deg);
    }

    50% {
        transform: scaleX(-1) translateY(-10px) rotate(12deg);
    }
}

.arrow-right {
    animation-name: floatArrowRight;
    /* Separate animation for mirrored arrow */
}

.bio-modal::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.bio-modal__content {
    padding: 40px;
    overflow-y: auto;
    max-height: 90vh;
    position: relative;
}

.bio-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.bio-modal__close:hover {
    color: var(--accent);
}

.bio-modal__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent);
}

.biography__timeline p {
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 1.1rem;
    color: #d1d1d1;
}


/* Media Cards - Glass buttons */
.media__links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.media__info p {
    font-family: var(--font-heading);
    /* Unbounded */
    font-weight: 400;
}

.media-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.05);
    /* Glass */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.media-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.1);
}

.media-card__icon {
    font-size: 1.2rem;
    color: var(--accent);
}

.media-card__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

/* Contact Icons Row */
.contacts__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

/* Legend Section */
.legend {
    background-color: #000;
    position: relative;
    z-index: 10;
}

.legend .section-title {
    font-family: var(--font-heading);
    /* Match "My Path" (Unbounded) */
    font-weight: 700;
}

.legend__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 Columns */
    gap: 30px;
    margin-top: 80px;
    /* Increased from 40px for more air */
}

/* Red Vertical Line (Dash) - Shortened */
.legend__column {
    position: relative;
    padding-left: 20px;
    /* Spacing text from dash */
    height: fit-content;
}

.legend__column::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    /* Optically aligned with first line */
    width: 4px;
    height: 24px;
    /* Approximate height of one line */
    background-color: #E50914;
}

.legend__column p {
    font-family: var(--font-heading);
    /* Match Subtitle (Unbounded) */
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    margin: 0;
    /* Clear margin to align with border */
}

@media (max-width: 1024px) {
    .legend__grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 Cols on Tablet */
    }
}

@media (max-width: 768px) {
    .legend__grid {
        grid-template-columns: 1fr;
        /* 1 Col on Mobile */
    }
}

.contacts__info {
    text-align: left;
}

.contacts__info p {
    font-family: var(--font-heading);
    /* Unbounded */
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.contacts__icons-row {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.contact-icon {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy */
}

.contact-icon:hover {
    color: var(--accent);
    transform: scale(1.3);
}

.contacts__form-wrapper {
    background-color: var(--bg-secondary);
    padding: 50px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    margin-bottom: 20px;
}

.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    background-color: #050505;
}

/* Responsive */
/* Responsive */
@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .hero {
        justify-content: center;
        text-align: center;
    }

    .hero__layer {
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        width: 100%;
    }


    .hero__layer--back {
        top: 15%;
        font-size: 14vw;
        color: rgba(255, 255, 255, 0.05);
        /* Fade out outline on mobile */
    }

    .hero__layer--front {
        top: 25%;
        font-size: 14vw;
        left: 50%;
        transform: translateX(-50%);
    }

    .hero__image-container {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        height: 60%;
        bottom: 0;
        justify-content: center;
    }

    .hero__content {
        align-items: center;
        text-align: center;
        padding-left: 20px;
        /* Reset padding */
    }

    .hero__status-block {
        justify-content: center;
    }

    .hero__buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .biography__grid,
    .contacts__container {
        grid-template-columns: 1fr;
    }

    .biography__photo {
        order: -1;
    }
}

/* Closing @media (max-width: 900px) */

/* Video/GIF Container Styles - Refined for Video */
.gif-container {
    display: flex;
    justify-content: center;
    margin: 40px auto;
    position: relative;
    max-width: 400px;
    /* 2x smaller (was 800px) */
    width: 90%;
}

.gif-wrapper {
    position: relative;
    padding: 6px;
    /* Space for the border */
    background: #000;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.3);
    /* Red glow */
    overflow: hidden;
    width: 100%;
}

/* Red Running Line Animation */
.gif-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, #e50914);
    /* Forced Red */
    animation: rotateBorder 4s linear infinite;
    z-index: 0;
}

.gif-wrapper::after {
    content: '';
    position: absolute;
    inset: 4px;
    /* Thickness of the runner */
    background: #000;
    /* Inner mask */
    border-radius: 18px;
    z-index: 0;
}

.gif-content {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Text Updates & Spacing --- */
#read-more-btn {
    margin-top: 40px;
    /* Increased separation */
}

.biography__timeline p {
    font-family: var(--font-heading);
    /* Unbounded (Born in 1992 style) */
    font-weight: 400;
    line-height: 1.6;
    font-size: 1rem;
    color: #dadada;
}

/* --- Uiverse Custom CTA Button --- */
.uiverse-button {
    margin: 0;
    height: auto;
    background: transparent;
    padding: 0;
    border: none;
    cursor: pointer;
    /* Font & Layout */
    --border-right: 6px;
    --text-stroke-color: rgba(255, 255, 255, 0.6);
    --animation-color: var(--accent);
    /* Adapted to Red */
    --fs-size: 1.5rem;
    /* Adjusted size */
    letter-spacing: 3px;
    text-decoration: none;
    font-size: var(--fs-size);
    font-family: var(--font-heading);
    /* Unbounded */
    position: relative;
    text-transform: uppercase;
    color: #fff;
    /* Solid White */
    /* -webkit-text-stroke: 1px var(--text-stroke-color); Removed stroke for solid fill */
    margin-top: 30px;
    display: block;
    width: fit-content;
    margin: 30px auto;
}

/* this is the text, when you hover on button */
.hover-text {
    position: absolute;
    box-sizing: border-box;
    content: attr(data-text);
    color: var(--animation-color);
    width: 0%;
    inset: 0;
    border-right: var(--border-right) solid var(--animation-color);
    overflow: hidden;
    transition: 0.5s;
    -webkit-text-stroke: 1px var(--animation-color);
}

/* hover */
.uiverse-button:hover .hover-text {
    width: 100%;
    filter: drop-shadow(0 0 23px var(--animation-color));
}

/* --- Entrepreneur Animated Border Box --- */
.entrepreneur-3d-wrapper {
    perspective: 1000px;
    /* Establish 3D space */
    padding: 60px 0;
    /* Space for the tilt */
}

.entrepreneur__text-border {
    position: relative;
    padding: 4px;
    border-radius: 32px;
    background: transparent;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    /* Margin handled by wrapper padding */
    width: fit-content;

    /* 3D Initial State */
    transform-style: preserve-3d;
    transform: rotateX(20deg) scale(0.9);
    /* Start tilted */
    will-change: transform;
    /* Optimize for animation */
    transition: transform 0.1s linear;
    /* Smooth scroll updates */
}

/* The Running Red Line */
.entrepreneur__text-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, #e50914);
    animation: rotateBorder 4s linear infinite;
    z-index: 1;
}

/* The Matte Card Background (Uiverse Style) - Matched to Site BG */
.entrepreneur__text-content {
    position: relative;
    z-index: 2;
    border-radius: 30px;
    background: #000;
    /* Matched to body background */
    box-shadow: 15px 15px 30px rgb(20, 20, 20),
        -15px -15px 30px rgb(60, 60, 60);
    /* Adjusted shadows for black bg */
    padding: 40px;
    text-align: left;
}

/* Ensure animation keyframe exists (it does, but just ensuring context) */
/* @keyframes rotateBorder { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } */


/* --- Mentions Section Styles --- */
.mentions-grid {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    gap: 60px;
    align-items: center;
}

.mentions-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    /* Center image in its col if needed */
}

/* Dim Pulsating Red Backlight */
.mentions-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(40px);
    border-radius: 50%;
    z-index: 0;
    animation: pulseRedGlow 4s ease-in-out infinite;
}

@keyframes pulseRedGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.mentions-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    /* Limit max size */
    height: auto;
    object-fit: contain;
}

.mentions-content {
    text-align: left;
}

/* Responsive Mentions */
/* --- Heartbeat Loader (Uiverse) --- */
.loading svg {
    width: 64px;
    height: 48px;
}

.loading svg polyline {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.loading svg polyline#back {
    fill: none;
    stroke: rgba(229, 9, 20, 0.2);
    /* Low opacity accent */
}

.loading svg polyline#front {
    fill: none;
    stroke: var(--accent);
    /* Main Red */
    stroke-dasharray: 48, 144;
    stroke-dashoffset: 192;
    animation: dash_682 1.4s linear infinite;
}

@keyframes dash_682 {
    72.5% {
        opacity: 0;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* =========================================
   MOBILE RESPONSIVENESS FIXES (< 768px)
   ========================================= */
@media screen and (max-width: 768px) {

    /* --- Global Layout --- */
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 20px;
        width: 100%;
        max-width: 100%;
    }

    .section {
        padding: 60px 0;
        /* Reduced vertical padding */
    }

    .section-title {
        font-size: 2rem !important;
        /* Smaller titles */
        word-wrap: break-word;
    }

    /* --- Hero Section --- */
    .hero {
        height: 100dvh;
        /* Dynamic viewport height */
        min-height: 100dvh;
        background-position: center bottom;
    }

    .hero__content {
        align-items: center;
        /* Center content on mobile */
        text-align: center;
        padding-left: 0;
        padding-bottom: 120px;
        /* Space for bottom bar of browser */
        justify-content: center;
    }

    .hero__buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero__status-block {
        display: none;
        /* Hide status block on mobile if it clutters */
        /* Or keep it but scale it down: */
        /* font-size: 0.7rem; padding: 10px 20px; */
    }

    /* Text Layers - Scale Down */
    .hero__layer {
        font-size: 15vw;
        /* Slightly smaller to fit width */
        width: 100%;
    }

    .hero__layer--back {
        top: 19%;
        /* Adjusted closer */
    }

    .hero__layer--middle,
    .hero__layer--front {
        top: 27%;
        /* Adjusted closer */
        line-height: normal;
        /* Restore normal line height */
    }

    .hero__image-container {
        width: 100%;
        height: 92%;
        /* Maximize size almost to top */
        bottom: 0;
        right: 0;
        opacity: 1;
        /* Ensure image is anchored to right/bottom but huge */
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
    }

    .hero__image-container img {
        height: 100%;
        width: auto;
        /* Maintain aspect ratio */
        object-fit: contain;
        object-position: bottom center;
        transform: scale(1.6);
        /* Increased size by an extra 15% */
        transform-origin: bottom center;
    }

    /* --- Legend Section --- */
    .legend__grid {
        grid-template-columns: 1fr;
        /* Stack columns */
        gap: 40px;
    }

    .legend__column {
        text-align: center;
        padding-left: 0;
    }

    .legend__column::before {
        /* Move dash to top center */
        left: 50%;
        transform: translateX(-50%);
        top: -20px;
        width: 24px;
        height: 4px;
        /* Horizontal dash */
    }

    /* --- Biography Section --- */
    .biography__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .biography__photo {
        order: 2;
        /* Move photo below text */
        display: block;
        /* Show photo again! */
        margin-top: 20px;
    }

    .biography__summary h3 {
        font-size: 1.5rem;
        text-align: center;
    }

    /* --- Entrepreneur Section --- */
    .entrepreneur-3d-wrapper {
        padding: 20px 0;
    }

    .entrepreneur__text-border {
        /* transform: handled by JS now */
        margin: 0 auto;
        padding: 3px;
        overflow: hidden;
        width: 90%;
    }

    /* --- Books Section --- */
    .books__grid {
        gap: 40px;
    }

    .book-card {
        width: 100%;
        max-width: 320px;
        height: auto;
        aspect-ratio: 2/3;
    }

    /* --- Mentions & Media --- */
    .mentions-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .mentions-content .section-title {
        text-align: center !important;
        /* Force center alignment */
    }

    .mentions-image-wrapper {
        margin: 0 auto;
        max-width: 80%;
    }

    .mentions-content {
        text-align: center;
    }

    .media__links {
        flex-direction: column;
        gap: 20px;
    }

    /* --- Contacts --- */
    .contacts__container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .contacts__info {
        order: -1;
        /* Move ABOVE form */
    }

    .contacts__info .section-title {
        text-align: center !important;
    }

    .contacts__icons-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    /* --- Footer --- */
    .footer .container {
        flex-direction: column;
        justify-content: center !important;
        text-align: center;
        gap: 20px;
    }

    .footer .container>div {
        align-items: center;
        /* Center nested flex items */
    }
}


/* Mobile Menu Links - Uiverse Structure (Exact Match) */
.mobile-menu__link {
    position: relative;
    display: inline-block;
    padding: 0;
    /* Remove padding to rely on text size */
    margin: 15px 0;
    /* Spacing handled by margin */
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
    font-family: var(--font-heading);
    background: transparent;
    border: none;
    cursor: pointer;
    letter-spacing: 2px;
    /* Variables */
    --border-right: 4px;
    --animation-color: var(--accent);
    color: transparent;
    /* Hide text if any leaks */
}

/* Base Text (White) - Defines Layout Size */
.mobile-menu__link .actual-text {
    color: #fff;
    position: relative;
    z-index: 1;
}

/* Hover Overlay (Red) - Absolute on top */
.mobile-menu__link .hover-text {
    position: absolute;
    inset: 0;
    width: 0%;
    /* Start closed */
    color: var(--animation-color);
    overflow: hidden;
    white-space: nowrap;
    border-right: var(--border-right) solid var(--animation-color);
    z-index: 2;
    transition: width 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    /* No Flex Centering here - relies on matching layout of actual-text */
    pointer-events: none;
}

/* Hover State */
@media (hover: hover) {
    .mobile-menu__link:hover .hover-text {
        width: 100%;
        filter: drop-shadow(0 0 15px var(--animation-color));
    }
}

/* Touch State */
.mobile-menu__link:active .hover-text {
    width: 100%;
    filter: drop-shadow(0 0 15px var(--animation-color));
}

/* Remove old pseudo cleanup if present */
.mobile-menu__link::before,
.mobile-menu__link::after {
    display: none;
}

/* --- Merch Section --- */
.merch {
    padding-bottom: 80px;
}

.merch__grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
    /* Ensure stacking on mobile */
}

/* Card Styles */
.card {
    /* Fixed width/height as requested, but responsive friendly */
    width: 280px;
    /* Slightly wider than 195px to fit content better, user asked for specific but 195 is very narrow */
    height: 380px;
    /* Taller for the image */
    background: #e6e6e6;
    /* Light gray for contrast with black shirts */
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #000;
    /* Dark text for light bg */
    transition: 0.2s ease-in-out;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    /* Keep image inside */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Flex wrap adjustment for mobile */
@media (max-width: 900px) {
    .merch__grid {
        flex-direction: column;
        align-items: center;
    }
}

.img {
    height: 90%;
    /* Start big */
    position: absolute;
    transition: 0.3s ease-in-out;
    z-index: 1;
    object-fit: contain;
    bottom: 0;
    /* Anchor to bottom so head isn't cut off if we crop */
}

.textBox {
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: 0.2s ease-in-out;
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    /* Readability backing */
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(5px);
}

.textBox>.head {
    font-size: 18px;
    font-weight: bold;
    font-family: var(--font-heading);
    margin: 0;
}

.textBox>span {
    font-size: 12px;
    color: #555;
}

.shop-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: #E50914;
    /* Red accent */
    font-size: 16px;
}

/* Hover Effects */
.card:hover>.textBox {
    opacity: 1;
}

.card:hover>.img {
    height: 65%;
    /* Shrink image to make room */
    filter: blur(7px);
    animation: anim 3s infinite;
}

@keyframes anim {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.card:hover {
    transform: scale(1.04);
}
/* --- Custom Merch Cart Button --- */
.btn-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: none;
  background-color: transparent;
  position: relative;
}

.btn-cart::after {
  content: attr(data-quantity);
  width: fit-content;
  height: fit-content;
  position: absolute;
  font-size: 15px;
  color: white;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: .2s linear;
  top: 115%;
}

.icon-cart {
  width: 24.38px;
  height: 30.52px;
  transition: .2s linear;
}

.icon-cart path {
  fill: rgb(240, 8, 8);
  transition: .2s linear;
}

.btn-cart:hover > .icon-cart {
  transform: scale(1.2);
}

.btn-cart:hover > .icon-cart path {
  fill: rgb(186, 34, 233);
}

.btn-cart:hover::after {
  visibility: visible;
  opacity: 1;
  top: 105%;
}

/* Extra tweak: prevent conflict if button is used inside anchor */
a.card .btn-cart {
    pointer-events: none; /* Let the click pass through to the card link */
}
