/* =============================================
   PAMELA CJ PORTFOLIO — styles.css
   Fonts: Bricolage Grotesque (headings) + DM Sans (body)
   Palette: Forest Green, Cream, Dark Brown, Dusty Rose, Sky Blue
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Zain:wght@400;700&family=Gantari:wght@400;600&family=Quicksand:wght@400;600;700&family=Nunito:wght@400;600&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
    --green-dark:    #1e3a1f;
    --green-mid:     #2d5a2e;
    --green-light:   #3d7a3e;
    --green-nav:     #416828;
    --cream:         #f5f0e8;
    --cream-warm:    #e8e0d0;
    --brown-dark:    #1a1510;
    --brown-mid:     #2c2318;
    --pink-blush:    #f4c5c5;
    --pink-rose:     #9b5060;
    --sky-blue:      #b8d8e8;

    --text-dark:     #1a1510;
    --text-light:    #f5f0e8;
    --text-muted:    #6b7c6b;

    --font-display:  'Bricolage Grotesque', sans-serif;
    --font-body:     'DM Sans', sans-serif;
    --font-zain:     'Zain', sans-serif;
    --font-gantari:  'Gantari', sans-serif;
    --font-quicksand:'Quicksand', sans-serif;
    --font-nunito:   'Nunito', sans-serif;
    --font-urbanist: 'Urbanist', sans-serif;

    --nav-height:    68px;
    --radius-sm:     5px;
    --radius-md:     5px;
    --radius-lg:     10px;

    --transition:    all 0.3s ease;
    --transition-slow: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* =============================================
   RESET & FOUNDATION
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ensure all text elements use the correct font explicitly */
p, li, a, span, button, input, label, figcaption, blockquote {
    font-family: var(--font-body);
}

img {
    width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Prevent ANY accidental overflow */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix dropdown overflow */
.dropdown-menu {
    left: 50%;
    transform: translateX(-50%);
}

/* Extra slider protection */
.slider {
    overflow: hidden;
}

/* Prevent flex overflow */
.hero-images {
    max-width: 100%;
    overflow: hidden;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.8rem; padding-bottom: 20px; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 0.95rem; font-weight: 400; }

p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
    opacity: 0.8;
    margin-bottom: 14px;
}

em {
    color: var(--pink-rose);
    font-weight: 600;
    opacity: 1;
}


/* =============================================
   UTILITY CLASSES
   ============================================= */
.col-80         { width: 80%; }
.margin-auto    { margin-left: auto; margin-right: auto; }
.center-text    { text-align: center; }
.full-width     { width: 100%; }
.round-corners  { border-radius: var(--radius-md); }


/* =============================================
   BUTTONS
   ============================================= */
.primary-btn {
    display: inline-block;
    background-color: var(--green-dark);
    color: var(--cream);
    border: 2px solid var(--green-dark);
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.primary-btn:hover {
    background-color: transparent;
    color: var(--green-dark);
}

.secondary-btn {
    display: inline-block;
    background-color: var(--brown-mid);
    color: var(--cream);
    border: 2px solid var(--brown-mid);
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.secondary-btn:hover {
    background-color: transparent;
    color: var(--brown-mid);
    border: 2px solid var(--brown-mid);
}

.btn-contact {
    display: inline-block;
    background-color: transparent;
    color: var(--cream);
    border: 2px solid var(--cream);
    padding: 8px 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-contact:hover {
    background-color: var(--cream);
    color: var(--green-dark);

}

.btn-resume {
    background-color: var(--pink-rose);
    color: var(--cream);
    border: 2px solid var(--pink-rose);
    padding: 10px 22px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 16px;
}

.btn-resume:hover {
    background-color: transparent;
    color: var(--cream);
    border: 2px solid var(--cream);
}


/* =============================================
   HEADER & NAVBAR
   ============================================= */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #416828;
    transition: var(--transition);
}

#header.header-scrolled {
    background-color: #416828;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: var(--nav-height);
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cream);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    color: var(--cream);
    flex-shrink: 0;
}

.logo-svg {
    width: 36px;
    height: 36px;
    display: block;
    transition: var(--transition);
}

.logo:hover .logo-svg {
    opacity: 0.8;
}

/* Desktop Navbar */
.navbar {
    display: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    padding: 6px 4px;
    border-radius: 0;
    transition: var(--transition);
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
    /* Active indicator underline */
    border-bottom: 2px solid transparent;
    margin: 0 8px;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--cream);
    border-bottom-color: var(--cream);
}

/* Arrow SVG images in nav */
.nav-arrow {
    width: 12px;
    height: 12px;
    display: inline-block;
    transition: transform 0.3s ease;
    /* If your arrow SVG is dark, invert it to show on green */
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.dropdown:hover .nav-arrow,
.dropdown:focus-within .nav-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown-toggle .nav-arrow {
    width: 12px;
    height: 12px;
    display: inline-block;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.mobile-dropdown-toggle[aria-expanded="true"] .nav-arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 210px;
    background-color: var(--green-dark);      /* dark green, not cream */
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    padding: 12px 0;
    box-shadow: 0 10px 32px rgba(0,0,0,0.35);
    z-index: 200;
}

/* small top triangle pointer */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: var(--green-dark);
    border-left: 1px solid rgba(255,255,255,0.12);
    border-top: 1px solid rgba(255,255,255,0.12);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 22px;
    color: var(--cream);                      /* cream text */
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    opacity: 1;
    background-color: rgba(255,255,255,0.08);
    padding-left: 28px;
    color: var(--cream);
}

