:root {
    --bg-colour: #f7f3eb;
    --card-white: #ffffff;
    --primary-colour: #3281ce;
    --primary-shadow-colour: #235a91;
    --primary-hover-colour: #478dd3;
    --text-main: #333333;
    --text-muted: #666666;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Default Status Colours */
    --status-positive: #2d6a4f;
    --status-negative: #bc4749;
}

/* --- ACCESSIBILITY MODE OVERRIDES --- */
body.accessible {
    --bg-colour: #ffffff;
    --card-white: #f0f0f0;
    --primary-colour: #004a99; /* Deep High-Contrast Blue */
    --primary-shadow-colour: #002d5e;
    --primary-hover-colour: #005bc1;
    --text-main: #000000;
    --text-muted: #222222;
    --status-positive: #004a99; 
    --status-negative: #e6a500; /* High Contrast Gold */
}

/* Specific UI adjustments for Accessible Mode */
body.accessible .pill-nav {
    background: var(--status-negative) !important;
    border: 2px solid var(--primary-colour) !important;
}

body.accessible .nav-link {
    color: #000000 !important; /* Black text for high contrast on Gold nav */
    font-weight: 700;
}

body.accessible .nav-link.active {
    color: #ffffff !important;
    background: var(--primary-colour);
    border-radius: 20px;
}

/* GLOBAL HOVER & BUTTON OVERRIDES */
/* This forces black text/high contrast on ALL interactive elements */

body.accessible button:not(.accessibility-toggle):hover,
body.accessible .btn-team:hover,
body.accessible .btn-text:hover,
body.accessible .project-action a:hover,
body.accessible .submit-btn:hover,
body.accessible a.case-link:hover,
body.accessible .location-pill:hover {
    background-color: #000000 !important; /* Pure black background */
    color: #ffffff !important;           /* White text for contrast */
    border: 2px solid var(--status-negative) !important;
    transform: translateY(-2px);
}

/* Specific fix for text buttons (like "View Project") */
body.accessible .btn-text, 
body.accessible .project-action a {
    color: #000000 !important;
    text-decoration: underline !important;
    font-weight: 800 !important;
}

/* --- ACCESSIBILITY TOGGLE BUTTON STYLING --- */
.accessibility-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-white);
    border: 2px solid var(--primary-colour);
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
    z-index: 2000;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
}

.accessibility-toggle:hover {
    transform: translateY(-2px);
    background: var(--primary-colour);
    color: white;
}

/* Toggle hover state when INSIDE accessible mode */
body.accessible .accessibility-toggle:hover {
    background: #000000 !important;
    color: var(--status-negative) !important;
    border-color: #ffffff !important;
}

/* Ensure all project cards and case study sections follow contrast rules */
body.accessible .card, 
body.accessible .case-header, 
body.accessible .section-card {
    border: 1px solid #000000 !important;
    box-shadow: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-colour);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    padding: 60px 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: 
        "intro intro status"
        "football spotify project"
        "foundations spotify story"
        "travel travel story";
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    align-items: start;
}

.card-intro {
    grid-area: intro;
    background-color: var(--card-white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
}

.intro-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.intro-text {
    flex: 2;
}

.intro-text h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.intro-text p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

.intro-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.intro-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-colour);
    box-shadow: var(--box-shadow);
}

.card-status {
    grid-area: status;
    background-color: var(--card-white);
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.availability-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.availability-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--text-main);
}

.availability-list li i {
    color: var(--primary-colour);
    font-size: 18px;
    width: 25px;
    text-align: center;
}

.status-links-minimal {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 25px;
}

.status-links-minimal a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-shadow-colour);
    color: var(--bg-colour);
    border-radius: 80px;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-links-minimal a:hover {
    background-color: var(--primary-hover-colour);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(50, 129, 206, 0.3);
}

