@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Instrument+Serif:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@300;400;500&family=DM+Sans:wght@300;400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Landing page */
html:has(body.landing-page) {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    overflow-x: visible;
}

body.landing-page,
body.about-page {
    --mouse-x: 50%;
    --mouse-y: 50%;
}

body.landing-page {
    min-height: 100vh;
    padding-top: 3.5rem;
    background: #F3EEEB;
    background-attachment: fixed;
    font-family: 'DM Sans', sans-serif;
    position: relative;
    overflow-y: auto;
}

body.about-page {
    position: relative;
}

body.landing-page::before,
body.about-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 24px 24px;
    animation: drift 60s linear infinite;
    pointer-events: none;
    z-index: 1;
}

body.about-page::before {
    opacity: 0;
}

body.landing-page::after,
body.about-page::after {
    content: '';
    position: fixed;
    inset: 0;
    background: #C98338;
    pointer-events: none;
    z-index: 0;
    mask-image:
        radial-gradient(
            circle at var(--mouse-x) var(--mouse-y),
            black 0%,
            black 8%,
            transparent 28%
        ),
        radial-gradient(circle at center, black 0.5px, transparent 0.5px);
    -webkit-mask-image:
        radial-gradient(
            circle at var(--mouse-x) var(--mouse-y),
            black 0%,
            black 8%,
            transparent 28%
        ),
        radial-gradient(circle at center, black 0.5px, transparent 0.5px);
    mask-size: cover, 5px 5px;
    -webkit-mask-size: cover, 5px 5px;
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

body.about-page::after {
    background: #fff;
}

body.about-page main,
body.about-page .site-footer {
    position: relative;
    z-index: 1;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.home-hero {
    min-height: 80vh;
    position: relative;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(24px, 24px); }
}

/* Fixed top menu bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: #F3EEEB;
    font-family: 'DM Sans', sans-serif;
    border-bottom: 1px solid rgba(139, 133, 149, 0.2);
    box-sizing: border-box;
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.top-nav-links a {
    color: #5a5568;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.top-nav-links a:hover {
    color: #3d3a45;
}

.top-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #3d3a45;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.top-nav-name {
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.top-nav-logo {
    width: 28px;
    height: 28px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.top-nav-brand:hover .top-nav-logo {
    opacity: 1;
}

.card-fixed-wrapper {
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.card-fixed-wrapper.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

.card-fixed-wrapper .container {
    pointer-events: auto;
    perspective: 1500px;
    position: relative;
}

.hero-cherub {
    position: absolute;
    right: max(-170px, -18vw);
    top: 52%;
    transform: translateY(-50%);
    width: min(280px, 34vw);
    pointer-events: auto;
    cursor: pointer;
    z-index: 6;
}

.hero-cherub img {
    display: block;
}

.hero-angel {
    width: 120%;
    height: auto;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

.hero-cherub-btn {
    position: absolute;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
    cursor: pointer;
}

.hero-cherub-btn--camera {
    top: 15%;
    left: 108%;
}

.hero-cherub-btn--mic {
    top: 60%;
    left: 108%;
}

.hero-cherub-btn--pen {
    top: 106%;
    left: 108%;
}

.hero-cherub:hover .hero-cherub-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.65);
    pointer-events: auto;
}

.hero-cherub:hover .hero-cherub-btn:active {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0.6;
}

.hero-cherub:hover .hero-angel {
    transform: rotate(-6deg);
}

.hero-angel--bounce {
    animation: hero-angel-bounce 0.35s ease-out;
}

@keyframes hero-angel-bounce {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.08) translateY(-3px);
    }
    60% {
        transform: scale(0.96) translateY(1px);
    }
    100% {
        transform: scale(1);
    }
}

.scroll-prompt {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.5s ease;
}

.card-fixed-wrapper.hidden .scroll-prompt {
    opacity: 0;
}

.scroll-prompt-text {
    font-size: 0.75rem;
    color: #8a8595;
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

.scroll-prompt-arrow {
    font-size: 1.25rem;
    color: #8a8595;
    animation: scroll-prompt-pulse 2s ease-in-out infinite;
}

@keyframes scroll-prompt-pulse {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.6; }
}

.hero {
    min-height: 16vh;
    position: relative;
    z-index: 0;
    scroll-snap-align: none;
    background: transparent;
}

.card {
    width: 520px;
    height: 330px;
    position: relative;
    z-index: 5;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    cursor: pointer;
}

.card-frame-outer {
    position: absolute;
    inset: -7px;
    background: rgba(239, 226, 216, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 19px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: -15px 25px 50px rgba(0, 27, 137, 0.12), 15px 25px 50px rgba(144, 46, 3, 0.12), 0 20px 45px rgba(0, 27, 137, 0.07), 0 20px 45px rgba(144, 46, 3, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateZ(-20px);
}

.card-frame-inner {
    position: absolute;
    inset: 0;
    background: rgba(239, 226, 216, 0.5);
    backdrop-filter: blur(40px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: -8px 12px 30px rgba(0, 27, 137, 0.09), 8px 12px 30px rgba(144, 46, 3, 0.09), inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.05);
    transform: translateZ(-5px);
}

.card-content {
    position: absolute;
    inset: 20px;
    background: #F0EDEA;
    backdrop-filter: blur(60px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 116px 30px 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    box-shadow: -6px 10px 28px rgba(0, 27, 137, 0.1), 6px 10px 28px rgba(144, 46, 3, 0.1), inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 -1px 0 rgba(0, 0, 0, 0.03);
    transform: translateZ(10px);
    overflow: hidden;
}

.card-content::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(239, 226, 216, 0.3) 0%, rgba(239, 226, 216, 0.15) 100%);
    pointer-events: none;
}

.card-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover .card-content::before {
    opacity: 1;
}

.light-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    transform: translateZ(15px);
}

.card:hover .light-effect {
    opacity: 1;
}

.profile-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #F0EDEA;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateZ(20px);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 25%;
}

.decorative-shape {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
    opacity: 0.15;
    transform: translateZ(5px) rotate(-15deg);
    transition: transform 0.3s ease;
}

.card:hover .decorative-shape {
    transform: translateZ(8px) rotate(-10deg);
}

.decorative-shape svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.card .name {
    font-family: 'Instrument Serif', serif;
    font-size: 52px;
    font-weight: 400;
    color: #4a4556;
    margin: 0 0 2px 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
    transform: translateZ(18px);
}

.card .hero-underline {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.card .subtitle {
    font-size: 0.95rem;
    color: #686173;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.scroll-hint {
    font-size: 0.95rem;
    color: #8f879a;
    font-weight: 400;
    margin: 4px 0 0 0;
    letter-spacing: 0.01em;
    text-transform: none;
    line-height: 1.5;
    max-width: 26rem;
}

.assets-strip-zone {
    position: relative;
    min-height: 70vh;
    scroll-snap-align: none;
    overflow: visible;
}

.assets-strip-perfume-layer {
    position: absolute;
    inset: 0;
    z-index: 9;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    padding: 2.5rem 2rem;
}

.assets-strip-perfume-layer .asset-item--perfume-below-card {
    margin-left: calc(320px + 4rem + 480px);
}

.assets-strip-location-layer {
    position: absolute;
    inset: 0;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    padding: 2.5rem 2rem;
}

.assets-strip-location-layer .asset-item--postit-below-card {
    margin-left: calc(-320px - 4rem - 400px + 200px);
    margin-bottom: 0;
    transform: translateY(80px);
}

.assets-strip-location-layer .asset-item--location-below-card {
    margin-left: calc(-320px - 4rem - 400px + 200px);
    margin-top: 1rem;
    transform: rotate(-35deg) translateY(20px);
}

.asset-item--postit-below-card {
    align-self: center;
    z-index: 2;
}

.assets-strip {
    min-height: 60vh;
    padding: 2.5rem 2rem 3rem;
    position: relative;
    z-index: 11;
    display: flex;
    background: transparent;
    align-items: center;
    justify-content: center;
    scroll-snap-align: none;
    overflow: visible;
}

.assets-strip-inner {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4rem;
    flex-wrap: nowrap;
    overflow: visible;
    padding: 2rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.assets-strip-inner::-webkit-scrollbar {
    height: 8px;
}

.assets-strip-inner::-webkit-scrollbar-track {
    background: rgba(239, 226, 216, 0.4);
    border-radius: 4px;
}

.assets-strip-inner::-webkit-scrollbar-thumb {
    background: rgba(239, 226, 216, 0.6);
    border-radius: 4px;
}

.asset-item {
    flex-shrink: 0;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.asset-item:hover {
    transform: translateY(-8px);
}

.asset-item img {
    max-height: 420px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(100, 80, 120, 0.2));
    border-radius: 8px;
}

.asset-item--angel {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    align-self: flex-end;
    z-index: 1;
}

.asset-item--angel:hover {
    transform: translateY(-8px);
}

.asset-item--camera {
    align-self: center;
    transform: rotate(4deg) translateX(-400px);
    z-index: 2;
}

.asset-item--camera:hover {
    transform: rotate(4deg) translateX(-400px) translateY(-8px);
}

.asset-item--location,
.asset-item--location-below-card {
    align-self: center;
    z-index: 2;
}

.asset-item--pencil {
    align-self: center;
    transform: rotate(-6deg);
    z-index: 12;
}

.asset-item--pencil:hover {
    transform: rotate(-6deg) translateY(-8px);
}

.asset-item--perfume,
.asset-item--perfume-below-card {
    align-self: flex-start;
    transform: rotate(-2deg);
}

.asset-item--perfume-below-card {
    z-index: 1;
}

.asset-item--perfume:hover,
.asset-item--perfume-below-card:hover {
    transform: rotate(-2deg) translateY(-8px);
}

.card .info-section {
    position: relative;
    z-index: 2;
    transform: translateZ(15px);
    text-align: left;
}

.card-reflection {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(239, 226, 216, 0) 0%, rgba(239, 226, 216, 0.25) 50%, rgba(239, 226, 216, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    transform: translateZ(12px);
}

.card:hover .card-reflection {
    opacity: 1;
}

@media (max-width: 768px) {
    /* On mobile, avoid costly fixed backgrounds/animations */
    body.landing-page {
        background-attachment: scroll;
    }

    body.landing-page::before {
        animation: none;
    }
    .top-nav {
        padding: 0.75rem 1rem;
    }

    .top-nav-links {
        gap: 1.25rem;
    }

    .top-nav-links a {
        font-size: 0.85rem;
    }

    .top-nav-logo {
        width: 24px;
        height: 24px;
    }

    .portfolio-section {
        padding: 1rem 0;
    }

    .portfolio-grid {
        gap: 0.5rem;
    }

    .portfolio-section-header {
        padding: 0 1rem;
    }

    .card {
        width: 94vw;
        max-width: 380px;
        /* Keep an explicit height so the absolutely positioned
           frame layers and content remain visible on mobile */
        height: 260px;
    }

    .card-content {
        padding: 20px 18px 18px;
        gap: 10px;
    }

    .card .name {
        font-size: 26px;
        line-height: 1.15;
    }

    .card .subtitle {
        font-size: 0.95rem;
    }

    .scroll-hint {
        font-size: 0.9rem;
    }

    .decorative-shape {
        width: 40px;
        height: 40px;
        top: 8px;
        right: 8px;
    }

    /* Landing hero: stack card + cherub nicely on small screens */
    .home-hero {
        min-height: auto;
        padding-top: 4.5rem;
    }

    .card-fixed-wrapper {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        padding: 1.5rem 0 2rem;
        transform: none;
    }

    .card-fixed-wrapper .container {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Mobile: cherub overlays the card instead of sitting below it */
    .hero-cherub {
        position: absolute;
        top: 68%;
        left: 70%;
        transform: translate(-50%, -50%);
        width: min(180px, 52vw);
        margin: 0;
    }

    .hero {
        min-height: 0;
    }
}

/* Portfolio (shared and portfolio page) – only when not landing page */
body:not(.landing-page):not(.project-page):not(.about-page) {
    font-family: "EB Garamond", serif;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
    background-color: #F3EEEB;
    padding: 20px;
}

.portfolio-section {
    background: #F3EEEB;
    position: relative;
    z-index: 5;
    scroll-snap-align: none;
    padding: 5rem 0 7rem;
}

.portfolio-background {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
    pointer-events: none;
    z-index: 0;
}

.outer-container {
    width: 100%;
    height: calc(100% + 50px);
    margin-top: -25px;
    margin-bottom: -25px;
    background: #ede8e0;
    border-radius: 32px;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        0 24px 60px rgba(80, 60, 50, 0.18),
        inset 2px 2px 6px rgba(255, 255, 255, 0.7),
        inset -2px -2px 6px rgba(180, 160, 150, 0.25);
    padding: 10px;
    box-sizing: border-box;
}

.inner-container {
    width: 100%;
    height: 100%;
    margin-top: 0;
    margin-bottom: 0;
    background:
        linear-gradient(135deg, rgba(239, 226, 216, 0.96) 0%, rgba(239, 226, 216, 0.9) 50%, rgba(239, 226, 216, 0.84) 100%);
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.6),
        inset -2px -2px 5px rgba(180, 160, 150, 0.2);
}

