/* Custom site-wide animated cursor (CustomCursor.svelte). The class is only
   added once the component mounts and picks up a real pointer, so a JS/pointer
   failure leaves the OS cursor untouched instead of hiding it outright.
   Links need an explicit `cursor: pointer` here: the browser's native
   "show a hand over links" behavior only kicks in when the computed cursor
   is `auto`, and our `none` on <html> is an explicit inherited value that
   overrides that — without this rule, links with no cursor of their own
   (e.g. the project card <a> wrapping an image/video) would show no hand
   cursor at all. Elements with their own explicit `cursor` (buttons, etc.)
   already win over both of these via normal inheritance. */
html.custom-cursor-active {
    cursor: none;
}

html.custom-cursor-active a {
    cursor: pointer;
}

body {
    background-color: #f8f8f8;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translate(-4.5%, -11%);
    transition: opacity 0.15s ease;
}

.custom-cursor.is-visible {
    opacity: 1;
}

.custom-cursor-svg {
    display: block;
    width: 24px;
    height: 24px;
    color: #020a0a;
    transform-origin: 4.5% 11%;
}

.featured-inner-break {
    margin-bottom: 16px;
}

.inner-section-break {
    margin-bottom: 40px;
}

.featured-section-break {
    margin-bottom: 80px;
}

.section-break {
    margin-bottom: 120px;
}

/* Mobile: tighten the Selected Works -> Creative Explorations gap to 80px.
   The last row's .featured-section-break (80px) plus the last tile's
   .inner-section-break (40px) would otherwise total 120px; trimming the
   row to 40px lands the gap at 80px. Scoped to #selected-works only. */
@media (max-width: 767px) {
    #selected-works .featured-section-break {
        margin-bottom: 40px;
    }
}

.inner-section-feature-break {
    margin-bottom: 16px;
}

.title-break {
    margin-bottom: 32px;
}

a {
    text-decoration: none;
}

a:hover {
    color: #8195f7;
}

.header-link-dark {
    color: #020a0a;
}

.header-link-dark:hover {
    color: #8195f7;
}

.header-link-muted {
    color: #797878;
}

.header-hr {
    border: none;
    border-top: 1px solid #E6E9EB;
    margin: 12px 0 0 0;
}

.flex-divider {
    flex: 1;
    height: 1px;
    background: #E6E9EB;
}

.icon-sm {
    display: inline-block;
    width: 12px;
    height: 12px;
}

.icon-link {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

/* ── Header subtitle rotation ── */
.header-subtitle {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: flex-end;
    column-gap: 0.3em;
}

.hb-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.hb-line {
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform-origin: 10px 10px;
}

/* Hamburger state: spread lines from center */
.hb-line-1 { transform: translateY(-3px); }
.hb-line-3 { transform: translateY(3px); }

/* X state: rotate around center (lines are already at y=10) */
.hb-open .hb-line-1 { transform: rotate(45deg); }
.hb-open .hb-line-3 { transform: rotate(-45deg); }

.menu-nav-link {
    animation: menuLinkIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-delay: calc(0.08s + var(--i) * 0.06s);
}

.menu-nav-heading {
    font-family: 'Noto Serif', serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 24px;
    text-decoration: none;
}

.menu-ampli-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-bottom-hr {
    border: none;
    border-top: 1px solid #E6E9EB;
    margin: 0 0 12px;
}

.menu-bottom-links {
    display: flex;
    justify-content: space-between;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    line-height: 18px;
    padding: 0 16px 12px;
}

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

.header-word-wrap {
    display: inline-block;
    overflow: hidden;
    line-height: 1.4;
}

.header-word-inner {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.header-word-inner.visible {
    transform: translateY(0);
    opacity: 1;
}

.header-word-inner.exiting {
    transform: translateY(-110%);
    opacity: 0;
}
.feature-img-wrap {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.feature-img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
    transition: opacity 0.25s ease;
}

.feature-link:hover .feature-img {
    opacity: 0.8;
}

video.feature-img {
    object-fit: cover;
    margin-top: -1px;
    height: calc(100% + 1px);
}

.featured-title {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;

    color: #797878;
}



.title-text {
    font-family: 'Noto Serif';
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 24px;

    color: #222222;
}

.body-text {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
}

.intro-body-text {
    color: #020A0A;
}

.featured-body-text {
    color: #797878;
}


.portfolio-subtitle {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 24px;

    /* identical to box height, or 171% */

    color: #797878;
}

.portfolio-body {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;

    /* or 143% */

    color: #020A0A;

    vertical-align: middle;
}

.divider {
    margin-top: 80px;
       margin-bottom: 80px;
}

.bio-text {
    font-family: 'Noto Serif';
    font-weight: 500;
    font-size: 24px;
    line-height: 36px;
    color: #222222;
}

@media (max-width: 767px) {
    .bio-text {
        font-size: 18px;
        line-height: 28px;
    }
}

.site-dot-pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.65;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.16) 0.75px, transparent 0.75px);
    background-size: 14px 14px;
    -webkit-mask-image:
        linear-gradient(to bottom, black 0, black calc(100% - 240px), transparent 100%),
        radial-gradient(ellipse 70% 140% at 50% 50%, black 70%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to bottom, black 0, black calc(100% - 240px), transparent 100%),
        radial-gradient(ellipse 70% 140% at 50% 50%, black 70%, transparent 100%);
    mask-composite: intersect;
}