/* Hamburger button */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1010;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--cream);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */
.mobile-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: var(--green-dark);
    padding: 24px 28px 40px;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    z-index: 999;
}

.mobile-nav.is-open {
    transform: translateX(0);
}

.mobile-nav-menu {
    flex: 1;
}

.mobile-nav-menu > li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-menu > li > a {
    display: block;
    padding: 16px 0;
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-nav-menu > li > a:hover {
    color: var(--pink-blush);
}

/* Mobile dropdown toggle button */
.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    background: none;
    border: none;
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    gap: 8px;
}

.mobile-dropdown-list {
    display: none;
    padding: 0 0 12px 16px;
}

.mobile-dropdown-list.is-open {
    display: block;
}

.mobile-dropdown-list li a {
    display: block;
    padding: 10px 0;
    color: var(--cream);
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.75;
}

.mobile-dropdown-list li a:hover {
    opacity: 1;
    color: var(--pink-blush);
}

.mobile-contact-btn {
    margin-top: 24px;
    text-align: center;
    padding: 14px;
    width: 100%;
}


/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    min-height: 100vh;
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 60px;
    background-color: var(--cream-warm);
    background-image:
        radial-gradient(ellipse at 80% 20%, rgba(30,58,31,0.12) 0%, transparent 60%),
        url('../img/splash-temp.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Subtle texture overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(245, 240, 232, 0.75);
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.hero-text {
    text-align: center;
    max-width: 600px;
}

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: left;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    color: var(--text-dark);
    padding-bottom: 6px;
    text-align: left;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--pink-rose);
    margin-bottom: 20px;
    text-align: left;
}

.hero-desc {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 480px;
    margin: 0 auto 28px;
    opacity: 0.85;
    text-align: left;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-images {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-img {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    background-color: var(--cream-warm);
}

.hero-img--main {
    width: 300px;
}

.hero-img--secondary {
    width: 180px;
    align-self: flex-end;
}

.hero-cta-bottom {
    position: relative;
    z-index: 1;
    margin-top: 50px;
    font-size: 1.1rem;
    text-align: left;
    width: 90%;
}


/* =============================================
   FEATURED WORKS / SLIDER
   ============================================= */
.section-featured {
    padding: 20px 60px 20px;
    background-color: var(--cream);
    position: relative;
}

.section-label {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green-dark);
    padding-bottom: 0;
    margin-bottom: 24px;
    width: 90%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 10px;
}

.slider-wrapper {
    position: relative;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    background-color: var(--cream-warm);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.slider {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.slide {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide:first-child {
    position: relative;
}

.slide-img {
    width: 100%;
    overflow: hidden;
}

.slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    padding: 24px;
}

.slide-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 6px;
}

.slide-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-mid);
    opacity: 1;
    margin-bottom: 10px;
}

.slide-desc {
    font-size: 1rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.btn {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: var(--cream);
    border: 1px solid rgba(30,58,31,0.2);
    border-radius: 15%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: var(--transition);
    padding: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.btn:hover {
    background-color: var(--green-dark);
    color: var(--cream);
    .btn:hover img { filter: brightness(0) invert(1); }
}
.btn:hover img {
    filter: brightness(0) invert(1) sepia(0.2) saturate(0.6);
}

.btn-prev { left: 14px; }
.btn-next { right: 14px; }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background-color: var(--cream-warm);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--green-dark);
    border: 2px solid var(--green-dark);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--pink-rose);
    border-color: var(--pink-rose);
    width: 24px;
    border-radius: 4px;
}


/* =============================================
   ABOUT SECTION
   ============================================= */
.section-about {
    padding: 70px 20px;
    background-color: var(--green-dark);
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: center;
}

.about-block {
    width: 90%;
    max-width: 700px;
}

.about-block h2 {
    color: var(--cream);
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.about-block p {
    color: var(--cream);
    opacity: 0.8;
}

.about-img {
    margin-top: 24px;
    max-width: 400px;
}

.about-portrait {
    margin-bottom: 24px;
    max-width: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
}


/* =============================================
   PROJECTS GRID
   ============================================= */
.section-projects {
    padding: 30px 0 30px;
    background-color: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-projects h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--green-dark);
}

.grid-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.grid-wrapper a {
    box-sizing: border-box;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: block;
    border-radius: 6px;
    border: 2px solid var(--cream);
}