.portfolio-section-header {
    max-width: 1200px;
    margin: 0 auto 0.75rem;
    padding: 0 2rem;
    padding-top: 8vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.portfolio-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 500;
    color: #3d3a45;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    margin: 0;
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.portfolio-filter-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #5a5568;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(139, 133, 149, 0.4);
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.portfolio-filter-btn:hover {
    color: #3d3a45;
    border-color: rgba(139, 133, 149, 0.7);
    background: rgba(139, 133, 149, 0.08);
}

.portfolio-filter-btn.is-active {
    color: #3d3a45;
    border-color: rgba(201, 131, 56, 0.6);
    background: rgba(201, 131, 56, 0.12);
}

.portfolio-tile.is-hidden {
    display: none;
}

/* Full-page dark overlay when a tile is hovered */
.portfolio-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.portfolio-section:has(.portfolio-tile:hover) .portfolio-overlay {
    opacity: 1;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    max-width: none;
    margin: 0;
    aspect-ratio: 1.5;
    position: relative;
    z-index: 5;
}

.portfolio-tile {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #F0EDEA;
    position: relative;
    z-index: 1;
    transition: z-index 0s 0.2s;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Dark layer behind image/text: tile background darkens on hover */
.portfolio-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    will-change: opacity;
    transform: translateZ(0);
}

.portfolio-tile:hover::before {
    opacity: 1;
}

.portfolio-tile:hover {
    z-index: 100;
    transition: z-index 0s 0s;
}

.portfolio-tile img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tile overlay: title, description, tags on hover (no darkening of image) */
.portfolio-tile-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    background: transparent;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.portfolio-tile:hover .portfolio-tile-overlay {
    opacity: 1;
}

.portfolio-tile-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.35rem;
    line-height: 1.3;
    text-transform: lowercase;
    text-shadow: 0 1px 3px rgba(0, 27, 137, 0.9), 0 2px 6px rgba(0, 27, 137, 0.7), 0 3px 8px rgba(0, 20, 80, 0.6);
}

