/* =========================================
   GENERAL
========================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #0b0b0b;
    color: #ffffff;
    line-height: 1.6;
}


/* =========================================
   NAVBAR
========================================= */

nav {
    max-width: 1200px;
    margin: auto;
    padding: 30px 40px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}

.logo:visited,
.logo:hover {
    color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.25s;
}

.nav-links a:hover {
    color: #ffffff;
}


/* =========================================
   HOME PAGE HERO
========================================= */

.hero {
    max-width: 1200px;
    margin: auto;
    padding: 140px 40px 180px;

    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 60px;
}

.subtitle {
    margin-bottom: 20px;

    color: #888888;
    font-size: 18px;
}

.hero h1 {
    max-width: 950px;

    font-size: clamp(48px, 7vw, 90px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -3px;
}

.hero h1 span {
    color: #777777;
}

.hero-description {
    max-width: 600px;
    margin-top: 30px;

    color: #aaaaaa;
    font-size: 20px;
}


/* =========================================
   BUTTONS
========================================= */

.buttons {
    display: flex;
    gap: 15px;

    margin-top: 40px;
}

.buttons a,
.primary-button,
.secondary-button,
.resume-button {
    display: inline-block;

    padding: 14px 24px;

    border-radius: 8px;

    font-weight: 500;
    text-decoration: none;
}

.primary-button {
    background: #ffffff;
    color: #000000;
}

.primary-button:hover {
    background: #dddddd;
}

.secondary-button,
.resume-button {
    border: 1px solid #444444;
    color: #ffffff;
    background: transparent;
}

.secondary-button:hover,
.resume-button:hover {
    background: #171717;
}


/* =========================================
   HERO PHOTO
========================================= */

.hero-photo {
    width: min(100%, 560px);
    max-width: 100%;

    justify-self: end;

    overflow: hidden;

    border: 1px solid #333333;
    border-radius: 12px;
}

.hero-photo img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;
}


/* =========================================
   PROJECT SECTION
========================================= */

.projects-section {
    max-width: 1200px;
    margin: auto;
    padding: 100px 40px;
}

.section-label {
    color: #777777;
    font-size: 13px;
    letter-spacing: 2px;
}

.projects-section h2 {
    margin: 10px 0 50px;

    color: #ffffff;
    font-size: 48px;
}


/* =========================================
   PROJECT GRID
========================================= */

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


/* =========================================
   PROJECT CARDS
========================================= */

.project-card {
    overflow: hidden;

    border: 1px solid #222222;
    border-radius: 16px;

    background: #121212;

    transition:
        transform 0.3s,
        border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: #555555;
}


/* =========================================
   PROJECT CARD IMAGES
========================================= */

.project-image {
    height: 330px;

    overflow: hidden;

    background: #1c1c1c;
}

.project-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.4s;
}

.project-card:hover .project-image img {
    transform: scale(1.03);
}


/* =========================================
   PROJECT CARD TEXT
========================================= */

.project-info {
    padding: 28px;
}

.project-category {
    margin-bottom: 8px;

    color: #666666;
    font-size: 12px;
    letter-spacing: 1.5px;
}

.project-info h3 {
    margin-bottom: 10px;

    color: #ffffff;
    font-size: 28px;
}

.project-info p {
    color: #aaaaaa;
}

.project-info a {
    display: inline-block;

    margin-top: 20px;

    color: #ffffff;
    text-decoration: none;
}


/* =========================================
   INTERACTIVE CAD MODEL
========================================= */

.project-model {
    position: relative;

    width: 100%;
    height: 330px;

    overflow: hidden;

    background-color: #181818;
}

.project-model model-viewer {
    display: block;

    width: 100%;
    height: 100%;

    background-color: #181818;

    --poster-color: #181818;
}

.model-instructions {
    position: absolute;
    right: 14px;
    bottom: 12px;

    margin: 0;
    padding: 7px 11px;

    border-radius: 5px;

    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;

    font-size: 12px;

    pointer-events: none;
}

.model-error {
    padding: 20px;

    background: #181818;
    color: #ffffff;

    text-align: center;
}


