/* The travel atlas is self-contained so the rest of the portfolio stays light. */
:root { --header-height: 74px; }
html { scroll-padding-top: var(--header-height); }

/* Small, separated hexagons join into a continuous navy surface at the bottom. */
.travel-transition {
    position: relative;
    height: clamp(220px, 25vw, 380px);
    margin-top: -60px;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(var(--travel-transition-direction, 180deg),
        #ffffff 0%, #ffffff 20%, #f3f6f8 40%, #bcced5 58%,
        #315164 76%, #0a1c2a 90%, #040e18 100%);
}

.travel-transition-hexagons {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Reverse the same dissolve in a shorter band on the way into Contact. */
.travel-transition.travel-transition--out {
    --travel-transition-direction: 0deg;
    height: clamp(130px, 13vw, 190px);
    margin-top: 0;
}

.travel-transition--out .travel-transition-hexagons {
    transform: rotate(180deg);
}

.travels {
    --atlas-cyan: #6eeaff;
    --atlas-gold: #f4c783;
    --atlas-muted: #92adb9;
    position: relative;
    isolation: isolate;
    min-height: calc(100svh - var(--header-height));
    padding: clamp(28px, 5vh, 60px) clamp(20px, 5vw, 80px) 24px;
    overflow: hidden;
    color: #e4f5fb;
    background: #040e18;
    background-image: radial-gradient(ellipse at 35% 50%, #0c2837 0%, transparent 65%),
        linear-gradient(rgba(84, 173, 194, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(84, 173, 194, .025) 1px, transparent 1px);
    background-size: auto, 64px 64px, 64px 64px;
}

.travels::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: linear-gradient(180deg, #040e18, transparent 25%, transparent 80%, #040e18);
}

.travels-heading, .travels-footer {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.atlas-eyebrow, .atlas-counter, .atlas-caption, .travel-number,
.globe-readout, .travel-coordinates, .travels-footer {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.atlas-eyebrow { margin: 0 0 12px; color: var(--atlas-cyan); }
.atlas-eyebrow::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 12px;
    border-radius: 50%;
    background: var(--atlas-cyan);
    box-shadow: 0 0 12px #6eeaffb3;
}
.travels h2 { margin: 0; font-size: clamp(38px, 4.5vw, 64px); line-height: 1.05; font-weight: 400; letter-spacing: -.05em; }
.travels-intro { margin: 14px 0 0; color: var(--atlas-muted); font-size: 15px; }
.atlas-counter { align-self: flex-start; margin-top: 6px; color: var(--atlas-muted); text-align: right; line-height: 2; }
.atlas-counter span { color: var(--atlas-cyan); }

.travel-explorer {
    max-width: 1400px;
    margin: 10px auto 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    align-items: center;
    gap: clamp(16px, 4vw, 70px);
    min-height: 440px;
}

.globe-stage { position: relative; min-width: 0; height: clamp(410px, 60svh, 760px); }
.globe-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; border-radius: 12px; }
.globe-canvas.is-dragging { cursor: grabbing; }
.globe-canvas:focus-visible { outline: 1px solid var(--atlas-cyan); outline-offset: -3px; }
.globe-readout { position: absolute; left: 0; top: 16px; color: #7295a4; pointer-events: none; }
.globe-readout span { display: block; margin-top: 7px; font-size: 9px; opacity: .65; }
.globe-readout #globe-view-label { margin-top: 0; font-size: inherit; opacity: 1; }
.globe-pins { position: absolute; inset: 0; pointer-events: none; }
.globe-pin {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: var(--atlas-gold);
    font: 11px 'Courier New', monospace;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-14px, -50%);
    animation: globe-pin-reveal .3s ease both;
}
.globe-pin[hidden] { display: none; }
.globe-pin.is-left { flex-direction: row-reverse; transform: translate(calc(-100% + 14px), -50%); }
.globe-pin-dot { position: relative; flex: 0 0 8px; height: 8px; border-radius: 50%; background: #ffe0a8; box-shadow: 0 0 15px #ffc57a; }
.globe-pin-dot::after { content: ''; position: absolute; inset: -6px; border: 1px solid #f4c78385; border-radius: 50%; animation: atlas-pulse 2.8s ease-out infinite; }
.globe-pin-label { padding: 4px 7px; background: #04121de6; border: 1px solid #f4c78340; border-radius: 2px; }
.globe-pin:hover .globe-pin-label, .globe-pin[aria-pressed='true'] .globe-pin-label { border-color: var(--atlas-gold); }
.globe-pin:focus-visible { outline: 1px solid var(--atlas-gold); outline-offset: 1px; border-radius: 3px; }

.globe-toolbar { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; border: 1px solid #6eeaff26; border-radius: 6px; background: #06131edb; }
.globe-toolbar button { border: 0; color: #a9c8d4; background: transparent; min-height: 36px; min-width: 36px; padding: 5px 10px; font: 12px 'Courier New', monospace; cursor: pointer; border-radius: 3px; white-space: nowrap; }
.globe-toolbar button:hover { background: #6eeaff12; color: var(--atlas-cyan); }
.globe-toolbar button:focus-visible, .travel-location:focus-visible, .travel-photo-open:focus-visible, .travel-gallery-link:focus-visible { outline: 2px solid var(--atlas-cyan); outline-offset: 4px; }
.globe-toolbar button:disabled { opacity: .3; cursor: default; }
.globe-toolbar .globe-rotation { min-width: 96px; border-right: 1px solid #6eeaff26; border-radius: 0; }

.travel-sidebar { padding: 18px 0; min-width: 0; }
.travel-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; color: var(--atlas-muted); font: 11px 'Courier New', monospace; }
.travel-breadcrumb[hidden] { display: none; }
.travel-breadcrumb button { padding: 7px 10px; background: #6eeaff09; border: 1px solid #6eeaff33; border-radius: 3px; color: var(--atlas-cyan); font: inherit; cursor: pointer; }
.travel-breadcrumb button:hover { background: #6eeaff18; }
.travel-breadcrumb button:focus-visible { outline: 2px solid var(--atlas-cyan); outline-offset: 3px; }
.atlas-caption { color: var(--atlas-muted); margin: 0 0 18px; }
.travel-destinations { display: grid; gap: 1px; margin-bottom: 28px; max-height: 210px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #285367 #06131e; padding-right: 8px; }
.travel-location { display: flex; align-items: center; gap: 15px; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid #6eeaff1f; color: #c3d6dd; background: transparent; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.travel-number { color: #648796; font-size: 10px; }
.travel-location-name { flex: 1; }
.travel-location-count { color: #7898a5; font-size: 11px; }
.travel-location:hover, .travel-location[aria-pressed='true'] { color: var(--atlas-gold); }
.travel-location[aria-pressed='true'] .travel-number { color: var(--atlas-gold); }
.travel-empty { padding: 18px 0 28px; }
.travel-empty-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #6eeaff33; border-radius: 50%; color: var(--atlas-cyan); font-size: 23px; font-weight: 400; }
.travel-empty h3 { margin: 18px 0 10px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; line-height: 1.25; letter-spacing: -.035em; }
.travel-empty p { max-width: 290px; color: var(--atlas-muted); font-size: 14px; }
.travel-selection[hidden], .travel-empty[hidden] { display: none; }
.travel-selection { animation: atlas-reveal .45s ease both; }
.travel-selection h3 { margin: 0 0 5px; font-size: 28px; line-height: 1.2; font-weight: 400; letter-spacing: -.035em; }
.travel-coordinates { color: #7898a5; font-size: 9px; letter-spacing: .08em; margin: 0 0 20px; }
.travel-photo-open { position: relative; display: block; width: 100%; padding: 0; background: #0b202d; border: 1px solid #6eeaff33; border-radius: 3px; overflow: hidden; cursor: zoom-in; }
.travel-photo-open img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .5s ease; }
.travel-photo-open:hover img { transform: scale(1.035); }
.travel-photo-expand { position: absolute; bottom: 10px; right: 10px; padding: 4px 8px; background: #04121dcf; color: #e4f5fb; font: 10px 'Courier New', monospace; border: 1px solid #ffffff40; }
.travel-photo-caption { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; font-size: 12px; color: #9bb5c0; }
.travel-photo-navigation { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.travel-photo-navigation button { background: transparent; color: var(--atlas-cyan); border: 1px solid #6eeaff33; width: 28px; height: 28px; cursor: pointer; }
.travel-photo-navigation button:focus-visible { outline: 2px solid var(--atlas-cyan); }
.travel-photo-navigation button:disabled { opacity: .3; cursor: default; }
.travel-gallery-link { display: inline-block; margin-top: 8px; color: var(--atlas-cyan); font-size: 12px; text-decoration: underline; text-underline-offset: 5px; }
.travel-back-globe { display: none; }
.travels-footer { padding-top: 18px; border-top: 1px solid #6eeaff26; color: #7898a5; font-size: 9px; letter-spacing: .08em; }
.travels-footer p { margin: 0; }
.atlas-status { color: var(--atlas-cyan); }
#travel-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.travel-lightbox { width: min(1100px, 94vw); max-height: 92svh; padding: 50px 20px 20px; color: #e4f5fb; background: #06131e; border: 1px solid #6eeaff40; border-radius: 7px; }
.travel-lightbox::backdrop { background: #020b13e8; backdrop-filter: blur(8px); }
.travel-lightbox img { margin: auto; max-height: 72svh; width: 100%; object-fit: contain; }
.travel-lightbox p { margin: 15px 0 0; color: #9bb5c0; font-size: 13px; text-align: center; }
.travel-lightbox-close { position: absolute; top: 9px; right: 12px; padding: 6px 12px; color: #e4f5fb; background: transparent; border: 1px solid #6eeaff40; cursor: pointer; border-radius: 3px; }
.travel-lightbox-close:focus-visible { outline: 2px solid #6eeaff; }
.gallery-item.is-linked { outline: 3px solid #3698af; outline-offset: 4px; }
.gallery-location { display: none; position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; border-radius: 3px; background: #04121de6; color: #d4f8ff; font-size: 10px; }
.gallery-item.is-selected .gallery-location { display: block; }

@keyframes atlas-pulse { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes globe-pin-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes atlas-reveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
    .travel-explorer { grid-template-columns: minmax(0, 1.3fr) minmax(240px, 1fr); gap: 20px; }
    .globe-stage { height: 440px; }
    .globe-pin-label { font-size: 9px; }
}
@media (max-width: 650px) {
    .travel-transition { height: 220px; margin-top: -30px; }
    .travel-transition.travel-transition--out { height: 130px; }
    .travels { padding-top: 32px; }
    .atlas-counter { font-size: 9px; }
    .atlas-eyebrow { font-size: 9px; letter-spacing: .09em; }
    .travels-intro { font-size: 13px; max-width: 220px; }
    .travel-explorer { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 0; }
    .globe-stage { height: clamp(310px, 46svh, 440px); }
    .globe-readout { top: 12px; font-size: 9px; }
    .globe-readout span { display: none; }
    .globe-readout #globe-view-label { display: block; }
    .travel-sidebar { padding-top: 8px; }
    .travel-destinations { grid-template-columns: 1fr 1fr; gap: 0 18px; margin-bottom: 16px; max-height: 150px; }
    .travel-location { font-size: 12px; gap: 8px; }
    .travel-location-count { display: none; }
    .travel-empty { padding: 4px 0; }
    .travel-empty-mark { display: none; }
    .travel-empty h3 { font-size: 22px; margin: 4px 0 8px; }
    .travel-empty p { max-width: none; font-size: 13px; margin-bottom: 0; }
    .travel-photo-open img { max-height: 270px; object-fit: contain; }
    .travel-back-globe { display: inline-block; margin: 8px 0 0 20px; padding: 0; border: 0; color: var(--atlas-cyan); font: inherit; font-size: 12px; background: transparent; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
    .travel-back-globe:focus-visible { outline: 2px solid var(--atlas-cyan); outline-offset: 4px; }
    .travels-footer { align-items: flex-start; font-size: 8px; }
    .travels-footer p:first-child { max-width: 190px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .globe-pin-dot::after { animation: none; }
    .globe-pin { animation: none; }
    .travel-selection { animation: none; }
    .travel-photo-open img { transition: none; }
}
