/* ============================================
   FONTS
   ============================================ */

@font-face {
    font-family: 'NB Akademie Pro';
    src: url('fonts/NB Akademie Pro - Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NB Akademie Pro';
    src: url('fonts/NB Akademie Pro - Light Italic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'NB Akademie Pro';
    src: url('fonts/NB Akademie Pro - Book.otf') format('opentype');
    font-weight: 350;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NB Akademie Pro';
    src: url('fonts/NB Akademie Pro - Book Italic.otf') format('opentype');
    font-weight: 350;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'NB Akademie Pro';
    src: url('fonts/NB Akademie Pro - Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NB Akademie Pro';
    src: url('fonts/NB Akademie Pro - Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* ============================================
   DESIGN SYSTEM & VARIABLES
   ============================================ */

:root {
    /* Colors */
    --color-white: #E6E6E6;
    --color-black: #090C0F;
    --color-gray-1: #333333;
    --color-gray-2: #434343;
    --color-gray-3: #666666;
    --color-gray-4: #999999;
    --color-gray-5: #CCCCCC;
    --color-gray-6: #E6E6E6;

    /* Typography */
    --font-family: 'NB Akademie Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-book: 350;
    --font-weight-regular: 400;

    /* Type scale — body */
    --text-xs: 0.875rem;    /* 14px — Small Text, Book */
    --text-base: 1.125rem;  /* 18px — Text, Book */

    /* Type scale — headings */
    --text-h-xs: 1.25rem;   /* 20px — H x-small, Book */
    --text-h-sm: 1.5rem;    /* 24px — H small, Regular */
    --text-h-md: 1.875rem;  /* 30px — H medium, Regular */
    --text-display: 3.75rem; /* 60px — Display/Hero */
    --text-h-lg: 2.5rem;    /* 40px — H large, Regular */

    /* Line heights */
    --lh-display: 1.1;      /* 110% — hero/display */
    --lh-heading: 1.2;      /* 120% — h2, h3 */
    --lh-body: 1.25;        /* 125% — body text */

    /* Letter spacing */
    --ls-base: -0.02em;     /* -2% — body & H x-small */
    --ls-link: -0.03em;     /* -3% — links & H small */
    --ls-tight: -0.04em;    /* -4% — H medium & H large */

    /* Grid */
    --grid-margin: 1.5rem;      /* 24px — desktop side margin */
    --grid-gutter: 1.5rem;      /* 24px — desktop column gutter */
    --grid-margin-sm: 0.5rem;   /* 8px  — mobile side margin */
    --grid-gutter-sm: 0.5rem;   /* 8px  — mobile column gutter */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Breakpoints */
    --bp-mobile: 375px;
    --bp-tablet: 768px;
    --bp-desktop: 1024px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

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

body {
    font-family: var(--font-family);
    background-color: var(--color-black);
    color: var(--color-white);
    font-size: var(--text-base);
    line-height: var(--lh-body);
    letter-spacing: var(--ls-base);
}

h1, h2, h3, h4, h5, h6 {
    line-height: var(--lh-heading);
    margin-bottom: var(--spacing-md);
}

/* H large — 60px, Regular, −4%, 110% lh */
h1 {
    font-size: clamp(var(--text-h-sm), 5vw, var(--text-display));
    font-weight: var(--font-weight-book);
    line-height: var(--lh-display);
    letter-spacing: var(--ls-tight);
}

/* H small — 24px, Regular, −3% */
h2 {
    font-size: var(--text-h-sm);
    font-weight: var(--font-weight-book);
    letter-spacing: var(--ls-link);
}

/* Text — 17px, Book, −2% */
h3 {
    font-size: var(--text-base);
    font-weight: var(--font-weight-book);
    letter-spacing: var(--ls-base);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
    font-size: var(--text-base);
    line-height: var(--lh-body);
    letter-spacing: var(--ls-base);
}

a {
    color: inherit;
    text-decoration: none;
    letter-spacing: var(--ls-link);
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(9, 12, 15, 0.98);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md) var(--grid-margin-sm);
    transition: transform 0.3s ease;
    will-change: transform;
}

/* Slides the navbar off-screen when scrolling down */
.navbar.nav-hidden {
    transform: translateY(-110%);
}

/* Mobile: 3-column grid — OK 50%, Projects 25%, About 25% */
.nav-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: contents;
}

.nav-logo,
.nav-link {
    color: var(--color-white);
    font-size: var(--text-base);
    font-weight: var(--font-weight-book);
    letter-spacing: var(--ls-base);
    background: none;
    padding: 0;
}

.nav-logo:hover,
.nav-link:hover,
.nav-link.active {
    text-decoration: line-through;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet+ Navigation — keep the original 12-column grid + dark navbar look */
@media (min-width: 768px) {
    .navbar {
        background-color: rgba(9, 12, 15, 0.98);
        backdrop-filter: blur(10px);
        padding: var(--spacing-md) 0;
    }

    .nav-container {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        column-gap: var(--grid-gutter);
        align-items: center;
        max-width: 1800px;
        margin: 0 auto;
        padding: 0 var(--grid-margin);
    }

    .nav-menu {
        display: contents;
    }

    .nav-menu li:nth-child(1) {
        grid-column: 7;
        display: flex;
        align-items: center;
    }

    .nav-menu li:nth-child(2) {
        grid-column: 8;
        display: flex;
        align-items: center;
    }

    main {
        margin-top: 4.375rem;
        min-height: calc(100vh - 4.375rem);
    }

    /* Reset pill styling on desktop — use plain text links */
    .nav-logo,
    .nav-link {
        background: none;
        color: var(--color-white);
        padding: 0;
        border-radius: 0;
        font-weight: var(--font-weight-light);
    }

    .nav-logo:hover,
    .nav-link:hover,
    .nav-link.active {
        background: none;
        text-decoration: line-through;
    }

    .footer-copyright {
        font-weight: var(--font-weight-light);
    }
}

/* ============================================
   MAIN CONTENT LAYOUT
   ============================================ */

main {
    margin-top: 5.25rem;
    min-height: calc(100vh - 5.25rem);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   FRONTPAGE
   ============================================ */

#frontpage-page {
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem var(--grid-margin) 0;
}

.hero-section {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gutter);
    margin: 0;
}

.hero-title {
    grid-column: 1 / span 8;
    margin: 0;
}

.fp-section {
    margin-top: 11.25rem;
}

.fp-section-title {
    margin: 0 0 var(--grid-gutter);
    font-size: var(--text-h-lg);
    font-weight: var(--font-weight-book);
    line-height: var(--lh-display);
    letter-spacing: var(--ls-tight);
}

/* CTA shown after the frontpage projects grid — text + arrow flow inline,
   arrow sits at the bottom of the last line of text, close to the last word. */
.fp-projects-cta {
    display: inline-block;
    margin-top: 5rem;
    font-size: var(--text-h-md); /* 30px */
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-tight);
    color: var(--color-white);
    text-decoration: none;
}

.fp-projects-cta:hover span {
    text-decoration: underline;
}

.fp-projects-cta-arrow {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.25rem;
    vertical-align: text-bottom;
}

@media (max-width: 767px) {
    .fp-projects-cta {
        margin-top: 3rem;
    }

    .fp-projects-cta-arrow {
        margin-left: 0.5rem; /* 8px after the last word on mobile */
    }
}

/* Contact CTA shown on every page above the footer */
.contact-cta {
    max-width: 1800px;
    margin: 0 auto;
    padding: var(--spacing-3xl) var(--grid-margin);
}


.contact-cta-link {
    display: inline-block;
    font-size: var(--text-h-md); /* 30px */
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-tight);
    color: var(--color-white);
    text-decoration: none;
}

.contact-cta-link:hover span {
    text-decoration: underline;
}

.contact-cta-arrow {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.25rem;
    vertical-align: text-bottom;
}

@media (max-width: 767px) {
    .contact-cta {
        padding: var(--spacing-3xl) var(--grid-margin-sm);
    }
}

/* Case study CTA — optional external link (e.g. research paper, app store) shown after the text columns */
.case-study-cta {
    display: inline-block;
    margin-top: 5rem;
    font-size: var(--text-h-md); /* 30px */
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-tight);
    color: var(--color-white);
    text-decoration: none;
}

.case-study-cta:hover span {
    text-decoration: underline;
}

.case-study-cta-arrow {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.25rem;
    vertical-align: text-bottom;
}

@media (max-width: 767px) {
    .case-study-cta {
        margin-top: 3rem;
    }
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--grid-gutter);
    }
}