.portfolio-tile-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #fff;
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 27, 137, 0.9), 0 2px 6px rgba(0, 27, 137, 0.7), 0 3px 8px rgba(0, 20, 80, 0.6);
}

.portfolio-tile-tags {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: #FFC04D;
    letter-spacing: 0.03em;
    text-transform: lowercase;
    text-shadow: 0 1px 3px rgba(0, 27, 137, 0.9), 0 2px 6px rgba(0, 27, 137, 0.7), 0 3px 8px rgba(0, 20, 80, 0.6);
}

/* Footer */
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(139, 133, 149, 0.2);
    background: #F3EEEB;
    font-family: 'DM Sans', sans-serif;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.footer-credit {
    margin: 0;
    font-size: 0.9rem;
    color: #5a5568;
    font-weight: 400;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: #5a5568;
    text-decoration: none;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #3d3a45;
}

/* Project pages → all styles live in project-pages.css */

/* Psych page */
body.psych-page {
    min-height: 100vh;
    padding-top: 3.5rem;
    background: #F3EEEB;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    flex-direction: column;
}

body.psych-page .top-nav {
    width: 100%;
    max-width: 100vw;
}

body.psych-page .psych-content {
    flex: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    width: 100%;
    text-align: center;
}

body.psych-page .psych-construction-img {
    display: block;
    margin: 0 auto 1.5rem;
    width: 65%;
    max-width: 100%;
    height: auto;
}

