/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-color: #faf8f5;        /* Warm Linen Off-White */
    --bg-accent: #f4f1eb;       /* Slightly deeper warm linen */
    --text-color: #121212;      /* Rich Charcoal Black */
    --text-muted: #62605c;      /* Muted grey-brown for secondary text */
    --border-color: #e5e2db;    /* Fine, soft border grey */
    --border-dark: #121212;     /* Strong contrast border */
    --error-color: #c94a3f;     /* Sophisticated muted red for validation errors */
    --success-color: #3b7a57;   /* Muted olive green for success state */

    /* Typography */
    --font-serif: 'EB Garamond', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Spacing Scale */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 7rem;
    
    /* Layout Constants */
    --max-width: 1100px;
    --header-height: 80px;

    /* Animation Transitions */
    --transition-base: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Custom Scrollbar */
html {
    scroll-behavior: smooth;
    scrollbar-color: var(--text-color) var(--bg-color);
    scrollbar-width: thin;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--text-color);
    color: var(--bg-color);
    padding: var(--spacing-sm) var(--spacing-md);
    z-index: 9999;
    text-decoration: none;
    font-weight: 500;
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 20px;
}

/* Typography Defaults */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-wrap: balance; /* Modern CSS heading wrapping balance */
}

p {
    text-wrap: pretty; /* Modern CSS paragraph orphan control */
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base), opacity var(--transition-base);
}

/* ==========================================================================
   LAYOUT & CONTAINER ELEMENTS
   ========================================================================== */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

.section-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--text-color);
}

/* ==========================================================================
   BUTTONS & ACTIONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.8rem 1.6rem;
    border: 1px solid var(--border-dark);
    cursor: pointer;
    background: transparent;
    transition: background-color var(--transition-base), color var(--transition-base), transform var(--transition-base);
}

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

.btn-icon {
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(250, 248, 245, 0.9); /* Translucent warm off-white */
    backdrop-filter: blur(8px); /* Modern backdrop glassmorphism */
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    font-weight: 500;
}

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

.main-nav {
    display: flex;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 400;
    position: relative;
    padding: var(--spacing-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-base);
}

/* Nav link hover wrapped in media query at the bottom */

.btn-connect {
    border: 1px solid var(--border-dark);
    padding: 0.4rem 1rem !important;
    border-radius: 0;
}

.btn-connect::after {
    display: none;
}

/* Button connect hover wrapped in media query at the bottom */

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding: var(--spacing-xl) 0 var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 0.95;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.hero-bio {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
}

/* ==========================================================================
   QUOTES / TESTIMONIALS SECTION
   ========================================================================== */
.quotes-section {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-accent);
}

.quotes-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.quote-card {
    border-right: 1px solid var(--border-color);
    padding-right: var(--spacing-md);
}

.quote-card:last-child,
.quote-card:nth-child(3n) {
    border-right: none;
    padding-right: 0;
}

.quote-text {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-style: italic;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

.quote-author {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-style: normal;
    display: block;
}

/* ==========================================================================
   SHE WRITES SECTION
   ========================================================================== */
.writes-section {
    border-bottom: 1px solid var(--border-color);
}

.writes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.write-card {
    display: flex;
    flex-direction: column;
}

.write-card-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--text-color);
    padding-bottom: var(--spacing-xs);
    width: fit-content;
}

.write-card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   SHE DOODLES SECTION
   ========================================================================== */
.doodles-section {
    border-bottom: 1px solid var(--border-color);
}

.doodles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.doodle-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.doodle-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-accent);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-lg);
    transition: border-color var(--transition-base), background-color var(--transition-base);
}

.doodle-svg {
    width: 100%;
    height: 100%;
    color: var(--text-color);
    transition: transform var(--transition-bounce);
}

/* Doodle hover animations wrapped in media query at the bottom */

.doodle-card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.doodle-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   SHE CURATES SECTION
   ========================================================================== */
.curates-section {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-accent);
}

.curates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.curate-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.curate-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-lg);
    transition: border-color var(--transition-base), background-color var(--transition-base);
}

.curate-svg {
    width: 100%;
    height: 100%;
    color: var(--text-color);
    transition: transform var(--transition-bounce);
}

/* Curate hover animations wrapped in media query at the bottom */

.curate-info {
    margin-top: var(--spacing-xs);
}

.curate-card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.curate-card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.curate-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   CONNECT / CONTACT SECTION
   ========================================================================== */
.connect-section {
    border-bottom: 1px solid var(--border-color);
}

.connect-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-xl);
}

.connect-subtitle {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}

.connect-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    max-width: 450px;
}

/* Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 0.8rem 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    outline: none;
    border-radius: 0;
    transition: border-color var(--transition-base);
}

.form-input:focus {
    border-bottom-color: var(--border-dark);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-submit {
    align-self: flex-start;
    background-color: var(--text-color);
    color: var(--bg-color);
    margin-top: var(--spacing-sm);
}

/* Button submit hover wrapped in media query at the bottom */

/* Real-Time Form Validation using :user-invalid */
.form-input:user-invalid {
    border-bottom-color: var(--error-color);
}