.card-football {
    grid-area: football;
    background-color: var(--card-white);
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.card-football:hover {
    transform: translateY(-5px); /* Subtle lift on hover */
}

/* 1. Team Switcher (Buttons) */
.team-switcher {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-team {
    flex: 1;
    padding: 10px 5px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-dufc { background-color: #FF6601; }
.btn-nufc { background-color: #000000; border: 1px solid #D4AF37 !important; }
.btn-fcb { background-color: #A50044; }

.btn-team:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 2. Match Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
}

#match-status {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: #e91e63;
    padding: 4px 8px;
    background: rgba(233, 30, 99, 0.1);
    border-radius: 20px;
}

/* LIVE PULSE ANIMATION */
.live-pulse {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

/* 3. Scoreboard Section */
#match-container {
    transition: opacity 0.4s ease;
}

.match-info-top {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.logo-wrapper {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.team span {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
}

.score-display {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 38px; /* Slightly larger for impact */
    font-weight: 900;
    color: var(--text-main);
}

.score-display .divider {
    color: var(--text-muted);
    font-size: 22px;
    opacity: 0.5;
}

.logo-wrapper img {
    width: 50px;   /* Or whatever size fits your design */
    height: 50px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.card-spotify { 
    grid-area: spotify; 
    background-color: var(--primary-colour);
    display: flex;
    flex-direction: column;
    border-radius: 30px;
    color: var(--card-white);
    padding: 25px;
    min-height: 700px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease;
}

.card-spotify:hover {
    transform: translateY(-5px);
    background-color: var(--primary-hover-colour);
}

.card-spotify span, .history-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    display: block;
}

#track-art { 
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 220px;
    border-radius: 15px;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

#track-title { 
    font-size: 22px; 
    font-weight: 700; 
    color: var(--card-white);
    margin: 0;
    line-height: 1.2;
}

#track-artist { 
    color: rgba(255, 255, 255, 0.9);
    margin: 6px 0 20px 0; 
    font-size: 15px; 
}

.progress-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    height: 5px;
    border-radius: 10px;
    margin: 10px 0;
}

#progress-bar {
    height: 100%;
    background: var(--primary-shadow-colour);
    width: 0%;
    transition: width 1s linear;
    border-radius: 10px;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--card-white);
    margin-top: 8px;
    font-family: monospace;
}

.history-section {
    margin-top: 40px;
}

.history-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

.history-item img { 
    width: 48px; 
    height: 48px; 
    border-radius: 8px; 
    object-fit: cover; 
}

.history-info p {
    margin: 0;
    font-size: 13px;
    color: var(--card-white);
    font-weight: 500;
}

.h-artist {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8) !important;
}

.card-project { 
    grid-area: project; 
    box-shadow: var(--box-shadow);
}

.card-project img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: #e0e0e0;
    border-radius: 20px;
    margin: 15px 0;
    display: block;
    box-shadow: var(--box-shadow);
}

.card-project button {
    background-color: #6a8d7a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
    transition: transform 0.2s;
}

.card-project button:hover {
    transform: scale(1.03);
}

.card-foundations {
    grid-area: foundations;
    background-color: var(--card-white);
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
}

.foundation-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 30px;
}

.foundation-item:last-child {
    margin-bottom: 0;
}

.icon-box {
    width: 55px;
    height: 55px;
    background-color: var(--card-white);
    border: #3281ce solid 2px;
    color: var(--primary-colour);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.info h3 {
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-colour);
    margin: 0 0 8px 0;
    font-weight: 800;
}

.info p {
    margin: 0;
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.5;
    font-weight: 500;
}

.edu-title {
    font-size: 18px !important;
    font-weight: 700;
    margin-bottom: 4px !important;
}

.edu-meta {
    font-size: 15px !important;
    color: var(--text-muted) !important;
    font-weight: 400 !important;
}

.card-story {
    grid-area: story;
    background-color: var(--card-white);
    padding: 35px;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.story-section {
    position: relative;
}

.story-section:not(:last-child):after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: var(--bg-colour);
    margin-top: 25px;
    border-radius: 2px;
}

.story-section h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-colour);
    margin: 0 0 12px 0;
    font-weight: 800;
}

.story-section p {
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-main);
    font-weight: 400;
}

.story-section p strong {
    color: var(--text-muted);
    font-weight: 700;
    background: linear-gradient(180deg, transparent 70%, rgba(50, 129, 206, 0.1) 30%);
}

.card-story h2 {
    margin-bottom: 10px;
}