body.psych-page .psych-content h1 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #3d3a45;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    text-transform: lowercase;
}

body.psych-page .psych-content p {
    font-size: 0.95rem;
    color: #5a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Fun page */
body.playground-page {
    min-height: 100vh;
    padding-top: 3.5rem;
    background: #F3EEEB;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body.playground-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(139, 133, 149, 0.2) 1px, transparent 1px);
    background-size: 24px 24px;
    animation: drift 60s linear infinite;
    pointer-events: none;
    z-index: 0;
}

body.playground-page .top-nav {
    width: 100%;
    max-width: 100vw;
}

body.playground-mode-explore .playground-intro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    z-index: 3;
    pointer-events: none;
}

body.playground-mode-grid .playground-intro {
    position: static;
    transform: none;
    padding: 4.5rem 2rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    z-index: 2;
}

.playground-intro h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 2.4rem;
    font-weight: 400;
    color: #3d3a45;
    letter-spacing: -0.01em;
}

.playground-hero-line {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: #6b6575;
}

.playground-hero-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #8a8595;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.playground-mode-grid .playground-hero-sub {
    display: none;
}

body.playground-page .playground-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

body.playground-page .fun-content {
    flex: 0 0 auto;
    width: 100%;
    height: calc(100vh - 3.5rem);
    min-height: calc(100vh - 3.5rem);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

body.playground-page .fun-canvas-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    inset: 0;
    cursor: grab;
}

