:root {
    /* little bit of colour, lifted from the game's own purple UI */
    --accent: #f1bd00;
    --accent-dim: #7c6500;
    --project-track: rgba(255, 255, 255, 0.08);
    --project-fade: rgba(14, 14, 14, 0);
    --project-divider: rgba(255, 255, 255, 0.12);
    --section-divider: rgba(255, 255, 255, 0.14);
    --video-background: #000000;
    --meta-divider: rgba(255, 255, 255, 0.15);
    --phase-divider: rgba(255, 255, 255, 0.1);
    --retro-background: rgba(255, 165, 0, 0.06);
    --mobile-nav-background: rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] {
    --project-track: rgba(0, 0, 0, 0.08);
    --project-fade: rgba(241, 241, 241, 0);
    --project-divider: rgba(0, 0, 0, 0.12);
    --section-divider: rgba(0, 0, 0, 0.14);
    --video-background: #ffffff;
    --meta-divider: rgba(0, 0, 0, 0.15);
    --phase-divider: rgba(0, 0, 0, 0.1);
    --mobile-nav-background: rgba(255, 255, 255, 0.85);
}

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

:focus-visible {
    outline: 2px dashed var(--accent);
}

/* ============ PAGE PROGRESS BAR ============ */

.progress-track {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--project-track);
    z-index: 70;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.1s linear;
}

/* ============ NAVBAR (same as home â€” hidden until scroll) ============ */

.nav {
    backdrop-filter: blur(14px) saturate(120%);
}

/* ============ HERO IMAGE (top of page, fades into the intro below) ============ */

.case-hero {
    position: relative;

    height: 55vh;

    min-height: 320px;

    overflow: hidden;

    background: var(--off-black);
}

.case-hero img {
    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: bottom;
}

.case-hero::after {
    content: "";

    position: absolute;

    left: 0;

    right: 0;

    bottom: 0;

    height: 55%;

    background: linear-gradient(
        to bottom,

        var(--project-fade) 0%,

        var(--off-black) 92%
    );

    pointer-events: none;
}

/* ============ CASE HEADER (off-black, title sits below the hero) ============ */

.case-header {
    background: var(--off-black);

    padding: clamp(40px, 6vw, 72px) clamp(20px, 6vw, 80px)
        clamp(48px, 7vw, 80px);

    text-align: center;

    border-bottom: 2px solid var(--project-divider);
}

.eyebrow {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    font-size: 0.78rem;

    font-weight: 600;

    letter-spacing: 0.14em;

    text-transform: uppercase;

    color: var(--accent);

    border: 2px solid var(--accent);

    padding: 6px 14px;

    margin-bottom: 22px;
}

.eyebrow svg {
    width: 14px;

    height: 14px;

    fill: var(--accent);

    stroke: none;
}

.case-header h1 {
    font-size: clamp(2.6rem, 7vw, 5rem);

    line-height: 1;
}

.hook {
    max-width: 56ch;

    margin: 18px auto 0;

    color: var(--quote);

    font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.badge-row {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 10px;

    margin-top: 28px;
}

.badge {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    border: 2px solid var(--line);

    padding: 7px 14px;

    font-size: 0.85rem;

    font-weight: 500;
}

.badge svg {
    width: 15px;

    height: 15px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.8;
}

.stat-highlight {
    margin: 30px auto 0;

    display: inline-flex;

    align-items: baseline;

    gap: 10px;

    border: 2px solid var(--accent);

    padding: 14px 26px;

    background: var(--retro-background);
}

.stat-highlight .num {
    font-family: var(--font-heading);

    font-size: clamp(1.8rem, 4vw, 2.6rem);

    color: var(--accent);
}

.stat-highlight .label {
    font-size: 0.85rem;

    color: var(--grey);
}

.cta {
    margin-top: 32px;
}

.btn-primary {
    background: var(--accent);

    border-color: var(--accent);

    box-shadow: 5px 5px 0 var(--accent-dim);
}

.btn-primary:hover {
    box-shadow: 0 0 0 var(--accent-dim);
}

.btn {
    margin: 16px;
}

/* ============ GENERIC SECTION (full black) ============ */

.section {
    padding: clamp(56px, 8vw, 100px) clamp(20px, 6vw, 80px);

    border-top: 2px solid var(--section-divider);
}

.section-inner {
    max-width: 880px;

    margin: 0 auto;
}

.section-inner.wide {
    max-width: 1080px;
}

.section-label {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 20px;
}

.section-label .num {
    font-family: var(--font-heading);

    font-size: 1.1rem;

    width: 38px;

    height: 38px;

    display: grid;

    place-items: center;

    border: 2px solid var(--accent);

    color: var(--accent);

    flex-shrink: 0;
}

.section h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.section p {
    color: var(--grey);
    max-width: 100%;
}

.section p + p {
    margin-top: 14px;
}

/* ============ VERTICAL DEMO VIDEO (mobile app = portrait capture) ============ */

.video-frame {
    max-width: 380px;

    margin: 0 auto;

    border: 2px solid var(--line);

    background: var(--off-black);

    overflow: hidden;
}
.video-frame.fullsize {
    max-width: fit-content;
}

.video-frame video {
    display: block;
    width: 100%;
    object-fit: cover;
    background: var(--video-background);
}

.video-caption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--grey);
    margin-top: 16px;
}

/* ============ VERTICAL SCREENSHOT (spread inline with text, not a grid) ============ */

.phase-split {
    display: flex;

    gap: 28px;

    align-items: flex-start;

    flex-wrap: wrap;

    margin-top: 18px;
}

.phase-split .text-col {
    flex: 1 1 320px;
}

.phase-split .text-col p {
    margin: 0 0 14px;
}