.card-travel {
    grid-area: travel;
    background-color: var(--card-white);
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
}

.travel-bio {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.location-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.location-pill {
    background-color: var(--card-white);
    border: #004a99 solid 1px;
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fi {
    border-radius: 2px;
}

.next-destination {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f7f3eb 50%, #3281ce 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(0,0,0,0.05);
}

.flag-large {
    font-size: 30px;
    width: 40px !important;
    height: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.next-info {
    display: flex;
    flex-direction: column;
}

.next-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    color: var(--primary-colour);
}

.next-country {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.card {
    background-color: white;
    border-radius: 30px;
    padding: 30px;
    height: 100%; 
}

/* ==========================================================================
   PILL NAVIGATION & SLIDER
   ========================================================================== */

.pill-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    backdrop-filter: blur(12px); /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(12px);
    padding: 6px; /* Space between border and the blue slider */
    border-radius: 100px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* The Moving Blue Pill */
.nav-slider {
    position: absolute;
    /* Height matches the nav height minus the padding (6px top + 6px bottom) */
    height: calc(100% - 12px); 
    top: 6px;
    left: 6px; /* Initial position */
    background: var(--primary-colour);
    border-radius: 100px;
    
    /* This makes the movement smooth */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* The Links */
.nav-link {
    position: relative;
    z-index: 2; /* Sits on top of the blue slider */
    text-decoration: none;
    color: var(--text-muted);
    padding: 10px 25px;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
    min-width: 90px;
    text-align: center;
}

/* Text color when the blue pill is underneath */
.nav-link.active {
    color: #ffffff;
}

/* Hover effect for non-active links */
.nav-link:not(.active):hover {
    color: var(--text-main);
}

/* --- CONTACT PAGE SPECIFIC STYLES --- */

.contact-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    width: 100%;
}

/* Row 1 & 4 & Form span full width */
.hero-card, .form-card, .resume-card {
    grid-column: span 3;
    background-color: var(--card-white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
}

/* Hero Section specific spacing */
.hero-card h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: var(--text-main);
}

/* Social Grid (Row 2) */
.social-grid {
    grid-column: span 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.social-item {
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-item .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.social-item i {
    font-size: 24px;
    color: var(--primary-colour);
}

.social-item .arrow {
    color: var(--text-muted);
    font-weight: bold;
}

.social-item h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text-main);
}

/* Contact Form Styling */
.form-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.availability-badge {
    background-color: rgba(50, 129, 206, 0.1);
    color: var(--primary-colour);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.input-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

#contact-form input, 
#contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border-radius: 15px;
    border: 2px solid var(--primary-colour);
    background-color: var(--card-white);
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
}

#contact-form input:focus, 
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-hover-colour);
    background-color: rgba(50, 129, 206, 0.05);
}

.submit-btn {
    background-color: var(--primary-colour);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--primary-hover-colour);
}

/* Resume Card Styling */
.resume-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-btn {
    text-decoration: none;
    background-color: var(--primary-shadow-colour);
    color: white;
    padding: 15px 30px;
    border-radius: 80px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background-color: var(--primary-hover-colour);
    transform: translateY(-3px);
}

/* ==========================================================================
   PROJECTS PAGE LAYOUT
   ========================================================================== */

.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 140px 20px; /* Extra bottom padding for the pill-nav */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Sub-Navigation Pill Bar --- */
.project-sub-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sub-link {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-link:hover {
    background: #fff;
    color: var(--text-main);
}

.sub-link.active {
    background: #fff;
    color: var(--primary-colour);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Header Card --- */
.project-header-card {
    text-align: left;
    padding: 40px;
}

.project-header-card h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--primary-colour);
}

/* --- Tab View Visibility Logic --- */
.project-view {
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease forwards;
}

