/* ==========================================
   VARIABLES & RESET
   ========================================== */
:root {
    --black: #000000;
    --off-white: #ffffff;
    --mustard: #ede908;
    --shadow-depth: 4px;

     /* Typography */
    --font-title: "balboa", sans-serif;
    --font-subtitle: "p22-underground", sans-serif;
    --font-paragraph: "quasimoda", sans-serif;
}

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-y: scroll;
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: var(--font-paragraph);
    font-weight: 400;
    font-style: normal;
    background-color: var(--off-white);
    color: var(--black);
    height: 100%;
}

/* Typography styles */
h1, .title {
    font-family: var(--font-title);
    font-weight: 900;
    font-style: normal;
}

h2, h3, .subtitle {
    font-family: var(--font-subtitle);
    font-weight: 600;
    font-style: normal;
}

p, .paragraph {
    font-family: var(--font-paragraph);
    font-weight: 300;
    font-style: normal;
}

/* ==========================================
   LANDING PAGE - FULL SCREEN
   ========================================== */
.landing-page {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1vh 2vw 1vh 2vw;
    justify-content: center;
    gap: 12vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    position: relative;
}

.landing-page::before {
    content: '';
    position: absolute;
    left: 1vw;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--black);
}

/* ==========================================
   PROJECT GRID - 3x3 LAYOUT
   ========================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8vw;
    max-width: 1400px;
    margin: 0 auto;
    flex-shrink: 0;
}

.project-item {
    display: flex;
    flex-direction: column;
    gap: 0.3vh;
}

.project-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
    max-height: 13.2vh;
}

.project-image:hover {
    opacity: 1;
}

#grid1 {
    background-image: url('images/grid/birdbike2.webp');
}

#grid1:hover {
    background-image: url('images/grid/birdbike.webp');
}

#grid2 {
    background-image: url('images/grid/dandelion.gif');
}

#grid2:hover {
    background-image: url('images/grid/liberty.webp');
}

#grid3 {
    background-image: url('images/grid/bestbird.png');
}

#grid3:hover {
    background-image: url('images/grid/bestbird2.webp');
}

#grid4 {
    background-image: url('images/grid/hdm1.2.webp');
}

#grid4:hover {
    background-image: url('images/grid/hdm2.webp');
}

#grid5 {
    background-image: url('images/grid/outsidein.webp');
}

#grid5:hover {
    background-image: url('images/grid/outsidein2.webp');
}

#grid6 {
    background-image: url('images/grid/trainhorse.webp');
}

#grid6:hover {
    background-image: url('images/grid/trainhorse2.webp');
}

#grid7 {
    background-image: url('images/grid/roofless.webp');
}

#grid7:hover {
    background-image: url('images/grid/rooflesschurch2.webp');
}

#grid8 {
    background-image: url('images/grid/backpabinet.webp');
}

#grid8:hover {
    background-image: url('images/grid/backpabinet2.webp');
}

.project-index {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--black);
    font-weight: 600;
}

/* Name Square - Upper Right */
.name-item {
    cursor: default;
}

.name-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--mustard);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}

.name-square h1 {
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: var(--black);
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
}

/* ==========================================
   PROJECT DESCRIPTIONS - FOUR COLUMNS
   ========================================== */
.project-descriptions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8vw;
    padding: 0.8vh 0 0 0;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.description-column {
    display: flex;
    flex-direction: column;
    gap: 1vh;
    align-items: flex-start;
}

.description-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.desc-index {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--black);
    font-weight: 600;
    margin-bottom: 0.2vh;
}

.description-item h3 {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.2vh;
    line-height: 1.2;
}

