/* 
 * zuckshot futurscape stylesheet
 * Theme: Cyber / Glassmorphism / Atmospheric
 */

:root {
    /* Atmospheric Obsidian Backgrounds */
    --bg-base: #0a0b10;
    --bg-glass: rgba(18, 20, 31, 0.6);
    --bg-glass-hover: rgba(28, 30, 46, 0.8);

    /* Neon Accents */
    --accent-cyan: #00f0ff;
    --accent-cyan-glow: rgba(0, 240, 255, 0.4);
    --accent-indigo: #7000ff;

    --grad-1: rgba(112, 0, 255, 0.08);
    --grad-2: rgba(0, 240, 255, 0.05);

    /* Text Colors */
    --text-main: #f0f0f5;
    --text-muted: #a0a4b8;

    /* Typography */
    --font-heading: 'Space Grotesk', 'Orbitron', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    /* Keeping a tiny bit of tech for small details */

    /* Spacing & Structure */
    --grid-gap: 2rem;
    --border-radius: 12px;
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);

    /* UI Colors */
    --nav-bg: rgba(10, 11, 16, 0.7);
    --overlay-grad-start: rgba(10, 11, 16, 0.95);
    --overlay-grad-end: rgba(10, 11, 16, 0);
    --lightbox-bg: rgba(8, 9, 14, 0.95);
    --input-bg: rgba(0, 0, 0, 0.3);
    --footer-bg: rgba(10, 11, 16, 0.5);
    --shadow-base: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.5);
    --shop-img-bg: #111;
    --title-grad-start: #fff;
    --title-grad-end: var(--text-muted);
}

:root[data-theme="light"] {
    --bg-base: #f4f4f8;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-hover: rgba(255, 255, 255, 0.9);

    --accent-cyan: #007799;
    --accent-cyan-glow: rgba(0, 119, 153, 0.25);
    --accent-indigo: #5500cc;

    --grad-1: rgba(85, 0, 204, 0.06);
    --grad-2: rgba(0, 119, 153, 0.05);

    --text-main: #181a20;
    --text-muted: #646a7f;

    --border-glass: 1px solid rgba(0, 0, 0, 0.08);

    --nav-bg: rgba(244, 244, 248, 0.75);
    --overlay-grad-start: rgba(244, 244, 248, 0.95);
    --overlay-grad-end: rgba(244, 244, 248, 0);
    --lightbox-bg: rgba(240, 240, 245, 0.95);
    --input-bg: rgba(255, 255, 255, 0.6);
    --footer-bg: rgba(244, 244, 248, 0.6);
    --shadow-base: rgba(0, 0, 0, 0.08);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
    --shop-img-bg: #e1e1e6;
    --title-grad-start: var(--text-main);
    --title-grad-end: var(--text-muted);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --- Dynamic Blurred Background Effect --- */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg-base);
}

.ambient-bg-img {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140vw;
    /* Oversized to prevent edges showing during parallax/blur */
    height: 140vh;
    object-fit: cover;
    filter: blur(80px) brightness(0.4);
    /* High blur + darkened so text remains readable */
    opacity: 0.6;
    /* Semi-transparent so background color shines through */
    transition: transform 0.1s linear, opacity 2s ease-in-out;
    will-change: transform;
}

:root[data-theme="light"] .ambient-bg-img {
    filter: blur(80px) brightness(1.2);
    /* Lighten for light mode */
    opacity: 0.3;
    /* Less opacity in light mode to keep things airy */
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Typography styles */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Floating Glass Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: var(--border-glass);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.brand span {
    color: var(--accent-cyan);
    text-shadow: 0 0 15px var(--accent-cyan-glow);
}

.nav-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan-glow);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a.active {
    color: var(--text-main);
    outline: none;
}

.nav-links a:hover::after,
.nav-links a:focus::after,
.nav-links a.active::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0;
}

.theme-toggle:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px var(--accent-cyan-glow);
}

/* Main Layout Container */
main {
    flex: 1;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 3rem 5%;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 3-COLUMN PARALLAX GALLERY --- */
.parallax-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    /* Keeps columns isolated from wide image breakouts */
}

.parallax-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    will-change: transform;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-glass);
    border: var(--border-glass);
    box-shadow: 0 4px 30px var(--shadow-base);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* Hover States */