.error-msg {
    display: none;
    font-size: 0.75rem;
    color: var(--error-color);
    margin-top: 2px;
}

.form-input:user-invalid ~ .error-msg {
    display: block;
}

.form-feedback {
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
    min-height: 24px;
}

.form-feedback.success {
    color: var(--success-color);
}

.form-feedback.error {
    color: var(--error-color);
}

/* Direct Contacts list */
.contact-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.contact-link-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-xs);
}

/* Contact links hover wrapped in media query at the bottom */

.contact-link-text {
    display: flex;
    flex-direction: column;
}

.contact-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition-base);
}

/* Contact icon hover wrapped in media query at the bottom */

.link-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.link-value {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-top: 2px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-socials {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-base);
}

/* Footer hover wrapped in media query at the bottom */

.footer-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition-base);
}

/* Footer icon hover wrapped in media query at the bottom */

/* ==========================================================================
   MOBILE MENU TOGGLE & OVERLAY NAV STYLES
   ========================================================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.hamburger-line {
    width: 100%;
    height: 1.5px;
    background-color: var(--text-color);
    transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Morph hamburger into 'X' when active */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.mobile-nav {
    width: 100%;
    text-align: center;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: 0 var(--spacing-md);
}

.mobile-nav-link {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 8vw, 3rem);
    color: var(--text-color);
    display: block;
    transition: opacity var(--transition-base);
}

.btn-connect-mobile {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.8rem 2rem;
    border: 1px solid var(--border-dark);
    margin-top: var(--spacing-sm);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Tablet Viewports */
@media (max-width: 900px) {
    :root {
        --spacing-xl: 5rem;
        --spacing-lg: 3rem;
    }

    .quotes-grid,
    .writes-grid,
    .doodles-grid,
    .curates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    /* Reset divider borders in grid layouts */
    .quote-card {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: var(--spacing-md);
    }
    
    /* Remove bottom border on the last row of a 2-column layout (cards 5 and 6) */
    .quote-card:nth-last-child(-n+2) {
        border-bottom: none;
        padding-bottom: 0;
    }

    .connect-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Mobile Header & Nav Toggle (768px and down) */
@media (max-width: 768px) {
    .home-nav {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
    .header-container {
        position: relative;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1005;
    }
}

/* Mobile Viewports */
@media (max-width: 600px) {
    :root {
        --spacing-xl: 3.5rem;
        --spacing-lg: 2rem;
        --header-height: 70px;
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 var(--spacing-md);
    }

    .quotes-grid,
    .writes-grid,
    .doodles-grid,
    .curates-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Adjust bottom borders in a 1-column layout */
    .quote-card {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: var(--spacing-md);
    }
    .quote-card:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-bio {
        font-size: 1.25rem;
    }

    .footer-container {
        flex-direction: column;
        gap: var(--spacing-xs);
        text-align: center;
    }
}

/* ==========================================================================
   ADDITIONAL ENHANCEMENTS (Scroll Margin & Animations)
   ========================================================================== */
#writes, #doodles, #curates, #connect {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

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

.spinner {
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   GALLERY PAGE & LIGHTBOX OVERLAY
   ========================================================================== */
.gallery-intro-section {
    padding-top: calc(var(--header-height) + var(--spacing-lg));
    border-bottom: 1px solid var(--border-color);
}

.gallery-header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-bottom: var(--spacing-md);
}

.gallery-page-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-family: var(--font-serif);
    margin-bottom: var(--spacing-xs);
}

.gallery-page-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 300;
}

.gallery-grid-section {
    padding: var(--spacing-xl) 0;
}

.gallery-featured-showcase {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.featured-image-container {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: var(--bg-accent);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    margin-bottom: var(--spacing-md);
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-bounce);
}

/* Featured gallery hover wrapped in media query at the bottom */

.featured-info {
    max-width: 600px;
    margin-top: var(--spacing-xs);
}

.featured-item-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}

.featured-item-desc {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.featured-hint {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: var(--spacing-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.featured-hint::before,
.featured-hint::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background-color: var(--border-color);
    vertical-align: middle;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.gallery-card {
    display: flex;
    flex-direction: column;
}

.gallery-image-container {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: var(--bg-accent);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    margin-bottom: var(--spacing-sm);
}

.gallery-item-link {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-bounce);
}

.gallery-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.view-label {
    color: var(--bg-color);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--bg-color);
    padding: 0.5rem 1rem;
    pointer-events: none;
}

/* Gallery cards hover wrapped in media query at the bottom */

.gallery-info {
    margin-top: var(--spacing-xs);
}

.gallery-item-title {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.gallery-item-desc {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.96);
    z-index: 2000;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    color: var(--bg-color);
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2100;
    transition: transform var(--transition-base), color var(--transition-base);
    padding: var(--spacing-xs);
}

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

.lightbox-content-wrapper {
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    transform: scale(0.97);
    transition: transform var(--transition-bounce), opacity var(--transition-base);
}

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

/* Slide/fade transition for switching images */
.lightbox-img.switching {
    opacity: 0;
    transform: scale(0.99);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.lightbox-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--spacing-md);
    text-align: center;
    max-width: 600px;
}

