/* ==========================================================================
   THEME TOKENS & DESIGN VARIABLES
   ========================================================================== */
:root {
    --bg-main: #FAFAFA;
    --bg-surface: #FFFFFF;
    --bg-alt: #F3F4F6;
    --text-main: #1A1A1A;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --accent: #111827;
    --accent-hover: #374151;
    --accent-contrast: #FFFFFF;
    --nav-bg: rgba(250, 250, 250, 0.92);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
    --matte-bg: #FFFFFF;
    --matte-border: #E5E7EB;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 72px;
    --nav-height-scrolled: 58px;
}

[data-theme="dark"] {
    --bg-main: #0B0F17;
    --bg-surface: #151D2A;
    --bg-alt: #1E293B;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --border-color: #243248;
    --accent: #F1F5F9;
    --accent-hover: #CBD5E1;
    --accent-contrast: #0B0F17;
    --nav-bg: rgba(11, 15, 23, 0.92);
    --nav-bg-scrolled: rgba(21, 29, 42, 0.98);
    --matte-bg: #111827;
    --matte-border: #1F2937;
}

[data-theme="safelight"] {
    --bg-main: #090304;
    --bg-surface: #140709;
    --bg-alt: #1F0B0E;
    --text-main: #FFF1F2;
    --text-muted: #FDA4AF;
    --border-color: #3F1218;
    --accent: #E11D48;
    --accent-hover: #F43F5E;
    --accent-contrast: #090304;
    --nav-bg: rgba(9, 3, 4, 0.94);
    --nav-bg-scrolled: rgba(20, 7, 9, 0.98);
    --matte-bg: #0D0406;
    --matte-border: #2B0C10;
}

/* ==========================================================================
   BASE & RESET STYLES (iOS Optimizations)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.35s ease, color 0.35s ease;
}

body.menu-open, 
body.lightbox-open {
    overflow: hidden;
    touch-action: none;
}

/* 35mm Analog Film Grain Overlay */
.film-grain-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9990;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

[data-theme="safelight"] .film-grain-overlay {
    opacity: 0.055;
}

/* Desktop Custom Cursor */
@media (pointer: fine) and (hover: hover) {
    .custom-cursor {
        position: fixed;
        top: 0; left: 0;
        width: 20px; height: 20px;
        border: 1.5px solid var(--accent);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                    height 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                    background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.2s ease,
                    border-color 0.2s ease;
        opacity: 0;
    }

    .custom-cursor.active { opacity: 0.85; }
    .custom-cursor.hover {
        width: 46px; height: 46px;
        background-color: rgba(225, 29, 72, 0.15);
        border-color: var(--accent);
    }
}

@media (pointer: coarse), (hover: none) {
    .custom-cursor { display: none !important; }
}

.reveal-on-scroll {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
        will-change: opacity, transform;
    }

    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
    padding-left: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right, 0px));
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    padding-top: env(safe-area-inset-top, 0px);
    transition: height 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
    height: var(--nav-height-scrolled);
    background: var(--nav-bg-scrolled);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 1rem;
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-decoration: none;
    color: var(--text-main);
    white-space: nowrap;
    transition: font-size 0.3s ease, color 0.3s ease;
}

.navbar.scrolled .brand-logo { font-size: 1.15rem; }
.brand-logo span { font-weight: 300; color: var(--text-muted); }

