:root {
    /* Softened warm charcoal dark theme (less harsh than #121212) */
    --bg: #222120; 
    --text: #dedad4;
    --secondary-text: #9e9992;
    --orb-1: rgba(80, 145, 235, 0.05);
    --orb-2: rgba(140, 80, 190, 0.04);
}

body.warm-page {
    /* Slightly softened warm beige so the dark-to-light transition is easy on the eyes */
    --bg: #ebe5dc;
    --text: #33312e;
    --secondary-text: #6e6a64;
    --orb-1: rgba(214, 122, 69, 0.12);
    --orb-2: rgba(184, 134, 75, 0.10);
}

.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg);
    transition: background-color 0.25s ease;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    transition: background 0.25s ease;
}

.orb-1 {
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, var(--orb-1) 0%, transparent 75%);
    top: -20%;
    left: -10%;
    animation: breatheOne 80s infinite ease-in-out;
}

.orb-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--orb-2) 0%, transparent 75%);
    bottom: -20%;
    right: -10%;
    animation: breatheTwo 60s infinite ease-in-out;
}

@keyframes breatheOne {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15vw, 10vh) scale(1.05); }
}

@keyframes breatheTwo {
    0%, 100% { transform: translate(0, 0) scale(1.1); }
    50% { transform: translate(-10vw, -15vh) scale(1); }
}

/* Snappy Page Transition Animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.02s; }
.delay-2 { animation-delay: 0.05s; }
.delay-3 { animation-delay: 0.08s; }
.delay-4 { animation-delay: 0.12s; }

.page-content { display: none; }
.page-content.active { display: block; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, background-color 0.25s ease, color 0.2s ease;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Fixed Static Header Bar (pointer-events: none makes the empty middle space click-through) */
nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 32px 48px;
    box-sizing: border-box;
    pointer-events: none;
}

@media (max-width: 640px) {
    nav {
        padding: 24px 24px;
    }
}

.logo,
.nav-right {
    pointer-events: auto;
}

.logo {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: -0.3px;
    margin: 0;
    color: var(--text);
    text-transform: lowercase;
    cursor: pointer;
}

.nav-right {
    display: flex;
    gap: 28px;
    align-items: center;
}

.link-small {
    font-size: 0.7rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.2s ease, color 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.link-small:hover { opacity: 0.5; }

/* Main Container */
.container {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 180px 48px 24px 48px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (max-width: 640px) {
    .container {
        padding: 130px 24px 20px 24px;
    }
}

/* Disruptive Off-Grid Hero Placement */
.hero {
    display: block;
    margin-top: -74px;
    margin-bottom: 234px;
    margin-left: 90%;
}

.description {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-style: italic;
    line-height: 1.35;
    font-size: 0.65rem;
    letter-spacing: 0.2px;
    text-align: left;
    margin: 0;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}

@media (min-width: 768px) {
    .project-grid { grid-template-columns: 1fr 1fr; }
}

.project-item {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #2c2b29;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Subtle, tiny bottom-left project title under each thumbnail */
.thumb-caption {
    display: block;
    margin-top: 8px;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--secondary-text);
    opacity: 0.45;
    text-align: left;
    letter-spacing: 0.3px;
    line-height: 1.2;
    transition: opacity 0.2s ease;
}

.project-item:hover .thumb-caption {
    opacity: 0.7;
}

/* =========================================================
   PROJECT DETAIL PAGE:
   Everything (Back link, Video, and Text Grid below) locks
   to the exact rendered width of the centered video.
   ========================================================= */
.project-detail {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding-top: 80px;
}

.back-link {
    background: none;
    border: none;
    color: var(--secondary-text);
    font-size: 0.75rem;
    font-weight: 400;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    display: block;
    text-align: left;
}

.back-link:hover {
    color: var(--text);
}

.video-container {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 48px 0;
    background: transparent;
}

.video-container video {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    display: block;
    border: none;
}

/* Asymmetric Grid: Matches the exact width of the video above it */
.project-asymmetric-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 680px) {
    .project-asymmetric-grid {
        /* 34% left column + 1fr right column scales cleanly to narrow 3:4 videos AND wide 16:9 videos */
        grid-template-columns: minmax(150px, 34%) 1fr;
        gap: clamp(28px, 6%, 72px);
        align-items: start;
    }

    .project-left {
        position: sticky;
        top: 120px;
    }
}

.project-left h2,
.about-content h2 {
    font-size: 1.65rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.project-date {
    display: block;
    font-size: 0.82rem;
    color: var(--secondary-text);
    margin-bottom: 28px;
}

/* =========================================================
   THEME & PRACTICE TABLE (Saved in code, hidden for now!)
   Delete "display: none;" below whenever you want it back.
   ========================================================= */
.spec-table {
    display: none;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.spec-table th {
    text-align: left;
    font-weight: 400;
    color: var(--secondary-text);
    padding: 6px 12px 6px 0;
    width: 38%;
    vertical-align: top;
}

.spec-table td {
    text-align: left;
    color: var(--text);
    padding: 6px 0;
    line-height: 1.4;
}

/* Right Column: Description Text */
.project-right {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.text-block p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--secondary-text);
    margin: 0 0 20px 0;
}

.text-block p:last-child {
    margin-bottom: 0;
}

/* Optional Stills Stream (Ready for future use if needed) */
.stills-stream {
    display: flex;
    flex-direction: column;
    gap: 72px;
    width: 100%;
}

.still {
    margin: 0;
    width: 100%;
}

.still img {
    width: 100%;
    height: auto;
    display: block;
    background-color: rgba(0, 0, 0, 0.05);
}

.still figcaption {
    font-size: 0.78rem;
    color: var(--secondary-text);
    line-height: 1.55;
    margin-top: 10px;
}

.still-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    width: 100%;
}

@media (min-width: 640px) {
    .still-row {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        align-items: start;
    }

    .still.size-full   { width: 100%; }
    .still.size-large  { width: 76%; }
    .still.size-medium { width: 56%; }
    .still.size-small  { width: 38%; }

    .still.size-medium.caption-left,
    .still.size-medium.caption-right { width: 78%; }
    .still.size-small.caption-left,
    .still.size-small.caption-right  { width: 58%; }

    .still.align-left   { margin-left: 0; margin-right: auto; }
    .still.align-center { margin-left: auto; margin-right: auto; }
    .still.offset-right { margin-left: 16%; margin-right: auto; }
    .still.align-right  { margin-left: auto; margin-right: 0; }

    .still.caption-left,
    .still.caption-right {
        display: grid;
        gap: 24px;
        align-items: end;
    }

    .still.caption-left {
        grid-template-columns: 170px 1fr;
    }

    .still.caption-left figcaption {
        order: -1;
        margin-top: 0;
        text-align: right;
    }

    .still.caption-right {
        grid-template-columns: 1fr 170px;
    }

    .still.caption-right figcaption {
        margin-top: 0;
        text-align: left;
    }
}

/* About Page Styling */
.about-content {
    max-width: 600px;
    margin-top: 20px;
}

.about-content h2 {
    margin-bottom: 24px;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--secondary-text);
    margin-bottom: 24px;
}

/* Separated, Tiny All-Lowercase Footer & Copyright */
.footer {
    margin-top: auto; 
    padding-top: 220px;
    padding-bottom: 12px;
    display: flex;
    justify-content: flex-start;
}

.copyright {
    font-size: 0.5rem;
    color: var(--secondary-text);
    opacity: 0.3; 
    text-transform: lowercase; 
    letter-spacing: 1px;
    line-height: 1;
    margin: 0;
}