.project-view.active {
    display: flex; /* Only active view shows */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Featured (Large) Project --- */
/* Main layout container (The Light Grey Box) */
.project-preview-layout {
    display: flex; /* Enables side-by-side layout */
    align-items: center; /* Vertically centers the text against the image */
    gap: 40px; /* Space between the image and the text block */
    padding: 40px; /* Internal spacing within the bento box */
    background-color: var(--card-white); /* The light grey bento color */
    border-radius: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* 1. Left Side: The Image Area */
.project-preview-large {
    flex: 1; /* Takes up equal space as the text info */
    width: 50%;
    height: 100%;
}

.project-image-container {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Important to keep zoomed image in bounds */
}


/* Hover Effect: The complex image zooms slightly within the container */
.featured-project-card:hover .project-image {
    transform: scale(1.03);
}

/* 2. Right Side: The Text Area */
.project-info {
    flex: 1; /* Takes up equal space as the image */
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spacing between title, text, meta, button */
}

.project-title-row h2 {
    font-size: 24px;
    color: #1a1b23;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.project-info p {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.project-meta {
    display: flex;
    flex-wrap: wrap; /* Wraps to new line on mobile */
    gap: 15px;
    font-size: 13px;
    color: #777;
    margin-top: 5px;
}

.project-action {
    margin-top: 20px;
}

/* --- Secondary Projects (Two Columns) --- */
.secondary-projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Container for the small bento card */
.small-project-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.small-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* 1. The Top Mockup Area (Light Beige/Grey Background) */
.project-preview-small {
    background-color: #fdf8f3; /* Matching the soft cream/beige in your reference image */
    padding: 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    overflow: hidden;
}

.small-image-size {
    width: 100%
}

.small-project-card:hover .desktop-mock {
    transform: scale(1.05) rotate(-1deg);
}

.project-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 2. The Bottom Information Area */
.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-info h3 {
    font-size: 20px;
    color: #1a1b23;
    font-weight: 700;
    margin: 0;
}

.project-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.project-preview-small {
    height: 250px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analytics-bg { background-color: #1a1b23; }
.mobile-bg { background-color: #eef6ff; }
.ux-study-bg { 
    background-color: #f8f9fa; 
    color: var(--primary-colour);
    font-size: 3rem;
}

/* --- Project Text Info --- */
.project-info {
    padding: 30px;
}

.project-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-info h2, .project-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.project-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.project-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

/* --- BUTTON ACTIONS --- */
.project-action {
    margin-top: 25px;
}

/* Primary Button (For Featured Card) */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-colour);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(50, 129, 206, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 129, 206, 0.3);
    filter: brightness(1.1);
}

/* Text Button (For Grid Cards) */
.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-colour);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: gap 0.2s ease, color 0.2s ease;
    margin-top: 10px;
}

.btn-text i {
    font-size: 12px;
}

.btn-text:hover {
    gap: 12px; /* Moves the arrow slightly */
    color: var(--text-main);
}

/* Arrow icon in title rows */
.arrow-icon {
    color: #ccc;
    font-size: 20px;
    transition: color 0.3s ease;
}

.card:hover .arrow-icon {
    color: var(--primary-colour);
}

/* --- UX Specific Components --- */
.category-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-colour);
    background: rgba(50, 129, 206, 0.1);
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Extra Projects Card (Footer) --- */
.extra-projects-card {
    padding: 40px;
}

