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

html {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

html.project-page-scroll {
    scroll-snap-type: y mandatory;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 1000;
    padding: 30px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    overflow: visible;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
    flex-wrap: wrap;
    overflow: visible;
}

.brand {
    font-size: 24px;
    font-weight: bold;
    color: #EC4747;
    letter-spacing: -0.5px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.brand:hover {
    opacity: 0.8;
}

nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    overflow: visible;
}

.nav-link {
    text-decoration: none !important;
    color: #333;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: #EC4747;
    text-decoration: none !important;
}

.nav-link:visited {
    text-decoration: none !important;
}

.nav-link.active {
    text-decoration: underline !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

main {
    margin-top: 0;
    padding: 0;
}

/* Hero Section - Full Page */
.hero-section.full-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0 60px;
    margin-bottom: 0;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Desktop / tablet: video fills the entire hero frame */
    object-fit: cover;
    object-position: center;
    background-color: #000; /* fallback behind video */
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.0125);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Work Section */
.work-section {
    min-height: auto;
    padding: 100px 0 60px;
    max-width: 1600px;
    margin: 0 auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.work-section .project-grid {
    padding: 0 30px;
}

.hero-word {
    font-size: 135px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -2px;
    line-height: 1.1;
    /* Gradient text effect - warm colors only */
    background: linear-gradient(135deg, 
        #EC4747 0%,
        #ff6b6b 12.5%,
        #ff8c42 25%,
        #ffd700 37.5%,
        #ffa500 50%,
        #ff6b9d 62.5%,
        #ff8c69 75%,
        #ff6347 87.5%,
        #EC4747 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-size: 400% 100%;
    animation: gradient-pulse 20s ease-in-out infinite;
    position: relative;
    z-index: 2;
    opacity: 0.9;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
}

@keyframes gradient-pulse {
    0% {
        background-position: 0% 50%;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
    }
    16.66% {
        background-position: 33.33% 50%;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
    }
    33.33% {
        background-position: 66.66% 50%;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
    }
    50% {
        background-position: 100% 50%;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
    }
    66.66% {
        background-position: 133.33% 50%;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
    }
    83.33% {
        background-position: 166.66% 50%;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
    }
    100% {
        background-position: 200% 50%;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
    }
}

.hero-details {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.phonetic {
    font-size: 34px;
    margin-bottom: 25px;
    font-style: italic;
    color: #EC4747;
    position: relative;
    z-index: 2;
    opacity: 0.85;
}

.part-of-speech {
    font-size: 30px;
    margin-bottom: 12px;
    text-transform: lowercase;
    /* Gradient for pronouns - more readable */
    background: linear-gradient(135deg, 
        #ff9999 0%,
        #ff7777 30%,
        #EC4747 50%,
        #ff7777 70%,
        #ff9999 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    background-position: 30% 50%;
    animation: gradient-shift 10s ease infinite;
    position: relative;
    z-index: 2;
    opacity: 0.85;
}

.definition {
    font-size: 34px;
    line-height: 1.6;
    min-height: 1.6em;
    color: #EC4747;
    position: relative;
    z-index: 2;
    opacity: 0.85;
}

.definition.typing::after {
    content: '|';
    animation: blink 1s infinite;
    color: #EC4747;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 20px;
    color: #333;
    line-height: 1.8;
    margin-top: 40px;
}

.hero-description strong {
    font-weight: bold;
    color: #000;
}


.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
}

.project-card {
    aspect-ratio: 16 / 9;
    background: #ffffff;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: #ffffff;
}

.project-card:hover .card-overlay {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.project-card iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.project-card:hover iframe {
    opacity: 0;
}

/* Adjust vehicle image positioning for full view */
.project-card[data-project="10"] {
    background: #e5e5e5;
}

.project-card[data-project="10"] .card-image {
    object-fit: contain;
    object-position: left center;
}

/* White background for ETC Volume Zero */
.project-card[data-project="11"] {
    background: #ffffff;
}

.project-card[data-project="11"] .card-image {
    object-fit: contain;
    background: #ffffff;
    transform: scale(1.1);
}



.project-card:hover .card-image {
    opacity: 0;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #EC4747;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    color: white;
    z-index: 1000;
    pointer-events: none;
}

.card-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 10px;
    color: white;
    line-height: 1.2;
}

.card-description {
    font-size: 16px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.card-link {
    font-size: 14px;
    text-decoration: underline;
    text-decoration-color: white;
    color: white;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.card-link:hover {
    opacity: 0.8;
    text-decoration-color: white;
    text-decoration: underline;
}

.card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #999;
    font-size: 18px;
    font-weight: 300;
}

/* Project Detail Page Styles */

.project-image-section.project-snap-section {
    overflow: visible;
  }
  
.project-detail {
    max-width: 900px;
    margin: 120px auto;
    padding: 0 50px;
}

.project-detail h1 {
    font-size: 48px;
    font-weight: 400;
    margin-bottom: 30px;
    color: #000;
    letter-spacing: -1px;
}

.project-detail .content {
    background-color: white;
    padding: 60px;
    margin-top: 30px;
}

.project-detail p {
    font-size: 18px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .project-detail {
        padding: 0 40px;
    }

    .project-detail .content {
        padding: 50px;
    }
}

@media (max-width: 768px) {
    .project-detail {
        margin-top: 140px;
        padding: 0 30px;
    }

    .project-detail h1 {
        font-size: 36px;
    }

    .project-detail .content {
        padding: 40px 30px;
    }

    .project-detail p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .project-detail {
        margin-top: 130px;
        padding: 0 20px;
    }

    .project-detail h1 {
        font-size: 28px;
    }

    .project-detail .content {
        padding: 30px 20px;
    }
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #EC4747;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.7;
}

/* About and Contact Page Styles */
.page-content {
    max-width: 1600px;
    margin: 120px auto;
    padding: 0 30px;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
}

.about-content-wrapper {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

.about-text {
    flex: 1;
    max-width: 600px;
}

.about-image {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    position: fixed;
    right: 0;
    top: 90px;
    z-index: 1;
}

.about-page-image {
    width: 50vw;
    max-width: 50vw;
    max-height: 100vh;
    height: auto;
    object-fit: contain;
    object-position: right center;
    /* No fade/overlay on the image */
    mask-image: none;
    -webkit-mask-image: none;
}

.page-content h1 {
    font-size: 48px;
    font-weight: 400;
    margin-bottom: 40px;
    color: #000;
    letter-spacing: -1px;
}

.page-content .content {
    background-color: white;
    padding: 0;
    margin-top: 0;
}

.page-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 20px;
}

/* Tablet and below - hide about image */
@media (max-width: 1366px) {
    .about-image {
        display: none;
    }
}

@media (max-width: 1024px) {
    .page-content {
        padding: 0 40px;
    }

    .about-content-wrapper {
        gap: 40px;
    }

    .page-content .content {
        padding: 50px;
    }
}

@media (max-width: 768px) {
    .page-content {
        margin-top: 140px;
        padding: 0 20px;
    }

    .about-content-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .about-text {
        max-width: 100%;
    }

    .about-image {
        display: none;
    }

    .page-content h1 {
        font-size: 36px;
        margin-bottom: 20px;
    }

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

    .page-content p {
        font-size: 16px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .page-content {
        margin-top: 130px;
        padding: 0 20px;
    }

    .about-content-wrapper {
        gap: 15px;
    }

    .page-content h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-content .content {
        padding: 15px 0;
    }

    .page-content p {
        margin-bottom: 10px;
    }
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .header-container {
        max-width: 100%;
        padding: 0 25px;
    }

    .hero-section.full-page {
        padding: 100px 0 40px;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 25px;
    }

    .work-section {
        max-width: 100%;
        padding: 80px 0 0;
    }

    .work-section .project-grid {
        padding: 0 25px;
    }

    .hero-word {
        font-size: 105px;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    header {
        padding: 20px 0;
    }

    .header-container {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        max-width: 100%;
        padding: 0 20px;
    }

    .brand {
        font-size: 22px;
        cursor: pointer;
    }

    nav {
        gap: 20px;
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 13px;
        cursor: pointer;
    }

    /* Mobile: hide hero section completely */
    .hero-section.full-page {
        display: none;
    }

    .hero-video,
    .hero-overlay {
        display: none;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 20px;
    }

    /* Mobile: dark text on white background - override gradient */
    .hero-word {
        background: #000;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        animation: none;
    }

    .phonetic,
    .part-of-speech,
    .definition {
        background: #333;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        animation: none;
    }

    .work-section {
        max-width: 100%;
        padding: 100px 0 0;
    }

    .work-section .project-grid {
        padding: 0 20px;
    }

    .hero-word {
        font-size: 79px;
    }

    .hero-description {
        font-size: 18px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .project-card {
        aspect-ratio: 16/9;
        cursor: pointer;
    }

    .card-placeholder {
        font-size: 16px;
    }
}

/* Responsive Design - Small Mobile */
@media (max-width: 480px) {
    .header-container {
        max-width: 100%;
        padding: 0 15px;
    }

    .brand {
        font-size: 20px;
    }

    nav {
        gap: 15px;
    }

    .nav-link {
        font-size: 12px;
    }

    .hero-section.full-page {
        display: none;
    }

    .hero-video,
    .hero-overlay {
        display: none;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-word {
        font-size: 75px;
        background: #000;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        animation: none;
    }

    .phonetic,
    .part-of-speech,
    .definition {
        background: #333;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        animation: none;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 15px;
    }

    .work-section {
        max-width: 100%;
        padding: 100px 0 0;
    }

    .work-section .project-grid {
        padding: 0 15px;
    }

    .hero-section.full-page {
        display: none;
    }

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

    .work-section {
        padding: 100px 0 0;
    }

    .work-section .project-grid {
        padding: 0 20px;
    }

    .hero-description {
        font-size: 16px;
    }

    .project-grid {
        gap: 12px;
    }
}

/* Project Hero Page Styles */
body.project-page {
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
    padding-top: 100px; /* offset for fixed header */
}

.project-snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    isolation: isolate;
    min-height: auto;
  height: auto;
  align-items: flex-start;   /* stop vertical centering */
  justify-content: center;
  padding: 20px 30px;        /* tighten as needed */
  overflow: visible;
}

.project-hero {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 0;
    margin: 0;
    padding: 0;
}

.project-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.project-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
}

.project-hero-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
}

.project-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.0125);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    z-index: 1;
}

.project-hero-title {
    font-size: 72px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Project Content Section */
.project-content-section {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 30px;
    position: relative;
    z-index: 10;
    isolation: isolate;
    min-height: 100vh;
}

.project-content-wrapper {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    align-items: start;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.project-content-single {
    grid-template-columns: 1fr;
    justify-items: center;
}

.project-content-single .project-description {
    max-width: 1000px;
    text-align: center;
}

.project-content-single .project-content-title {
    text-align: center;
}

.project-content-single .project-content-text {
    text-align: center;
}

.project-content-with-images {
    grid-template-columns: 1fr;
    gap: 60px;
    justify-items: center;
}

.project-description-top {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.project-content-with-images .project-content-title {
    text-align: center;
}

.project-content-with-images .project-content-text {
    text-align: center;
}

.project-content-with-images .project-images-side-by-side {
    max-width: 1200px;
    width: 100%;
}

.project-description {
    max-width: 100%;
    width: 100%;
    text-align: left;
}

.project-content-title {
    font-size: 48px;
    font-weight: 400;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.2;
    letter-spacing: -1px;
    text-align: left;
}

.project-content-text {
    font-size: 18px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 20px;
    text-align: left;
}

.project-services {
    padding-top: 0;
    width: 100%;
    text-align: left;
}

.services-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-list li {
    font-size: 18px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 10px;
}

/* Project Image Sections */
.project-image-section {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    position: relative;
    z-index: 0;
    overflow: visible;
    min-height: auto;
}

.project-image-section:has(.project-resense-grid) {
    padding: 80px 30px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.project-image-section
  .project-image-container:not(.project-sketches-grid):not(.project-images-side-by-side) {
  max-width: 1600px;
  padding: 0;
}

.project-image-section:has(.project-sketches-grid){
    padding: 40px 30px;   /* decreased vertical padding */
}

.project-image-section.project-bleed {
    padding: 0;
    overflow: hidden;
}

.project-image-section.project-bleed .project-image-container {
    max-width: none;
    width: 100vw;
    margin: 0 auto;
    padding: 0;
}

.project-image-section.project-bleed .project-full-image {
    width: 100vw;
    max-width: 100vw;
    height: auto;
    object-fit: cover;
    display: block;
}

.project-image-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.project-image-container:not(.project-images-side-by-side) {
    flex-direction: column;
    gap: 50px;
}

.project-image-container:not(.project-images-side-by-side) .project-full-image {
    margin: 0;
}

/* GCOO single phone image sizing */
.gcoo-phone-image {
    width: auto;
    max-height: 100vh;  /* allow larger phone while still fitting one page */
    height: auto;
    object-fit: contain;
}

/* Slightly smaller variant for specific GCOO screenshots */
.gcoo-phone-image-small {
    width: auto;
    max-height: 75vh;   /* 25% smaller than 100vh */
    height: auto;
    object-fit: contain;
}

/* GCOO card grid */
.gcoo-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1600px;
}

.gcoo-cards-grid .project-full-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.project-images-side-by-side {
    display: flex;
    gap: 140px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.project-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(50% - 70px);
    flex: 0 0 auto;
}

.project-images-side-by-side .project-image-wrapper .project-full-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.project-image-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-align: center;
}

.project-images-side-by-side .project-full-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* Keep standalone videos from overflowing the viewport */
.project-image-section video.project-full-image {
    max-height: 100vh;           /* allow more vertical space */
    max-width: 70vw;             /* prevent over-expansion horizontally */
    width: auto;
    height: auto;
    object-fit: contain;
    transform: scale(1.25);       /* enlarge ~25% */
    transform-origin: center center;
}

.project-full-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}



/* Project Video Section */
.project-video-section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 0;
    margin: 0;
    padding: 0;
}

.project-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin: 0;
    padding: 0;
}

.project-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
}

/* Project Sketches Grid */
.project-sketches-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 1600px;
    padding: 0;     /* inner padding around the 2 images */
    gap: 12px;           /* space between them */
    box-sizing: border-box;
  }
  

.project-resense-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 30px;
    width: 100%;
    max-width: 1600px;
    height: calc(100vh - 260px);
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.project-resense-grid .project-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-resense-grid .project-image-wrapper:first-child {
    grid-column: 1;
    grid-row: 1 / 3;
}

.project-resense-grid .project-image-wrapper:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.project-resense-grid .project-image-wrapper:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.project-resense-grid .project-full-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.project-resense-grid .project-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.project-resense-grid .project-image-wrapper:nth-child(2) .project-full-image,
.project-resense-grid .project-image-wrapper:nth-child(3) .project-full-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-sketch-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transform: none;
  }
  