.description-item p {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* ==========================================
   PROJECTS SECTIONS - VERTICAL SNAP SCROLL
   ========================================== */
.project-section {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    position: relative;
}

/* White sidebar with project title */
.project-sidebar {
    width: 5vw;
    height: 100vh;
    background: var(--off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.project-sidebar::before {
    content: '';
    position: absolute;
    left: 20%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--black);
}

.project-sidebar h2 {
    font-size: 1.2rem;
    color: var(--black);
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transform: rotate(-90deg);
    transform-origin: center center;
}

/* Main content area - 95vw */
.project-content-area {
    width: 95vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 3vh 3vw;
}

/* Featured media with margins - clickable */
.project-unit-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
    position: relative;
}

.project-unit-media:hover {
    opacity: 0.95;
}

.project-unit-media video,
.project-unit-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Grid gallery view */
.gallery-grid {
    width: 100%;
    height: 100%;
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    overflow-y: auto;
    padding: 2rem;
}

.gallery-grid.active {
    display: grid;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.gallery-item:hover {
    border-color: var(--mustard);
    transform: scale(1.02);
}

.gallery-item.video::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Title box in gallery */
.gallery-item.title-box {
    background-color: #ede908;
    background-image: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gallery-item.title-box h3 {
    font-size: 1.2rem;
    color: var(--black);
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

/* Project description display */
.project-description-display {
    max-width: 800px;
    padding: 2rem;
    overflow-y: auto;
    max-height: 100%;
}

.project-description-display h2 {
    font-size: 2rem;
    color: var(--black);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.project-description-display .description-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--black);
}

.project-description-display .description-text a {
    color: var(--black);
    text-decoration: underline;
}

.project-description-display .description-text a:hover {
    opacity: 0.7;
}

/* Single media view in gallery */
.single-media-view {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
}

.single-media-view.active {
    display: flex;
}

.single-media-view video,
.single-media-view img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Video skip controls - appear on hover */
.video-skip-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.single-media-view:hover .video-skip-controls {
    opacity: 1;
    pointer-events: auto;
}

.skip-button {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skip-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.skip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    transition: border-color 0.2s ease;
}

.skip-button:hover .skip-icon {
    border-color: rgba(255, 255, 255, 0.7);
}

.skip-text {
    font-size: 0.85rem;
}

/* Media caption in upper right */
.single-media-view .media-caption {
    position: absolute;
    top: 2rem;
    right: 2rem;
    max-width: 300px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--black);
    z-index: 10;
}

.single-media-view .media-caption a {
    color: var(--black);
    text-decoration: underline;
}

.single-media-view .media-caption a:hover {
    opacity: 0.7;
}

/* Back to grid button */
.back-to-grid {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 40px;
    height: 40px;
    background: var(--mustard);
    border: 2px solid var(--black);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: all 0.2s ease;
}

.back-to-grid.active {
    display: flex;
}

.back-to-grid:hover {
    transform: scale(1.1);
}

.back-to-grid svg {
    width: 24px;
    height: 24px;
    fill: var(--black);
}

/* ==========================================
   FLOATING CONTROLS - PROJECT SECTIONS ONLY
   ========================================== */
.floating-controls {
    position: fixed;
    bottom: 3vh;
    right: 3vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    background-color: #ede908;
    padding: 2rem 1.25rem;
    border-radius: 4px;
    z-index: 100;
}

/* Mobile styles - horizontal layout at bottom */
@media (max-width: 768px) {
    .floating-controls {
        top: auto;
        bottom: 2vh;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 1.5rem;
        padding: 0.75rem 1.5rem;
    }
    
    .control-label {
        font-size: 0.6rem;
        margin-bottom: 0.5rem;
    }
    
    .toggle-button {
        width: 28px;
        height: 28px;
    }
    
    .toggle-status,
    .dial-value,
    .zoom-value {
        font-size: 0.6rem;
        margin-top: 0.5rem;
    }
    
    .dial {
        width: 28px;
        height: 28px;
    }
    
    .dial-container {
        margin-bottom: 0.5rem;
    }
    
    /* Zoom slider horizontal on mobile */
    .slider-container {
        width: 60px;
        height: 28px;
        margin-bottom: 0.5rem;
    }
    
    .zoom-slider {
        width: 60px;
        height: 4px;
        transform: rotate(0deg);
    }
}

.control-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.control-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.05em;
    margin-top: 0.75rem;
}

/* Audio toggle button */
.audio-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.audio-toggle.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.toggle-button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 35px;
    height: 35px;
    position: relative;
    font-family: inherit;
}

.toggle-button .button-face {
    display: block;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    transition: all 0.05s ease;
}

.toggle-button .toggle-on {
    background-image: url('images/buttons/button-pressed.png');
}

.toggle-button .toggle-off {
    background-image: url('images/buttons/button-unpressed.png');
}

.toggle-status {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--black);
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.75rem;
}

/* Volume dial */
.volume-control {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.volume-control.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.volume-control.disabled .dial-value {
    color: #999;
}

.dial-container {
    position: relative;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.dial {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-image: url('images/buttons/dial.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    cursor: grab;
    transition: transform 0.05s ease;
    transform: rotate(-135deg);
}

.dial:active {
    cursor: grabbing;
}

.dial-indicator {
    display: none;
}

.dial-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.05em;
}

/* Zoom slider */
.zoom-control {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.zoom-control.disabled .control-label,
.zoom-control.disabled .zoom-value {
    opacity: 0.3;
    color: #999;
}

.slider-container {
    position: relative;
    width: 35px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.zoom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: var(--black);
    outline: none;
    transform: rotate(-90deg);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.zoom-slider:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #999;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background-image: url('images/buttons/slider.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.zoom-slider:disabled::-webkit-slider-thumb {
    opacity: 0.3;
    cursor: not-allowed;
}

.zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background-image: url('images/buttons/slider.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    border: none;
}

.zoom-slider:disabled::-moz-range-thumb {
    opacity: 0.3;
    cursor: not-allowed;
}

.zoom-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
}

.zoom-control.disabled .zoom-value {
    opacity: 0.3;
    color: #999;
}

/* ==========================================
   BIO SECTION - SCROLLABLE BELOW
   ========================================== */
.bio-section {
    height: 100vh;
    min-height: 100vh;
    background-color: var(--black);
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

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

.bio-content h2 {
    font-size: 1.5rem;
    color: var(--mustard);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.bio-content p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--off-white);
}