/* =========================================
   ABOUT SECTION
========================================= */

.about-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px 140px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text h2 {
    margin: 10px 0 45px;

    color: #ffffff;
    font-size: 48px;
    line-height: 1.1;
}

.about-text > p:last-child {
    max-width: 600px;

    color: #aaaaaa;
    font-size: 20px;
    line-height: 1.8;
}

.about-photo {
    width: 100%;

    overflow: hidden;

    border: 1px solid #222222;
    border-radius: 14px;
}

.about-photo img {
    display: block;

    width: 100%;
    height: auto;
}


/* =========================================
   STANDARD PROJECT PAGE HERO
========================================= */

.project-page-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 40px 70px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.project-page-title h1 {
    margin: 15px 0 25px;

    color: #ffffff;
    font-size: clamp(45px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.project-page-summary {
    color: #aaaaaa;
    font-size: 18px;
    line-height: 1.7;
}


/* =========================================
   STANDARD PROJECT HERO IMAGE
========================================= */

.project-hero-image {
    width: 100%;
    height: 350px;

    overflow: hidden;

    border-radius: 16px;

    background: #171717;
}

.project-hero-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================
   STANDARD PROJECT OVERVIEW
========================================= */

.project-content {
    max-width: 850px;
    margin: 0 auto;
    padding: 80px 40px;
}

.project-content h2 {
    margin: 10px 0 25px;

    color: #ffffff;
    font-size: 40px;
    line-height: 1.15;
}

.project-text {
    margin-bottom: 20px;

    color: #aaaaaa;
    font-size: 18px;
    line-height: 1.8;
}


/* =========================================
   STANDARD PROJECT IMAGE + TEXT
========================================= */

.project-split {
    max-width: 1000px;
    margin: 0 auto;
    padding: 70px 40px;

    display: grid;
    grid-template-columns: 45% 55%;
    gap: 50px;
    align-items: center;
}

.project-split-image {
    width: 100%;
    height: 300px;

    overflow: hidden;

    border-radius: 14px;

    background: #171717;
}

.project-split-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.project-split-text h2 {
    margin: 10px 0 20px;

    color: #ffffff;
    font-size: 36px;
    line-height: 1.15;
}

.project-split-text p {
    margin-bottom: 18px;

    color: #aaaaaa;
    font-size: 17px;
    line-height: 1.75;
}


/* =========================================
   STANDARD PROJECT PHOTO GALLERY
========================================= */

.project-gallery-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 40px;
}

.project-gallery-section h2 {
    margin: 10px 0 35px;

    color: #ffffff;
    font-size: 40px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.project-gallery img {
    width: 100%;
    height: 220px;

    border-radius: 12px;

    object-fit: cover;

    transition: transform 0.25s ease;
}

.project-gallery img:hover {
    transform: scale(1.02);
}


/* =========================================
   STANDARD PROJECT BACK BUTTON
========================================= */

.project-back {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 40px 90px;
}

.project-back a {
    color: #ffffff;
    font-size: 17px;
    text-decoration: none;
}

.project-back a:hover {
    opacity: 0.65;
}


/* =========================================
   L-GUARD PROJECT PAGE
========================================= */

.lguard-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 50px 0 90px;
}


/* =========================================
   L-GUARD BACK LINK
========================================= */

.lguard-page > .project-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    width: auto;
    max-width: none;

    margin: 0 0 50px;
    padding: 0;

    color: #aaaaaa;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.lguard-page > .project-back:hover {
    color: #ffffff;
}

.lguard-page > .project-back span {
    font-size: 23px;
}


/* =========================================
   L-GUARD HERO
========================================= */

.lguard-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;

    margin-bottom: 80px;
}

.project-label {
    margin: 0 0 14px;

    color: #777777;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.lguard-hero h1 {
    margin: 0 0 24px;

    color: #ffffff;
    font-size: clamp(48px, 7vw, 88px);
    line-height: 0.95;
    letter-spacing: -4px;
}

.lguard-hero-text {
    max-width: 560px;
    margin: 0;

    color: #aaaaaa;
    font-size: 18px;
    line-height: 1.75;
}

