:root {
    --bg: #050505;
    --bg-soft: #0b0b0b;
    --white: #ffffff;
    --muted: #929292;
    --border: rgba(255,255,255,0.1);
    --purple: #8b5cf6;
    --purple-bright: #a78bfa;
    --purple-hot: #d8c8ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

body,
a,
button {
    cursor: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}


/* =========================
   BACKGROUND
========================= */

.background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(139,92,246,0.07), transparent 45%);
}

.ambient-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.grid {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);

    background-size: 70px 70px;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 85%
    );
    animation: grid-drift 18s linear infinite;
}

@keyframes grid-drift {
    to { background-position: 70px 70px; }
}

.scanline {
    position: absolute;
    inset: -100% 0;
    opacity: 0.18;
    background: linear-gradient(transparent 0%, rgba(216,200,255,0.15) 48%, transparent 52%);
    animation: scanline 9s linear infinite;
}

@keyframes scanline {
    to { transform: translateY(100%); }
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;

    background: radial-gradient(
        circle,
        rgba(139,92,246,0.15),
        transparent 70%
    );

    filter: blur(50px);
    mix-blend-mode: screen;
    animation: glow-drift 12s ease-in-out infinite alternate;
}

.glow-one {
    top: -250px;
    right: -200px;
}

.glow-two {
    top: 50%;
    left: -300px;
    animation-delay: -5s;
}

@keyframes glow-drift {
    from { transform: translate3d(-3%, -2%, 0) scale(0.92); }
    to { transform: translate3d(5%, 4%, 0) scale(1.08); }
}


/* =========================
   CURSOR
========================= */

.cursor {
    position: fixed;

    width: 8px;
    height: 8px;

    background: white;
    border-radius: 50%;

    pointer-events: none;
    z-index: 9999;

    transform: translate(-50%, -50%);
    will-change: transform;
    box-shadow: 0 0 16px 4px rgba(255,255,255,0.55), 0 0 35px 8px rgba(167,139,250,0.5);
}

.cursor-follower {
    position: fixed;

    width: 35px;
    height: 35px;

    border: 1px solid rgba(167,139,250,0.7);
    border-radius: 50%;

    pointer-events: none;
    z-index: 9998;

    transform: translate(-50%, -50%);
    will-change: transform;

    transition:
        width 0.25s ease,
        height 0.25s ease,
        background 0.25s ease,
        border 0.25s ease;
}

.cursor-follower.hover {
    width: 65px;
    height: 65px;

    background: rgba(139,92,246,0.12);
    border-color: var(--purple-bright);
    box-shadow: 0 0 35px rgba(139,92,246,0.45);
}


/* =========================
   NAVBAR
========================= */