/* Responsive Project Hero */
@media (max-width: 1024px) {
    .project-hero-title {
        font-size: 56px;
    }

    .project-content-wrapper {
        max-width: 1400px;
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .project-content-title {
        font-size: 40px;
    }
}

/* ===== MOBILE ADJUSTMENTS FOR PROJECT PAGES ===== */
@media (max-width: 768px) {
    /* Tighter padding-top on body to reduce space at top */
    body.project-page {
        padding-top: 70px; /* reduced from 100px */
    }
    
    /* Reduce padding in all snap sections */
    .project-snap-section {
        min-height: auto;
        padding: 15px 20px; /* reduced from 20px 30px */
    }

    /* Hero section - reduce padding */
    .project-hero {
        min-height: 60vh; /* reduced from 100vh */
    }
    
    .project-hero-content {
        padding: 20px; /* reduced from 30px 20px */
    }

    .project-hero-title {
        font-size: 36px; /* reduced from 42px */
        margin-bottom: 0;
    }

    /* Content section - much tighter spacing */
    .project-content-section {
        padding: 30px 20px; /* reduced from 60px 20px */
        min-height: auto;
    }
    
    .project-content-wrapper {
        gap: 30px; /* reduced from default */
    }

    .project-content-title {
        font-size: 28px; /* reduced from 32px */
        margin-bottom: 15px; /* reduced from 30px */
    }

    .project-content-text {
        font-size: 16px;
        line-height: 1.6; /* tighter line height */
        margin-bottom: 12px; /* reduced from 20px */
    }

    .services-title {
        margin-bottom: 12px; /* reduced from 20px */
    }

    .services-list li {
        font-size: 16px;
        margin-bottom: 6px; /* reduced from 10px */
    }

    /* Image sections - reduced padding */
    .project-image-section {
        padding: 20px 15px; /* reduced from 40px 30px */
    }
    
    .project-image-container:not(.project-images-side-by-side) {
        gap: 20px; /* reduced from 50px */
    }

    /* Side by side images */
    .project-images-side-by-side {
        flex-direction: column;
        gap: 15px; /* reduced from 20px */
    }
    
    .project-image-label {
        margin-bottom: 10px; /* reduced from 20px */
    }

    /* Sketches grid */
    .project-sketches-grid {
        grid-template-columns: 1fr;
        gap: 15px; /* reduced from 20px */
    }
    
    .project-image-section:has(.project-sketches-grid) {
        padding: 20px 15px; /* reduced from 40px 30px */
    }
    
    /* Video section */
    .project-video-section {
        min-height: 50vh; /* reduced from 100vh */
    }
}

/* Even tighter for very small phones */
@media (max-width: 480px) {
    body.project-page {
        padding-top: 60px;
    }
    
    .project-snap-section {
        padding: 10px 15px;
    }
    
    .project-hero-content {
        padding: 15px;
    }
    
    .project-hero-title {
        font-size: 32px;
    }
    
    .project-content-section {
        padding: 20px 15px;
    }
    
    .project-content-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .project-content-text {
        font-size: 15px;
        margin-bottom: 10px;
        line-height: 1.5;
    }
    
    .project-image-section {
        padding: 15px 10px;
    }
    
    .project-image-container:not(.project-images-side-by-side) {
        gap: 15px;
    }
    
    .project-images-side-by-side {
        gap: 12px;
    }
}

/* Timeline Styles */
.timeline-container {
    margin-top: 100px;
    min-height: calc(100vh - 100px);
    padding: 0;
}

.timeline-wrapper {
    display: flex;
    min-height: calc(100vh - 100px);
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
}

.timeline-left {
    width: 40%;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.timeline-line {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    min-height: calc(100vh - 100px);
}

.timeline-dot {
    position: absolute;
    left: 0;
}

.timeline-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        #333 15%, 
        #333 85%, 
        transparent 100%);
    z-index: 1;
}