.nav-links {
    display: flex;
    gap: 2rem;
    margin-left: auto;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    transition: var(--transition);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.theme-icon { display: none; }
[data-theme="light"] .moon-icon { display: inline-block; }
[data-theme="dark"] .safelight-icon { display: inline-block; }
[data-theme="safelight"] .sun-icon { display: inline-block; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
    transform-origin: center;
}

.nav-toggle.open .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-backdrop.active {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding: calc(var(--nav-height) + 4rem) 0 4.5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    line-height: 1.2;
    max-width: 800px;
    margin: 0 auto 1.25rem;
}

.hero-desc {
    max-width: 580px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    line-height: 1.65;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 2rem;
    background-color: var(--accent);
    color: var(--accent-contrast);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* ==========================================================================
   GALLERY STAGE & CONTROLS
   ========================================================================== */
.section {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    scroll-margin-top: calc(var(--nav-height-scrolled) + 12px);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
}

.text-center { 
    text-align: center; 
    justify-content: center; 
    flex-direction: column; 
}

.section-subtitle { 
    color: var(--text-muted); 
    margin-top: 0.4rem; 
    font-size: 0.95rem; 
}

/* Genre Dropdown Select (Prevents iPhone Auto-Zoom with font-size: 16px) */
.filter-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.custom-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.55rem 2.4rem 0.55rem 1rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 16px; /* 16px prevents iOS Safari from zooming into the page */
    font-weight: 500;
    cursor: pointer;
    min-height: 44px; /* Apple Human Interface Guideline touch target */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.filter-select:hover {
    border-color: var(--accent);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(120, 120, 120, 0.15);
}

.select-chevron {
    position: absolute;
    right: 0.85rem;
    pointer-events: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="safelight"] .filter-select {
    background-color: #140709;
    border-color: #3F1218;
}

[data-theme="safelight"] .filter-select:hover,
[data-theme="safelight"] .filter-select:focus {
    border-color: var(--accent);
}

.empty-notice {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1.5rem;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    line-height: 1.7;
}

.carousel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1020px;
    margin: 0 auto;
}

.ambient-glow {
    position: absolute;
    top: 5%; left: 5%; width: 90%; height: 90%;
    border-radius: 16px;
    filter: blur(55px);
    background-color: rgba(100, 100, 100, 0.1);
    z-index: 0;
    pointer-events: none;
    transition: background-color 0.8s ease;
}

.carousel-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 620px;
    background: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    touch-action: pan-y pinch-zoom; /* Allows vertical swipe scrolling without freezing page */
}

.carousel-track-wrapper {
    width: 100%; height: 100%;
    overflow: hidden;
    background: transparent;
}

.carousel-track {
    display: flex;
    width: 100%; height: 100%;
    background: transparent;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    background: transparent;
    cursor: zoom-in;
}

.matte-frame {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--matte-bg);
    border: 1px solid var(--matte-border);
    border-radius: 8px;
    padding: clamp(8px, 1.8vw, 18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.blur-load {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    border-radius: 4px;
}

.blur-load::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    filter: blur(20px);
    transform: scale(1.1);
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.blur-load img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0;
    transition: opacity 0.45s ease-in-out, transform 0.45s ease-out;
    transform: scale(0.98);
}

.blur-load.loaded::before { opacity: 0; }
.blur-load.loaded img { opacity: 1; transform: scale(1); }

/* Side Stage Navigation Arrows */
.stage-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.stage-nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.06);
}

.stage-nav-btn.prev { left: 1rem; }
.stage-nav-btn.next { right: 1rem; }

.zoom-hint {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.carousel-slide:hover .zoom-hint { opacity: 1; transform: scale(1); }

/* EXIF & Slide Counter Bar */
.exif-bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.5rem;
    min-height: 28px;
}

.exif-text {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 2vw, 0.78rem);
    letter-spacing: 0.04em;
    color: var(--text-muted);
    word-break: break-word;
}