.extra-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.extra-content .icon-box {
    width: 60px;
    height: 60px;
    background: #f0f7ff;
    color: var(--primary-colour);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.extra-text {
    flex-grow: 1;
}

.view-all-btn {
    padding: 12px 25px;
    background: var(--primary-colour);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.view-all-btn:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   CASE STUDY PAGE STYLES (CENTERED)
   ========================================================================== */

/* 1. Reset/Layout Fix */
.case-study-page {
    background-color: var(--bg-colour);
    display: block; 
    margin: 0;
    padding: 0;
    width: 100%;
}

/* 2. Centered Container */
.case-container {
    max-width: 900px; 
    margin: 0 auto; 
    padding: 40px 20px 180px 20px;
    display: flex;
    flex-direction: column;
    gap: 60px;
    box-sizing: border-box;
}

/* 3. Navigation & Back Button */
.case-nav {
    max-width: 900px;
    margin: 40px auto 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: left;
}

.back-btn {
    text-decoration: none;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover { color: var(--primary-colour); }

/* Version Toggle Navigation */
.case-sub-nav {
    margin: 30px auto 0 auto;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 4. Visibility Logic for 2023/2026 Views */
.version-view {
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 60px;
    animation: caseFadeIn 0.5s ease forwards;
}

.version-view.active {
    display: flex; /* Only shown when active */
}

@keyframes caseFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 5. Case Header & Typography */
.case-header .project-type {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    color: #999;
    font-weight: 700;
}

.case-header h1 {
    font-size: 36px;
    margin: 10px 0 0 0;
    color: #1a1b23;
}

.section-number {
    font-size: 18px;
    font-weight: 700;
    color: #1a1b23;
    margin-bottom: 5px;
}

.section-divider {
    width: 40px;
    height: 3px;
    background: var(--primary-colour);
    margin-bottom: 25px;
}

.section-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    max-width: 750px;
}

/* Ensure the card allows the div to fill the space */
.hero-display-card {
    padding: 0 !important;
    overflow: hidden;
    height: 600px; /* Adjust height as needed */
}

/* New wrapper div set to full size */
.prototype-wrapper {
    width: 100%;
    height: 100%;
}

/* Iframe fills the wrapper */
.adobe-prototype {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Custom Goal List Styling */
.goal-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 30px;
}

.goal-list li {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

.goal-list .bullet {
    color: var(--primary-colour);
    font-weight: bold;
}

.goal-list strong {
    color: #333;
}

/* Enhancing standard paragraph spacing within sections */
.section-content p + p {
    margin-top: 15px;
}

/* 7. Research Grid & Cards */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
    width: 100%;
}

.research-card {
    padding: 25px;
    background: white;
    border-radius: 20px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.3s ease;
}

.research-card h4 {
    font-size: 15px;
    margin: 0 0 10px 0;
    color: var(--primary-colour);
    font-weight: 700;
}

.research-card p {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   SECTION 03: DESIGN SOLUTION (ARTEFACT GRID)
   ========================================================================== */

/* Grid Layout for 03. Design Solution */
.artefact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Card Styling */
.artefact-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #eee;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Grey Image Box */
.image-container {
    width: 100%;
    height: 220px;
    background-color: #f5f7fa; /* Light grey background */
    display: flex;
    overflow: hidden;
}

/* Standard Image Fit */
.artefact-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Makes sure images fill the grey area */
    display: block;
}

/* This forces the card to take up the full row */
.wide-card {
    grid-column: 1 / -1;
}

/* Optional: Increase the height of the dual-image container 
   since it now has more horizontal room */
.wide-card .image-container {
    height: 350px; /* Adjust as needed for your images */
}

/* Ensure images sit nicely inside the now wider container */
.wide-card .dual-image {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    gap: 20px;
}

.wide-card .dual-image .artefact-img {
    width: 50%; /* Adjusted for better spacing in a wide row */
    height: auto;
    object-fit: contain;
}
/* Label Styling */
.artefact-label {
    padding: 20px;
}

.artefact-label h4 {
    margin: 0 0 8px 0;
    font-size: 17px;
    color: #1a1b23;
}

.artefact-label p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

/* Special Case: Logo should not be cropped */
.artefact-card:first-child .artefact-img {
    object-fit: contain;
    padding: 20px;
}

/* Section Header Typography (If not already in your global styles) */
.section-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: #1a1b23;
    margin-top: 40px;
    margin-bottom: 15px;
}

/* Link Card Specifics */
.link-card {
    background: #f0f7ff;
    border: 2px dashed var(--primary-colour);
    align-items: center;
    text-align: center;
}

.link-card i {
    font-size: 24px;
    color: var(--primary-colour);
    margin-bottom: 12px;
}

/* 8. Result Grid & Items */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.result-item {
    padding: 30px;
    background: white;
    border-radius: 20px;
    border: 1px solid #eee;
}

.result-item .label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 10px;
}

.result-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-colour);
    margin: 0;
}