.service-image {
    width: 100%;
    aspect-ratio: 5 / 6; /* portrait on mobile */
    object-fit: cover;
    display: block;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .service-image {
        aspect-ratio: 3 / 2; /* landscape on desktop */
    }
}

.service-title {
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    letter-spacing: var(--ls-base);
    margin-bottom: var(--spacing-sm);
    color: var(--color-white);
}

.service-description {
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    color: var(--color-white);
    line-height: var(--lh-body);
    margin-bottom: var(--spacing-sm);
}

@media (min-width: 768px) {
    .service-description {
        max-width: 75%;
    }
}

.service-tags {
    list-style: disc;
    list-style-position: outside;
    padding-left: 1.25rem;
    margin: 0;
}

.service-tags li {
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    color: var(--color-white);
    margin-bottom: var(--spacing-xs);
}

.service-tags li:last-child {
    margin-bottom: 0;
}

/* ============================================
   CLIENTS SECTION
   ============================================ */

.fp-clients-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .fp-clients-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--grid-gutter);
        margin: 0;
    }
}

.client-box {
    background-color: #0D1115;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    min-width: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .client-box {
        aspect-ratio: unset;
        height: 220px;
    }
}

.client-logo {
    height: 44px;
    width: auto;
    max-width: 80%;
    object-fit: contain;
    display: block;
}