.lguard-hero-image {
    width: 100%;
    min-height: 500px;

    overflow: hidden;

    border: 1px solid #222222;
    border-radius: 14px;

    background-color: #171717;
}

.lguard-hero-image img {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 500px;

    object-fit: cover;
}


/* =========================================
   L-GUARD FULL-WIDTH IMAGE
========================================= */

.lguard-banner {
    width: 100%;
    height: 480px;

    margin-bottom: 32px;

    overflow: hidden;

    border: 1px solid #222222;
    border-radius: 14px;

    background-color: #171717;
}

.lguard-banner img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================
   L-GUARD PROJECT HIGHLIGHTS
========================================= */

.project-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;

    margin-bottom: 110px;
}

.highlight-card {
    padding: 28px;

    border: 1px solid #222222;
    border-radius: 12px;

    background-color: #121212;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.highlight-card:hover {
    transform: translateY(-4px);
    border-color: #555555;
}

.highlight-card h3 {
    margin: 0 0 10px;

    color: #ffffff;
    font-size: 18px;
}

.highlight-card p {
    margin: 0;

    color: #aaaaaa;
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================
   L-GUARD TECHNICAL DETAILS
========================================= */

.lguard-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;

    margin-bottom: 110px;
}

.lguard-details h2,
.gallery-section h2 {
    margin: 0 0 24px;

    color: #ffffff;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.lguard-details p {
    margin: 0 0 20px;

    color: #aaaaaa;
    font-size: 17px;
    line-height: 1.75;
}

.lguard-details ul {
    margin: 28px 0 0;
    padding-left: 20px;

    color: #aaaaaa;
    line-height: 1.9;
}

.lguard-details li::marker {
    color: #ffffff;
}

.lguard-detail-image {
    width: 100%;
    min-height: 540px;

    overflow: hidden;

    border: 1px solid #222222;
    border-radius: 14px;

    background-color: #171717;
}

.lguard-detail-image img {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 540px;

    object-fit: cover;
}


/* =========================================
   L-GUARD PHOTO GALLERY
========================================= */

.gallery-section {
    margin-bottom: 80px;
}

.gallery-heading {
    max-width: 700px;
    margin-bottom: 40px;
}

.gallery-heading p {
    margin: 0;

    color: #aaaaaa;
    font-size: 17px;
    line-height: 1.7;
}

.photo-gallery {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.75fr;
    gap: 20px;
}

.gallery-image {
    height: 370px;

    overflow: hidden;

    border: 1px solid #222222;
    border-radius: 12px;

    background-color: #171717;
}

.gallery-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.35s ease;
}

.gallery-image:hover img {
    transform: scale(1.035);
}


/* =========================================
   L-GUARD BOTTOM NAVIGATION
========================================= */

.project-bottom-navigation {
    display: flex;
    justify-content: center;

    padding-top: 20px;
}

.project-bottom-navigation .primary-button {
    display: inline-block;

    padding: 14px 24px;

    border-radius: 8px;

    background-color: #ffffff;
    color: #000000;

    font-weight: 500;
    text-decoration: none;
}

.project-bottom-navigation .primary-button:hover {
    background-color: #dddddd;
}


/* =========================================
   FOOTER
========================================= */

footer {
    padding: 40px 25px;

    border-top: 1px solid #1f1f1f;

    color: #777777;
    text-align: center;
}


/* =========================================
   TABLET AND MOBILE
========================================= */

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-photo {
        width: 100%;
        max-width: 550px;

        margin-top: 40px;

        justify-self: start;
    }
}


