/* Centered homepage hero variation */

:root {
    --home-centered-ink: #0b2030;
    --home-centered-paper: #fbfcf8;
    --home-centered-card: #fbfbfb;
    --home-centered-green: #00a86b;
    --home-centered-muted: #64717b;
    --home-centered-border: rgba(11, 32, 48, 0.06);
    --home-project-copy-bg: #f5f5f5;
}

body.home-centered-page.home-dark {
    --home-centered-ink: #eef3f5;
    --home-centered-paper: #101416;
    --home-centered-card: #171c1f;
    --home-centered-muted: #adb8be;
    --home-centered-border: rgba(255, 255, 255, 0.08);
    --home-project-copy-bg: #171c1f;
}

html {
    scroll-behavior: smooth;
}

body.home-centered-page {
    margin: 0;
    background: var(--home-centered-paper);
    color: var(--home-centered-ink);
    font-family: "Plus Jakarta Sans", sans-serif;
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}



.home-centered-header {
    position: fixed;
    top: 18px;
    left: 0;
    right: 0;

    z-index: 1050;

    display: flex;
    justify-content: center;

    padding: 0 1rem;

    pointer-events: none;
}

.home-centered-nav {
    pointer-events: auto;

    display: inline-flex;
    align-items: center;

    gap: 3px;

    padding: 5px;

    /* Glass */
    background: rgba(255, 255, 255, 0.55);

    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);

    /* iOS-style rounded container */
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;

    /* Outer + inner depth */
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

.home-centered-nav-group {
    pointer-events: auto;

    display: flex;
    align-items: center;

    gap: 8px;
}


.home-centered-nav-divider {
    width: 1px;
    height: 22px;

    margin: 0 3px;

    background: rgba(11, 32, 48, 0.1);
}

.home-centered-nav-link {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 14px;

    border-radius: 13px;

    color: var(--home-centered-ink);

    font-size: 0.78rem;
    font-weight: 500;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.home-centered-nav-link:hover {
    color: var(--home-centered-ink);

    background: rgba(255, 255, 255, 0.45);
}

.home-centered-nav-link.active {
    background: rgba(255, 255, 255, 0.72);

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}


.home-centered-hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background: var(--home-centered-paper);
}

.home-centered-container {
    min-height: 100dvh;
}

.home-centered-inner {
    width: 100%;
    max-width: 1160px;
    min-height: 100dvh;

    margin: 0 auto;

    display: flex;
    flex-direction: column;

    padding-top: 5rem;
    padding-bottom: 1.5rem;
}

.home-centered-content {
    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: center;

    width: 100%;
}

.home-centered-theme-toggle {
    position: relative;

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;

    color: var(--home-centered-ink);

    background: rgba(255, 255, 255, 0.55);

    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);

    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    cursor: pointer;
}

.home-centered-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.6);

    transform: scale(1.03);
}

.home-centered-theme-toggle:active {
    transform: scale(0.94);
}

.home-centered-theme-icon {
    position: absolute;

    top: 50%;
    left: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 1.25rem;
    height: 1.25rem;

    font-size: 1.15rem;
    line-height: 1;

    transform: translate(-50%, -50%);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

/* ========================================
   DARK MODE GLASS
======================================== */

.home-dark .home-centered-nav {
    background: rgba(25, 29, 32, 0.58);

    border-color: rgba(255, 255, 255, 0.1);

    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}


.home-dark .home-centered-nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
}


