@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* ── The Golden Ratio (φ = 1.618) ────────────────────────────── */
    --phi: 1.6180339887;
    --phi-inv: 0.6180339887;
    --phi-inv2: 0.3819660113;
    --phi-inv3: 0.2360679775;
    --phi-inv4: 0.1458980338;
    --phi-sq: 2.6180339887;
    --phi-cube: 4.2360679775;

    /* ── Fluid Scaling Space Engine (based on φ and viewport) ─────── */
    --fluid-unit: clamp(14px, 0.8vw + 0.5vh, 19px);
    --space-xxs: calc(var(--fluid-unit) * var(--phi-inv2));
    /* ~5px - 7px */
    --space-xs: calc(var(--fluid-unit) * var(--phi-inv));
    /* ~8.5px - 12px */
    --space-sm: var(--fluid-unit);
    /* ~14px - 19px */
    --space-md: calc(var(--fluid-unit) * var(--phi));
    /* ~22.5px - 31px */
    --space-lg: calc(var(--fluid-unit) * var(--phi-sq));
    /* ~36.5px - 50px */
    --space-xl: calc(var(--fluid-unit) * var(--phi-cube));
    /* ~59px - 80px */

    /* ── Primary Theme: Cosmic Blooming Colors ─────── */
    --bg-base: #355070;
    --bg-stone-surface: #6d597a;

    /* Frosted glass */
    --bg-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 100%);
    --bg-surface-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
    --bg-surface-active: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.12) 100%);

    --border-color: rgba(255, 255, 255, 0.2);
    --border-bottom-glass: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.35);
    --border-warm: rgba(255, 255, 255, 0.4);

    /* Typography */
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.75);
    --text-subtle: rgba(255, 255, 255, 0.5);

    /* Warm Transparent Backlight & Caustic Accents */
    --warm-backlight: rgba(234, 172, 139, 0.38);
    --warm-backlight-soft: rgba(234, 172, 139, 0.2);
    --warm-glow: rgba(229, 107, 111, 0.45);
    --warm-glow-intense: rgba(229, 107, 111, 0.75);
    --accent-champagne: #eaac8b;
    --accent-alabaster: #ffffff;

    --font-sans: 'Presicav', 'Georgia', sans-serif;
    --transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    --radius-sm: calc(var(--space-xs) * 1.1);
    --radius-md: calc(var(--space-sm) * 1.1);
    --radius-lg: calc(var(--space-md) * 0.9);
}

html {
    view-transition-name: none;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: var(--phi);
    margin: 0;
    padding: 0;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* ── Realistic Delicate Marble Veining & Texture ─────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    /* Soft organic marble veining curves */
    background:
        radial-gradient(ellipse at 15% 20%, rgba(109, 89, 122, 0.75) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 80%, rgba(181, 101, 118, 0.7) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(229, 107, 111, 0.75) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 20%, rgba(234, 172, 139, 0.75) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(53, 80, 112, 0.8) 0%, transparent 60%);
}

/* Fine architectural stone grain */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.035;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Loading State to prevent Flash of Unstyled Content (FOUC) and premature animation */
body.loading,
body.loading * {
    transition: none !important;
    animation: none !important;
}

body.loading .scroll-container,
body.loading .main-nav {
    opacity: 0;
    pointer-events: none;
}

.scroll-container,
.main-nav {
    transition: opacity 0.5s ease;
}

/* ── Ambient Warm Sunlight / Cove Backlight Wash ─────────────────── */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--bg-base);
}

