:root {
    --bg-color: #020202;
    --panel-bg: #0a0a0a;
    --text-primary: #e0e0e0;
    --text-secondary: #ff00ff;
    --accent-cyan: #00ffff;
    --accent-yellow: #f0f000;
    --grid-line: rgba(255, 255, 255, 0.03);

    --font-display: 'Press Start 2P', cursive;
    --font-body: 'Space Grotesk', sans-serif;

    --sidebar-width: 350px;
    --border-width: 2px;
}

@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

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

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }

    20% {
        transform: skew(-2deg);
    }

    40% {
        transform: skew(2deg);
    }

    60% {
        transform: skew(-1deg);
    }

    80% {
        transform: skew(1deg);
    }

    100% {
        transform: skew(0deg);
    }
}

@keyframes text-flicker {
    0% {
        opacity: 0.1;
    }

    2% {
        opacity: 1;
    }

    8% {
        opacity: 0.1;
    }

    9% {
        opacity: 1;
    }

    12% {
        opacity: 0.1;
    }

    20% {
        opacity: 1;
    }

    25% {
        opacity: 1;
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 0.7;
    }

    72% {
        opacity: 0.2;
    }

    77% {
        opacity: 0.9;
    }

    100% {
        opacity: 0.9;
    }
}

@keyframes spark-drift {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--dx), var(--dy)) scale(0);
        opacity: 0;
    }
}

.spark {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--spark-color, var(--accent-cyan));
    pointer-events: none;
    z-index: 1001;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    box-shadow: 0 0 70px var(--spark-color, var(--accent-cyan));
    animation: spark-drift 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.click-counter-container {
    position: relative;
}

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

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #050505;
    border-left: 1px solid var(--grid-line);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border: 2px solid #000;
    box-shadow: inset 0 0 10px rgba(255, 0, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.5);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) #050505;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    transition: border 0.3s ease;
}

body.lock-active {
    border: 5px solid var(--text-secondary);
    box-sizing: border-box;
}

body.lock-active::before {
    content: 'SCROLL LOCKED';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-secondary);
    z-index: 99999;
    pointer-events: none;
    text-shadow: 0 0 20px var(--text-secondary);
    animation: text-flicker 2s infinite;
    opacity: 0.5;
}

body.lock-active::after {
    content: '[ SYSTEM OVERRIDE: DOUBLE-CLICK ANY DATA-SLOT TO RE-ESTABLISH SCROLL CONTROL ]';
    position: fixed;
    top: calc(50% + 50px);
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: var(--accent-cyan);
    z-index: 99999;
    pointer-events: none;
    letter-spacing: 2px;
    opacity: 0.8;
}

.mobile-notice {
    display: none;
    background: var(--accent-yellow);
    color: #000;
    text-align: center;
    padding: 10px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    position: fixed;
    top: 75px;
    left: 0;
    width: 100%;
    z-index: 900;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .mobile-notice {
        display: block;
    }

    .main-content {
        margin-top: 120px;
    }
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 9999;
}

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.social-hub {
    background: var(--panel-bg);
    border-bottom: var(--border-width) solid var(--text-secondary);
    padding: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(255, 0, 255, 0.2);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .social-hub {
        padding: 10px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .links-container {
        justify-content: center;
        width: 100%;
    }
}


.click-counter-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-display);
    border-left: 2px solid var(--accent-cyan);
    padding-left: 15px;
    margin-left: 15px;
}

.counter-label {
    font-size: 0.5rem;
    color: var(--accent-cyan);
    letter-spacing: 1px;
}

.counter-value {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-shadow: 0 0 10px var(--text-secondary);
}

.counter-value.rapid {
    animation: text-flicker 0.1s infinite, glitch-skew 0.3s infinite;
    color: var(--accent-yellow);
    text-shadow: 2px 2px 0 var(--text-secondary), -2px -2px 0 var(--accent-cyan);
}

@keyframes counter-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

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

.counter-value.pop {
    animation: counter-pop 0.2s ease-out;
}