body.playground-page .fun-canvas-container.dragging {
    cursor: grabbing;
}

body.playground-page .fun-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 3000px;
    height: 3000px;
    padding: 100px;
}

body.playground-page .fun-drag-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

body.playground-page .fun-drag-hint.hidden {
    opacity: 0;
}

body.playground-page .fun-intro {
    display: none;
}

body.playground-page .fun-intro h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #3d3a45;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

body.playground-page .fun-intro p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: #6b6575;
    line-height: 1.5;
    margin: 0;
}

body.playground-page .fun-card {
    position: absolute;
    padding: 0.25rem 0;
    max-width: 400px;
    user-select: none;
}

body.playground-page .fun-card.playground-hidden {
    display: none;
}

body.playground-page a.fun-card {
    text-decoration: none;
    color: inherit;
}

body.playground-page .fun-card h2 {
    margin-bottom: 0.35rem;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    color: #4a4556;
}

body.playground-page .fun-card p {
    line-height: 1.5;
    color: #6b6575;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    margin: 0;
}

body.playground-page .fun-card img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 0.35rem;
    border-radius: 8px;
}

/* Subcards (Monere, Null) – distinct from main fun-cards */
body.playground-page .fun-subcard {
    position: absolute;
    padding: 0.2rem 0;
    max-width: 260px;
    overflow: visible;
    user-select: none;
}