@media (max-width: 850px) {

    .lguard-hero,
    .lguard-details {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .lguard-hero-image,
    .lguard-hero-image img,
    .lguard-detail-image,
    .lguard-detail-image img {
        min-height: 420px;
    }

    .project-highlights {
        grid-template-columns: 1fr;
        margin-bottom: 80px;
    }

    .photo-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .photo-gallery .gallery-image:first-child {
        grid-column: 1 / -1;
    }
}


@media (max-width: 800px) {

    nav {
        padding: 25px;
    }

    .nav-links {
        gap: 18px;
    }

    .hero {
        padding: 90px 25px 120px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .projects-section {
        padding-left: 25px;
        padding-right: 25px;
    }

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

    .about-section {
        grid-template-columns: 1fr;
        gap: 45px;

        padding-left: 25px;
        padding-right: 25px;
    }

    .about-text h2 {
        font-size: 40px;
    }

    .project-page-hero {
        grid-template-columns: 1fr;
        padding-top: 70px;
    }

    .project-hero-image {
        height: 300px;
    }

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

    .project-split-image {
        height: 280px;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .project-gallery img {
        height: 280px;
    }

    .project-page-hero,
    .project-content,
    .project-split,
    .project-gallery-section {
        padding-left: 25px;
        padding-right: 25px;
    }
}


@media (max-width: 560px) {

    .lguard-page {
        width: min(100% - 24px, 1180px);
        padding-top: 30px;
    }

    .lguard-hero {
        margin-bottom: 55px;
    }

    .lguard-hero h1 {
        letter-spacing: -2px;
    }

    .lguard-hero-image,
    .lguard-hero-image img {
        min-height: 340px;
    }

    .lguard-banner {
        height: 300px;
    }

    .lguard-detail-image,
    .lguard-detail-image img {
        min-height: 380px;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
    }

    .photo-gallery .gallery-image:first-child {
        grid-column: auto;
    }

    .gallery-image {
        height: 310px;
    }
}
/* Force L-Guard titles to white */

.lguard-hero h1,
.lguard-details h2,
.gallery-section h2 {
    color: #ffffff !important;
}
/* Make L-Guard highlight bubbles grey */

.highlight-card {
    background-color: #242424 !important;
    border-color: #3a3a3a !important;
}

.highlight-card h3 {
    color: #ffffff !important;
}

.highlight-card p {
    color: #b8b8b8 !important;
}
/* Wider layout across the website */
nav,
.hero,
.projects-section,
.about-section,
.project-page-hero,
.project-content,
.project-split,
.project-gallery-section,
main > .project-back,
.lguard-page {
    width: 95%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Keep columns within the available width */
@media (min-width: 801px) {
    .project-split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* Comfortable margins on smaller screens */
@media (max-width: 800px) {
    nav,
    .hero,
    .projects-section,
    .about-section,
    .project-page-hero,
    .project-content,
    .project-split,
    .project-gallery-section,
    main > .project-back {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    .lguard-page {
        width: calc(100% - 40px);
    }
}
/* Show the complete casting photo */
.casting-section .project-split-image {
    height: auto;
}

.casting-section .project-split-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Text left, photo right on desktop */
@media (min-width: 801px) {
    .casting-section .project-split-text {
        grid-column: 1;
        grid-row: 1;
    }

    .casting-section .project-split-image {
        grid-column: 2;
        grid-row: 1;
    }
}
/* Show full images without cropping */
.project-split .project-split-image {
    height: auto !important;
}

.project-split .project-split-image img {
    display: block;
    width: 100%;
    height: auto !important;
    object-fit: contain;
}

/* Desktop: alternate image placement */
@media (min-width: 801px) {
    /* First, third, fifth: image right */
    .project-split .project-split-text {
        grid-column: 1;
        grid-row: 1;
    }

    .project-split .project-split-image {
        grid-column: 2;
        grid-row: 1;
    }

    /* Second, fourth, sixth: image left */
    :nth-child(even of .project-split) .project-split-image {
        grid-column: 1;
    }

    :nth-child(even of .project-split) .project-split-text {
        grid-column: 2;
    }
}
/* Mobile: text above image */
@media (max-width: 800px) {
    .project-split .project-split-text {
        grid-column: 1;
        grid-row: 1;
    }

    .project-split .project-split-image {
        grid-column: 1;
        grid-row: 2;
    }
}

/* Enlarge homepage hero photo */
@media (min-width: 901px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) 650px !important;
    }

    .hero-photo {
        width: 650px !important;
        max-width: none !important;
        justify-self: end !important;
    }

    .hero-photo img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }
}