.social-link.dev-link {
    background: var(--accent-yellow);
    color: #000;
    box-shadow: 0 0 10px rgba(240, 240, 0, 0.4);
    font-weight: bold;
}

.social-link.dev-link:hover {
    box-shadow: 0 0 20px var(--accent-yellow);
    background: #fff;
}

.brand {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-size: 1.2rem;
    text-shadow: 2px 2px 0px var(--text-secondary);
}

.logo-sub {
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.links-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.social-link {
    text-decoration: none;
    color: var(--bg-color);
    background: var(--text-secondary);
    padding: 5px 10px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    text-transform: uppercase;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--accent-cyan);
    transform: translateY(-2px);
}

.social-link i {
    margin-right: 5px;
}

.sidebar-footer {
    display: none;
}

.main-content {
    padding: 20px;
    width: 100%;
    margin-top: 80px;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.profile-header {
    border: var(--border-width) solid var(--accent-cyan);
    background: rgba(0, 255, 255, 0.05);
    padding: 20px;
    margin-bottom: 40px;
    display: grid;
    grid-template-areas:
        "pic info"
        "stats stats"
        "bio bio";
    gap: 20px;
    position: relative;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    border-top: 4px solid var(--text-secondary);
    border-left: 4px solid var(--text-secondary);
}

.profile-header::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-bottom: 4px solid var(--text-secondary);
    border-right: 4px solid var(--text-secondary);
}

.profile-pic-wrapper {
    grid-area: pic;
    width: 100px;
    height: 100px;
}

.glitch-img-container {
    width: 100%;
    height: 100%;
    border: 2px solid var(--text-secondary);
    overflow: hidden;
    position: relative;
}

.glitch-img-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 2px, transparent 4px);
    pointer-events: none;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.3s;
}

.profile-pic:hover {
    filter: grayscale(0%) contrast(1);
}

.profile-details {
    grid-area: info;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.username {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--accent-cyan);
}

.actions {
    display: flex;
    gap: 10px;
}

button {
    font-family: var(--font-display);
    font-size: 0.7rem;
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--text-secondary);
    color: var(--bg-color);
    box-shadow: 4px 4px 0 var(--accent-cyan);
}

.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--accent-cyan);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

.stats-row {
    grid-area: stats;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    padding: 10px 0;
    font-family: var(--font-display);
    font-size: 0.7rem;
}

.stats-row .stat strong {
    color: var(--accent-yellow);
    display: block;
    font-size: 1rem;
    margin-bottom: 5px;
}

.bio-section {
    grid-area: bio;
    font-size: 0.9rem;
    line-height: 1.6;
    border-left: 2px solid var(--text-secondary);
    padding-left: 15px;
}

.bio-line.status {
    color: var(--accent-cyan);
    font-weight: bold;
    text-transform: uppercase;
}

.active-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--text-secondary);
    margin-right: 5px;
    box-shadow: 0 0 10px var(--text-secondary);
    animation: text-flicker 2s infinite;
}

.highlights-scroll {
    margin-bottom: 50px;
}

.highlight-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
}

.highlight .circle {
    width: 70px;
    height: 70px;
    border: 2px solid var(--grid-line);
    padding: 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
    background: #000;
}

.highlight .circle img {
    border-radius: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.highlight:hover .circle {
    border-color: var(--accent-yellow);
}

.highlight:hover img {
    opacity: 1;
}

.highlight span {
    font-family: var(--font-display);
    font-size: 0.5rem;
    color: var(--text-secondary);
}

.gallery-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--grid-line);
}

.gallery-tabs span {
    padding: 10px 20px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--text-primary);
    cursor: pointer;
    opacity: 0.5;
    position: relative;
}

.gallery-tabs span.active {
    opacity: 1;
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding-bottom: 100px;
    perspective: 1000px;
}