/* Coming Soon Styling */
.coming-soon-card {
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(145deg, #ffffff, #f0f4f8);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.coming-soon-content {
    max-width: 500px;
    padding: 40px;
}

.icon-pulse {
    font-size: 3rem;
    color: var(--primary-colour);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.coming-soon-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #1a1b23;
}

.coming-soon-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.status-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(50, 129, 206, 0.1);
    color: var(--primary-colour);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- VA Dundee Case Study Extras --- */
/* Responsive Figma Embed */
.hero-display-card {
    padding: 0 !important; /* Removes padding to let the iframe fill the card if desired */
    overflow: hidden;
    height: 500px; /* Fixed height for the hero display */
}

.iframe-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Container for header links */
.case-external-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Base style for both buttons */
.live-demo-link, .github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Live Demo Button (Primary) */
.live-demo-link {
    background-color: var(--primary-colour);
    color: white;
}

/* GitHub Button (Secondary/Outline) */
.github-link {
    background-color: var(--primary-colour);
    color: var(--text-color, #fff);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hover effects */
.live-demo-link:hover, .github-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Prototype Area */
.prototype-container {
    margin: 2rem 0;
    padding: 1.5rem;
    /* Changed to match your cream/beige bento theme seen in screenshots */
    background: #fdf8f3; 
    border-radius: 24px;
    border: 1px solid #f0f0f0;
}

.prototype-image-wrapper {
    display: block; /* Changed from flex to allow top-down positioning */
    background: #1a1b23; /* Dark navy background matching the site's header */
    border-radius: 12px;
    width: 100%;
    height: 500px; /* Increased height to show more of the hero section */
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    cursor: -moz-zoom-in;
}

/* FIX: The artefact-img specific styling */
.va-img {
    width: 100%;
    height: 100%;
    /* 'cover' ensures it fills the 500px height box */
    object-fit: cover; 
    /* 'top' ensures the Nav and Hero are visible, not the middle of the page */
    object-position: top; 
    display: block;
    transition: transform 0.5s ease;
}

/* Hover effect for better interactivity before clicking the lightbox */
.prototype-container:hover .va-img {
    transform: scale(1.02);
}

/* Research Grid Adjustments */
.research-grid-VA {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.research-card-VA h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-color);
}

/* Result Highlighting */
.result-value-VA {
    color: #2ecc71; /* Success Green */
    font-size: 2.5rem;
    margin: 10px 0;
}

/* --- Case Study: Design Solution Bento Grid --- */

.cs-design-persona-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.cs-design-artefact-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* Unique Bento Card Styling */
.cs-design-bento-card {
    background: var(--card-white);
    border-radius: 25px;
    border: 1px solid rgba(0,0,0,0.08); /* Slightly darker border for definition */
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Image Box Logic */
.cs-design-img-box {
    width: 100%;
    height: 200px; 
    background-color: #f8f9fa;
    overflow: hidden;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* --- Lightbox Overlay --- */
.cs-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Dark background to focus on image */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 40px;
    backdrop-filter: blur(5px);
}

/* State when lightbox is active */
.cs-lightbox.active {
    display: flex;
}

.cs-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
}

.cs-lightbox-img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* Close Button (The Cross) */
.cs-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 35px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cs-lightbox-close:hover {
    transform: scale(1.2);
}

/* Indicate image is clickable */
.cs-design-img-box {
    cursor: -webkit-grab;
}

.cs-design-artefact-row .cs-design-img-box {
    height: 280px; /* Taller for Journey/Wireframe visibility */
}

.cs-design-bento-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Enhanced Typography for Readability */
.cs-design-bento-content {
    padding: 24px;
}

.cs-design-bento-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main); /* High contrast */
    letter-spacing: -0.01em;
}

.cs-design-bento-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted); /* Soft but readable */
}

/* --- AcclimatizeMeNow Specific Styles --- */

.acme-section {
    margin: 5px; /* Note: You might want to increase this to '5rem 0' for better section breathing room */
}

/* Bento & Cards */
.acme-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.acme-card {
    background: var(--card-white);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #f0f0f0;
}

/* --- NEW: Strategy & Brainstorming Box --- */
.acme-strategy-box {
    background: var(--card-white); /* Matches your table header and theme */
    border-left: 5px solid #333;
    padding: 3rem;
}

.acme-strategy-content h3 {
    margin-top: 0;
}

.acme-goal-list {
    margin-top: 1rem;
}