.projects-grid {
    display: grid;
    row-gap: 2rem;
    column-gap: var(--grid-gutter-sm);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 3.75rem;
        column-gap: var(--grid-gutter);
    }
}

.project-card {
    cursor: pointer;
}

.project-card:hover .project-title {
    text-decoration: underline;
}

.project-image {
    width: 100%;
    aspect-ratio: 5 / 6; /* portrait on mobile */
    object-fit: cover;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .project-image {
        aspect-ratio: 3 / 2; /* landscape on desktop */
    }
}

.project-meta {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 0;
    align-items: start;
}

.project-client {
    font-size: var(--text-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: var(--ls-base);
    padding-top: 4px;
}

.project-title {
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    margin: 0;
    color: var(--color-white);
}

.project-meta {
    font-size: var(--text-xs);
    line-height: var(--lh-heading);
    color: var(--color-gray-4);
    margin-top: var(--spacing-xs);
}

/* ============================================
   PROJECTS PAGE
   ============================================ */

#projects-page {
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem var(--grid-margin) 0;
}

.page-header {
    margin: 0 0 var(--spacing-2xl);
}

.page-header h1 {
    margin: 0;
}

/* ============================================
   CASE STUDY PAGE
   ============================================ */

#case-study-page {
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem var(--grid-margin) 0;
}

.case-study-container {
    width: 100%;
}

.case-study-header {
    margin-bottom: 11.25rem;
}

.case-study-title {
    margin: 0 0 var(--spacing-lg);
    font-size: clamp(var(--text-h-sm), 5vw, var(--text-display));
    font-weight: var(--font-weight-book);
    line-height: var(--lh-display);
    letter-spacing: var(--ls-tight);
}

.case-study-meta {
    display: flex;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    color: var(--color-white);
}

.case-study-meta-label {
    margin-right: 0.25rem;
}

@media (min-width: 768px) {
    .case-study-header {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        column-gap: var(--grid-gutter);
    }

    .case-study-title {
        grid-column: 1 / span 7;
    }

    .case-study-meta {
        grid-column: 1 / -1;
    }
}

.case-study-image {
    width: 100%;
    aspect-ratio: 5 / 6; /* portrait on mobile */
    object-fit: cover;
    display: block;
    margin: 0 0 2rem;
}

@media (min-width: 768px) {
    .case-study-image {
        aspect-ratio: 3 / 2; /* landscape on desktop */
    }
}

.case-study-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
}

@media (min-width: 768px) {
    .case-study-columns {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--grid-gutter);
    }
}

.case-study-column {
    display: flex;
    flex-direction: column;
}

.case-study-column-title {
    margin: 0 0 var(--spacing-md);
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    color: var(--color-white);
}

.case-study-column-text {
    margin: 0 0 var(--spacing-md);
    color: var(--color-white);
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-body);
}

@media (min-width: 768px) {
    .case-study-column-text {
        max-width: 90%; /* 9/10 of the column width on desktop */
    }
}

.case-study-grid {
    display: grid;
    gap: var(--grid-gutter-sm);
    margin: 8.75rem 0 var(--spacing-2xl);
}

@media (min-width: 768px) {
    .case-study-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--grid-gutter);
    }

    /* Optional 3-column variant — opt-in via galleryColumns: 3 in data.js */
    .case-study-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.case-study-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.other-projects {
    margin-top: 11.25rem;
}

.other-projects-grid {
    display: grid;
    gap: 2rem var(--grid-gutter-sm);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .other-projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3.75rem var(--grid-gutter);
    }
}

.other-project-card {
    cursor: pointer;
}

.other-project-card:hover .project-title {
    text-decoration: underline;
}

.other-project-card img {
    width: 100%;
    aspect-ratio: 5 / 6;
    object-fit: cover;
    margin-bottom: 1.25rem;
}

/* ============================================
   ABOUT PAGE
   ============================================ */

#about-page {
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem var(--grid-margin) 0;
}

.about-block {
    margin-top: 11.25rem;
}