.blob {
    position: absolute;
    border-radius: 50%;
    width: clamp(450px, 58vw, 950px);
    height: clamp(450px, 58vw, 950px);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    animation: float 28s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

/* Warm cove illumination top-left */
.blob-1 {
    top: -15%;
    left: -10%;
    background: radial-gradient(circle,
            rgba(181, 101, 118, 0.95) 0%,
            rgba(181, 101, 118, 0.45) 45%,
            transparent 75%);
}

/* Cove backlight bottom-right */
.blob-2 {
    bottom: -15%;
    right: -10%;
    background: radial-gradient(circle,
            rgba(229, 107, 111, 0.9) 0%,
            rgba(229, 107, 111, 0.4) 50%,
            transparent 75%);
    animation-delay: -14s;
}

/* Center atmospheric glow */
.blob-3 {
    top: 35%;
    left: 35%;
    background: radial-gradient(circle,
            rgba(109, 89, 122, 0.95) 0%,
            rgba(109, 89, 122, 0.45) 50%,
            transparent 75%);
    animation-delay: -7s;
}

/* Bottom-left cove illumination */
.blob-4 {
    bottom: -10%;
    left: 5%;
    background: radial-gradient(circle,
            rgba(234, 172, 139, 0.9) 0%,
            rgba(234, 172, 139, 0.45) 50%,
            transparent 75%);
    animation-delay: -21s;
}

/* Top-right cove illumination */
.blob-5 {
    top: -5%;
    right: 15%;
    background: radial-gradient(circle,
            rgba(53, 80, 112, 0.9) 0%,
            rgba(53, 80, 112, 0.4) 50%,
            transparent 75%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(4vw, 3vh, 0) scale(1.05);
    }

    100% {
        transform: translate3d(-3vw, 5vh, 0) scale(1.1);
    }
}

/* ── Scroll Container ────────────────────────────────────────────── */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-behavior: auto;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    will-change: scroll-position;
    transform: translateZ(0);
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

/* ── Snap Sections: Golden Ratio Spacing & Scaling ───────────────── */
.snap-section {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Vertical & horizontal padding scaled via φ */
    padding: var(--space-lg) clamp(1.5rem, 6.18vw, 6.18rem);
    box-sizing: border-box;
    position: relative;
}

/* Content wrapper follows golden ratio viewport width (61.8vw) */
.content-wrapper {
    width: 100%;
    max-width: min(61.8vw, 980px);
    min-width: min(100%, 320px);
    animation: fadeIn 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(calc(var(--space-md) * 0.7));
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Typography Scale (Golden Ratio Harmonic Progression) ────────── */
h1 {
    font-size: clamp(2.618rem, 2rem + 3.82vw, 4.854rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin: 0 0 var(--space-xs) 0;
    color: var(--text-main);
}

h2 {
    font-size: clamp(1.854rem, 1.4rem + 1.618vw, 2.854rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: var(--space-md);
    position: relative;
    display: inline-block;
    color: var(--text-main);
}

/* Golden ratio warm architectural stone underline */
h2::after {
    content: '';
    position: absolute;
    bottom: calc(var(--space-xs) * -0.618);
    left: 0;
    width: var(--space-xl);
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg,
            var(--accent-champagne) 0%,
            rgba(184, 147, 92, 0.3) 70%,
            transparent 100%);
    box-shadow: 0 0 10px var(--warm-backlight);
}

h3 {
    font-size: clamp(1.15rem, 1rem + 0.382vw, 1.382rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 var(--space-xs) 0;
    color: var(--text-main);
}

p {
    font-size: clamp(1rem, 0.92rem + 0.382vw, 1.18rem);
    color: var(--text-muted);
    line-height: var(--phi);
    margin-bottom: var(--space-md);
    font-weight: 400;
}

.subtitle {
    color: var(--accent-champagne);
    font-size: clamp(1.05rem, 0.95rem + 0.382vw, 1.35rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    margin: 0 0 var(--space-md) 0;
}

/* ── About Section: Golden Ratio Framing Rules (Top-Left Biased) ── */
#about.snap-section {
    justify-content: flex-start;
    align-items: flex-start;
    /* Golden ratio vertical framing: top padding aligns title to φ-division (23.6vh to 38.2vh) */
    padding-top: clamp(4.5rem, calc(100vh * var(--phi-inv3)), 14rem);
    /* Golden ratio horizontal framing: left padding scaled by φ-subdivision (14.6vw) */
    padding-left: clamp(1.5rem, calc(100vw * var(--phi-inv4)), 12rem);
    padding-right: clamp(1.5rem, 6.18vw, 6.18rem);
    padding-bottom: var(--space-xl);
    box-sizing: border-box;
}

#about .content-wrapper {
    margin: 0;
    max-width: min(calc(100vw * var(--phi-inv)), 840px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* ── Standalone Title Block ──────────────────────────────────────── */
.about-title-block {
    position: relative;
    margin-bottom: calc(var(--space-md) * var(--phi));
    width: auto;
}

.about-title {
    font-size: clamp(2.618rem, 2rem + 3.82vw, 4.854rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin: 0;
    color: var(--text-main);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
    position: relative;
    display: inline-block;
}

/* Explicitly disable any underline or pseudo-element on about title block and title */
.about-title-block::after,
.about-title::after,
h1::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* ── Standalone Bio Block ────────────────────────────────────────── */
.about-bio-block {
    position: relative;
    max-width: min(calc(100% * var(--phi-inv)), 600px);
    width: 100%;
    padding-inline: 2px;
    box-sizing: border-box;
}

.about-bio-block p {
    font-size: clamp(1.05rem, 0.95rem + 0.382vw, 1.25rem);
    color: var(--text-muted);
    line-height: var(--phi);
    font-weight: 400;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.about-bio-block a,
p a {
    color: var(--text-main);
    text-decoration: underline;
    text-decoration-color: rgba(234, 172, 139, 0.45);
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: color 0.25s ease, text-decoration-color 0.25s ease, text-shadow 0.25s ease;
}

.about-bio-block a:hover,
p a:hover {
    color: var(--accent-champagne);
    text-decoration-color: var(--accent-champagne);
    text-shadow: 0 0 10px rgba(234, 172, 139, 0.4);
}

/* ── Cards & Grid Layouts (Proportioned with φ) ───────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 26vw, 360px), 1fr));
    gap: var(--space-md);
    width: 100%;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-bottom-color: var(--border-bottom-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: inherit;
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
    /* Soft architectural ambient shadow on marble with elevated floating depth */
    box-shadow:
        0 22px 52px -12px rgba(135, 115, 88, 0.15),
        0 4px 16px -2px rgba(145, 125, 100, 0.07),
        inset 0 2px 2.5px rgba(255, 255, 255, 0.98),
        inset 0 -1.5px 2.5px rgba(218, 205, 188, 0.35);
}

/* Polished specular top-rim sheen */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.95) 50%,
            transparent 100%);
    opacity: 0.85;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-6px);
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    border-bottom-color: rgba(225, 210, 192, 0.6);
    box-shadow:
        0 32px 70px -14px rgba(125, 100, 70, 0.22),
        0 0 36px -4px rgba(240, 204, 145, 0.35),
        inset 0 2px 2.5px rgba(255, 255, 255, 1);
}

.card h3 {
    margin: 0 0 var(--space-xs) 0;
    transition: color 0.3s ease;
}

.card:hover h3 {
    color: #ffffff;
}

.card p {
    font-size: clamp(0.92rem, 0.86rem + 0.2vw, 1.02rem);
    margin: 0 0 var(--space-md) 0;
    flex: 1;
    color: var(--text-muted);
}

/* ── Architectural Tags: Crystalline Frosted Badges ─────────────── */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--space-xs) * 0.75);
    margin-top: auto;
}

.tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.03) 100%);
    color: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top-color: rgba(255, 255, 255, 0.25);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    padding: calc(var(--space-xxs) * 0.75) calc(var(--space-xs) * 1.1);
    border-radius: 999px;
    font-size: clamp(0.72rem, 0.68rem + 0.16vw, 0.78rem);
    font-weight: 400;
    letter-spacing: 0.025em;
    line-height: 1.2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    will-change: transform;
    transform: translateZ(0);
    box-shadow:
        inset 0 1px 0.5px rgba(255, 255, 255, 0.14),
        0 2px 6px rgba(0, 0, 0, 0.12);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
    user-select: none;
}

/* On Card Hover: tags gently catch ambient champagne light without stealing focus */
.card:hover .tag {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(234, 172, 139, 0.06) 100%);
    border-color: rgba(234, 172, 139, 0.28);
    border-top-color: rgba(255, 255, 255, 0.38);
    color: rgba(255, 255, 255, 0.88);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Individual Tag Hover: micro-interaction with luminous edge glow */
.tag:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(234, 172, 139, 0.14) 100%) !important;
    border-color: rgba(234, 172, 139, 0.45) !important;
    border-top-color: rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-1.5px);
    box-shadow:
        0 4px 12px rgba(234, 172, 139, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
}