.grid-wrapper article figure {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.grid-wrapper article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.grid-item-text {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(30, 58, 31, 0.8);
    color: var(--cream);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 20px;
}

.grid-item-text h4 {
    color: var(--cream);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.grid-item-text h5 {
    color: var(--pink-blush);
    font-size: 1rem;
    opacity: 1;
}

.grid-wrapper a:hover .grid-item-text {
    opacity: 1;
}

.grid-wrapper a:hover img {
    transform: scale(1.07);
}


/* =============================================
   CONTACT / FOOTER SECTION
   ============================================= */
.section-contact {
    background-color: var(--brown-dark);
    padding: 50px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.contact-inner {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto 30px;
}

.contact-left h2 {
    color: var(--cream);
    font-size: 1.3rem;
    padding-bottom: 12px;
}

.contact-icons {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.icon-link {
    display: block;
    width: 32px;
    height: 32px;
    opacity: 0.9;
    transition: var(--transition);
}

.icon-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.linkedin-btn {
    background: url('../img/linkedin.svg') no-repeat center / contain;
}

.email-btn {
    background: url('../img/email.svg') no-repeat center / contain;
    /* fallback: plain circle if icon not found */
}

.contact-right h3 {
    color: var(--pink-blush);
    font-size: 1.1rem;
    font-family: var(--font-display);
    margin-bottom: 10px;
}

.contact-right p {
    color: var(--cream);
    opacity: 0.7;
    font-size: 1rem;
    margin: 0;
}

.contact-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo-mark {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--cream);
    line-height: 1;
}

.footer-logo-sub {
    font-size: 0.75rem;
    color: var(--cream);
    opacity: 0.3;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.copyright {
    text-align: center;
    color: var(--cream);
    opacity: 0.4;
    font-size: 0.8rem;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}


/* =============================================
   MEDIA QUERIES — TABLET  (≥800px)
   ============================================= */
@media only screen and (min-width: 800px) {

    /* Typography */
    h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

    /* Navbar */
    .hamburger { display: none; }
    .mobile-nav { display: none !important; }

    .navbar {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    /* Hero */
    .hero-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .hero-text {
        text-align: left;
        flex: 1;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .hero-desc {
        margin-left: 0;
    }

    .hero-images {
        flex: 0 0 auto;
        flex-direction: column;
        align-items: flex-end;
    }

    .hero-img--main   { width: 400px; }
    .hero-img--secondary { width: 200px; }

    /* Featured / Slider */
    .slide {
        flex-direction: row;
        align-items: stretch;
    }

    .slide:first-child {
        position: absolute;
    }

    /* make slider a fixed height on tablet+ */
    .slider {
        height: 320px;
    }

    .slide-img {
        width: 40%;
        flex-shrink: 0;
        aspect-ratio: unset;
        height: 100%;
    }

    .slide-content {
        width: 60%;
        padding: 32px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* About */
    .section-about {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 60px;
        padding: 80px 40px;
    }

    .about-block {
        flex: 1;
        max-width: 580px;
    }

    /* Grid */
    .grid-wrapper a {
        width: 50%;
    }

    /* Contact */
    .contact-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .contact-logo {
        align-items: flex-end;
    }
    .section-projects h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--green-dark);
    margin-left: 50px;
}
}


/* =============================================
   MEDIA QUERIES — DESKTOP  (≥1500px)
   ============================================= */
@media only screen and (min-width: 1500px) {

    html { font-size: 18px; }

    .header-container {
        padding: 0 60px;
    }

    /* Hero */
    .hero-inner {
        max-width: 1300px;
    }

    .hero-img--secondary { width: 250px; }

    /* Slider */
    .slider { height: 380px; }

    .slider-wrapper,
    .section-label {
        max-width: 1300px;
    }

    .slider-wrapper{
        flex: 1;
        background-color: var(--cream-warm);
        border-radius: var(--radius-lg);
        overflow: hidden;
        min-width: 0;
        position: relative;
    }

    /* Grid */
    .grid-wrapper a {
        width: 25%;
    }

    /* Section spacing */
    .section-featured,
    .section-projects {
        padding: 90px 0;
    }

    .section-about {
        padding: 100px 80px;
        gap: 100px;
    }

    .section-contact {
        padding: 70px 60px 40px;
    }

    .contact-inner {
        max-width: 1300px;
    }
}


/* =============================================
   CONTACT DROPDOWN  (.dropdown--contact)
   ============================================= */
.dropdown--contact { position: relative; }

.dropdown-toggle-contact {
    display: inline-flex; align-items: center; gap: 6px;
    background-color: transparent; color: var(--cream);
    border: 2px solid var(--cream); padding: 8px 18px;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.dropdown-toggle-contact:hover,
.dropdown--contact:hover .dropdown-toggle-contact,
.dropdown--contact:focus-within .dropdown-toggle-contact {
    background-color: var(--cream); color: var(--green-dark);
}
.dropdown--contact:hover .nav-arrow,
.dropdown--contact:focus-within .nav-arrow { transform: rotate(180deg); }

.dropdown-menu--contact {
    display: none; position: absolute; top: calc(100% + 10px); right: 0; left: auto; transform: none;
    min-width: 260px; background-color: var(--brown-mid);
    border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md);
    padding: 16px 0 12px; box-shadow: 0 10px 32px rgba(0,0,0,0.4); z-index: 300;
}
.dropdown-menu--contact::before {
    content: ''; position: absolute; top: -6px; right: 24px; left: auto;
    transform: rotate(45deg); width: 12px; height: 12px;
    background-color: var(--brown-mid);
    border-left: 1px solid rgba(255,255,255,0.1);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.dropdown--contact:hover .dropdown-menu--contact,
.dropdown--contact:focus-within .dropdown-menu--contact { display: block; }

.contact-drop-link {
    display: flex;
    align-items: center;          /* vertically centres icon + text */
    flex-direction: row;          /* icon left, text right — same line */
    gap: 12px;
    padding: 12px 20px;
    color: var(--pink-blush);     /* pink text matching the icon tint */
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 400;
    transition: var(--transition);
    white-space: nowrap;          /* prevents text wrapping under icon */
}

.contact-drop-link:hover {
    background-color: rgba(255,255,255,0.07);
    color: var(--cream);
}

.contact-drop-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;               /* icon never squishes */
    border-radius: var(--radius-sm);
    object-fit: contain;
    padding: 5px;
    background-color: rgba(244,197,197,0.15); /* faint pink tint behind icon */
}


/* =============================================
   PROJECT PAGES  (.projects-page)
   ============================================= */
.projects-page { padding-top: var(--nav-height); background-color: var(--cream); min-height: 100vh; }
.projects-content { width: 90%; max-width: 1100px; margin: 0 auto; padding: 50px 0 0; }
.projects-heading {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700; color: var(--text-dark); margin-bottom: 32px;
}

/* Shared tile base */
.project-tile {
    position: relative; overflow: hidden; border-radius: var(--radius-md);
    cursor: pointer; background-color: var(--brown-dark); min-height: 200px;
}
.project-tile img {
    width: 100%; height: 100%; min-height: 200px;
    object-fit: cover; object-position: center; display: block;
    transition: transform 0.4s ease;
}
.project-tile:not(.project-tile--video):hover img { transform: scale(1.05); }

.tile-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(30,58,31,0.15) 0%, rgba(30,58,31,0.88) 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 20px; opacity: 0; transition: opacity 0.35s ease; z-index: 1;
}
.project-tile:not(.project-tile--video):hover .tile-overlay,
.project-tile:not(.project-tile--video):focus-within .tile-overlay { opacity: 1; }
.project-tile.tile-revealed .tile-overlay { opacity: 1; }

.tile-title {
    font-family: var(--font-display); font-size: 1rem; font-weight: 700;
    color: var(--cream); margin-bottom: 6px; line-height: 1.2;
}
.tile-desc {
    font-family: var(--font-body); font-size: 0.82rem;
    color: var(--cream); opacity: 0.9; line-height: 1.5; margin-bottom: 10px;
}
.tile-link {
    display: inline-block; font-family: var(--font-body);
    font-size: 0.8rem; font-weight: 600; color: var(--cream);
    border: 1px solid rgba(255,255,255,0.6); border-radius: var(--radius-sm);
    padding: 5px 12px; transition: var(--transition); width: fit-content;
}
.tile-link:hover { background-color: var(--cream); color: var(--green-dark); border-color: var(--cream); }

/* Info box (green CTA card) */
.projects-info-box {
    background-color: var(--green-mid); border-radius: var(--radius-md);
    padding: 28px 24px; display: flex; flex-direction: column;
    justify-content: center; gap: 16px; min-height: 200px;
}
.projects-info-box p {
    font-family: var(--font-body); font-size: 1rem; color: var(--cream);
    margin: 0; line-height: 1.6;
}

/* View All / Hide All */
.btn-reveal-all {
    display: inline-block; align-self: flex-start;
    background-color: transparent; color: var(--cream);
    border: 2px solid var(--cream); padding: 9px 22px;
    font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
}
.btn-reveal-all:hover,
.btn-reveal-all.is-active { background-color: var(--cream); color: var(--green-dark); }

/* Masonry grid — graphic-design.html */
.projects-grid--masonry { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* Simple 2x2 grid — web, motion, animation */
.projects-grid--simple { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* Video tiles */
.project-tile--video { background-color: var(--brown-dark); }
.project-tile--video video {
    width: 100%; height: 100%; min-height: 200px;
    object-fit: cover; display: block; position: relative; z-index: 0;
}
.project-tile--video .tile-overlay {
    inset: 0; height: 100%;
    background: linear-gradient(to bottom, rgba(30,58,31,0.1) 0%, rgba(30,58,31,0.85) 60%);
    z-index: 2; cursor: pointer;
}
.project-tile--video:hover .tile-overlay { opacity: 1; }
.project-tile--video.is-playing .tile-overlay { opacity: 0; pointer-events: none; }
.tile-play-hint {
    font-family: var(--font-body); font-size: 0.78rem;
    color: var(--cream); opacity: 0.7; margin-top: 4px; font-style: italic;
}

/* Next section / Next case study button */
.next-section-bar {
    background: none; padding: 36px 20px;
    display: flex; justify-content: center; align-items: center;
}
.btn-next-section {
    display: inline-flex; align-items: center; gap: 10px;
    background-color: var(--green-dark); color: var(--cream);
    font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
    padding: 13px 32px; border-radius: var(--radius-sm);
    border: 2px solid var(--green-dark); text-decoration: none;
    transition: var(--transition); letter-spacing: 0.02em;
}
.btn-next-section:hover { background-color: transparent; color: var(--green-dark); }
.btn-next-section__arrow {
    width: 16px; height: 16px; object-fit: contain; display: block;
    flex-shrink: 0; filter: brightness(0) invert(1);
    transition: filter 0.3s ease, transform 0.25s ease;
}
.btn-next-section:hover .btn-next-section__arrow {
    filter: brightness(0); transform: translateX(4px);
}

@media only screen and (min-width: 800px) {
    .projects-grid--masonry {
        grid-template-columns: 1fr 1fr; grid-auto-rows: 220px;
        grid-auto-flow: dense; gap: 14px;
    }
    .projects-grid--masonry .project-tile.tile--tall { grid-row: span 2; }
    .projects-grid--masonry .project-tile.tile--wide { grid-column: span 2; }
    .projects-grid--masonry .projects-info-box { grid-row: span 1; min-height: unset; justify-content: center; }
    .projects-grid--masonry .project-tile { min-height: unset; }
    .projects-grid--masonry .project-tile img { height: 100%; min-height: unset; }

    .projects-grid--simple { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 14px; }
    .projects-grid--simple .project-tile,
    .projects-grid--simple .projects-info-box { aspect-ratio: 4/3; min-height: unset; }
    .projects-grid--simple .project-tile img,
    .projects-grid--simple .project-tile--video video { height: 100%; min-height: unset; }
}

@media only screen and (min-width: 1100px) {
    .projects-grid--masonry {
        grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: 240px;
        grid-auto-flow: dense; gap: 16px;
    }
}

@media only screen and (min-width: 1500px) {
    .projects-content { max-width: 1300px; }
    .projects-grid--masonry, .projects-grid--simple { gap: 16px; }
}


/* =============================================
   RESUME PAGE STYLES
   ============================================= */
.resume-page { padding-top: var(--nav-height); background-color: var(--cream); min-height: 100vh; }

.resume-section-inner { width: 90%; max-width: 1100px; margin: 0 auto; }

.resume-section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700; color: var(--text-dark); text-align: left;
}

/* Overview */
.resume-overview { background-color: var(--green-dark); padding: 60px 0; }
.resume-overview__inner {
    width: 90%; max-width: 1100px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 32px; align-items: flex-start;
}
.resume-overview__heading {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700; color: var(--cream); margin-bottom: 24px;
}
.resume-overview__text { flex: 1; min-width: 0; }
.resume-overview__image {
    width: 100%; border-radius: var(--radius-md); overflow: hidden;
    flex-shrink: 0; max-height: 320px;
}
.resume-overview__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.resume-direction-card {
    background-color: var(--cream); border-radius: var(--radius-md); padding: 28px 28px 24px;
}
.resume-direction-card__title {
    font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
    color: var(--text-dark); margin-bottom: 12px; padding-bottom: 0;
}
.resume-direction-card p { color: var(--text-dark); opacity: 0.8; font-size: 0.9rem; line-height: 1.7; margin-bottom: 10px; }
.resume-direction-card p:last-child { margin-bottom: 0; }

/* Experience */
.resume-experience { background-color: var(--brown-mid); padding: 60px 0; }
.resume-experience__inner {
    width: 90%; max-width: 1100px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 32px; align-items: flex-start;
}
.resume-experience__heading {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700;
    color: var(--cream); margin-bottom: 12px; padding-bottom: 0;
}
.resume-experience__text { flex: 1; min-width: 0; }
.resume-experience__text p { color: var(--cream); opacity: 0.8; font-size: 0.95rem; line-height: 1.7; margin-bottom: 18px; }
.resume-experience-card__link {
    display: inline-block; color: var(--cream);
    font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.5); border-radius: var(--radius-sm);
    padding: 8px 18px; transition: var(--transition); width: fit-content;
}
.resume-experience-card__link:hover { background-color: var(--cream); color: var(--brown-mid); border-color: var(--cream); }
.resume-experience__logo {
    width: 100%; max-width: 280px; border-radius: var(--radius-md);
    overflow: hidden; flex-shrink: 0; padding: 24px;
}
.resume-experience__logo img { width: 100%; height: auto; display: block; }

/* Skills */
.resume-skills--technical { padding: 60px 0; background-color: var(--cream); }
.resume-skills--software  { padding: 60px 0; background-color: var(--cream-warm); }
.resume-skills--technical .resume-section-heading,
.resume-skills--software  .resume-section-heading { text-align: center; }

.skills-grid--technical { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }
.skill-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: default; position: relative; background: none; border: none; padding: 8px 4px 32px;
}
.skill-tile img {
    width: 60px; height: 60px; object-fit: contain; display: block; flex-shrink: 0;
    transition: transform 0.25s ease; position: relative; z-index: 1;
}
.skill-tile:hover img { transform: translateY(-6px); }
.skill-tile::after {
    content: attr(data-skill); position: absolute; bottom: 6px; left: 50%;
    transform: translateX(-50%); font-family: var(--font-body); font-size: 0.85rem;
    font-weight: 500; color: var(--text-dark); opacity: 0; white-space: nowrap;
    pointer-events: none; transition: opacity 0.2s ease; z-index: 2;
}
.skill-tile:hover::after { opacity: 0.8; }
.skill-tile::before { display: none; }

.skills-grid--software { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; justify-items: center; }
.skill-tile--software {
    background: none; border: none; border-radius: 0; padding: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: default; overflow: visible;
}
.skill-tile--software img {
    width: 64px; height: 64px; object-fit: contain; display: block;
    flex-shrink: 0; transition: transform 0.25s ease;
}
.skill-tile--software:hover img { transform: translateY(-6px); }

/* Education */
.resume-education { padding: 60px 0; background-color: var(--cream); }
.resume-education__inner {
    width: 90%; max-width: 1100px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 32px; align-items: flex-start;
}
.resume-education__text { flex: 1; min-width: 0; }
.resume-education__body {
    font-family: var(--font-body); font-size: 0.95rem; line-height: 1.8;
    color: var(--text-dark); opacity: 0.8; max-width: 640px; margin: 0;
}
.resume-education__image {
    width: 100%; max-width: 200px; border-radius: var(--radius-md);
    overflow: hidden; flex-shrink: 0;
}
.resume-education__image img {
    width: 100%; height: auto; display: block; min-height: 180px; object-fit: cover;
}

/* Download button */
.resume-download { padding: 40px 0; background-color: var(--cream-warm); text-align: center; }
.resume-download__inner { display: flex; justify-content: center; }
.btn-download-resume {
    display: inline-flex; align-items: center; gap: 10px;
    background-color: var(--green-nav, #416828); color: var(--cream);
    font-family: var(--font-body); font-size: 1rem; font-weight: 600;
    padding: 14px 36px; border-radius: var(--radius-sm);
    border: 2px solid var(--green-nav, #416828); text-decoration: none;
    transition: var(--transition); letter-spacing: 0.02em;
}
.btn-download-resume:hover { background-color: transparent; color: var(--green-dark); border-color: var(--green-dark); }
.btn-download-resume__icon {
    width: 18px; height: 18px; object-fit: contain; display: block; flex-shrink: 0;
    filter: brightness(0) invert(1); transition: filter 0.3s ease;
}
.btn-download-resume:hover .btn-download-resume__icon { filter: brightness(0); }

/* Resume media queries */
@media only screen and (min-width: 800px) {
    .resume-overview__inner { flex-direction: row; align-items: stretch; gap: 48px; }
    .resume-overview__image { width: 360px; max-height: none; }
    .resume-experience__inner { flex-direction: row; align-items: center; gap: 48px; }
    .resume-experience__logo { width: 260px; max-width: 260px; }
    .skills-grid--technical { grid-template-columns: repeat(6, 1fr); gap: 24px 16px; }
    .skills-grid--software  { grid-template-columns: repeat(6, 1fr); gap: 20px; }
    .resume-education__inner { flex-direction: row; align-items: center; gap: 48px; }
    .resume-education__image { width: 250px; }
}
@media only screen and (min-width: 1500px) {
    .resume-section-inner,
    .resume-overview__inner,
    .resume-experience__inner,
    .resume-education__inner { max-width: 1300px; }
    .skill-tile img           { width: 70px; height: 70px; }
    .skill-tile--software img { width: 72px; height: 72px; }
}


/* =============================================
   CASE STUDY PAGE SHELL & HERO
   ============================================= */
.case-study-page { padding-top: var(--nav-height); background-color: var(--cream); min-height: 100vh; }

.cs-hero {
    background-color: var(--green-dark);
    background-size: cover; background-position: center;
    padding: 48px 0 56px; position: relative;
}
.cs-hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(30,58,31,0.55) 0%, rgba(0,0,0,0.25) 100%);
    pointer-events: none; z-index: 0;
}
.cs-hero__inner {
    position: relative; z-index: 1;
    width: 90%; max-width: 1100px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 32px;
}
.cs-hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 700;
    color: var(--cream); display: inline-block; margin-bottom: 16px; padding-bottom: 6px;
}
.cs-hero__image {
    width: 100%; border-radius: var(--radius-md); overflow: hidden;
    background-color: var(--cream-warm);
    display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px;
}
.cs-hero__image img {
    width: 100%; height: auto; display: block; border-radius: var(--radius-sm);
    object-fit: contain; background-color: var(--cream-warm); min-height: 120px;
}
.cs-hero__cta-inline {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--green-dark); font-family: var(--font-body);
    font-size: 0.875rem; font-weight: 600;
    border-bottom: 1px solid currentColor; padding-bottom: 2px;
    text-decoration: none; transition: var(--transition); width: fit-content;
}
.cs-hero__cta-inline:hover { color: var(--green-mid); }
.cs-hero__brief { flex: 1; min-width: 0; }
.cs-brief-card {
    background-color: var(--cream); border-radius: var(--radius-md); padding: 24px 24px 20px;
}
.cs-brief-card__heading {
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
    color: var(--text-dark); padding-bottom: 0; margin-bottom: 8px; margin-top: 16px;
}
.cs-brief-card__heading:first-child { margin-top: 0; }
.cs-brief-card p { font-size: 0.95rem; line-height: 1.7; color: var(--text-dark); opacity: 0.8; margin-bottom: 8px; }

/* Content sections */
.cs-section { padding-top: 56px; background-color: var(--cream); }
.cs-section--alt { background-color: var(--cream-warm); }
.cs-section__inner { width: 90%; max-width: 1100px; margin: 0 auto; }
.cs-section__heading {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700;
    color: var(--text-dark); padding-bottom: 10px; margin-bottom: 28px;
    border-bottom: 2px solid rgba(30,58,31,0.2); display: block;
}

/* Download buttons */
.cs-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.cs-download-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background-color: var(--green-dark); color: var(--cream);
    font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
    padding: 10px 20px; border-radius: var(--radius-sm);
    border: 2px solid var(--green-dark); text-decoration: none; transition: var(--transition);
}
.cs-download-btn:hover { background-color: transparent; color: var(--green-dark); }
.cs-download-btn img {
    width: 14px; height: 14px; object-fit: contain; display: block;
    flex-shrink: 0; filter: brightness(0) invert(1); transition: filter 0.25s ease;
}
.cs-download-btn:hover img { filter: brightness(0); }