.home-dark .home-centered-nav-link.active {
    background: rgba(255, 255, 255, 0.1);

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


.home-dark .home-centered-theme-toggle {
    background: rgba(255, 255, 255, 0.07);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


.home-dark .home-centered-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}


.home-dark .home-centered-nav-divider {
    background: rgba(255, 255, 255, 0.1);
}

.home-centered-theme-light {
    opacity: 1;
    transform:
        translate(-50%, -50%)
        rotate(0deg)
        scale(1);
}

.home-centered-theme-dark {
    opacity: 0;
    transform:
        translate(-50%, -50%)
        rotate(-20deg)
        scale(0.8);
}

.home-dark .home-centered-theme-light {
    opacity: 0;
    transform:
        translate(-50%, -50%)
        rotate(20deg)
        scale(0.8);
}

.home-dark .home-centered-theme-dark {
    opacity: 1;
    transform:
        translate(-50%, -50%)
        rotate(0deg)
        scale(1);
}

.home-dark .home-centered-nav-link {
    color: #eef3f5;
}

.home-dark .home-centered-nav-link:hover,
.home-dark .home-centered-nav-link:focus-visible {
    color: #ffffff;
}

.home-dark .home-centered-nav-link.active,
.home-dark .home-centered-nav-link.active:hover {
    color: #eef3f5;
}

.home-dark .home-centered-nav-link.active {
    background: rgba(255, 255, 255, 0.12);

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Heading stays on one line where possible */

.home-centered-title {
    margin: 0 0 clamp(2rem, 4vh, 3rem);

    color: var(--home-centered-ink);

    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(3.4rem, 5.8vw, 6.5rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.05em;

    white-space: nowrap;
}

.home-centered-title strong {
    font-weight: 700;
}

.typed-role-wrap {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

#typedRole {
    display: inline-block;
    min-width: 2ch;
}

.typed-cursor {
    display: inline-block;

    width: 0.62em;
    height: 0.92em;
    margin-left: 0.08em;

    background: currentColor;
    opacity: 0.5;

    transform: translateY(0.08em);

    animation: insertBlink 1.1s steps(1) infinite;
}

@keyframes insertBlink {
    0%,
    45% {
        opacity: 0.1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

.tcb-highlight {
    background: linear-gradient(
        to top,
        rgba(0, 166, 118, 0.80) 0 40%,
        transparent 40% 100%
    );
}

/* Main two-column layout */

.home-centered-main {
    display: grid;

    grid-template-columns:
        minmax(250px, 0.82fr)
        minmax(0, 1.7fr);

    align-items: stretch;

    gap: clamp(1.75rem, 2.5vw, 3rem);

    width: 100%;
}


/* Image defines the shared row height */

.home-centered-portrait-wrap {
    width: 100%;
    height: clamp(320px, 34vw, 430px);

    overflow: hidden;

    border-radius: clamp(26px, 2.5vw, 38px);
}

.home-centered-portrait {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;
}


/* Right side matches image height */

.home-centered-copy {
    min-width: 0;

    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* Main statement */

.home-centered-statement {
    margin: 0;

    color: var(--home-centered-ink);

    font-size: clamp(2rem, 3.2vw, 3.5rem);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.home-centered-statement strong {
    font-weight: 700;
}

.home-centered-scroll {
    flex-shrink: 0;
    align-self: center;

    margin-top: 1.5rem;

    color: var(--home-centered-ink);
    text-decoration: none;

    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 500;
}

.home-centered-scroll span {
    margin-left: 0.25rem;
    color: #22b7b0;
}

.home-centered-work {
    min-height: 100vh;
    background: var(--home-centered-paper);
}

.home-work-section {
    position: relative;
    min-height: 100vh;

    padding: clamp(6rem, 10vw, 10rem) 0;

    background: var(--home-centered-paper);
}

.home-work-heading {
    max-width: 1160px;

    margin:
        0 auto
        clamp(2rem, 5vw, 4.5rem);
        text-decoration: underline;
}

.home-work-heading a{
    color: var(--home-centered-ink);
}

.home-work-heading-bottom{
    max-width: 1160px;

    margin:
        0 auto
        clamp(2rem, 5vw, 4.5rem);
        text-decoration: underline;
}

.home-work-heading-bottom a{
    color: var(--home-centered-ink);
}

.home-work-heading-bottom h2 {
    margin: 0;

    color: var(--home-centered-ink);

    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 500;

    letter-spacing: -0.04em;
    text-align: right;
}

.home-section-kicker {
    color: var(--home-centered-muted);

    font-size: 0.82rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.home-work-heading h2 {
    margin: 0;

    color: var(--home-centered-ink);

    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 500;

    letter-spacing: -0.04em;
}

.home-project-card {
    max-width: 1160px;

    margin:
        0 auto
        clamp(3rem, 7vw, 6.5rem);

    overflow: hidden;

    border: 1px solid rgba(11, 32, 48, 0.055);
    border-radius: clamp(22px, 3vw, 34px);
    background: var(--home-centered-card);

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.025);
}

.home-project-media {
    position: relative;

    height: 100%;
    min-height: clamp(340px, 42vw, 610px);

    display: flex;
    align-items: flex-end;
    justify-content: center;

    overflow: hidden;
    background-color: #fff;
}


/* Shared behaviour for image + video */

.home-project-asset {
    display: block;

    width: 94%;
    height: auto;
    max-height: 94%;

    object-fit: contain;
    object-position: center bottom;

    margin-top: auto;
}

/* Video-specific */

.home-project-video {
    border-radius: 0;
}

/* ========================================
   PINKBIKE — THREE VIDEO FEATURE CARD
======================================== */

.home-project-media-pinkbike {
    padding: 0;
    background: #fff;
}

.pinkbike-video-grid {
    width: 100%;
    height: 100%;
    min-height: clamp(340px, 42vw, 610px);

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    overflow: hidden;
}

.pinkbike-grid-video {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;
    object-position: center;

    background: #fff;
}

@media (max-width: 767.98px) {

    .pinkbike-video-grid {
        grid-template-columns: 1fr;
        min-height: min(72vw, 430px);
    }

    .pinkbike-grid-video:nth-child(2),
    .pinkbike-grid-video:nth-child(3) {
        display: none;
    }
}

.home-project-media img {
    width: 94%;
    height: 94%;

    display: block;

    object-fit: contain;
    object-position: center bottom;

    transition:
        transform 0.45s
        cubic-bezier(0.22, 1, 0.36, 1);
}

.home-project-card:hover .home-project-media img {
    transform: scale(1.018);
}

.home-project-copy {
    height: 100%;
    min-height: clamp(340px, 42vw, 610px);

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: clamp(2rem, 4.5vw, 4.5rem);
}

.home-project-card-bg{
    background-color: var(--home-project-copy-bg);
}

.home-project-tag {
    align-self: flex-start;

    margin-bottom: 1.15rem;

    padding: 0.28rem 0.55rem;

    border-radius: 4px;

    font-size: 0.72rem;
    line-height: 1;
}

.home-project-tag-tcb {
    background: #d7f3e9;
}

.home-project-tag-personal {
    background: #ffdbe5;
}

.home-project-tag-freelance {
    background: #fff1bd;
}

.home-project-copy h3 {
    margin-bottom: 1.2rem;

    color: var(--home-centered-ink);

    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.25;
}

.home-project-copy p {
    margin-bottom: 1.4rem;

    color: var(--home-centered-muted);

    font-size: clamp(0.95rem, 1vw, 1.08rem);
    line-height: 1.55;
}

.home-project-link {
    align-self: flex-start;

    color: var(--home-centered-ink);

    font-size: 0.86rem;
    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-project-link span {
    margin-left: 0.3rem;
    text-underline-offset: 0px !important;
    text-decoration: none !important;
}

.home-progress-label {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    padding: 0.55rem 0.8rem;

    border: 2px solid #ff6e6e;
    border-radius: 7px;

    background: rgba(255, 255, 255, 0.92);

    color: #992020;

    font-size: 0.82rem;
    font-weight: 700;
}

.home-all-work {
    text-align: center;
}

.home-all-work-link {
    color: var(--home-centered-ink);

    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 4px;
}

.home-all-work-link span {
    color: var(--home-centered-green);
}

.reveal-home {
    opacity: 0;

    transform: translateY(44px);

    transition:
        opacity 0.8s ease,
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-home.is-visible {
    opacity: 1;

    transform: translateY(0);
}

.project-hero {
    padding-top: clamp(8rem, 15vh, 13rem);
    padding-bottom: clamp(2rem, 5vh, 5rem);
}

/* ========================================
   PROJECT PAGES — DARK MODE
======================================== */

.home-dark {
    color: var(--home-centered-ink);
    background: var(--home-centered-paper);
}


/* Main project text */

.home-dark .text-block p,
.home-dark .text-block ul li,
.home-dark .app-blocks p {
    color: var(--home-centered-muted);
}


/* Main headings */

.home-dark .text-block-heading,
.home-dark .content-heading,
.home-dark .project-card-heading {
    color: var(--home-centered-ink);
}


/* ========================================
   AT A GLANCE / IMPACT CARDS
======================================== */

.home-dark .project-overview-card,
.home-dark .project-impact-card {
    background: var(--home-centered-card);

    border-color:
        rgba(255, 255, 255, 0.07);
}


.home-dark .project-detail-row {
    border-color:
        rgba(255, 255, 255, 0.08);
}


.home-dark .project-detail-row dt {
    color: var(--home-centered-muted);
}


.home-dark .project-detail-row dd {
    color: var(--home-centered-ink);
}


/* Individual impact boxes */

.home-dark .impact-stat {
    background: #202629;

    border-color:
        rgba(255, 255, 255, 0.07);
}


.home-dark .impact-stat span {
    color: var(--home-centered-muted);
}


/* Keep stats green */

.home-dark .impact-stat strong {
    color: var(--home-centered-green);
}


/* ========================================
   JUMP TO
======================================== */

.home-dark .jump-to-section {
    background: var(--home-centered-paper);

    border-color:
        rgba(255, 255, 255, 0.05);
}


.home-dark .jump-to-card {
    background: var(--home-centered-card);

    border-color:
        rgba(255, 255, 255, 0.06);

    box-shadow:
        0 16px 40px
        rgba(0, 0, 0, 0.18);
}


.home-dark .jump-to-link {
    color: var(--home-centered-ink);

    background: #202629;
}


.home-dark .jump-to-link:hover,
.home-dark .jump-to-link:focus-visible {
    color: var(--home-centered-ink);

    background: #262d31;

    border-color:
        rgba(255, 255, 255, 0.1);

    box-shadow:
        0 10px 24px
        rgba(0, 0, 0, 0.2);
}


.home-dark .jump-to-number {
    background: #eef3f5;
    color: #101416;
}


/* ========================================
   CALLOUT / TEXT BACKGROUNDS
======================================== */

.home-dark .text-container-bg {
    background: var(--home-centered-card);

    color: var(--home-centered-ink);

    border:
        1px solid
        rgba(255, 255, 255, 0.06);
}


.home-dark .text-container-bg p,
.home-dark .text-container-bg li {
    color: var(--home-centered-muted);
}


/* ========================================
   MEDIA CONTAINERS
======================================== */

.home-dark .container.media-container {
    background: var(--home-centered-card);
}


/* Captions */

.home-dark .figure-caption {
    color: var(--home-centered-muted);
}


/* ========================================
   SECTION DIVIDERS
======================================== */

.home-dark .project-chapter-heading .text-block {
    border-color:
        rgba(255, 255, 255, 0.1);
}


/* ========================================
   MODAL
======================================== */

.home-dark .image-modal-content {
    background: var(--home-centered-card);
    color: var(--home-centered-ink);
}


.home-dark .modal-header {
    border-color:
        rgba(255, 255, 255, 0.08);
}


/* Bootstrap close button needs inversion */

.home-dark .btn-close {
    filter: invert(1);
}


/* ========================================
   BACK TO TOP
======================================== */

.home-dark .back-to-top {
    background: #eef3f5;
    color: #101416;
}


.home-dark .back-to-top:hover {
    background: var(--home-centered-green);
    color: #fff;
}

/* ========================================
   PROJECT HERO — KEEP ACCESSIBLE CONTRAST
======================================== */

.project-hero-card {
    color: #0b2030;
}

.project-hero-card .project-hero-title {
    color: #0b2030;
}

.project-hero-card .project-hero-subtitle {
    color: #4f5668;
}

.home-dark .project-card .project-stat {
    color: #4f5668;
}

.home-dark .project-card .project-tag {
    color: #0b2030;
}


/* ========================================
   WORK PAGE — LIGHT SURFACE TEXT FIX
======================================== */

/* Stat pill on project image */
.home-dark .project-stat,
.home-dark .project-stat span {
    color: #4f5668;
}

/* Project category / brand tag */
.home-dark .project-tag,
.home-dark .project-tag span {
    color: #0b2030;
}

/* ========================================
   HOMEPAGE FEATURED PROJECTS — DARK MODE
======================================== */

.home-dark .home-project-card {
    background: var(--home-centered-card);

    border-color: var(--home-centered-border);
}

.home-dark .home-project-card-bg {
    background-color: var(--home-centered-card);
}

.home-dark .home-project-copy {
    color: var(--home-centered-ink);
}

.home-dark .home-project-copy h3 {
    color: var(--home-centered-ink);
}

.home-dark .home-project-copy p {
    color: var(--home-centered-muted);
}

.home-dark .home-project-link {
    color: var(--home-centered-ink);
}

.home-dark .home-project-tag {
    color: #0b2030;
}

@media (max-width: 1199.98px) {
    .home-centered-inner {
        max-width: 960px;
    }

    .home-centered-title {
        font-size: clamp(3.3rem, 6vw, 5.8rem);
    }

    .home-centered-statement {
        font-size: clamp(2rem, 4.1vw, 3.6rem);
    }

    .home-centered-portrait-wrap {
        max-width: 290px;
    }
}

@media (max-width: 991.98px) {
    .home-centered-inner {
        padding-top: 6rem;
    }

    .home-centered-title {
        margin-bottom: 2rem;
        font-size: clamp(3rem, 6.8vw, 5rem);
    }

    .home-centered-main {
        grid-template-columns: minmax(200px, 0.78fr) minmax(0, 1.6fr);
        gap: 1.5rem;
    }

    .home-centered-portrait-wrap {
        max-width: 250px;
    }

    .home-centered-statement {
        font-size: clamp(1.85rem, 4.4vw, 3rem);
    }
}

@media (max-width: 991.98px) {
    .home-project-copy,
    .home-project-media {
        min-height: auto;
    }

    .home-project-media {
        min-height: 420px;
    }

    .home-project-copy {
        padding: 2.3rem;
    }
}

@media (max-width: 767.98px) {
    .home-work-section {
        padding-top: 5rem;
    }

    .home-project-card {
        margin-bottom: 2.5rem;
        border-radius: 24px;
    }

    .home-project-media {
        min-height: min(72vw, 430px);
    }
}

@media (max-width: 767.98px) {
    .home-centered-header {
        padding: 0.65rem;
    }

    .home-centered-nav {
        max-width: calc(100vw - 1.3rem);
    }

    .home-centered-nav-link {
        padding: 0.5rem 0.62rem;
        font-size: 0.75rem;
    }

    .home-centered-hero,
    .home-centered-container {
        min-height: 100svh;
    }

    .home-centered-inner {
        justify-content: center;
        padding-top: 5.25rem;
        padding-bottom: 1.25rem;
    }

    .home-centered-title {
        white-space: normal;

        font-size: clamp(2.7rem, 10vw, 4rem);

        margin-bottom: 1.5rem;
    }

    .home-centered-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .home-centered-portrait-wrap {
        width: min(72vw, 300px);
        height: auto;
        aspect-ratio: 0.92 / 1;
    }

    .home-centered-statement {
        font-size: clamp(2rem, 7.5vw, 3rem);
    }

    .home-centered-copy {
        height: auto;
        gap: 1rem;
    }

    .home-centered-scroll {
        margin-top: 1.5rem;
    }
}

@media (max-width: 420px) {
    .home-centered-nav-link {
        padding-inline: 0.45rem;
        font-size: 0.7rem;
    }

    .home-centered-title {
        font-size: clamp(2.35rem, 10.5vw, 3.2rem);
    }

    .home-centered-portrait-wrap {
        width: min(72vw, 250px);
    }

    .home-centered-statement {
        font-size: clamp(1.8rem, 7.8vw, 2.55rem);
    }
}

@media (min-width: 768px) and (max-height: 760px) {
    .home-centered-inner {
        padding-top: 4.75rem;
        padding-bottom: 1rem;
    }

    .home-centered-title {
        margin-bottom: 1.25rem;
        font-size: clamp(3rem, 5.4vw, 5.4rem);
    }

    .home-centered-portrait-wrap {
        max-width: 250px;
    }

    .home-centered-statement {
        font-size: clamp(1.8rem, 3.4vw, 3rem);
    }

    .home-centered-scroll {
        margin-top: 1.25rem;
    }
}