/* ── Contact Grid & Warm Luminous Cards ──────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 26vw, 360px), 1fr));
    gap: var(--space-md);
    width: 100%;
}

.contact-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-bottom-color: var(--border-bottom-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-md) calc(var(--space-md) * 1.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: inherit;
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
    box-shadow:
        0 14px 36px -10px rgba(145, 125, 100, 0.11),
        0 2px 10px -2px rgba(155, 138, 118, 0.05),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.95),
        inset 0 -1px 2px rgba(218, 205, 188, 0.3);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.95) 50%,
            transparent 100%);
    opacity: 0.85;
}

.contact-card:hover {
    transform: translateY(-4px);
    background: var(--bg-surface-hover);
    border-color: var(--border-warm);
    box-shadow:
        0 22px 48px -10px rgba(135, 115, 90, 0.16),
        0 0 30px -4px rgba(240, 204, 145, 0.3),
        inset 0 1.5px 2px rgba(255, 255, 255, 1);
}

.contact-icon {
    width: calc(var(--space-lg) * 1.15);
    height: calc(var(--space-lg) * 1.15);
    border-radius: 14px;
    background: linear-gradient(135deg,
            rgba(246, 242, 235, 0.8) 0%,
            rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-top-color: rgba(210, 195, 175, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-champagne);
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow:
        inset 0 1.5px 3px rgba(160, 140, 115, 0.12),
        inset 0 -1px 2px rgba(255, 255, 255, 0.95),
        0 2px 8px rgba(150, 130, 105, 0.06);
}

.contact-card:hover .contact-icon {
    background: linear-gradient(135deg,
            rgba(255, 252, 246, 0.95) 0%,
            rgba(255, 255, 255, 1) 100%);
    border-color: var(--accent-champagne);
    color: #947137;
    transform: scale(1.05);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 1),
        0 0 18px rgba(240, 204, 145, 0.35);
}

.contact-details {
    flex: 1;
    min-width: 0;
}

.contact-details h3 {
    font-size: clamp(1.05rem, 0.95rem + 0.3vw, 1.25rem);
    font-weight: 600;
    margin: 0 0 calc(var(--space-xxs) * 0.8) 0;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.contact-details p {
    font-size: clamp(0.88rem, 0.82rem + 0.2vw, 0.98rem);
    margin: 0;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-arrow {
    font-size: clamp(1.2rem, 1rem + 0.382vw, 1.5rem);
    color: var(--text-subtle);
    transition: var(--transition);
    margin-left: auto;
}

.contact-card:hover .contact-arrow {
    color: var(--accent-champagne);
    transform: translate(3px, -3px);
}

/* ── Palette Section ─────────────────────────────────────────────── */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 26vw, 360px), 1fr));
    gap: var(--space-md);
    width: 100%;
}

.palette-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-bottom-color: var(--border-bottom-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
    box-shadow:
        0 20px 48px -12px rgba(0, 0, 0, 0.25),
        0 4px 16px -2px rgba(0, 0, 0, 0.12),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.35);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.palette-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.6) 50%,
            transparent 100%);
    opacity: 0.7;
}

.palette-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
        0 24px 56px -10px rgba(0, 0, 0, 0.35),
        0 0 24px -4px var(--swatch-color, rgba(234, 172, 139, 0.3)),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
}

.palette-swatch {
    width: 100%;
    height: 90px;
    border-radius: calc(var(--radius-md) * 0.9);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 8px 12px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.35),
        0 6px 18px -3px rgba(0, 0, 0, 0.3);
}

.swatch-number {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 8px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.palette-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.palette-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.palette-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
}

