/* Shared finishing layer for the original Glitched Pixel district pages. build:20260722a */
:root {
    --bg-main: #080911;
    --bg-card: #11131d;
    --border: rgba(117, 91, 255, 0.3);
    --text-main: #d7daea;
    --text-muted: #9ba3bb;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    background:
        radial-gradient(circle at 8% 0%, rgba(0, 229, 255, 0.055), transparent 30rem),
        radial-gradient(circle at 92% 10%, rgba(255, 79, 203, 0.055), transparent 30rem),
        var(--bg-main);
    font-size: 16px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.nav {
    background: rgba(8, 9, 17, 0.84);
    border-bottom-color: rgba(117, 91, 255, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav-logo {
    font-size: 13px;
    letter-spacing: 2.5px;
}

.nav-links a {
    color: #aeb5ca;
}

.nav-login {
    display: none;
}

.nav-mobile-toggle {
    display: none;
    width: 43px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(0, 229, 255, 0.42);
    border-radius: 5px;
    background: rgba(0, 229, 255, 0.06);
    color: var(--cyan);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-mobile-toggle span,
.nav-mobile-toggle::before,
.nav-mobile-toggle::after {
    content: "";
    width: 18px;
    height: 1px;
    background: currentColor;
    position: absolute;
    transition: transform 180ms ease, opacity 180ms ease;
}

.nav-mobile-toggle::before { transform: translateY(-6px); }
.nav-mobile-toggle::after { transform: translateY(6px); }
.nav-mobile-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-mobile-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.nav-mobile-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

.district-header {
    background: rgba(17, 19, 29, 0.6);
}

.district-back,
.section-label,
.project-tagline,
.feature-list li,
.tech-role,
.issue-desc,
.stat-label,
.signal-hero p,
.post-card-excerpt {
    color: var(--text-muted);
}

.section-label {
    letter-spacing: 0.2em;
}

.card,
.feature-card,
.post-card {
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.card {
    min-height: 260px;
    padding: 28px;
    border-radius: 12px;
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    inset: auto -40% -70% auto;
    width: 220px;
    aspect-ratio: 1;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.08);
    filter: blur(30px);
    pointer-events: none;
}

.card-img {
    height: 72px;
    filter: drop-shadow(0 12px 24px rgba(0, 229, 255, 0.12));
}

.project-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.project-tagline {
    font-size: 1rem;
    max-width: 720px;
}

.project-showcase {
    padding: 0 40px 64px;
}

.project-showcase-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.27);
    border-radius: 14px;
    background: #05060b;
    box-shadow: 0 32px 110px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 229, 255, 0.06);
}

.project-showcase-frame::before {
    content: "KALIDASH // LIVE SYSTEM VIEW";
    display: block;
    padding: 11px 15px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.18);
    color: var(--cyan);
    font: 700 9px/1 var(--font-head);
    letter-spacing: 0.2em;
}

.project-showcase-frame img {
    width: 100%;
    max-height: 760px;
    object-fit: cover;
    object-position: top center;
}

body[data-page="projects.html"] .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

body[data-page="projects.html"] .card:first-child {
    grid-column: 1 / -1;
    min-height: 330px;
    padding: 42px;
    background:
        linear-gradient(90deg, rgba(17, 19, 29, 0.98) 35%, rgba(17, 19, 29, 0.66)),
        url("../images/Gallery/kalidash-rf-scan.webp") center / cover;
}

body[data-page="projects.html"] .card:first-child .card-img {
    height: 92px;
}

body[data-page="projects.html"] .card:first-child p {
    max-width: 510px;
}

body[data-page="blog.html"] .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="blog.html"] .post-card:first-child {
    grid-column: 1 / -1;
    min-height: 350px;
    background:
        linear-gradient(90deg, rgba(17, 19, 29, 0.98) 25%, rgba(17, 19, 29, 0.74)),
        url("../images/districts/the-signal.webp") right 6% center / auto 118% no-repeat,
        var(--bg-card);
}

body[data-page="blog.html"] .post-card:first-child .post-card-body {
    justify-content: flex-end;
    max-width: 690px;
    padding: 42px;
}

body[data-page="blog.html"] .post-card:first-child .post-card-title {
    font-size: clamp(1rem, 2.4vw, 1.6rem);
}

body[data-page="gallery.html"] .gallery-item {
    border-radius: 12px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

body[data-page="gallery.html"] .gallery-grid {
    gap: 16px;
}

@media (max-width: 920px) {
    .container {
        padding-inline: 24px;
    }

    .nav {
        padding-inline: 0;
    }

    .nav-mobile-toggle {
        display: inline-flex;
        position: relative;
        flex: 0 0 auto;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        max-height: calc(100vh - 74px);
        overflow-y: auto;
        padding: 18px 24px 24px;
        gap: 0;
        flex-direction: column;
        background: rgba(8, 9, 17, 0.98);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5);
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid rgba(155, 111, 255, 0.15);
        font-size: 12px;
    }

    .project-overview,
    .arch-layout {
        flex-direction: column;
    }

    .arch-file-tree {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .container {
        padding-inline: 20px;
    }

    .nav {
        padding: 13px 0;
    }

    .project-hero {
        padding: 38px 0 30px;
    }

    .project-hero-inner {
        gap: 18px;
    }

    .project-icon-large {
        font-size: 44px;
    }

    .project-title {
        font-size: 1.75rem;
        letter-spacing: 0.08em;
        overflow-wrap: anywhere;
    }

    .project-subtitle {
        font-size: 11px;
        letter-spacing: 0.16em;
    }

    .project-showcase {
        padding: 0 20px 42px;
    }

    .section {
        padding: 38px 0;
    }

    .card {
        min-height: auto;
        padding: 24px;
    }

    body[data-page="projects.html"] .card-grid,
    body[data-page="blog.html"] .post-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="projects.html"] .card:first-child,
    body[data-page="blog.html"] .post-card:first-child {
        grid-column: auto;
        min-height: 300px;
    }

    body[data-page="projects.html"] .card:first-child,
    body[data-page="blog.html"] .post-card:first-child .post-card-body {
        padding: 26px;
    }

    .footer .nav-inner {
        gap: 10px;
        flex-direction: column;
        text-align: center;
    }
}

@media (hover: none) {
    .gallery-item-overlay {
        opacity: 1;
        background: linear-gradient(transparent 46%, rgba(5, 6, 12, 0.9));
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