.slide-counter {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* iOS Smooth Momentum Filmstrip */
.filmstrip-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow-x: auto;
    padding: 0.35rem 0.25rem 0.85rem;
    -webkit-overflow-scrolling: touch; /* Momentum deceleration scrolling on iOS */
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.filmstrip-wrapper::-webkit-scrollbar { height: 4px; }
.filmstrip-wrapper::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

.filmstrip-track { display: flex; gap: 0.6rem; justify-content: flex-start; }

.filmstrip-thumb {
    flex: 0 0 76px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: var(--bg-alt);
    cursor: pointer;
    opacity: 0.45;
    scroll-snap-align: center;
    transition: var(--transition);
}

.filmstrip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.filmstrip-thumb:hover { opacity: 0.8; }
.filmstrip-thumb.active { opacity: 1; border-color: var(--accent); transform: scale(1.04); }

/* ==========================================================================
   FULLSCREEN LIGHTBOX (Dynamic Viewport Units for iOS Safari)
   ========================================================================== */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    height: 100vh;
    height: 100dvh; /* Adapts dynamically to iOS Safari address bar collapse */
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.lightbox-modal.active { 
    opacity: 1; 
    visibility: visible; 
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.lightbox-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem);
    padding-top: max(clamp(2rem, 5vw, 4rem), env(safe-area-inset-top, 0px));
    padding-bottom: max(clamp(2rem, 5vw, 4rem), env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.lightbox-img {
    max-width: 92vw;
    max-height: 80vh;
    max-height: 80dvh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.96);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-modal.active .lightbox-img { transform: scale(1); }

.lightbox-caption {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: #E5E7EB;
    margin-top: 1rem;
    text-align: center;
    max-width: 800px;
    padding: 0 1rem;
    pointer-events: auto;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.lightbox-btn {
    position: absolute;
    z-index: 3;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lightbox-btn:hover { 
    background: rgba(255, 255, 255, 0.28); 
    border-color: rgba(255, 255, 255, 0.45);
}

.lightbox-close {
    top: calc(1.5rem + env(safe-area-inset-top, 0px));
    right: max(1.5rem, env(safe-area-inset-right, 0px));
    width: 44px; 
    height: 44px;
    font-size: 1.7rem;
    line-height: 1;
}

.lightbox-prev {
    left: max(1.5rem, env(safe-area-inset-left, 0px));
    top: 50%;
    transform: translateY(-50%);
    width: 48px; 
    height: 48px;
    font-size: 1.25rem;
}

.lightbox-next {
    right: max(1.5rem, env(safe-area-inset-right, 0px));
    top: 50%;
    transform: translateY(-50%);
    width: 48px; 
    height: 48px;
    font-size: 1.25rem;
}

/* ==========================================================================
   ABOUT & STATS SECTION
   ========================================================================== */
.about-section {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}

.about-image-wrap {
    width: 100%;
}

.about-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 540px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sub-heading {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3.5vw, 2.2rem);
    line-height: 1.25;
    margin: 0.5rem 0 1.2rem;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
}

.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.75rem);
    font-weight: 600;
    line-height: 1.2;
}

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

/* ==========================================================================
   JOURNAL & BLOG SECTIONS (COMPACT HOMEPAGE & ARTICLE PAGES)
   ========================================================================== */
.journal-compact-section {
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.compact-journal-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.compact-journal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.2s ease, 
                box-shadow 0.2s ease, 
                background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.compact-journal-row:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.compact-journal-row:active {
    transform: scale(0.99);
    background-color: var(--bg-alt);
}

.compact-row-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.compact-date {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.compact-title {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main);
}

.compact-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* --- Infinite Scroll Animation & Loader --- */
.compact-journal-row.lazy-loaded-row {
    animation: fadeInRow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-sentinel {
    text-align: center;
    padding: 2.5rem 0 1rem;
    min-height: 48px;
}

.sentinel-loader {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spinSentinel 0.6s linear infinite;
}

@keyframes spinSentinel {
    to { transform: rotate(360deg); }
}

/* Single Article Reader View */
.journal-wrapper {
    padding: calc(var(--nav-height) + 3rem) 0 5rem;
    min-height: 80vh;
}

.article-single {
    max-width: 740px;
    margin: 0 auto;
}

.journal-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2.2rem;
    min-height: 44px;
    transition: var(--transition);
}

.journal-back-link:hover {
    color: var(--text-main);
    border-color: var(--accent);
    transform: translateX(-3px);
}

.journal-back-link:active {
    background: var(--bg-alt);
}

.article-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.journal-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--bg-alt);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
}

.article-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.2;
    margin: 0.85rem 0;
}

.article-date {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.article-hero-cover {
    width: 100%;
    max-height: 480px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
}

.article-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--text-main);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body blockquote {
    border-left: 2px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-main);
}

/* ==========================================================================
   KIND WORDS (TESTIMONIALS)
   ========================================================================== */
.kind-words-section {
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.kind-words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.kind-words-card {
    background: var(--bg-surface);
    padding: 2.25rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kind-words-quote-mark {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.25;
    margin-bottom: -1rem;
}

.kind-words-text {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.kind-words-author {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.author-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

.author-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.kind-words-empty {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-surface);
    padding: 3rem 2rem;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

.empty-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.kind-words-empty h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.kind-words-empty p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.75rem;
}

.empty-cta { font-size: 0.88rem; padding: 0.65rem 1.6rem; }

/* ==========================================================================
   CONTACT SECTION (Inputs sized >= 16px to prevent iOS Auto-Zoom)
   ========================================================================== */
.contact-box { max-width: 650px; }
.contact-form {
    background: var(--bg-surface);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.4rem; }

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 16px; /* Must remain at least 16px for iOS Safari */
    background: var(--bg-main);
    color: var(--text-main);
    -webkit-appearance: none;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-surface);
}

.turnstile-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 1.25rem auto !important;
    text-align: center;
}