.navbar {
    position: fixed;

    top: 20px;
    left: 50%;

    transform: translateX(-50%);

    width: min(1200px, calc(100% - 40px));

    padding: 14px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: rgba(5,5,5,0.7);
    backdrop-filter: blur(20px);

    z-index: 1000;

    transition: 0.3s ease;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span,
.footer-logo span {
    color: var(--purple-bright);
}

.navbar nav {
    display: flex;
    gap: 32px;
}

.navbar nav a {
    color: var(--muted);
    font-size: 13px;
    transition: 0.3s;
}

.navbar nav a:hover {
    color: white;
}

.nav-button {
    padding: 10px 17px;

    border-radius: 10px;

    background: white;
    color: black;

    font-size: 12px;
    font-weight: 700;

    transition: 0.3s;
}

.nav-button:hover {
    background: var(--purple-bright);
    color: white;
}

.performance-toggle {
    display: none;
    padding: 10px 13px;
    border: 1px solid var(--purple-bright);
    border-radius: 10px;
    background: rgba(139,92,246,0.12);
    color: var(--purple-hot);
    font-size: 11px;
    font-weight: 700;
}

body.performance-mode .performance-toggle {
    display: block;
}

.performance-toggle:hover {
    background: var(--purple-bright);
    color: black;
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 100vh;

    display: flex;
    align-items: center;

    padding: 150px max(40px, 8vw) 100px;

    position: relative;
}

.hero-content {
    max-width: 1000px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2px;

    margin-bottom: 30px;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #9b7cff;

    box-shadow: 0 0 15px #8b5cf6;

    animation: pulse 2s infinite;
}

@keyframes pulse {
    50% {
        opacity: 0.3;
        transform: scale(0.7);
    }
}

.hero h1 {
    font-size: clamp(55px, 9vw, 125px);

    line-height: 0.88;

    letter-spacing: -7px;

    font-weight: 800;
}

.hero h1 span {
    color: transparent;

    -webkit-text-stroke: 1px white;

    transition: 0.4s;
}

.hero h1 span:hover {
    color: var(--purple-bright);

    -webkit-text-stroke: 1px var(--purple-bright);
    text-shadow: 0 0 35px rgba(167,139,250,0.7);
}

.hero p {
    max-width: 560px;

    margin-top: 35px;

    color: var(--muted);

    font-size: 16px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 14px;

    margin-top: 35px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 15px;

    padding: 16px 22px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 700;

    transition: 0.3s;
}

.primary-button {
    background: white;
    color: black;
}

.primary-button:hover {
    background: var(--purple-bright);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(216,200,255,0.45);
}

.secondary-button {
    border: 1px solid var(--border);
    color: white;
}

.secondary-button:hover {
    border-color: var(--purple-bright);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;

    bottom: 40px;
    left: max(40px, 8vw);

    display: flex;
    align-items: center;
    gap: 12px;

    color: #666;

    font-size: 9px;
    letter-spacing: 2px;
}

.scroll-indicator span {
    width: 35px;
    height: 1px;

    background: var(--purple-bright);
}


/* =========================
   SECTIONS
========================= */

.section {
    width: min(1200px, calc(100% - 80px));

    margin: auto;

    padding: 150px 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;

    margin-bottom: 65px;
}

.section-number {
    color: var(--purple-bright);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 3px;

    margin-bottom: 20px;
}

.section-heading h2,
.about-content h2 {
    font-size: clamp(45px, 6vw, 80px);

    line-height: 0.95;

    letter-spacing: -4px;
}

.section-heading h2 span,
.about-content h2 span {
    color: var(--purple-bright);
}

.section-heading > p {
    width: 300px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.7;
}


/* =========================
   FILTERS
========================= */

.filters {
    display: flex;
    gap: 8px;

    margin-bottom: 35px;
}

.filter {
    border: 1px solid var(--border);

    background: transparent;
    color: var(--muted);

    padding: 9px 16px;

    border-radius: 50px;

    font-size: 11px;

    transition: 0.3s;
}

.filter:hover,
.filter.active {
    background: white;
    color: black;

    border-color: white;
}


/* =========================
   GALLERY
========================= */

.gallery {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 45px 25px;
}

.project-card {
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

.project-card.hidden {
    display: none;
}

.project-image {
    position: relative;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    border-radius: 12px;

    background: #111;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 18px 50px rgba(139,92,246,0.04);
    transition: box-shadow 0.5s ease;
}

.project-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}

.project-card:hover .project-image img {
    transform: scale(1.07);
}

.project-card:hover .project-image {
    box-shadow: 0 0 0 1px rgba(167,139,250,0.5), 0 20px 70px rgba(139,92,246,0.23);
}

.image-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(10,5,20,0.65);

    opacity: 0;

    transition: 0.4s;
}

.project-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay span {
    padding: 13px 18px;

    border: 1px solid rgba(255,255,255,0.3);

    border-radius: 50px;

    font-size: 10px;
    letter-spacing: 1px;

    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

.project-info {
    display: flex;
    justify-content: space-between;

    padding-top: 18px;
}

.project-info h3 {
    font-size: 16px;
}

.project-info p {
    color: #666;

    font-size: 11px;

    margin-top: 6px;
}

.project-arrow {
    font-size: 20px;

    color: var(--purple-bright);
}


/* =========================
   STATS
========================= */

.stats-section {
    width: min(1200px, calc(100% - 80px));

    margin: auto;

    padding: 60px 0;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;

    font-size: 45px;

    letter-spacing: -2px;
    text-shadow: 0 0 25px rgba(167,139,250,0.4);
}

.stat span {
    color: #666;

    font-size: 9px;
    letter-spacing: 2px;
}


/* =========================
   SERVERS
========================= */

.server-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.servers-section {
    position: relative;
}

.servers-section::before {
    content: "COMMUNITIES / 04";
    position: absolute;
    top: 90px;
    right: 0;
    color: rgba(255,255,255,0.16);
    font-size: 9px;
    letter-spacing: 3px;
    writing-mode: vertical-rl;
}

.server-card {
    border: 1px solid var(--border);

    border-radius: 15px;

    overflow: hidden;

    background: rgba(255,255,255,0.02);

    transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
    transform-style: preserve-3d;
    animation: server-float 7s ease-in-out infinite;
}

.server-card:nth-child(2) {
    animation-delay: -2s;
}

.server-card:nth-child(3) {
    animation-delay: -4s;
}

.server-card:nth-child(4) {
    animation-delay: -6s;
}

@keyframes server-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -7px; }
}