.acme-bullet {
    color: #333;
    font-weight: bold;
    margin-right: 10px;
}

/* --- Persona Layout --- */
.acme-persona-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.acme-persona-img-container {
    width: 100%;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    cursor: pointer;
}

.acme-persona-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: top; 
    display: block;
}

.acme-persona-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- NEW: User Flow Container --- */
.acme-flow-container {
    background: var(--card-white);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #eee;
    margin: 2rem 0;
    transition: transform 0.3s ease;
}

.acme-flow-container:hover {
    transform: translateY(-5px);
}

/* Competitor Table */
.acme-table-container { 
    overflow-x: auto; 
    margin-top: 1.5rem; 
    border-radius: 12px; 
    border: 1px solid #eee; 
}

.acme-analysis-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
    text-align: left; 
}

.acme-analysis-table th, 
.acme-analysis-table td { 
    padding: 1.2rem; 
    border-bottom: 1px solid #eee; 
}

.acme-analysis-table th { 
    background: var(--card-white); 
    font-weight: 700; 
    font-size: 0.85rem; 
}

.acme-check { color: var(--status-positive); font-weight: bold; text-align: center; }
.acme-cross { color: var(--status-negative); font-weight: bold; text-align: center; }

/* Visual Grid (Images fit boxes) */
.acme-visual-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 2rem; 
}

.acme-img-wrapper { 
    width: 100%; 
    height: 450px; 
    overflow: hidden; 
    border-radius: 12px; 
    background: #eee; 
    margin-bottom: 1.5rem; 
    cursor: pointer;
}

.acme-fit-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: top; 
    display: block; 
}

/* Typography Helpers */
.acme-subtitle { margin: 2rem 0 1rem; font-size: 1.25rem; font-weight: 700; }
.acme-margin-v { margin: 3rem 0; }
.acme-label { font-size: 0.8rem; text-transform: uppercase; opacity: 0.6; }
.acme-result-value { font-size: 2.5rem; margin-top: 0.5rem; color: #333; }

/* --- Final Result Styling --- */

.acme-result-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    background: var(--card-white);
}

.acme-result-card:hover {
    transform: translateY(-5px);
    border-color: #333;
    background: #fff;
}

.acme-result-value {
    font-size: 3rem;
    font-weight: 800;
    color: #222;
    margin: 0.5rem 0;
    text-transform: uppercase;
}

.acme-label {
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #888;
    display: block;
    font-size: 0.75rem;
}

.acme-result-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* --- Reflections & Future Iterations --- */

.acme-strategy-box {
    background-color: var(--card-white); /* Matches your competitor table header */
    border-left: 5px solid #333; /* Thick professional accent */
    padding: 3rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 0 15px 15px 0; /* Keeps the left edge sharp and the right soft */
}

.acme-strategy-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #222;
    letter-spacing: -0.5px;
}

.acme-strategy-box p {
    line-height: 1.7;
    color: #444;
    margin-bottom: 1.5rem;
}

.acme-goal-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.acme-goal-list li {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
    color: #333;
}

.acme-bullet {
    color: #333;
    font-weight: 900;
    font-size: 1.2rem;
    line-height: 1;
    margin-top: 2px;
}

/* Specific styling for the Wearable highlights */
.acme-goal-list strong {
    color: #000;
    font-weight: 700;
}

/* --- DUCT Gallery Specific Styles --- */

.duct-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 2rem;
    margin-top: 3rem;
    padding-bottom: 5rem;
}

.duct-gallery-card {
    padding: 0 !important; /* Overriding default card padding for flush images */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.duct-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10; /* Maintains the landscape rectangular shape */
    overflow: hidden;
    cursor: pointer;
    background: #f4f4f4;
}

.duct-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.duct-img-wrapper:hover img {
    transform: scale(1.05); /* Subtle zoom on hover */
}