.palette-hex {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--swatch-color, #ffffff);
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.palette-role {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.palette-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-subtle);
    font-family: monospace;
    margin-top: 4px;
}

/* ── Clean Floating Scroll Indicator (First Page Only) ────────────── */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.85rem);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    z-index: 10;
}

.scroll-indicator:hover {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Ensure the scroll indicator only appears on the first nondirectory page (#about) */
.snap-section:not(#about) .scroll-indicator,
section:not(#about) .scroll-indicator {
    display: none !important;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(calc(var(--space-xs) * -1.2)) translateX(-50%);
    }

    60% {
        transform: translateY(calc(var(--space-xs) * -0.6)) translateX(-50%);
    }
}

/* ════════════════════════════════════════════════════════════════════
   TOP BAR & NAVIGATION: FROSTED GLASS & INDENTED BOXES
   ════════════════════════════════════════════════════════════════════ */

.main-nav {
    position: fixed;
    z-index: 1000;
    top: clamp(12px, 1.6vh, 20px);
    right: clamp(1.2rem, 4.5vw, 6.18rem);
    left: auto;
    width: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(8px, 1.2vw, calc(var(--space-xs) * 1.1));
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-bottom: none;
    box-shadow: none;
    box-sizing: border-box;
    transform: none;
}

/* Directory mode (Centered monumental splash state) */
.main-nav.directory-mode {
    position: fixed;
    top: 0;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    height: 100vh;
    width: max-content;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    box-sizing: border-box;
    gap: calc(var(--space-md) * 1.15);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-bottom: none;
    border-radius: 0;
    box-shadow: none;
    pointer-events: none;
}

/* Base link behavior */
.main-nav a {
    position: relative;
    text-decoration: none;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Top Bar Mode: Crystalline Glass Boxes with Crisp White Text ── */
.main-nav:not(.directory-mode) a {
    /* Ultra-translucent 0.01 fill opacity */
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 13px;
    padding: calc(var(--space-xxs) * 0.95) clamp(10px, 1.2vw, calc(var(--space-xs) * 1.35));

    /* Delicate, airy glass rim highlight */
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-top-color: rgba(255, 255, 255, 0.32);
    border-bottom-color: rgba(255, 255, 255, 0.08);

    /* Purely internal glass bevels - strictly no shadows outside the box */
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);

    /* ── High-Contrast Clean Typography ──────────────────── */
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
    font-size: clamp(0.8rem, 0.74rem + 0.25vw, 0.94rem);
    letter-spacing: 0.04em;
    text-transform: lowercase;

    /* Clean text shadow within the box for crisp readability */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    filter: none;
    transform: none;
}

/* Hover State: No hover shift or lift, maintains 0.01 fill, strictly inner effects */
.main-nav:not(.directory-mode) a:hover {
    background: rgba(255, 255, 255, 0.01);
    transform: none;
    border-color: rgba(255, 255, 255, 0.28);
    border-top-color: rgba(255, 255, 255, 0.45);
    border-bottom-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);

    color: rgba(255, 255, 255, 0.9);
    filter: none;
}

/* Active State: Preserves flat alignment and 0.01 fill with internal highlight only */
.main-nav:not(.directory-mode) a.active {
    background: rgba(255, 255, 255, 0.01);
    transform: none;
    border-color: rgba(255, 255, 255, 0.38);
    border-top-color: rgba(255, 255, 255, 0.55);
    border-bottom-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.06);

    color: #ffffff;
    filter: none;
}

/* ── Directory Mode: True Frosted Glass Text ─────────────────────── */
.main-nav.directory-mode {
    gap: calc(var(--space-md) * 1.15);
}

.main-nav.directory-mode a {
    font-weight: 600;
    font-size: clamp(3.2rem, 2.4rem + 4.5vw, 5.6rem);
    letter-spacing: 0.01em;
    line-height: 1.15;
    padding: 0.15rem 0.5rem;
    text-align: left;
    justify-content: flex-start;
    text-transform: uppercase;

    /* Slightly opaque white text with no outlines */
    color: rgba(255, 255, 255, 0.65);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.65);
    -webkit-text-stroke: 0;

    /* Strictly no glow in resting state */
    filter: none;

    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.main-nav.directory-mode a::before,