.lightbox-counter {
    color: var(--bg-color);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.6;
    margin-bottom: 4px;
}

.lightbox-caption {
    color: var(--bg-color);
    font-family: var(--font-serif);
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.5;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--bg-color);
    cursor: pointer;
    z-index: 2100;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: opacity var(--transition-base), transform var(--transition-base), color var(--transition-base);
    outline: none;
}

.lightbox-prev {
    left: var(--spacing-md);
}

.lightbox-next {
    right: var(--spacing-md);
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-prev:focus,
.lightbox-next:focus {
    opacity: 1;
    color: #ffffff;
}

.lightbox-prev:hover {
    transform: translateY(-50%) translateX(-3px);
}

.lightbox-next:hover {
    transform: translateY(-50%) translateX(3px);
}

@media (max-width: 600px) {
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
    }
    .lightbox-prev {
        left: var(--spacing-xs);
    }
    .lightbox-next {
        right: var(--spacing-xs);
    }
}

/* Gallery Responsive Media Queries */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .gallery-page-title {
        font-size: 2.75rem;
    }
}

/* Mobile menu base styles moved above media queries to fix cascade specificity */

/* ==========================================================================
   DESKTOP ONLY HOVER EFFECTS
   ========================================================================== */
@media (hover: hover) {
    /* Primary buttons */
    .btn-primary:hover {
        background-color: transparent;
        color: var(--text-color);
    }
    
    .btn:hover .btn-icon {
        transform: translateY(2px);
    }

    /* Nav links line effect */
    .nav-link:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }
    
    .btn-connect:hover {
        background-color: var(--text-color);
        color: var(--bg-color);
    }

    /* Doodle cards zoom & rotate */
    .doodle-card:hover .doodle-preview {
        background-color: var(--bg-color);
        border-color: var(--text-color);
    }

    .doodle-card:hover .doodle-svg {
        transform: rotate(3deg) scale(1.05);
    }

    /* Curate cards zoom */
    .curate-card:hover .curate-thumbnail {
        background-color: var(--bg-accent);
        border-color: var(--text-color);
    }

    .curate-card:hover .curate-svg {
        transform: scale(1.04);
    }

    /* Contact Links & Submit Button */
    .btn-submit:hover {
        background-color: transparent;
        color: var(--text-color);
    }

    .contact-link-item:hover {
        border-bottom-color: var(--border-dark);
    }

    .contact-link-item:hover .contact-icon {
        color: var(--text-color);
    }

    /* Footer Socials */
    .footer-social-link:hover {
        color: var(--text-color);
    }

    .footer-social-link:hover .footer-icon {
        color: var(--text-color);
    }

    /* Gallery Hovers */
    .gallery-featured-showcase:hover .featured-img {
        transform: scale(1.02);
    }

    .gallery-featured-showcase:hover .gallery-hover-overlay {
        opacity: 1;
    }

    .gallery-card:hover .gallery-img {
        transform: scale(1.05);
    }

    .gallery-card:hover .gallery-hover-overlay {
        opacity: 1;
    }
}

/* ==========================================================================
   TOUCH SCREEN PRESET BADGES (NO HOVER INTERACTION REPLACEMENT)
   ========================================================================== */
@media (hover: none) {
    .gallery-hover-overlay {
        opacity: 1;
        background-color: transparent;
        align-items: flex-end;
        justify-content: flex-end;
        padding: var(--spacing-sm);
        pointer-events: none; /* Let taps pass to gallery item link */
    }

    .view-label {
        font-size: 0.7rem;
        background-color: rgba(18, 18, 18, 0.75);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        padding: 0.35rem 0.7rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    /* Append set / single-image icons to labels dynamically */
    .gallery-item-link[data-gallery="skeleton"] .view-label::before,
    .gallery-item-link[data-gallery="snake"] .view-label::before,
    .gallery-item-link[data-gallery="marginalia"] .view-label::before {
        content: "⧉\00a0"; /* Stack overlay symbol for sets */
    }
    
    .gallery-item-link:not([data-gallery="skeleton"]):not([data-gallery="snake"]):not([data-gallery="marginalia"]) .view-label::before {
        content: "⤢\00a0"; /* Diagonal zoom/expand symbol for single images */
    }
}

/* ==========================================================================
   TOUCH SCREENS ACTIVE TAP STATES
   ========================================================================== */
.btn-primary:active,
.btn-submit:active {
    opacity: 0.8;
}

.btn-connect:active,
.btn-connect-mobile:active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.doodle-card:active .doodle-preview {
    background-color: var(--bg-color);
    border-color: var(--text-color);
}

.curate-card:active .curate-thumbnail {
    background-color: var(--bg-accent);
    border-color: var(--text-color);
}

.contact-link-item:active {
    border-bottom-color: var(--border-dark);
}

.footer-social-link:active {
    color: var(--text-color);
}

.mobile-nav-link:active {
    opacity: 0.6;
}