/* Cell types */
.cs-cell--image {
    background-color: var(--brown-dark); border: none;
    display: flex; align-items: center; justify-content: center;
}
.cs-cell--image img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    display: block; min-height: 180px;
}
.cs-cell--text { padding: 20px; display: flex; flex-direction: column; justify-content: flex-start; }
.cs-cell--text h3 {
    font-family: var(--font-display); font-size: 1rem; font-weight: 700;
    color: var(--text-dark); margin-bottom: 10px; padding-bottom: 0;
}
.cs-cell--text p {
    font-family: var(--font-body); font-size: 0.95rem; line-height: 1.7;
    color: var(--text-dark); opacity: 0.8; margin-bottom: 0;
}
.cs-cell--color-swatch {
    padding: 16px; display: flex; flex-direction: column;
    justify-content: center; background-color: var(--cream);
}
.cs-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cs-swatch {
    aspect-ratio: 1; border-radius: var(--radius-sm);
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 3px; position: relative; overflow: visible;
}
.cs-swatch span {
    font-family: var(--font-body); font-size: 0.55rem;
    color: rgba(255,255,255,0.85); text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    pointer-events: none; text-align: center; line-height: 1;
}
.cs-cell--typography {
    padding: 20px; background-color: var(--cream); display: flex; align-items: center;
}
.cs-type-specimen { width: 100%; }
.cs-type-row {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 4px; margin-top: 12px;
}
.cs-type-row:first-child { margin-top: 0; }
.cs-type-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--text-dark); }
.cs-type-role { font-family: var(--font-body); font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.cs-type-sample--primary {
    font-family: var(--font-display); font-size: 2rem; font-weight: 700;
    color: var(--text-dark); line-height: 1.1; margin-bottom: 8px;
}
.cs-type-sample--secondary {
    font-family: var(--font-body); font-size: 1.5rem; font-weight: 400;
    color: var(--text-dark); line-height: 1.1;
}

/* Hero desktop layout */
@media only screen and (min-width: 800px) {
    .cs-hero__inner { flex-direction: row; align-items: flex-start; gap: 48px; }
    .cs-hero__image { width: 360px; flex-shrink: 0; }
    .cs-hero__brief { flex: 1; }
    .cs-section__inner, .cs-hero__inner { max-width: 1100px; }
}
@media only screen and (min-width: 1500px) {
    .cs-section__inner, .cs-hero__inner { max-width: 1300px; }
    .cs-hero__image { width: 440px; }
}

/* =============================================
   CASE STUDY ROWS — DESKTOP & MOBILE BEHAVIOUR
   ─────────────────────────────────────────────
   PLAIN .cs-row
     Mobile : horizontal scroll carousel (85vw cells)
     Desktop: 3-equal-column CSS Grid, no scroll

   .cs-row--slider-layout  (pitch decks / branding)
     Mobile : vertical stack — each .cs-cell--slider
              is its own independent image slider
     Desktop: 3-equal-column CSS Grid (same as plain rows)
              so slider cells take 1/3 width each
   ─────────────────────────────────────────────
   ============================================= */

/* ── MOBILE base: plain rows carousel ── */
.cs-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.cs-row::-webkit-scrollbar { display: none; }

.cs-cell {
    flex: 0 0 85vw;
    max-width: 85vw;
    scroll-snap-align: start;
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 180px;
    background-color: var(--cream);
    border: 1px solid rgba(30, 58, 31, 0.1);
}

/* ── MOBILE: slider-layout rows stack vertically ──
   Each slider cell is full-width so the user sees
   one pitch deck / branding guide at a time and can
   swipe through its images using the slider controls.
   The row itself does NOT scroll horizontally.        */
.cs-row--slider-layout {
    /* On mobile: vertical stack so each slider sits
       below the text cell as its own full-width block */
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
    margin-bottom: 20px;
}

/* Text cells in slider rows: full width, natural height */
.cs-row--slider-layout .cs-cell--text {
    flex: unset;
    width: 100%;
    max-width: 100%;
    min-height: unset;
    border: 1px solid rgba(30, 58, 31, 0.1);
    border-radius: var(--radius-md);
    background-color: var(--cream);
}

/* ─── CRITICAL SLIDER CELL MOBILE FIX ───────────────────
   The slider cell MUST have:
   1. A fixed height  — gives the flex track a real
      percentage to fill; without it height:100% = 0
   2. overflow:hidden — clips the translateX track so
      only the current slide is visible
   3. position:relative — anchors absolute dots/buttons
   ────────────────────────────────────────────────────── */
.cs-row--slider-layout .cs-cell--slider {
    flex: unset;
    width: 100%;
    max-width: 100%;
    height: 260px;          /* fixed — REQUIRED for track clipping */
    overflow: hidden;       /* REQUIRED — clips off-screen slides  */
    position: relative;     /* REQUIRED — for absolute dots/btns   */
    background-color: var(--brown-dark);
    border-radius: var(--radius-md);
    border: none;
    display: flex;
    flex-direction: column;
}

/* Track fills the slider cell exactly */
.cs-row--slider-layout .cs-slides-track {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;           /* fills the fixed 260px cell height   */
    flex: 1;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Each slide is exactly 100% of the cell width */
.cs-row--slider-layout .cs-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cs-row--slider-layout .cs-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Dots: absolute at bottom centre of each slider cell */
.cs-row--slider-layout .cs-slide-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    display: flex;
    gap: 6px;
}

/* Arrow buttons: absolute left/right centre */
.cs-row--slider-layout .cs-slide-btn {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    padding: 6px;
}

.cs-row--slider-layout .cs-slide-btn--prev { left: 8px; }
.cs-row--slider-layout .cs-slide-btn--next { right: 8px; }

/* ── DESKTOP >=800px ── */
@media only screen and (min-width: 800px) {

    /* Plain rows: 3 equal columns, no scrolling */
    .cs-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        overflow-x: visible;
        scroll-snap-type: none;
        padding-bottom: 0;
        margin-bottom: 14px;
    }

    /* All cells reset to normal grid items */
    .cs-cell {
        flex: unset;
        max-width: unset;
        scroll-snap-align: unset;
        min-height: 220px;
    }

    .cs-cell--image img { min-height: 220px; }

    /* Slider-layout rows: also 3 equal columns on desktop.
       [text cell] [slider 1] [slider 2]  — all 1/3 width.
       If there is a 4th cell (e.g. Collaboration text),
       it spans full width on a new row below.             */
    .cs-row--slider-layout {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        overflow-x: visible;
        scroll-snap-type: none;
        padding-bottom: 0;
        margin-bottom: 14px;
    }

    /* Slider cells take their natural 1/3 column */
    .cs-row--slider-layout .cs-cell--slider {
        width: unset;
        max-width: unset;
        min-height: 260px;
    }

    /* Text cells take their natural 1/3 column */
    .cs-row--slider-layout .cs-cell--text {
        width: unset;
        max-width: unset;
        min-height: 220px;
    }

    /* If a 4th cell exists (like Collaboration in Crimson),
       force it to a new full-width row below               */
    .cs-row--slider-layout > .cs-cell:nth-child(4) {
        grid-column: 1 / -1;
    }

    /* Hide prev/next arrow buttons on desktop —
       dot indicators handle navigation            */
    .cs-cell--slider .cs-slide-btn {
        display: none !important;
    }

    /* Dots stay at bottom-centre of the slider cell */
    .cs-cell--slider .cs-slide-dots {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        padding: 0;
    }

    /* Slider cell needs position:relative for absolute dots */
    .cs-cell--slider {
        position: relative;
        overflow: hidden;
        border-radius: var(--radius-md);
        background-color: var(--brown-dark);
        border: none;
        display: flex;
        flex-direction: column;
    }
}