.about-block-title {
    margin: 0 0 var(--grid-gutter);
    font-size: var(--text-h-lg);
    font-weight: var(--font-weight-book);
    line-height: var(--lh-display);
    letter-spacing: var(--ls-tight);
    color: var(--color-white);
}

.about-image {
    width: 100%;
    aspect-ratio: 5 / 6; /* portrait on mobile */
    object-fit: cover;
    display: block;
    margin-bottom: var(--grid-gutter);
}

@media (min-width: 768px) {
    .about-image {
        aspect-ratio: 3 / 2; /* landscape on desktop */
    }
}

/* Two-image pair — 5:6 portrait on both viewports, no gap.
   Mobile: stacked (1 column). Desktop: side-by-side (2 columns). */
.about-image-pair {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    margin-bottom: var(--grid-gutter);
}

.about-image-pair img {
    width: 100%;
    aspect-ratio: 5 / 6;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .about-image-pair {
        grid-template-columns: 1fr 1fr;
        gap: var(--grid-gutter);
    }
}

.about-rows {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.about-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .about-row {
        grid-template-columns: repeat(12, 1fr);
        column-gap: var(--grid-gutter);
        align-items: start;
    }

    .about-col-name {
        grid-column: 1 / span 3;
    }

    .about-col-label {
        grid-column: 4 / span 3;
    }

    .about-col-content {
        grid-column: 7 / span 6;
    }
}

.about-col-name,
.about-col-label {
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    color: var(--color-white);
}

.about-col-content {
    color: var(--color-white);
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-body);
}

.about-col-content p {
    margin: 0 0 var(--spacing-md);
    font-size: var(--text-h-xs);
    line-height: var(--lh-body);
}

.about-col-content p:last-child {
    margin-bottom: 0;
}

/* Resume mini table inside the content column */
.resume-table {
    display: flex;
    flex-direction: column;
}

.resume-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    color: var(--color-white);
}


.about-contact-link {
    display: block;
    color: var(--color-white);
    font-size: var(--text-h-xs);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    text-decoration: underline;
}

.about-contact-link:hover {
    text-decoration: none;
}

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

.footer {
    background-color: var(--color-black);
    padding: var(--spacing-md) 0;
    margin-top: var(--spacing-3xl);
}

.footer-inner {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.footer-copyright {
    font-size: var(--text-base);
    font-weight: var(--font-weight-light);
    line-height: var(--lh-heading);
    color: var(--color-white);
    margin: 0;
}

/* ============================================
   LOADING SCREEN
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.7s ease;
}

.loading-screen.fade-out {
    opacity: 0;
}

.loading-counter {
    font-family: 'NB Akademie Pro', sans-serif;
    font-size: var(--text-xs);
    font-weight: var(--font-weight-light);
    letter-spacing: var(--ls-base);
    color: var(--color-white);
    line-height: 1;
}

/* ============================================
   GRAIN OVERLAY
   ============================================ */

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('grain.gif');
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 9999;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 767px) {
    /* Mobile logo — same as desktop (18px) */
    .nav-logo {
        font-size: var(--text-base);
    }

    /* Top line slides down to center, bottom line slides up to center */
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(calc(2px + 0.35rem));
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(calc(-2px - 0.35rem));
        opacity: 0;
    }

    #frontpage-page {
        padding: 0.5rem var(--grid-margin-sm) 0;
    }

    .client-logo {
        height: 36px;
    }

    .hero-section {
        grid-template-columns: repeat(6, 1fr);
        column-gap: var(--grid-gutter-sm);
    }

    .hero-title {
        grid-column: 1 / -1;
    }

    #projects-page {
        padding: 0.5rem var(--grid-margin-sm) 0;
    }

    #case-study-page {
        padding: 0.5rem var(--grid-margin-sm) 0;
    }

    #about-page {
        padding: 0.5rem var(--grid-margin-sm) 0;
    }

    .footer {
        padding: var(--spacing-md) 0;
    }

    .footer-inner {
        padding: 0 var(--grid-margin-sm);
    }


    h1 {
        font-size: 2.375rem; /* 38px */
        line-height: var(--lh-heading); /* 120% */
    }

    .case-study-title {
        font-size: 2.375rem; /* 38px — matches other h1s on mobile */
        line-height: var(--lh-heading);
        max-width: none;
    }


    /* Mobile: stack meta vertically with aligned label / value columns */
    .case-study-meta {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: var(--spacing-md);
        row-gap: var(--spacing-xs);
    }

    .case-study-meta-item {
        display: contents;
    }

    .case-study-meta-label {
        margin-right: 0;
    }


    .other-projects {
        margin-top: var(--spacing-3xl);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .navbar,
    .footer,
    .nav-toggle {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }
}