.gallery-item:hover,
.gallery-item:focus {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.15);
    outline: none;
}

.gallery-item:hover img,
.gallery-item:focus img {
    transform: scale(1.03);
}

/* Glass Details Overlay for Gallery */
.item-details-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, var(--overlay-grad-start), var(--overlay-grad-end));
    backdrop-filter: blur(4px);
    color: var(--text-main);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover .item-details-overlay,
.gallery-item:focus .item-details-overlay {
    transform: translateY(0);
    opacity: 1;
}

.item-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.item-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
}

/* Ultra-Wide 21:9 Breakout Row */
.ultra-wide-breakout {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 4rem;
    margin-bottom: 4rem;
    position: relative;
    height: 80vh;
    /* Fixed cinematic block height */
    overflow: hidden;
    /* Mandatory to isolate zoom bleed */
}

.ultra-wide-breakout .gallery-item {
    border-radius: 0;
    border: none;
    width: 100%;
    height: 100%;
}

.ultra-wide-breakout img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    transform-origin: center;
}

/* Removed CSS zoom in favor of high-performance JS scroll lerping */
.ultra-wide-breakout img {
    will-change: transform;
    /* Hardware acceleration for JS zoom */
}

/* Parallax Responsive Rules */
@media (max-width: 1024px) {
    .parallax-col:nth-child(3) {
        display: none;
    }
}

@media (max-width: 768px) {

    .parallax-col:nth-child(2),
    .parallax-col:nth-child(3) {
        display: none;
    }

    .parallax-col {
        transform: none !important;
    }
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--lightbox-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    /* Limit the image size to 75% of the viewport per request */
    max-width: 75vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 50px var(--shadow-heavy), 0 0 40px var(--accent-cyan-glow);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-family: var(--font-heading);
    color: var(--text-muted);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
}

.lightbox-close:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

/* --- Pages General (About, Gear, Blog, Newsletter) --- */
.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--title-grad-start), var(--title-grad-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Glass Panel for Content (About, Gear, Newsletter) */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--border-glass);
    border-radius: var(--border-radius);
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 8px 32px var(--shadow-base);
}

/* Button Styling (Cyber/Futurscape) */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.5);
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.1);
}

.btn:hover,
.btn:focus {
    background: var(--accent-cyan);
    color: var(--bg-base);
    box-shadow: 0 0 20px var(--accent-cyan-glow);
    outline: none;
}

/* Form Styles (Newsletter) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: var(--input-bg);
    border: var(--border-glass);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

/* --- James Popsys Inspired Shop, Futurscape Twist --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}

.shop-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s;
}

.shop-item:hover {
    transform: translateY(-5px);
}

.shop-image-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: var(--shop-img-bg);
    /* Soft shadow instead of borders for clean Popsys look */
    box-shadow: 0 10px 30px var(--shadow-heavy);
}

.shop-image-wrapper img {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Clean square crop for shop */
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.shop-item:hover .shop-image-wrapper img {
    transform: scale(1.05);
}

/* Optional glowing border overlay on shop images */
.shop-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s;
    pointer-events: none;
}

.shop-item:hover .shop-image-wrapper::after {
    border-color: rgba(0, 240, 255, 0.3);
}

.shop-info {
    text-align: center;
}

.shop-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.shop-price {
    font-family: var(--font-mono);
    color: #a0a4b8;
    font-size: 0.95rem;
}

/* --- About Page Split Flex --- */
.about-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}

.about-image {
    flex: 1;
    min-width: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-heavy);
    border: var(--border-glass);
}

.about-image img {
    width: 100%;
    display: block;
    filter: brightness(0.9) contrast(1.1);
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 5%;
    border-top: var(--border-glass);
    text-align: center;
    background: var(--footer-bg);
}

.footer-content {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

.social-links a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan-glow);
}

/* --- Rich Text Editor --- */
.rte-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--nav-bg);
    border: var(--border-glass);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.rte-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.rte-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

:root[data-theme="light"] .rte-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.rte-content {
    border-radius: 0 0 4px 4px;
    min-height: 150px;
    resize: vertical;
    overflow-y: auto;
}

.rte-content:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    pointer-events: none;
    display: block;
}