/* Font Faces */
@font-face {
    font-family: 'Automatic';
    src: url('assets/fonts/AutomaticTypewriter.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Automatic';
    src: url('assets/fonts/AutomaticTypewriter_Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Automatic';
    src: url('assets/fonts/AutomaticTypewriter_Slant.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Automatic';
    src: url('assets/fonts/AutomaticTypewriter_BoldSlant.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Automatic Underline';
    src: url('assets/fonts/AutomaticTypewriter_Underline.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Automatic Underline';
    src: url('assets/fonts/AutomaticTypewriter_Bold_Underline.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Automatic Underline';
    src: url('assets/fonts/AutomaticTypewriter_Slant_Underline.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Automatic Underline';
    src: url('assets/fonts/AutomaticTypewriter_BoldSlant_Underline.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #fcfcfc;
    --text: #1a1a1a;
    --text-muted: #666;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Automatic', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main View */
.main-view {
    flex: 1;
    position: relative;
    z-index: 10;
}

/* Header - logo + nav stacked - stays above hover preview */
.header {
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 100;
}

/* Keep header visible in album view */
#album-view .header,
.album-view-active .header {
    position: sticky;
    top: 0;
    background: var(--bg);
    padding-top: 2rem;
    margin-top: -2rem;
}

/* Logo Area */
.logo-area {
    margin-bottom: 1.5rem;
}

.logo-link {
    display: inline-block;
}

.logo-text {
    font-family: 'Automatic Underline', monospace;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.logo-globe {
    display: block;
    width: 110px;
    height: auto;
    margin-top: 1rem;
    position: relative;
    z-index: 101;
}

/* Navigation - under logo */
.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    font-family: 'Automatic Underline', monospace;
    color: var(--text);
}

/* Columns Grid - no headers */
.columns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 5rem;
    align-items: start;
    max-width: 950px;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Project Item */
.project {
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.project-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    display: block;
    width: fit-content;
}

.project-meta {
    font-style: italic;
    font-size: 0.7rem;
    color: var(--text);
    margin-top: 0.2rem;
    width: fit-content;
}

.project-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    width: fit-content;
}

/* Preview Image - NO TRANSITION, instant */
.preview-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.preview-image.visible {
    opacity: 1;
}

/* Page Views */
.page-view.hidden {
    display: none;
}

/* Page Content (prints, blog) */
.page-content {
    max-width: 800px;
}

.page-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.page-intro {
    font-style: italic;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 400px;
}

/* Prints Grid */
.prints-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.print-item img {
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
}

.print-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.print-title {
    font-family: 'Automatic Underline', monospace;
}

.print-price {
    color: var(--text-muted);
}

.prints-note {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.prints-note a {
    color: var(--text);
}

/* Blog List */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.blog-post {
    max-width: 500px;
}

.blog-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.blog-post-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.blog-excerpt {
    font-style: italic;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Album View */
/* Break out of container for full-width album */
#album-view {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0 2rem;
    max-width: none;
}

.album-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    min-height: 70vh;
    max-width: 100%;
}

.album-sidebar {
    position: sticky;
    top: 14rem; /* Below the sticky header */
    height: fit-content;
    align-self: start;
}

.back-btn {
    background: none;
    border: none;
    font-family: 'Automatic', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    padding: 0;
}

.back-btn:hover {
    opacity: 0.6;
}

.album-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
}

.album-date {
    font-size: 0.75rem;
    margin-bottom: 1.25rem;
}

.album-description {
    font-style: italic;
    font-size: 0.7rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.album-credits {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.album-credits p {
    margin-bottom: 0.2rem;
}

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

/* Album Gallery - Mosaic grid */
.album-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 45vh;
    gap: 0.4rem;
}

.album-gallery img,
.album-gallery video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

/* Max-size scroll layout (single column, no cropping) */
.album-gallery.album-gallery-max {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.album-gallery.album-gallery-max img,
.album-gallery.album-gallery-max video {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
}

.album-gallery img:hover,
.album-gallery video:hover {
    opacity: 0.9;
}

/* Portrait images/videos span 2 rows */
.album-gallery img.img-portrait,
.album-gallery video.img-portrait {
    grid-row: span 2;
}

/* Wide landscape images/videos span 2 columns */
.album-gallery img.img-wide,
.album-gallery video.img-wide {
    grid-column: span 2;
}

/* Hero images - full width, almost full screen height */
.album-gallery img.img-hero,
.album-gallery video.img-hero {
    grid-column: span 2;
    grid-row: span 2;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox.hidden {
    display: none;
}

.lightbox img,
.lightbox video {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox video {
    display: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 1rem;
    opacity: 0.6;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Footer */
.footer {
    margin-top: 5rem;
    padding-top: 2rem;
    position: relative;
    z-index: 100;
}

/* Sticky footer in album view */
.album-view-active .footer {
    position: fixed;
    bottom: 2rem;
    left: 2.5rem;
    margin-top: 0;
    padding-top: 0;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
}

.footer-contact a {
    width: fit-content;
}

.footer-contact a:hover {
    opacity: 0.6;
}

/* Page Views (Prints, Blog) */
.page-view {
    max-width: 700px;
    flex: 1;
}

.page-view.hidden {
    display: none;
}

.page-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.page-description {
    font-size: 0.75rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
}

.page-contact {
    font-size: 0.75rem;
    margin-top: 3rem;
    color: var(--text-muted);
}

.page-contact a {
    color: var(--text);
}

/* Prints Grid */
.prints-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.print-item {
    cursor: pointer;
}

.print-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #eee;
    margin-bottom: 0.75rem;
}

.print-name {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}

.print-details {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Blog List */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.blog-post {
    cursor: pointer;
}

.blog-post-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.8rem;
    display: block;
    width: fit-content;
}

.blog-post-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.blog-post-excerpt {
    font-style: italic;
    font-size: 0.7rem;
    margin-top: 0.4rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 1.5rem;
    }

    .header {
        margin-bottom: 2.5rem;
    }

    .album-view-active .header {
        position: relative;
        top: auto;
        margin-top: 0;
        padding-top: 0;
    }

    .columns-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 2.5rem;
    }

    .column {
        gap: 2rem;
    }

    #album-view {
        padding: 0 1rem;
    }

    .album-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .album-sidebar {
        position: relative;
        top: 0;
    }

    .album-gallery {
        grid-auto-rows: 30vh;
        gap: 0.3rem;
    }

    .album-gallery.album-gallery-max img,
    .album-gallery.album-gallery-max video {
        max-height: 75vh;
    }

    /* Disable hover preview on mobile */
    .preview-image {
        display: none !important;
    }

    .footer {
        margin-top: 3rem;
    }

    .album-view-active .footer {
        position: static;
        bottom: auto;
        left: auto;
        margin-top: 3rem;
        padding-top: 2rem;
    }
}

@media (max-width: 480px) {
    .columns-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .column {
        gap: 1.5rem;
    }

    .nav {
        gap: 1rem;
    }

    .logo-globe {
        width: 80px;
    }

    .album-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        grid-auto-flow: row; /* Ensure strict DOM order - no reordering to fill gaps */
    }

    .album-gallery img,
    .album-gallery video {
        height: auto;
        max-height: 70vh;
        object-fit: contain;
    }

    .album-gallery img.img-portrait,
    .album-gallery img.img-wide,
    .album-gallery video.img-portrait,
    .album-gallery video.img-wide {
        grid-row: span 1;
        grid-column: span 1;
    }

    .album-gallery img.img-hero,
    .album-gallery video.img-hero {
        grid-row: span 1;
        grid-column: span 1;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.5rem;
        font-size: 1.2rem;
    }
}

/* Selection */
::selection {
    background: var(--text);
    color: var(--bg);
}

/* ========== PASSWORD GATE MODAL ========== */
.gate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-modal.hidden {
    display: none;
}

.gate-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(252, 252, 252, 0.95);
}

.gate-content {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--text);
    padding: 2.5rem 3rem;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 3px 3px 0 var(--text);
}

.gate-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.1s;
}

.gate-close:hover {
    opacity: 1;
}

.gate-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.gate-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.gate-input {
    display: block;
    width: 100%;
    font-family: 'Automatic', monospace;
    font-size: 0.8rem;
    text-align: center;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--text);
    background: var(--bg);
    margin-bottom: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.gate-input:focus {
    outline: none;
    box-shadow: 2px 2px 0 var(--text);
}

.gate-input::placeholder {
    text-transform: lowercase;
    letter-spacing: normal;
    color: var(--text-muted);
}

.gate-btn {
    display: block;
    width: 100%;
    font-family: 'Automatic', monospace;
    font-size: 0.75rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--text);
    background: var(--text);
    color: var(--bg);
    cursor: pointer;
    transition: all 0.1s;
}

.gate-btn:hover:not(:disabled) {
    background: var(--bg);
    color: var(--text);
}

.gate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gate-error {
    font-size: 0.65rem;
    color: #c44;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.gate-error.hidden {
    display: none;
}

.gate-hint {
    font-size: 0.6rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 1.5rem;
    opacity: 0.7;
}

@media (max-width: 480px) {
    .gate-content {
        padding: 2rem;
    }
}

/* ========== RADIO PLAYER ========== */
.radio-player {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--text);
    padding: 0.75rem 1rem;
    z-index: 500;
    font-size: 0.7rem;
    min-width: 140px;
    box-shadow: 2px 2px 0 var(--text);
}

.radio-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid var(--text);
    padding-bottom: 0.4rem;
    cursor: pointer;
    user-select: none;
}

.radio-header:hover .radio-toggle {
    opacity: 1;
}

.radio-toggle {
    margin-left: auto;
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.1s;
}

.radio-icon {
    font-size: 0.8rem;
}

.radio-label {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.radio-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.radio-btn {
    background: none;
    border: 1px solid var(--text);
    font-family: 'Automatic', monospace;
    font-size: 0.65rem;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.1s;
}

.radio-btn:hover {
    background: var(--text);
    color: var(--bg);
}

.radio-btn.playing {
    background: var(--text);
    color: var(--bg);
}

.radio-select {
    font-family: 'Automatic', monospace;
    font-size: 0.65rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--text-muted);
    color: var(--text);
    cursor: pointer;
    padding: 0.2rem 0;
    flex: 1;
    min-width: 0;
}

.radio-select:focus {
    outline: none;
    border-bottom-color: var(--text);
}

.radio-volume {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.volume-label {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.volume-slider {
    flex: 1;
    height: 2px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--text-muted);
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 8px;
    background: var(--text);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 8px;
    height: 8px;
    background: var(--text);
    border: none;
    cursor: pointer;
}

.radio-status {
    font-size: 0.55rem;
    color: var(--text-muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-credit {
    display: block;
    font-size: 0.5rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.1s;
}

.radio-credit:hover {
    opacity: 1;
}

/* Radio collapsed state */
.radio-player.collapsed .radio-controls,
.radio-player.collapsed .radio-volume,
.radio-player.collapsed .radio-status,
.radio-player.collapsed .radio-credit {
    display: none;
}

.radio-player.collapsed .radio-header {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.radio-player.collapsed {
    min-width: auto;
}

.radio-player.collapsed .radio-toggle {
    transform: rotate(0deg);
}

/* Playing indicator */
.radio-player.is-playing .radio-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Radio mobile */
@media (max-width: 768px) {
    .radio-player {
        position: absolute;
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 0.8rem;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .radio-player {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.65rem;
    }
}

/* ========== MAP VIEW ========== */
.map-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2.5rem;
    min-height: 60vh;
}

.map-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.map-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.map-desc {
    font-style: italic;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Locations list */
.map-locations-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.map-locations-list li {
    padding: 0.4rem 0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.map-locations-list li:hover {
    padding-left: 0.3rem;
}

.map-locations-list li .loc-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.75rem;
    display: inline;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.map-locations-list li .loc-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.1rem;
}

.map-locations-list li.active .loc-title {
    font-weight: 700;
    border-bottom-color: var(--text);
}

.map-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--text);
}

.map-info.hidden {
    display: none;
}

.map-info-title {
    font-family: 'Automatic Underline', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
}

.map-info-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.map-info-desc {
    font-style: italic;
    font-size: 0.7rem;
    line-height: 1.5;
}

.map-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    border: 1px solid var(--text);
    background: var(--bg);
    aspect-ratio: 1010 / 666;
    /* Prevent blurry scaling */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: grab;
    transform-origin: center center;
}

.map-wrapper svg,
.map-wrapper object {
    shape-rendering: geometricPrecision;
    image-rendering: optimizeQuality;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.map-wrapper.dragging {
    cursor: grabbing;
}

/* Grid overlay - sits behind map */
.map-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.map-grid .grid-lines-lng path,
.map-grid .grid-lines-lat path {
    fill: none;
    stroke: var(--text);
    stroke-width: 0.25;
    opacity: 0.15;
}

.map-grid .coord-labels text {
    font-family: 'Automatic', monospace;
    font-size: 6px;
    fill: var(--text-muted);
    opacity: 0.4;
}

/* World map embed - on top of grid */
.world-map-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none; /* Allow drag events to pass through to map-wrapper */
}

/* Markers overlay - on top of everything */
.map-markers-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.map-markers-overlay .markers {
    pointer-events: all;
}

/* Map markers */
.map-marker {
    cursor: pointer;
}

.map-marker circle.marker-dot {
    fill: var(--text);
    stroke: var(--bg);
    stroke-width: 2;
    transition: all 0.15s ease;
}

.map-marker:hover circle.marker-dot {
    fill: var(--bg);
    stroke: var(--text);
    stroke-width: 2;
}

.map-marker.active circle.marker-dot {
    fill: var(--bg);
    stroke: var(--text);
    stroke-width: 2;
}

.map-marker circle.marker-ring {
    fill: none;
    stroke: var(--text);
    stroke-width: 1;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.map-marker:hover circle.marker-ring,
.map-marker.active circle.marker-ring {
    opacity: 1;
}

.map-marker circle.marker-pulse {
    fill: none;
    stroke: var(--text);
    stroke-width: 0.5;
    opacity: 0;
}

.map-marker.active circle.marker-pulse {
    animation: marker-pulse 2s ease-out infinite;
}

@keyframes marker-pulse {
    0% { r: 6; opacity: 0.6; }
    100% { r: 20; opacity: 0; }
}

/* Map controls */
.map-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.3rem;
    z-index: 10;
}

.map-controls button {
    background: var(--bg);
    border: 1px solid var(--text);
    font-family: 'Automatic', monospace;
    font-size: 0.8rem;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
}

.map-controls button:hover {
    background: var(--text);
    color: var(--bg);
}

.map-zoom-hint {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.5;
    z-index: 10;
}

/* Map mobile */
@media (max-width: 768px) {
    .map-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .map-sidebar {
        position: relative;
        top: 0;
    }

    .map-container {
        max-width: 100%;
    }

    .map-zoom-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .map-controls {
        bottom: 0.5rem;
        right: 0.5rem;
    }

    .map-controls button {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}

/* ============================================
   SITE-LEVEL PASSWORD GATE
   ============================================ */

.site-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.site-gate.hidden {
  display: none;
}

.main-site.hidden {
  display: none;
}

.gate-centered {
  text-align: center;
  max-width: 300px;
  padding: 2rem;
}

.gate-logo {
  margin-bottom: 3rem;
}

.gate-logo-img {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.gate-logo-text {
  display: block;
  font-family: 'Automatic', 'Courier New', monospace;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--brown);
}

.gate-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gate-password-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tan);
  background: rgba(255,255,255,0.5);
  font-family: 'Automatic', 'Courier New', monospace;
  font-size: 1rem;
  color: var(--brown);
  border-radius: 2px;
  text-align: center;
  letter-spacing: 0.2em;
}

.gate-password-input::placeholder {
  color: var(--tan);
  letter-spacing: 0.1em;
}

.gate-password-input:focus {
  outline: none;
  border-color: var(--brown);
}

.gate-submit-btn {
  padding: 0.75rem 1rem;
  border: 1px solid var(--tan);
  background: var(--cream);
  color: var(--brown);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.gate-submit-btn:hover {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.gate-error-text {
  color: #c44;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.gate-error-text.hidden {
  display: none;
}

.gate-subtext {
  font-size: 0.8rem;
  color: var(--tan);
  font-style: italic;
}

/* Radio on gate page */
.gate-radio {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
}

/* ============================================
   PASSWORD GATE (inline, same layout as collections)
   ============================================ */

.gate-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem;
}

.gate-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.gate-input {
  padding: 0.6rem 1rem;
  border: 1px solid var(--tan);
  background: transparent;
  font-family: 'Automatic', 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--brown);
  width: 180px;
  text-align: center;
  letter-spacing: 0.15em;
}

.gate-input::placeholder {
  color: var(--tan);
  letter-spacing: 0.1em;
}

.gate-input:focus {
  outline: none;
  border-color: var(--brown);
}

.gate-btn {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--tan);
  background: transparent;
  color: var(--brown);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gate-btn:hover {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.gate-error {
  color: #a55;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.gate-error.hidden {
  display: none;
}

.gate-hint {
  font-size: 0.75rem;
  color: var(--tan);
  font-style: italic;
}

/* ========== HEADER PASSWORD (under nav) ========== */
.header-password {
    margin-top: 1.5rem;
}

.header-password-input {
    font-family: 'Automatic', monospace;
    font-size: 0.8rem;
    text-align: left;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--text);
    background: var(--bg);
    width: 120px;
    letter-spacing: 0.05em;
}

.header-password .gate-hint {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.4rem;
}

.header-password-input:focus {
    outline: none;
    box-shadow: 1px 1px 0 var(--text);
}

.header-password-input::placeholder {
    color: var(--text-muted);
    letter-spacing: normal;
}

.header-password .gate-error {
    font-size: 0.55rem;
    margin-top: 0.2rem;
    margin-bottom: 0;
    text-align: left;
}

.unlocked-msg {
    font-size: 0.65rem;
    color: #5a5;
    margin-top: 0.3rem;
}

.unlocked-msg.hidden {
    display: none;
}

.header-password.hidden {
    display: none;
}

/* ========== LOCKED CONTENT (empty state) ========== */
#locked-content {
    min-height: 100px;
}