.timeline-dot {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease, opacity 0.3s ease;
    padding: 10px 0;
    transform: translateY(-50%);
}

.timeline-dot-range {
    position: absolute;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
}

.timeline-range-line {
    position: absolute;
    left: 0;
    width: 2px;
    background: #EC4747;
    z-index: 1;
    transition: all 0.3s ease;
    top: 0;
    bottom: 0;
    height: 100%;
}

.timeline-dot-start,
.timeline-dot-end {
    position: absolute;
    left: 0;
    z-index: 3;
}

.timeline-dot-start {
    bottom: 0;
}

.timeline-dot-start::before {
    top: 50%;
    transform: translateY(-50%);
}

.timeline-dot-end {
    top: 0;
}

.timeline-dot-end::before {
    top: 50%;
    transform: translateY(-50%);
}


.timeline-dot::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333;
    border: none;
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    transition: all 0.3s ease;
}

.timeline-dot.active::before {
    width: 24px;
    height: 24px;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: #EC4747;
    border: none;
}

.year-label {
    margin-left: 50px;
    font-size: 14px;
    color: #333;
    font-weight: 400;
    transition: all 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
}

.timeline-dot:first-child .year-label,
.timeline-dot:last-child .year-label {
    opacity: 0.3;
}

.timeline-dot:nth-child(2) .year-label,
.timeline-dot:nth-child(5) .year-label {
    opacity: 0.5;
}