.turnstile-wrapper iframe,
.turnstile-wrapper > div { margin: 0 auto !important; }

.form-submit { width: 100%; min-height: 48px; }
.form-feedback { margin-top: 1.25rem; font-size: 0.9rem; text-align: center; display: none; }
.form-feedback.success { display: block; color: #10B981; }
.form-feedback.error { display: block; color: #EF4444; }

/* ==========================================================================
   FOOTER & UTILITY
   ========================================================================== */
.site-footer {
    padding: 2.25rem 0 calc(2.25rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }

.back-to-top {
    position: fixed;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    right: max(1.5rem, env(safe-area-inset-right, 0px));
    min-width: 44px;
    min-height: 44px;
    background: var(--accent);
    color: var(--accent-contrast);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    z-index: 900;
}

.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-hover); transform: translateY(-3px); }

/* ==========================================================================
   RESPONSIVE QUERIES (iPhone, iPad & Touch Devices)
   ========================================================================== */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .about-image-wrap { max-width: 500px; margin: 0 auto; width: 100%; }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
        --nav-height-scrolled: 54px;
    }

    .nav-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0;
        background: var(--bg-surface);
        flex-direction: column;
        align-items: center;
        padding: 2.5rem 1.5rem;
        gap: 1.75rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
        transform: translateY(-120%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        visibility: hidden;
    }

    .navbar.scrolled .nav-links { top: var(--nav-height-scrolled); }
    .nav-links.open { transform: translateY(0); visibility: visible; }
    .nav-link { font-size: 1.15rem; font-weight: 600; width: 100%; text-align: center; }

    .hero-section { padding: calc(var(--nav-height) + 2rem) 0 3rem; }
    .carousel-stage { aspect-ratio: 4 / 3; }

    /* Touch Controls for iPhone */
    .stage-nav-btn {
        width: 44px; /* Minimum 44px for reliable thumb taps */
        height: 44px;
        font-size: 1rem;
    }
    .stage-nav-btn.prev { left: 0.5rem; }
    .stage-nav-btn.next { right: 0.5rem; }

    .filter-dropdown-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    
    .custom-select-wrap {
        flex-grow: 1;
    }

    .filter-select {
        width: 100%;
    }

    .slide-counter { margin-left: 0; font-size: 0.72rem; }
    .filmstrip-thumb { flex: 0 0 68px; height: 50px; }

    /* Lightbox Controls for iPhone / Notch Devices */
    .lightbox-close { 
        top: max(1rem, env(safe-area-inset-top, 0px)); 
        right: max(1rem, env(safe-area-inset-right, 0px)); 
        width: 44px; 
        height: 44px; 
        font-size: 1.6rem; 
    }

    .lightbox-prev, 
    .lightbox-next { 
        top: 50%;
        transform: translateY(-50%);
        width: 44px; 
        height: 44px; 
        font-size: 1.15rem; 
    }

    .lightbox-prev { left: max(0.5rem, env(safe-area-inset-left, 0px)); }
    .lightbox-next { right: max(0.5rem, env(safe-area-inset-right, 0px)); }

    .lightbox-btn:active {
        background: rgba(255, 255, 255, 0.35);
    }

    /* Journal Card Touch Layout */
    .compact-journal-list { gap: 0.75rem; }
    .compact-journal-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.15rem;
        gap: 0.65rem;
    }

    .compact-row-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .compact-title { font-size: 1rem; }
    .compact-date { font-size: 0.72rem; }
    .compact-tag {
        font-size: 0.68rem;
        padding: 0.2rem 0.5rem;
        align-self: flex-start;
    }

    .journal-wrapper { padding: calc(var(--nav-height) + 1.75rem) 0 3.5rem; }
    .section-head { flex-direction: column; align-items: stretch; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .footer-content { flex-direction: column; text-align: center; gap: 1.25rem; }
}

@media (max-width: 480px) {
    .carousel-stage { aspect-ratio: 1 / 1; }
    .about-stats { grid-template-columns: 1fr; gap: 1rem; text-align: center; }
    .back-to-top { 
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); 
        right: max(1rem, env(safe-area-inset-right, 0px)); 
        width: 44px; 
        height: 44px; 
        font-size: 1.05rem; 
    }
}