.bio-word {
    display: inline-block;
    opacity: 0;
    filter: blur(8px);
    animation: bio-word-in 0.55s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.04s + var(--delay-offset, 0.1s));
    animation-play-state: paused;
}

.bio-word.playing {
    animation-play-state: running;
}

@keyframes bio-word-in {
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* ── Text reveal ── */
.reveal-wrap {
    display: block;
}

.reveal-text {
    display: block;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Media (image/video) fade-up reveal ── */
.reveal-media {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-media.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Divider left-to-right reveal ── */
.reveal-divider-line {
    flex: 1;
    height: 1px;
    background: #E6E9EB;
    border: none;
    margin: 0;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.8s cubic-bezier(0.4, 0.4, 0, 1);
    will-change: transform;
}

.reveal-divider-line.is-visible {
    transform: scaleX(1);
}

/* standalone <hr> dividers sit in flex-column containers — prevent flex-basis:0 from collapsing height */
hr.reveal-divider-line {
    flex: none;
    width: 100%;
    opacity: 1;
}

.section-label {
    font-family: 'IBM Plex Sans';
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #797878;
    white-space: nowrap;
}

.feature-img-sized {
    width: 100%;
    aspect-ratio: 1 / 1;
}


.feature-link {
    display: block;
}

/* Mobile: title + description stacked */
.card-text-row {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Desktop: title fixed 136px, description fills to image right edge */
@media (min-width: 768px) {
    .card-text-row {
        display: grid;
        grid-template-columns: 136px 1fr;
        gap: 12px;
    }
}

/* ── About page ── */

/* Heading: reuses bio-text (Noto Serif Medium 24px/36px #222); 12px gap to body */
.about-heading {
    margin-bottom: 12px;
}

/* Bio text: IBM Plex Sans Regular 16px/24px #020a0a */
.about-bio-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #020a0a;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-bio-text p {
    margin: 0;
}

/* Selected clients / Tools & Methods / Experience — 3 equal columns.
   The More Info card is a 4th grid item spanning columns 1-2 in row 2, so it
   sits under Selected clients / Tools & Methods while Experience (column 3)
   spans both rows uninterrupted. */
.about-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 40px;
    row-gap: 40px;
}

.about-column-experience {
    grid-column: 3;
    grid-row: 1 / 3;
}

.about-column-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.about-column-item {
    margin: 0;
    line-height: 32px;
}

/* Bio industry words -> Selected clients highlight. Hovering a word in the
   bio (.industry-term) sets hoveredIndustry in about/+page.svelte, which
   toggles is-industry-match on any client tagged with that industry. Reuses
   the case-study .text-highlight yellow gradient look, but hover-driven
   (background-size 0 -> 100%) instead of the scroll-triggered version, so
   it's scoped to its own class rather than .text-highlight to avoid
   colliding with initHighlights' IntersectionObserver. */
.industry-term {
    padding: 0 1px;
}

@media (hover: hover) and (pointer: fine) {
    .industry-term {
        /* no explicit cursor: value here — the site hides the OS pointer
           site-wide via html.custom-cursor-active { cursor: none } and
           swaps in a custom-cursor element instead; an explicit cursor
           (even 'default') on a descendant breaks that inheritance and
           brings the native pointer back while hovering this span. */
        text-decoration: underline dotted;
        text-decoration-color: #b8b8b8;
        text-underline-offset: 3px;
    }
}

.about-client-item {
    display: inline-block;
    padding: 0 4px;
    margin-left: -4px;
    border-radius: 4px;
    background-image: linear-gradient(
        82deg,
        color-mix(in srgb, var(--match-color, #f2be22), transparent 55%),
        color-mix(in srgb, var(--match-color, #f2be22), transparent 88%) 6%,
        color-mix(in srgb, var(--match-color, #f2be22), transparent 75%) 93%,
        color-mix(in srgb, var(--match-color, #f2be22), transparent 50%)
    );
    background-size: 0% 100%;
    background-repeat: no-repeat;
    /* Same-specificity .reveal-text (opacity/transform, see above) and this
       selector both set `transition`, and this rule comes later in the
       cascade — a lone `background-size` value here would silently replace
       .reveal-text's fade/rise entirely (items would pop in instantly with
       no animation, and their transition-delay stagger would have nothing
       to delay). Listing all three keeps the scroll-reveal transition
       intact and layers the industry-hover highlight on top of it. */
    transition:
        opacity 0.6s ease,
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        background-size 220ms ease;
}

.about-client-item.is-industry-match {
    background-size: 100% 100%;
}

/* Experience: flex-col, 16px between entries */
.about-experience-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-experience-entry {
    display: flex;
    flex-direction: column;
}

.about-experience-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #020a0a;
    margin: 0;
}

.about-experience-company,
.about-experience-date {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #797878;
    margin: 0;
}

/* More Info card — mobile-first: heading, "doing now" block, photo, "current
   time" block, links, all stacked in that DOM order so mobile naturally reads
   top-to-bottom with the photo between the two info blocks. Desktop pulls the
   photo out of flow to the right (see media query below). */
.about-info-card {
    grid-column: 1 / 3;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid transparent;
    border-radius: 10px;
    /* Border-only magic-card hover effect (see use:magicCard in
       about/+page.svelte): two background layers — a solid padding-box fill
       (the card's real background) plus a radial-gradient clipped to
       border-box, which only shows through the 1px border ring and tracks
       the cursor via --magic-x/--magic-y. Off-hover the gradient circle sits
       off-card (see the action's default), so the border-box layer renders
       as flat #e6e9eb — same as the original static border. */
    background:
        linear-gradient(#f8f8f8, #f8f8f8) padding-box,
        radial-gradient(
                var(--magic-size, 256px) circle at var(--magic-x, -256px) var(--magic-y, -256px),
                #8195f7,
                rgba(129, 149, 247, 0.8) 60%,
                #e6e9eb 100%
            )
            border-box;
}

.about-info-heading {
    font-family: 'Noto Serif', serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 32px;
    color: #222222;
    margin: 0 0 8px;
}

.about-info-block-primary,
.about-info-block-secondary {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
}

.about-info-block-primary p,
.about-info-block-secondary p {
    margin: 0;
}

.about-info-block-primary {
    color: #222222;
    margin-bottom: 24px;
}

.about-status-divider {
    color: #797878;
}

.about-info-block-secondary {
    color: #797878;
}

.about-info-links {
    margin-top: 24px;
}

.about-photo-swap {
    position: relative;
    align-self: center;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 24px;
}

.about-info-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: contain;
    object-position: right center;
}

.about-photo-a {
    z-index: 2;
}

.about-photo-b {
    z-index: 1;
    opacity: 0;
}

.about-photo-swap.is-swapped .about-photo-a {
    opacity: 0;
}

.about-photo-swap.is-swapped .about-photo-b {
    opacity: 1;
}

/* Pixel-dissolve cover: a PIXEL_GRID x PIXEL_GRID tile grid (see
   animations.ts), each fading in on a per-tile --d delay (pixelTileDelays —
   a fixed shuffled order, not a left-to-right sweep, so it reads as
   scattered rather than swept), sitting above both photos. See photoSwap in
   animations.ts for the enter/leave sequencing. */
.pixel-tiles {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(28, 1fr);
    grid-template-rows: repeat(28, 1fr);
    pointer-events: none;
}

/* Material Design's standard accelerate/decelerate easing pairs, applied by
   direction: tiles appearing (opacity 0 -> 1, covering the photo) use the
   decelerate curve — fast start, settles in — while tiles disappearing
   (1 -> 0, revealing it) use the accelerate curve — slow start, exits fast.
   Same convention as native enter/exit transitions (Material's own
   fade-through pattern, iOS's UIView animation curves). */
.pixel-tile {
    background: var(--tile-color, #8195f7);
    opacity: 0;
    transition: opacity 190ms cubic-bezier(0.4, 0, 1, 1); /* accelerate (exit) */
    transition-delay: var(--d, 0ms);
}

.about-photo-swap.is-closing .pixel-tile {
    opacity: 1;
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1); /* decelerate (enter) */
}

@media (min-width: 768px) {
    .about-info-card {
        padding-right: 244px;
        /* Ensures the auto margin below has room to push the bottom block
           down even when the text content is shorter than the photo (photo
           is a fixed 220px circle now, plus 24px padding top/bottom) */
        min-height: 268px;
    }

    /* Pin Current Time & Location + the links row to the bottom of the card */
    .about-info-block-secondary {
        margin-top: auto;
    }

    .about-info-links {
        margin-top: 8px;
    }

    /* Pinned to the card's top-right corner, 24px inset to match the card's
       own padding. Stays a fixed 220px circle (same shape as mobile) rather
       than stretching to fill the card's height — .about-info-card's
       min-height above reserves enough room so it never overflows. */
    .about-photo-swap {
        position: absolute;
        align-self: auto;
        top: 24px;
        right: 24px;
        left: auto;
        width: 220px;
        height: 220px;
        border-radius: 50%;
        margin-bottom: 0;
        transform: none;
    }
}

/* ── Portfolio Template ── */

.portfolio-col {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 124px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.portfolio-overview {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portfolio-title {
    font-family: 'Noto Serif';
    font-weight: 500;
    font-size: 24px;
    line-height: 36px;
    color: #222222;
    margin: 0;
}

.portfolio-summary {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #020a0a;
}

.portfolio-summary p {
    margin-bottom: 11px;
}

.portfolio-summary p:last-child {
    margin-bottom: 0;
}

.portfolio-meta {
    display: flex;
    gap: 24px;
    color: #797878;
}

.portfolio-meta-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.portfolio-meta-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
}

.portfolio-meta-value {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    white-space: nowrap;
}

.portfolio-hero {
    width: 100%;
    height: 375px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    display: block;
}

.portfolio-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portfolio-section-no-tag {
    /* portfolio-col gap is 80px; -48px leaves 32px above a tagless heading */
    margin-top: -48px;
}

.portfolio-section-heading {
    font-family: 'Noto Serif';
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    color: #222222;
    margin: 0;
}

.portfolio-body-wrap {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

/* Heading -> body gap: 16px (section gap is 24px, so pull body up 8px) */
.reveal-wrap + .portfolio-body-wrap {
    margin-top: -8px;
}

.portfolio-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #020a0a;
    margin: 0;
}

.portfolio-body a {
    color: #020a0a;
}

.portfolio-body a:hover {
    color: #8195f7;
}

.portfolio-img-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    width: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.portfolio-img-btn img {
    pointer-events: none;
}

.portfolio-section-img {
    width: 100%;
    height: 375px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    display: block;
}

.portfolio-video-wrap {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

video.portfolio-section-img {
    border: none;
    display: block;
    height: calc(375px + 2px);
    margin-top: -1px;
    margin-bottom: -1px;
    object-fit: cover;
}

.portfolio-meta-row-2 {
    margin-top: 24px;
}

.portfolio-meta-value-wrap {
    white-space: normal;
}

/* Side-by-side image pair with captions */
.portfolio-img-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.portfolio-img-pair-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portfolio-pair-img {
    height: auto;
    aspect-ratio: 2246 / 2172;
}

.portfolio-img-caption {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 18px;
    color: #797878;
    margin: 0;
}

/* Toggle */
.portfolio-toggle {
    position: relative;
    display: flex;
    background: #F3F2F9;
    border: 1px solid #E6E9EB;
    border-radius: 100px;
    padding: 4px;
    gap: 0;
    width: fit-content;
    overflow: hidden;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    background: #DCDAF3;
    border-radius: 100px;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.toggle-slider.no-transition {
    transition: none !important;
}

.toggle-tab {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #797878;
    padding: 4px 16px;
    border-radius: 100px;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-tab:not(.active):hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(93, 80, 180, 0.06);
    border-radius: 100px;
    z-index: -1;
    transition: background 0.2s ease;
}

.toggle-tab.active {
    font-weight: 600;
    color: #222222;
    background: none;
}

/* Lightbox */
.portfolio-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.lightbox-img {
    max-width: calc(100vw - 32px);
    max-height: 80vh;
    border-radius: 10px;
    object-fit: contain;
    display: block;
}

/* Next Project */
hr {
    opacity: 1;
}

.portfolio-next-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: -40px;
}

.portfolio-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.portfolio-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #797878;
    transition: color 0.2s ease;
}

.portfolio-nav-link:hover {
    color: #8195f7;
}

.portfolio-nav-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
}

.portfolio-nav-arrow {
    width: 12px;
    height: 12px;
}

.footer-say-hi {
    color: #020a0a;
}

.footer-say-hi:hover {
    color: #8195f7;
}

.footer-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .portfolio-col {
        padding-left: 16px;
        padding-right: 16px;
        margin-top: 120px;
        gap: 60px;
    }

    .portfolio-section-no-tag {
        /* mobile portfolio-col gap is 60px; -28px keeps 32px above */
        margin-top: -28px;
    }

    .portfolio-title {
        font-size: 20px;
        line-height: 28px;
    }

    .portfolio-section-heading {
        font-size: 18px;
    }

    .portfolio-section-img {
        height: 274px;
    }

    video.portfolio-section-img {
        height: calc(274px + 2px);
        margin-bottom: -1px;
    }

    .portfolio-toggle {
        padding: 4px;
        width: 100%;
    }

    .toggle-tab {
        font-size: 13px;
        padding: 4px 6px;
        flex: 1;
        text-align: center;
    }

    .portfolio-meta-value {
        white-space: normal;
    }

    .portfolio-img-pair {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Keep caption images at their square ratio on mobile instead of the
       274px cover-crop that .portfolio-section-img would otherwise impose */
    .portfolio-pair-img {
        height: auto;
    }

}

@media (max-width: 767px) {
    /* Single column, 32px row gap between Selected clients / Tools & Methods / Experience / card */
    .about-columns {
        grid-template-columns: 1fr;
        row-gap: 32px;
    }

    .about-column-experience,
    .about-info-card {
        grid-column: 1;
        grid-row: auto;
    }
}

/* ── Sticky header ── */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.70);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: transform 0.3s ease, box-shadow 0.25s ease;
}

#site-header.header-scrolled {
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.07);
}

#site-header.header-hidden {
    transform: translateY(-100%);
}

body.menu-open #site-header {
    transform: none !important;
}

/* ── Scroll-triggered text highlight ── */
.text-highlight {
    --marker-color: #8195f7;
    display: inline;
    margin: -.04em -.06em;
    padding: .04em .06em;
    border-radius: .2em .15em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background-image: linear-gradient(
        75deg,
        color-mix(in srgb, var(--marker-color), transparent 50%),
        color-mix(in srgb, var(--marker-color), transparent 85%) 4%,
        color-mix(in srgb, var(--marker-color), transparent 70%) 96%,
        color-mix(in srgb, var(--marker-color), transparent 40%)
    );
    background-size: 0% 88%;
    background-repeat: no-repeat;
    background-position: left center;
    transition: background-size 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.text-highlight.is-visible {
    background-size: 100% 88%;
}
.text-highlight.highlight-yellow {
    background-image: linear-gradient(82deg, #f2be2273, #f2be221f 6%, #f2be2240 93%, #f2be2280);
}
.text-highlight.highlight-pink {
    background-image: linear-gradient(82deg, #d6409f6b, #d6409f1f 6%, #d6409f38 93%, #d6409f7a);
}
.text-highlight.highlight-green {
    background-image: linear-gradient(82deg, #2ea06e6b, #2ea06e1f 6%, #2ea06e38 93%, #2ea06e7a);
}

/* ── Portfolio side nav ── */
.portfolio-sidenav {
    position: fixed;
    top: 140px;
    /* xl (1200–1399px): Bootstrap container max-width 1140px, 12px left gutter */
    left: calc((100vw - 1140px) / 2 + 12px);
    width: 150px;
    display: flex;
    flex-direction: column;
    padding-left: 12px;
    border-left: 1px solid #E6E9EB;
    opacity: 0;
    transition: opacity 0.15s ease;
}

@media (min-width: 1400px) {
    /* xxl: Bootstrap container max-width 1320px, 12px left gutter */
    .portfolio-sidenav {
        left: calc((100vw - 1320px) / 2 + 12px);
    }
}

.sidenav-item {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    line-height: 20px;
    color: #C5C5C5;
    font-weight: 400;
    text-decoration: none;
    padding: 5px 0 5px 10px;
    border-left: 2px solid transparent;
    margin-left: -13px;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidenav-item.active {
    color: #222222;
    font-weight: 500;
    border-left-color: #8195f7;
}

.sidenav-item:hover:not(.active) {
    color: #888;
}

@media (max-width: 1199px) {
    .portfolio-sidenav { display: none; }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ── More page ── */
.more-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #797878;
    margin-top: 24px;
    margin-bottom: 0;
}

.more-gallery {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 60px;
}

.more-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.more-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.more-card-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: block;
    transition: opacity 0.25s ease;
}

.portfolio-img-btn:hover .more-card-img {
    opacity: 0.8;
}

.more-card-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #020a0a;
    margin: 0 0 4px 0;
}

.more-card-desc {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #797878;
    margin: 0;
}

@media (max-width: 767px) {
    .more-gallery {
        flex-direction: column;
    }

    .more-heading {
        font-size: 20px;
        line-height: 28px;
    }
}

/* Cursor-following label shown on hover over images/links (Home, About, More) */
.hover-cursor-label {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 0;
    transform: translate(16px, -12px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    z-index: 3000;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.hover-cursor-label.is-visible {
    opacity: 1;
    transform: translate(16px, -12px) scale(1);
}

.hover-cursor-label-text,
.hover-cursor-label-plus {
    box-sizing: border-box;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    color: #020a0a;
}

.hover-cursor-label-text {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 4px;
    border-radius: 4px;
    white-space: nowrap;
}

.hover-cursor-label-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

@media (hover: none), (pointer: coarse) {
    .hover-cursor-label {
        display: none;
    }
}