.phase-split .text-col p:last-child {
    margin-bottom: 0;
}

.shot-figure {
    flex: 0 1 240px;

    max-width: 240px;

    border: 2px solid var(--image-border);

    margin: 0 auto;
}

.shot-figure img {
    width: 100%;

    aspect-ratio: 9 / 16;

    object-fit: cover;

    display: block;
}

.shot-figure figcaption {
    padding: 10px 12px;

    font-size: 0.8rem;

    color: var(--grey);

    border-top: 2px solid var(--image-border);
}

/* ============ RESULT ROW: text + a tall (vertical) image, 3:2, text-first on mobile ============ */

.result-row {
    display: flex;

    gap: 28px;

    align-items: flex-start;

    flex-wrap: wrap;

    margin-top: 24px;
}

.result-row .text-col {
    flex: 3 1 320px;
}

.result-row .img-col {
    flex: 2 1 220px;

    display: flex;

    justify-content: center;
}

.tall-figure {
    display: block;

    /* width: max-content; */

    max-width: 100%;

    border: 2px solid var(--image-border);

    margin: 0;
}

.tall-figure img {
    display: block;

    width: auto;
    margin:auto;
    height: auto;

    max-height: 500px;

    max-width: 100%;
}

.tall-figure figcaption {
    padding: 10px 12px;

    font-size: 0.8rem;

    color: var(--grey);

    border-top: 2px solid var(--image-border);

    text-align: center;
}

/* ============ ROLE LIST ============ */

.role-list {
    list-style: none;

    margin: 0;

    padding: 0;

    display: grid;

    gap: 14px;
}

.role-list li {
    border-left: 3px solid var(--accent);

    padding: 4px 0 4px 16px;

    color: var(--quote);
}

.role-list strong {
    color: var(--white);
}

/* ============ TIMELINE / TECH BADGE ============ */

.meta-line {
    font-size: 0.9rem;

    color: var(--grey);

    border-bottom: 1px solid var(--meta-divider);

    padding-bottom: 18px;

    margin-bottom: 28px;
}

.meta-line strong {
    color: var(--white);
}

.timeline-badge {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    border: 2px solid var(--accent);

    color: var(--accent);

    padding: 6px 14px;

    font-size: 0.8rem;

    font-weight: 600;

    margin-top: 12px;
}

/* ============ SUB-PHASE BLOCKS ============ */

.phase {
    padding: 32px 0;

    border-top: 1px solid var(--phase-divider);
}

.phase:first-of-type {
    border-top: none;

    padding-top: 8px;
}

.phase-tag {
    font-family: var(--font-heading);

    color: var(--accent);

    font-size: 1rem;

    margin-bottom: 10px;
}

.phase h3 {
    font-size: clamp(1.2rem, 2.6vw, 1.5rem);

    margin-bottom: 10px;
}

/* ============ SYSTEM CARD GRID ============ */

.card-grid {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

    gap: 14px;

    margin-top: 18px;
}

.sys-card {
    border: 2px solid var(--image-border);

    padding: 16px;

    transition: border-color 0.15s;
}

.sys-card:hover {
    border-color: var(--accent);
}

.sys-card .name {
    font-weight: 700;

    display: block;

    margin-bottom: 6px;
}

.sys-card .desc {
    font-size: 0.88rem;

    color: var(--grey);
}

/* ============ AI STEP LIST ============ */

.step-list {
    list-style: none;

    margin: 18px 0 0;

    padding: 0;

    display: grid;

    gap: 16px;

    counter-reset: step;
}

.step-list li {
    display: flex;

    gap: 16px;

    align-items: flex-start;
}

.step-list li::before {
    counter-increment: step;

    content: counter(step);

    font-family: var(--font-heading);

    flex-shrink: 0;

    width: 34px;

    height: 34px;

    border: 2px solid var(--accent);

    color: var(--accent);

    display: grid;

    place-items: center;

    font-size: 0.95rem;
}

.step-list b {
    color: var(--white);
}

/* ============ IMAGE BLOCK WITH CAPTION (full-width, landscape figures) ============ */

.figure {
    margin: 26px 0 0;

    border: 2px solid var(--image-border);
}

.figure img {
    width: 100%;
}

.figure figcaption {
    padding: 12px 16px;

    font-size: 0.85rem;

    color: var(--grey);

    border-top: 2px solid var(--image-border);
}

/* ============ RETROSPECTIVE ============ */

.retro {
    border: 2px solid var(--accent);

    padding: clamp(24px, 4vw, 40px);

    background: var(--retro-background);
}

footer {
    display: flex;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: 12px;
}

footer a:hover {
    color: var(--accent);
}

/* ============ MOBILE ============ */

@media (max-width: 760px) {
    .nav-links {
        background: var(--mobile-nav-background);
    }

    .result-row .img-col {
        justify-content: flex-start;
    }
}

.case-header--flush {
    padding-top: 0;
}

.image--centered {
    margin: auto;
}

.subheading {
    margin-top: 28px;
    font-size: 1.1rem;
    color: var(--accent);
    font-family: var(--font-body);
    font-weight: 600;
}

.paragraph--spaced {
    margin-top: 18px;
}

.section--centered {
    text-align: center;
}

/* ============ ADD TO projects.css ============ */
/* New for Veterinary Canine Simulation: two demo videos side by side.
   Everything else on this page reuses your existing projects.css classes
   (.figure, .result-row/.tall-figure, .card-grid/.sys-card, .role-list,
   .subheading, .paragraph--spaced, etc.) — nothing else needed changing. */

.video-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.video-row .video-frame {
    max-width: 460px;
    flex: 1 1 380px;
    margin: 0;
}

.video-row-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