.main-nav.directory-mode a::after {
    display: none;
}

.main-nav.directory-mode a:hover,
.main-nav.directory-mode a:focus-visible {
    transform: translateY(-3px) scale(1.02);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    -webkit-text-stroke: 0;
    /* Clean white and warm glow only when highlighted */
    filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 8px rgba(234, 172, 139, 0.5));
}

/* View Transitions: individual link morphing */
.main-nav a:nth-child(1) {
    view-transition-name: nav-link-1;
}

.main-nav a:nth-child(2) {
    view-transition-name: nav-link-2;
}

.main-nav a:nth-child(3) {
    view-transition-name: nav-link-3;
}

.main-nav a:nth-child(4) {
    view-transition-name: nav-link-4;
}

::view-transition-group(nav-link-1),
::view-transition-group(nav-link-2),
::view-transition-group(nav-link-3),
::view-transition-group(nav-link-4) {
    animation-duration: 0.45s;
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
    /* ease-in */
}

::view-transition-image-pair(nav-link-1),
::view-transition-image-pair(nav-link-2),
::view-transition-image-pair(nav-link-3),
::view-transition-image-pair(nav-link-4) {
    animation: 0.45s cubic-bezier(0.55, 0.055, 0.675, 0.19) both bead-morph;
}

::view-transition-old(nav-link-1),
::view-transition-old(nav-link-2),
::view-transition-old(nav-link-3),
::view-transition-old(nav-link-4) {
    animation: 0.45s cubic-bezier(0.55, 0.055, 0.675, 0.19) both old-fade;
}

::view-transition-new(nav-link-1),
::view-transition-new(nav-link-2),
::view-transition-new(nav-link-3),
::view-transition-new(nav-link-4) {
    animation: 0.45s cubic-bezier(0.55, 0.055, 0.675, 0.19) both new-fade;
}

@keyframes bead-morph {
    0% {
        background-color: rgba(255, 255, 255, 0);
        box-shadow: inset 0 0 0 rgba(255, 255, 255, 0);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        clip-path: inset(0% round 13px);
        transform: translateY(0);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }

    22% {
        background-color: rgba(255, 255, 255, 0.18);
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.42),
            inset 0 -2px 4px rgba(0, 0, 0, 0.12);
        backdrop-filter: blur(16px) saturate(125%);
        -webkit-backdrop-filter: blur(16px) saturate(125%);
        clip-path: inset(calc(50% - 11px) round 11px);
        /* 22px crystalline semi-transparent glass bead */
        transform: translateY(24px);
        filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.32));
    }

    78% {
        background-color: rgba(255, 255, 255, 0.18);
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.42),
            inset 0 -2px 4px rgba(0, 0, 0, 0.12);
        backdrop-filter: blur(16px) saturate(125%);
        -webkit-backdrop-filter: blur(16px) saturate(125%);
        clip-path: inset(calc(50% - 11px) round 11px);
        transform: translateY(-16px);
        filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.32));
    }

    100% {
        background-color: rgba(255, 255, 255, 0);
        box-shadow: inset 0 0 0 rgba(255, 255, 255, 0);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        clip-path: inset(0% round 13px);
        transform: translateY(0);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }
}

@keyframes old-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    22% {
        opacity: 0;
        transform: scale(0.35);
        /* Shrinks into the bead */
    }

    100% {
        opacity: 0;
        transform: scale(0.35);
    }
}

@keyframes new-fade {
    0% {
        opacity: 0;
        transform: scale(0.35);
    }

    78% {
        opacity: 0;
        transform: scale(0.35);
        /* Expands out of the bead */
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Responsive Refinements ──────────────────────────────────────── */

@media (max-width: 768px) {
    .content-wrapper {
        max-width: 100%;
    }

    .about-bio-block {
        max-width: 100%;
    }

    .main-nav.directory-mode {
        gap: var(--space-md);
    }

    .card-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}