.timeline-dot.active .year-label {
    font-size: 18px;
    font-weight: 600;
    color: #EC4747;
}

.timeline-right {
    width: 60%;
    padding: 0 0 0 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow-y: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    height: calc(100vh - 100px);
}

.timeline-content {
    width: 100%;
    max-width: 600px;
}

.timeline-section {
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    scroll-snap-align: center;
    scroll-snap-stop: normal;
    padding: 40px 0;
}

.timeline-section.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.timeline-section h3 {
    font-size: 36px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.timeline-section p {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
}

.timeline-event {
    margin-bottom: 40px;
}

.timeline-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
    font-weight: 400;
}

.timeline-event-title {
    font-size: 20px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

/* Responsive Timeline */
@media (max-width: 1024px) {
    .timeline-wrapper {
        flex-direction: column;
    }

    .timeline-left {
        width: 100%;
        padding: 40px 30px;
    }

    .timeline-right {
        width: 100%;
        padding: 40px 30px;
    }

    .timeline-line {
        flex-direction: row;
        justify-content: space-around;
        padding: 20px 0;
    }

    .timeline-line::before {
        left: 0;
        right: 0;
        top: 50%;
        width: 100%;
        height: 2px;
        transform: translateY(-50%);
    }

    .timeline-dot {
        flex-direction: column;
        padding: 0 10px;
    }

    .timeline-dot::before {
        left: 50%;
        transform: translateX(-50%);
        top: -8px;
    }

    .timeline-dot.active::before {
        left: 50%;
        transform: translateX(-50%);
        top: -12px;
    }

    .year-label {
        margin-left: 0;
        margin-top: 20px;
        text-align: center;
    }

    .timeline-dot.active .year-label {
        font-size: 24px;
    }
}

/* Hide timeline on mobile */
@media (max-width: 768px) {
    .timeline-container {
        display: none;
    }
}