body.playground-page .fun-subcard h2 {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    color: #3d3028;
}

body.playground-page .fun-subcard p {
    line-height: 1.4;
    color: #3d3028;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    margin: 0;
}

body.playground-page .fun-subcard img {
    display: block;
    width: 380px;
    max-width: none;
    height: auto;
    margin-bottom: 0.3rem;
    border-radius: 6px;
}

body.playground-page .fun-subcard:nth-child(4) img {
    width: 340px;
}

/* Cards arranged in a circle around the intro (1100, 550), radius ~550px */
body.playground-page .fun-card:nth-child(2) { top: 470px; left: 1580px; }   /* Concept Art (main) */
body.playground-page .fun-subcard:nth-child(3) { top: 80px; left: 1580px; }  /* Monere – above Concept Art */
body.playground-page .fun-subcard:nth-child(4) { top: 565px; left: 1700px; } /* N[u]ll – below Concept Art */
body.playground-page .fun-card:nth-child(5) { top: 904px; left: 1521px; }   /* Camera Strolls */
body.playground-page .fun-card:nth-child(6) { top: 1092px; left: 1196px; } /* My favorite game */
body.playground-page .fun-card:nth-child(7) { top: 1027px; left: 825px; }   /* Perfume */
body.playground-page .fun-card:nth-child(8) { top: 738px; left: 583px; }     /* Eats with Friends */
body.playground-page .fun-card:nth-child(9) { top: 362px; left: 583px; }     /* Crafts */
body.playground-page .fun-card:nth-child(10) { top: 73px; left: 825px; }     /* Say Hi */

body.playground-page .fun-card--label p {
    display: none;
}

body.playground-page .fun-card--label h2 {
    margin-bottom: 0;
}

/* Playground view mode toggle */
body.playground-page .playground-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0;
    margin-top: 0.75rem;
    z-index: 2;
    pointer-events: auto;
}

.playground-mode-btn {
    border: 1px solid rgba(139, 133, 149, 0.3);
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(243, 238, 235, 0.8);
    color: #6b6575;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.playground-mode-btn.is-active {
    background: #3d3a45;
    color: #F3EEEB;
    border-color: #3d3a45;
}

/* Sections */
.playground-section {
    display: none;
}

.playground-section.is-active {
    display: block;
}

/* Grid mode layout */
.playground-grid {
    max-width: 1040px;
    margin: 0 auto 4rem;
    padding: 2rem 2rem 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.playground-grid-card {
    background: #F0EDEA;
    border-radius: 10px;
    padding: 1.1rem 1.15rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.playground-grid-card h2 {
    font-family: 'Crimson Pro', serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: #3d3a45;
    letter-spacing: -0.01em;
}

.playground-grid-card p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #5a5568;
    margin: 0;
}

.playground-grid-card--link a {
    margin-top: 0.35rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    text-decoration: none;
    color: #C98338;
}

.playground-grid-card--link a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    body.playground-page .playground-mode-toggle {
        margin-top: 0.5rem;
    }

    body.playground-page .fun-content {
        height: calc(100vh - 3.5rem - 3rem);
        min-height: calc(100vh - 3.5rem - 3rem);
    }
}

/* About page */
body.about-page {
    min-height: 100vh;
    padding-top: 3.5rem;
    background: #F3EEEB;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    flex-direction: column;
}

body.about-page .about-content {
    flex: 1;
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    width: 100%;
}

body.about-page .about-column-text,
body.about-page .about-column-photo {
    min-width: 0;
}

body.about-page .about-column-photo {
    display: flex;
    flex-direction: column;
}

body.about-page .about-content h1 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #3d3a45;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    text-transform: lowercase;
}