.server-card:hover {
    border-color: rgba(139,92,246,0.5);

    box-shadow: 0 0 0 1px rgba(167,139,250,0.18), 0 20px 80px rgba(139,92,246,0.16);
}

.server-banner {
    height: 350px;

    position: relative;

    overflow: hidden;
}

.server-banner::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,0.7),
            transparent 60%
        ),
        linear-gradient(115deg, transparent 25%, rgba(255,255,255,0.16), transparent 42%);
    background-size: 100% 100%, 220% 100%;
    animation: banner-sheen 8s linear infinite;
}

@keyframes banner-sheen {
    from { background-position: 0 0, 140% 0; }
    to { background-position: 0 0, -80% 0; }
}

.server-banner img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: 0.8s;
}

.server-card:hover .server-banner img {
    transform: scale(1.05);
}

.server-card:hover {
    transform: translateY(-10px) rotateX(1deg);
}

.server-number {
    position: absolute;

    top: 25px;
    right: 25px;

    z-index: 2;

    color: white;

    font-size: 12px;
}

.server-content {
    padding: 35px;

    display: flex;
    align-items: center;
    gap: 30px;
}

.server-logo {
    width: 90px;
    height: 90px;

    object-fit: cover;

    border-radius: 18px;

    border: 1px solid var(--border);
    box-shadow: 0 0 25px rgba(139,92,246,0.16);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.server-card:hover .server-logo {
    transform: rotate(-4deg) scale(1.06);
    box-shadow: 0 0 35px rgba(167,139,250,0.4);
}

.server-details {
    flex: 1;
}

.server-type {
    color: var(--purple-bright);

    font-size: 9px;
    letter-spacing: 2px;
}

.server-details h3 {
    font-size: 25px;

    margin: 8px 0;
}

.server-details p {
    max-width: 600px;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.6;
}

.server-tags {
    display: flex;
    gap: 7px;

    margin-top: 15px;
}

.server-tags span,
.skills span {
    border: 1px solid var(--border);

    padding: 7px 10px;

    border-radius: 50px;

    color: #777;

    font-size: 8px;

    letter-spacing: 1px;
}

.server-button {
    padding: 13px 18px;

    border: 1px solid var(--border);

    border-radius: 9px;

    white-space: nowrap;

    font-size: 10px;

    transition: 0.3s;
}

.server-button:hover {
    background: white;
    color: black;
}


/* =========================
   ABOUT
========================= */

.about-content {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 100px;
}

.about-text {
    max-width: 500px;
}

.about-text p {
    color: var(--muted);

    line-height: 1.8;

    margin-bottom: 20px;
}

.skills {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 35px;
}


/* =========================
   CONTACT
========================= */

.contact-section {
    min-height: 75vh;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    position: relative;

    overflow: hidden;
}

.contact-glow {
    position: absolute;

    width: 700px;
    height: 700px;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(139,92,246,0.18),
        transparent 65%
    );

    filter: blur(30px);
    animation: contact-pulse 5s ease-in-out infinite alternate;
}

@keyframes contact-pulse {
    to { transform: scale(1.2); opacity: 0.75; }
}

.contact-content {
    position: relative;

    z-index: 2;
}

.contact-content h2 {
    font-size: clamp(50px, 8vw, 110px);

    line-height: 0.9;

    letter-spacing: -6px;
}

.contact-content h2 span {
    display: block;

    color: transparent;

    -webkit-text-stroke: 1px white;
}

.contact-content p {
    color: var(--muted);

    margin: 30px auto;

    max-width: 500px;

    line-height: 1.7;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 20px;

    padding: 18px 25px;

    background: white;
    color: black;

    border-radius: 10px;

    font-size: 12px;
    font-weight: 800;

    transition: 0.3s;
}

.contact-button:hover {
    background: var(--purple-bright);
    color: white;

    transform: translateY(-5px);
}


/* =========================
   FOOTER
========================= */

footer {
    width: min(1200px, calc(100% - 80px));

    margin: auto;

    padding: 30px 0 40px;

    border-top: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #555;

    font-size: 10px;
}

.footer-logo {
    font-size: 18px;
    font-weight: 800;

    color: white;
}


/* =========================
   LIGHTBOX
========================= */

