/* ── Variables ─────────────────────────────────────────── */
:root {
    --bg:        #0d0d0d;
    --border:    #222222;
    --text:      #e0e0e0;
    --muted:     #666666;
    --accent:    #ffffff;
    --nav-h:     52px;
    --gap:       6px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Nav ────────────────────────────────────────────────── */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}
.nav-logo {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text);
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
}
.nav-links a {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* ── Page wrapper (all pages except home) ───────────────── */
.page {
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 32px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--muted);
}

/* ── Intro text ─────────────────────────────────────────── */
#intro {
    position: fixed;
    top: calc(50% - 0.95em);
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
#intro-typed {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(20px, 3vw, 30px);
    color: #e8e4dc;
    line-height: 1.9;
    margin: 0;
    white-space: pre;
}
#intro-typed::after {
    content: '_';
    animation: cursor-blink 0.65s step-start infinite;
}
@keyframes cursor-blink {
    50% { opacity: 0; }
}

/* ── Home ───────────────────────────────────────────────── */
body.home {
    overflow-x: hidden;
}

.photos-wrap {
    position: relative;
    z-index: 2;
    background: var(--bg);
    padding: 0 24px;
    max-width: 85vw;
    margin: 0 auto;
    overflow: visible;
}
.photos-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 250px 250px;
    opacity: 0.09;
    mix-blend-mode: soft-light;
}

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@property --shimmer-hue {
    syntax: '<number>';
    initial-value: 0;
    inherits: false;
}
@property --shimmer-sat {
    syntax: '<percentage>';
    initial-value: 0%;
    inherits: false;
}
@property --shimmer-lit {
    syntax: '<percentage>';
    initial-value: 100%;
    inherits: false;
}
@keyframes border-spin {
    to { --border-angle: 360deg; }
}
@keyframes shimmer-rainbow {
    0%   { --shimmer-hue: 0;   --shimmer-sat: 100%; --shimmer-lit: 68%; }
    100% { --shimmer-hue: 360; --shimmer-sat: 0%;   --shimmer-lit: 100%; }
}
.msg-btn-float {
    position: fixed;
    bottom: 32px;
    left: 50%;
    z-index: 100;
    font-size: 13px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    border-radius: 100px;
    padding: 18px 48px;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 24px rgba(255,255,255,0.08);
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
    pointer-events: none;
    transition: box-shadow 0.2s;
    cursor: pointer;
    white-space: nowrap;
}
.msg-btn-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--border-angle),
        transparent 0deg,
        hsl(var(--shimmer-hue) var(--shimmer-sat) var(--shimmer-lit) / 0.05) 20deg,
        hsl(var(--shimmer-hue) var(--shimmer-sat) var(--shimmer-lit) / 0.35) 55deg,
        hsl(var(--shimmer-hue) var(--shimmer-sat) var(--shimmer-lit) / 0.6)  75deg,
        hsl(var(--shimmer-hue) var(--shimmer-sat) var(--shimmer-lit) / 0.35) 95deg,
        hsl(var(--shimmer-hue) var(--shimmer-sat) var(--shimmer-lit) / 0.05) 130deg,
        transparent 150deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}