body.about-page .about-content p,
body.about-page .about-content ul,
body.about-page .about-content li {
    font-size: 0.95rem;
    color: #5a5568;
    margin-bottom: 1rem;
}

body.about-page .about-content p {
    line-height: 1.6;
}

body.about-page .about-content ul {
    padding-left: 2rem;
    line-height: 1.1;
}

body.about-page .about-content li {
    margin-left: 0.5rem;
    line-height: 1.1;
}

body.about-page .about-content li:last-child {
    margin-bottom: 0;
}

/* About photo pile (stack: new image appears on top with random rotation) */
body.about-page .about-photo-pile {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.about-page .about-column-photo .about-photo-pile {
    flex: 1;
    width: 100%;
    margin-top: 0;
    align-items: stretch;
}

body.about-page .about-photo-stack {
    position: relative;
    max-width: 50%;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.about-page .about-column-photo .about-photo-stack {
    max-width: 100%;
    width: 100%;
}

body.about-page .about-column-photo .about-photo-layer:first-child {
    width: 100%;
}

body.about-page .about-column-photo .about-photo-layer .about-photo-img {
    width: 100%;
}

body.about-page .about-photo-layer {
    position: absolute;
    left: 50%;
    top: 50%;
    width: max-content;
    max-width: 100%;
    transform: translate(-50%, -50%);
}

body.about-page .about-photo-layer:first-child {
    position: relative;
    left: auto;
    top: auto;
}

body.about-page .about-photo-layer .about-photo-img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    vertical-align: bottom;
}

body.about-page .about-photo-pile .about-photo-caption {
    position: relative;
    z-index: 10;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background-color: #e67e22;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0 0;
    text-align: center;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

body:not(.landing-page):not(.project-page):not(.about-page) .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
}

body:not(.landing-page):not(.project-page):not(.about-page):not(.psych-page):not(.playground-page) header {
    width: 30%;
    text-align: left;
    padding: 20px 0;
}

body:not(.landing-page):not(.project-page):not(.about-page) h1 {
    font-family: "Instrument Serif", serif;
    font-size: 2.5em;
    margin-bottom: 5px;
    color: #2E7675;
    display: inline-block;
    cursor: default;
}

body:not(.landing-page):not(.project-page):not(.about-page) .header-favicon {
    width: 40px;
    height: 40px;
    margin-left: 10px;
    vertical-align: middle;
    opacity: 0;
    display: inline-block;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body:not(.landing-page):not(.project-page):not(.about-page) h1:hover .header-favicon,
body:not(.landing-page):not(.project-page):not(.about-page) header:hover .header-favicon {
    opacity: 1;
}

body:not(.landing-page):not(.project-page):not(.about-page) .subtitle {
    color: #DC7C57;
    font-size: 1.1em;
}

body:not(.landing-page):not(.project-page):not(.about-page):not(.playground-page):not(.psych-page) main {
    width: 70%;
    margin-bottom: 40px;
    padding-top: 40px;
}

body:not(.landing-page):not(.project-page):not(.about-page) .project {
    background: #F3EEEB;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(201, 131, 106, 0.1);
    overflow: hidden;
}

.project-header {
    width: 100%;
    background-color: #F3EEEB;
    border: none;
    padding: 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.project-header h2 {
    font-family: "Instrument Serif", serif;
    font-size: 1.8em;
    margin: 0;
    color: #2E7675;
    flex: 1;
    text-align: left;
}

.toggle-icon {
    font-size: 1.5em;
    color: #666;
}

.project.active .toggle-icon {
    transform: rotate(45deg);
}

.project-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    display: block;
    border: none;
}

.project-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    display: block;
}

.project-images-row {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.project-images-row .project-image {
    width: 50%;
    margin: 0;
}

.project-content {
    display: none;
    padding: 0 30px 30px;
    text-align: left;
}

#video-preview {
    position: fixed;
    width: 450px;
    height: 300px;
    background: #F3EEEB;
    overflow: hidden;
    display: none;
    pointer-events: none;
    z-index: 1000;
    box-shadow: none;
}

#video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project.active .project-content {
    display: block;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.tech {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    font-style: italic;
    color: #DC7C57;
    font-size: 0.9em;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.project-link:hover {
    color: #0052a3;
}

.description {
    margin-bottom: 15px;
    color: #444;
    line-height: 1.7;
}

.description ul {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.description li {
    margin-bottom: 8px;
}

.research-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.research-section h3 {
    font-family: "Instrument Serif", serif;
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #2E7675;
}

.research-section h4 {
    font-family: "Instrument Serif", serif;
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2E7675;
}

code {
    background-color: #F3EEEB;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #c7254e;
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .container {
        flex-direction: column;
        gap: 20px;
    }

    header {
        width: 100%;
    }

    main {
        width: 100%;
    }

    h1 {
        font-size: 2em;
    }

    .project-header {
        padding: 20px;
    }

    .project-header h2 {
        font-size: 1.5em;
    }

    .project-content {
        padding: 0 20px 20px 20px;
    }

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ─── NEW PORTFOLIO GRID ────────────────────────────────────────────── */

.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 0;
    position: relative;
    z-index: 5;
}

/* Each tile */
.ptile {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #F0EDEA;
    border: 1px solid rgba(139, 133, 149, 0.12);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(18px);
    transition:
        background 0.3s ease,
        opacity 0.5s ease,
        transform 0.5s ease;
}

.ptile.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ptile:hover {
    background: #EAE5E0;
}

/* Image container — fixed height, image fills it */
.ptile-img-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ptile-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.ptile:hover .ptile-img-wrap img {
    transform: scale(1.02);
}

/* Hero tile — full width, tall image */
.ptile--hero .ptile-img-wrap {
    height: 56vw;
    max-height: 640px;
    min-height: 320px;
}

/* Standard tile image height */
.ptile-row .ptile .ptile-img-wrap {
    height: 36vw;
    max-height: 460px;
    min-height: 220px;
}

/* Meta row below image — always visible */
.ptile-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 2rem 1.5rem;
    border-top: 1px solid rgba(139, 133, 149, 0.15);
    gap: 1rem;
}

.ptile-meta-left {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
}

.ptile-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: #C98338;
    letter-spacing: 0.06em;
    text-transform: lowercase;
}

.ptile-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #3d3a45;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.ptile--hero .ptile-title {
    font-size: 2.25rem;
}