.lightbox {
    position: fixed;
    inset: 0;

    z-index: 5000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0,0,0,0.9);

    backdrop-filter: blur(20px);

    opacity: 0;
    visibility: hidden;

    transition: 0.4s;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 1100px;
    width: 100%;

    transform: scale(0.9);

    transition: 0.4s;
}

.lightbox.open .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    display: block;

    max-width: 100%;
    max-height: 75vh;

    margin: auto;

    object-fit: contain;

    border-radius: 8px;
}

.lightbox-info {
    text-align: center;

    margin-top: 20px;
}

.lightbox-info h3 {
    font-size: 20px;
}

.lightbox-info p {
    color: var(--muted);

    margin-top: 5px;

    font-size: 12px;
}

.lightbox-close {
    position: absolute;

    top: 25px;
    right: 30px;

    width: 45px;
    height: 45px;

    border: 1px solid var(--border);

    border-radius: 50%;

    background: rgba(255,255,255,0.05);

    color: white;

    font-size: 28px;

    transition: 0.3s;
}

.lightbox-close:hover {
    background: white;
    color: black;
}

.performance-prompt {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 4500;
    width: min(360px, calc(100% - 40px));
    padding: 22px;
    border: 1px solid rgba(167,139,250,0.45);
    border-radius: 14px;
    background: rgba(10,7,18,0.88);
    box-shadow: 0 0 45px rgba(139,92,246,0.2);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.performance-prompt.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.performance-prompt .section-number {
    margin-bottom: 12px;
}

.performance-prompt h2 {
    font-size: 22px;
    line-height: 1.1;
}

.performance-prompt p {
    margin-top: 9px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.performance-prompt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.performance-prompt button {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    transition: 0.25s ease;
}

.performance-accept {
    background: white;
    color: black;
}

.performance-accept:hover {
    background: var(--purple-hot);
    box-shadow: 0 0 22px rgba(216,200,255,0.35);
}

.performance-dismiss {
    background: transparent;
    color: var(--muted);
}

.performance-dismiss:hover {
    border-color: var(--purple-bright);
    color: white;
}

body.performance-mode,
body.performance-mode a,
body.performance-mode button {
    cursor: auto;
}

body.performance-mode .cursor,
body.performance-mode .cursor-follower,
body.performance-mode .ambient-canvas,
body.performance-mode .scanline {
    display: none;
}

body.performance-mode * {
    animation: none !important;
    transition: none !important;
}

.contact-button:hover {
    box-shadow: 0 0 35px rgba(216,200,255,0.45);
}


/* =========================
   SCROLL ANIMATIONS
========================= */

.reveal {
    opacity: 0;

    transform: translateY(45px);

    transition:
        opacity 0.9s cubic-bezier(.2,.7,.2,1),
        transform 0.9s cubic-bezier(.2,.7,.2,1);
}

.reveal.visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 800px) {

    body,
    a,
    button {
        cursor: auto;
    }

    .cursor,
    .cursor-follower {
        display: none;
    }

    .navbar {
        width: calc(100% - 25px);
    }

    .navbar nav {
        display: none;
    }

    .hero {
        padding-left: 25px;
        padding-right: 25px;
    }

    .hero h1 {
        font-size: clamp(48px, 14vw, 80px);
        letter-spacing: -4px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .section,
    .stats-section,
    footer {
        width: calc(100% - 40px);
    }

    .section-heading {
        display: block;
    }

    .section-heading > p {
        width: auto;

        margin-top: 25px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);

        gap: 40px;
    }

    .server-banner {
        height: 220px;
    }

    .server-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .server-button {
        width: 100%;
        text-align: center;
    }

    .about-content {
        grid-template-columns: 1fr;

        gap: 40px;
    }

    .contact-content h2 {
        letter-spacing: -4px;
    }

    footer {
        flex-direction: column;

        gap: 15px;

        text-align: center;
    }

    .performance-prompt {
        right: 20px;
        bottom: 20px;
    }
}

.server-card:nth-child(1) .server-type,
.server-card:nth-child(1) .server-number {
    color: #ff8f9d;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.server-card:nth-child(2) .server-type,
.server-card:nth-child(2) .server-number {
    color: #7fb8ff;
}

.server-card:nth-child(3) .server-type,
.server-card:nth-child(3) .server-number {
    color: #f5a5a5;
}

.server-card:nth-child(4) .server-type,
.server-card:nth-child(4) .server-number {
    color: #f0c276;
}

.server-card.reveal {
    transition-property: opacity, transform, border-color, box-shadow;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}