/* ── Slider internals (all screen sizes) ── */
.cs-slides-track {
    display: flex;
    width: 100%;
    height: 100%;
    flex: 1;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cs-slide {
    flex: 0 0 100%;
    width: 100%;
    overflow: hidden;
    min-height: 260px;
}

.cs-slide img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Slider dot indicators */
.cs-slide-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 8px;
    position: relative;
    background-color: transparent;
}

.cs-slide-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.25s ease, width 0.25s ease;
    flex-shrink: 0;
    border: none;
}

.cs-slide-dot.active {
    background-color: var(--cream);
    width: 18px;
    border-radius: 4px;
}

/* Arrow buttons (mobile only — hidden on desktop above) */
.cs-slide-btn {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.cs-slide-btn--prev { left: 10px; }
.cs-slide-btn--next { right: 10px; }
.cs-slide-btn:hover { background-color: var(--green-dark); }
.cs-slide-btn:hover img { filter: brightness(0) invert(1); }
.cs-slide-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: filter 0.25s ease;
}

/* Carousel dot indicators injected by casestudy.js
   below plain .cs-row rows — hidden on desktop      */
.cs-row-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 4px 0 16px;
}

.cs-row-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: rgba(30, 58, 31, 0.25);
    border: none;
    transition: background-color 0.25s ease, width 0.25s ease;
    flex-shrink: 0;
}

.cs-row-dot.active {
    background-color: var(--green-dark);
    width: 20px;
    border-radius: 4px;
}

@media only screen and (min-width: 800px) {
    /* Hide carousel dots on desktop — rows are grids, not carousels */
    .cs-row-dots { display: none !important; }
}

/* ── Typography font matching via data attributes ── */
.cs-type-specimen[data-font-primary="Zain"] .cs-type-sample--primary {
    font-family: var(--font-zain);
}
.cs-type-specimen[data-font-secondary="Gantari"] .cs-type-sample--secondary {
    font-family: var(--font-gantari);
}
.cs-type-specimen[data-font-primary="Urbanist"] .cs-type-sample--primary {
    font-family: var(--font-urbanist);
}
.cs-type-specimen[data-font-primary="Quicksand"] .cs-type-sample--primary {
    font-family: var(--font-quicksand);
}
.cs-type-specimen[data-font-secondary="Nunito"] .cs-type-sample--secondary {
    font-family: var(--font-nunito);
}