.ptile-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: #6b6575;
    line-height: 1.5;
    margin: 0;
    max-width: 52ch;
}

.ptile-arrow {
    font-size: 1.1rem;
    color: #9b8fa9;
    flex-shrink: 0;
    margin-top: 0.2rem;
    transition: transform 0.2s ease, color 0.2s ease;
    align-self: flex-start;
}

.ptile:hover .ptile-arrow {
    transform: translate(3px, -3px);
    color: #C98338;
}

/* Row layouts */
.ptile-row {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

.ptile-row--50-50 {
    grid-template-columns: 1fr 1fr;
}

.ptile-row--60-40 {
    grid-template-columns: 3fr 2fr;
}

.ptile-row--40-60 {
    grid-template-columns: 2fr 3fr;
}

/* extra breathing room between rows */
.ptile-row {
    padding-bottom: 0.5rem;
}

/* Filter: hide tiles */
.ptile.is-hidden,
.ptile-row.is-hidden {
    display: none;
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ptile-row--60-40,
    .ptile-row--40-60,
    .ptile-row--50-50 {
        grid-template-columns: 1fr;
    }

    .ptile--hero .ptile-img-wrap {
        height: 70vw;
    }

    .ptile-row .ptile .ptile-img-wrap {
        height: 60vw;
    }

    .ptile--hero .ptile-title {
        font-size: 1.75rem;
    }

    .ptile-title {
        font-size: 1.35rem;
    }
}