.duct-card-info {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duct-card-info p {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.4;
    margin: 0;
}


/* ==========================================================================
   MASTER MOBILE RESPONSIVE BLOCK (MAX-WIDTH: 768px)
   Targets: Index, Contact, Projects, and Case Studies
   ========================================================================== */

@media (max-width: 768px) {
    /* 1. Global Reset */
    body {
        padding: 20px 15px 120px 15px; /* Space for the fixed nav pill */
    }

    /* 2. INDEX PAGE: Bento Grid to Vertical Stack */
    .grid-container {
        display: flex;
        flex-direction: column;
        grid-template-areas: none; /* Disables desktop layout map */
        gap: 15px;
        margin: 20px auto;
    }

    .card-intro { padding: 25px; }
    .intro-content {
        flex-direction: column-reverse; /* Image on top, text below */
        text-align: center;
        gap: 20px;
    }
    .intro-image img { width: 150px; height: 150px; }
    .intro-text h1 { font-size: 32px; }

    /* 3. NAVIGATION PILL (Fixed at bottom) */
    .pill-nav {
        width: 95%;
        bottom: 15px;
        padding: 4px;
        justify-content: space-around;
    }
    .nav-link {
        padding: 12px 10px;
        font-size: 12px;
        min-width: 65px;
    }

    /* 4. PROJECTS PAGE: Large & Small Cards */
    .project-header-card { padding: 25px; text-align: center; }
    
    .project-preview-layout {
        flex-direction: column; /* Image stacks on text */
        padding: 20px;
    }
    .project-preview-large, .project-info { width: 100%; }

    .secondary-projects-grid {
        grid-template-columns: 1fr; /* 2 columns become 1 */
    }

    /* 5. CONTACT PAGE: Form & Socials */
    .contact-container, 
    .social-grid, 
    .input-row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .hero-card, .form-card, .resume-card { grid-column: span 1; padding: 25px; }
    .hero-card h1 { font-size: 30px; }

    /* 6. CASE STUDIES (VA Dundee, ACME, Subman) */
    .case-container { padding-bottom: 120px; gap: 35px; }
    .case-header h1 { font-size: 28px; }
    
    /* Prototype & Image Heights */
    .hero-display-card { height: 350px !important; }
    .prototype-image-wrapper { min-height: 250px; }
    .acme-persona-img-container { height: 400px; }
    .acme-img-wrapper { height: 300px; }

    /* Grid Resets for Case Study Sections */
    .result-grid, 
    .artefact-grid, 
    .acme-visual-grid, 
    .acme-persona-layout,
    .duct-gallery-grid,
    .duct-card-grid { 
        grid-template-columns: 1fr !important; 
        gap: 1.5rem;
    }

    /* Links & Strategy Boxes */
    .case-external-links { flex-direction: column; }
    .live-demo-link, .github-link { width: 100%; justify-content: center; }
    
    /* Wide Cards (Artefacts) */
    .wide-card .dual-image {
        flex-direction: column;
        align-items: center;
    }
    .wide-card .dual-image .artefact-img { width: 100%; }

/* 1. Ensure the container doesn't force a horizontal scroll */
    .acme-content {
        width: 100% !important;
        padding: 0 !important;
        overflow-x: hidden;
    }

    /* 2. Reset the strategy box for mobile */
    .acme-strategy-box {
        width: 100% !important;
        padding: 1.5rem !important;
        margin: 0 !important;
        border-left: 4px solid var(--primary-colour) !important;
        box-sizing: border-box; /* Crucial for preventing overflow */
    }

    /* 3. Typography Adjustments */
    .acme-strategy-box h3, 
    .acme-subtitle {
        font-size: 1.2rem !important;
        line-height: 1.3;
        margin-top: 1.5rem;
    }

    .acme-strategy-box p {
        font-size: 0.95rem !important;
        line-height: 1.6;
    }

    /* 4. Fix the Bullet List spacing */
    .acme-goal-list {
        margin-top: 20px !important;
    }

    .acme-goal-list li {
        display: flex;
        gap: 10px;
        margin-bottom: 20px !important;
        font-size: 0.9rem !important;
        line-height: 1.5;
        align-items: flex-start;
    }

    .acme-bullet {
        color: var(--primary-colour);
        font-weight: bold;
        flex-shrink: 0; /* Prevents bullet from squishing */
    }

    /* 7. UI Elements */
    .accessibility-toggle {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 11px;
    }
}