.msg-btn-float.visible {
    animation: msg-btn-pop 0.8s cubic-bezier(0.34, 1.15, 0.64, 1) forwards;
    pointer-events: auto;
}
.msg-btn-float.visible::before {
    animation: border-spin 4s linear 0.7s infinite;
}
.msg-btn-float.btn-spectrum::before {
    animation: border-spin 4s linear infinite,
               shimmer-rainbow 2.5s linear forwards;
}
@keyframes msg-btn-pop {
    0%   { opacity: 0; transform: translateX(-50%) translateY(32px) scale(0.92); }
    40%  { opacity: 1; }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@media (hover: hover) {
    .msg-btn-float:hover {
        box-shadow: 0 0 40px rgba(255,255,255,0.28);
    }
}

/* ── Message backdrop ────────────────────────────────────── */
.msg-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.msg-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Message card ────────────────────────────────────────── */
.msg-card {
    position: fixed;
    inset: 0;
    margin: auto;
    height: fit-content;
    width: min(560px, calc(100vw - 48px));
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 32px;
    z-index: 200;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translate(0px,0px) scale(1,1);
    opacity: 0;
    pointer-events: none;
}
.msg-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.msg-card-title {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
}
.msg-card-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: color 0.15s;
}
.msg-card-close:hover { color: var(--text); }
.msg-card input,
.msg-card textarea {
    background: #0d0d0d;
    border: 1px solid #252525;
    color: var(--text);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
}
.msg-card input:focus,
.msg-card textarea:focus { border-color: rgba(255,255,255,0.25); }
.msg-card input::placeholder,
.msg-card textarea::placeholder { color: var(--muted); }
.msg-card-send {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 100px;
    padding: 14px 0;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(255,255,255,0.1);
    transition: border-color 0.2s;
    width: 100%;
    margin-top: 4px;
}
.msg-card-send:hover { border-color: rgba(255,255,255,0.75); }
.msg-card-send:disabled { opacity: 0.45; cursor: not-allowed; }
.msg-card-status {
    font-size: 12px;
    text-align: center;
    min-height: 16px;
    color: transparent;
}
.msg-card-status.success { color: #6fcf97; }
.msg-card-status.error   { color: #eb5757; }

/* ── Photo page: grid ───────────────────────────────────── */
.photo-grid {
    column-count: 3;
    column-gap: var(--gap);
    overflow: visible;
}
.photo-item {
    break-inside: avoid;
    margin-bottom: var(--gap);
    overflow: visible;
}
.photo-grid img {
    width: 100%;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s cubic-bezier(0.22,1,0.36,1);
}
.js-ready .photo-grid img:not(.revealed) {
    opacity: 0;
    transform: translateY(52px);
}
@media (hover: hover) {
    .photo-grid img.revealed:hover {
        transform: scale(1.03) translateY(-4px);
        position: relative;
        z-index: 10;
        opacity: 1;
    }
    .photo-grid:has(img.revealed:hover) img.revealed:not(:hover) {
        opacity: 0.88;
    }
    body.msg-open .photo-grid img.revealed:hover {
        transform: none;
        box-shadow: none;
    }
    body.msg-open .photo-grid:has(img.revealed:hover) img.revealed:not(:hover) {
        opacity: 1;
        transform: none;
    }
}


/* ── Bottom fade ────────────────────────────────────────── */
.bottom-fade {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 180px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    z-index: 10;
    pointer-events: none;
}

/* ── Lightbox ───────────────────────────────────────────── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lb-card {
    position: relative;
    transition: transform 0.12s ease-out;
    will-change: transform;
    line-height: 0;
}
#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
    display: block;
}
#lb-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: background 0.12s ease-out;
}
.lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 4px;
    font-size: 40px;
    line-height: 1;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.lb-nav:hover {
    color: #fff;
    background: rgba(0,0,0,0.45);
    border-color: rgba(255,255,255,0.3);
}
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
@media (max-width: 900px) {
    .lb-nav { width: 44px; height: 44px; font-size: 32px; }
    .lb-prev { left: 10px; }
    .lb-next { right: 10px; }
}

/* ── About & Contact ─────────────────────────────────────── */
.prose {
    max-width: 640px;
}
.prose h1 {
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--muted);
    margin-bottom: 32px;
}
.prose p { color: var(--muted); margin-bottom: 16px; line-height: 1.8; }
.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}
.contact-list li { font-size: 14px; color: var(--muted); }
.contact-list a:hover { color: var(--text); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .photo-grid { column-count: 2; }
    .photos-wrap { max-width: 100%; }
}
@media (max-width: 500px) {
    .site-nav { padding: 0 16px; }
    .page { padding-left: 16px; padding-right: 16px; }
}