.gallery-item {
    position: relative;
    border: none;
    background: transparent;
    aspect-ratio: auto;
    overflow: visible;
    grid-column: span 2;
    will-change: transform, opacity;
    opacity: 0.2;
    transition: opacity 0.8s ease-out;

    .gallery-item.visible {
        opacity: 1;
        transition: opacity 0.8s ease-out;
    }

    .gallery-item img {
        border: 1px solid var(--grid-line);
        width: 100%;
        height: auto;
        display: block;
        filter: grayscale(100%) contrast(1.2);
        transition: all 0.5s ease;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .gallery-item:hover img {
        filter: grayscale(0%) contrast(1.1) drop-shadow(0 0 10px var(--accent-cyan));
        z-index: 10;
        transform: scale(1.02);
        clip-path: polygon(2% 0, 100% 2%, 98% 100%, 0 98%);
    }

    .gallery-item.wide {
        grid-column: span 3;
    }

    .gallery-item.tall {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-item.massive {
        grid-column: span 4;
        grid-row: span 2;
    }

    .gallery-text-card {
        grid-column: 1 / -1;
        background: transparent;
        border: none;
        aspect-ratio: auto;
        min-height: 20vh;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        position: relative;
        z-index: 0;
    }

    .gallery-text-card span {
        background: transparent;
        color: transparent;
        font-family: var(--font-display);
        font-size: 5rem;
        line-height: 0.8;
        text-transform: uppercase;
        -webkit-text-stroke: 2px var(--text-secondary);
        white-space: nowrap;
        opacity: 0.3;
        transform: skew(-5deg);
        transition: all 0.5s ease;
    }

    .gallery-text-card.glitch-mode span {
        color: var(--accent-cyan);
        -webkit-text-stroke: 0;
        text-shadow: 4px 4px 0 var(--text-secondary);
        opacity: 1;
    }

    @media (max-width: 768px) {
        .gallery-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .gallery-item,
        .gallery-item.wide,
        .gallery-item.tall,
        .gallery-item.massive {
            grid-column: span 1;
            grid-row: span 1;
        }

        .gallery-item.wide {
            grid-column: span 2;
        }

        .gallery-text-card span {
            font-size: 2.5rem;
        }

        .main-content {
            filter: none !important;
            opacity: 1 !important;
            transform: none !important;
        }

        .gallery-item img {
            filter: none !important;
        }
    }
}

.marquee-container {
    background: var(--accent-yellow);
    color: #000;
    border: none;
    transform: rotate(-1deg);
    width: 105%;
    margin-left: -2.5%;
    margin-bottom: 40px;
}

.marquee-item {
    font-weight: 900;
    color: #000;
}

@media (min-width: 900px) {
    .app-layout {
        flex-direction: row;
    }

    .social-hub {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 40px;
        border-right: none;
        border-bottom: var(--border-width) solid var(--text-secondary);
        background: rgba(10, 10, 10, 0.9);
        backdrop-filter: blur(10px);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
    }

    .logo-text {
        font-size: 2.5rem;
        margin-bottom: 5px;
    }

    .logo-sub {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .links-container {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin-top: auto;
        margin-bottom: 20px;
    }

    .sidebar-footer {
        display: block;
        font-family: var(--font-display);
        font-size: 0.6rem;
        color: #555;
    }

    .social-link {
        text-align: center;
        padding: 15px;
        font-size: 0.8rem;
    }

    .main-content {
        flex: 1;
        height: auto;
        overflow-y: visible;
        padding: 0;
        margin-top: 80px;
        margin-left: 0;
    }

    .content-wrapper {
        padding: 40px;
        max-width: 100%;
    }

    .profile-header {
        grid-template-columns: 200px 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "pic info"
            "pic stats"
            "bio bio";
        gap: 30px;
    }

    .profile-pic-wrapper {
        width: 200px;
        height: 200px;
    }

    .username {
        font-size: 3rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 30px;
    }

}

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-cyan);
    background: rgba(0, 255, 255, 0.2);
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    mix-blend-mode: exclusion;
}

.custom-cursor.hover {
    width: 50px;
    height: 50px;
    background: transparent;
    border-color: var(--text-secondary);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-secondary);
    font-size: 3rem;
    cursor: pointer;
    font-family: var(--font-display);
}