/* ==========================================================================
   HOME — Hero · About · Projects
   Loaded by index.html only (after style.css, before mobile.css).
   Inspired by the "giant gradient name + rising cut-out portrait" hero,
   the scroll-lit About paragraph and the alternating Selected-work list,
   rebuilt in plain CSS/JS with this site's copper-on-ink design tokens.
   Works in dark and light themes; mobile rules live at the bottom.
   ========================================================================== */

/* ---------- Tokens for the three sections ---------- */
:root {
    --hero-bg-1: #211f26;
    --hero-bg-2: #08080a;
    --hero-t1: #ffffff;
    --hero-t2: #d4d1c8;
    --hero-t3: #3b3a42;

    --word-off: rgba(237, 234, 223, 0.2);
    --word-on-dim: rgba(237, 234, 223, 0.78);
    --word-on: #ffffff;

    --grad-1: #ffffff;
    --grad-2: #d4d1c8;
    --grad-3: #4a4952;
}

html.light-mode {
    --hero-bg-1: #fcfbff;
    --hero-bg-2: #d6d1ec;
    --hero-t1: #1c1a2b;
    --hero-t2: #4a4570;
    --hero-t3: #c3bde2;

    --word-off: rgba(28, 26, 43, 0.22);
    --word-on-dim: rgba(28, 26, 43, 0.74);
    --word-on: #1c1a2b;

    --grad-1: #1c1a2b;
    --grad-2: #4a4570;
    --grad-3: #cfc9ea;
}

/* Gradient-filled display text (hero name, "About", "Selected") */
.grad-text {
    background: linear-gradient(to bottom, var(--grad-1) 10%, var(--grad-2) 55%, var(--grad-3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ==========================================================================
   HERO
   ========================================================================== */
html.hero-lock,
html.hero-lock body {
    overflow: hidden;
}

.hero {
    --fs: min(10.4vw, 12rem);
    --lines: 1;
    --tt: 45%;
    position: relative;
    isolation: isolate;
    height: 100svh;
    min-height: 540px;
    overflow: hidden;
    background: transparent;
    /* shared page background shows through */
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(40% 36% at 50% 82%, rgba(221, 154, 59, 0.16), transparent 70%),
        radial-gradient(60% 50% at 50% 100%, rgba(95, 179, 163, 0.08), transparent 72%);
}

html.light-mode .hero-bg {
    background:
        radial-gradient(40% 36% at 50% 82%, rgba(185, 116, 30, 0.14), transparent 70%),
        radial-gradient(60% 50% at 50% 100%, rgba(109, 91, 208, 0.12), transparent 72%);
}


/* ---- Title block: name + subtitle + actions. No transform here, so the
        children can layer above AND below the portrait. ---- */
.hero-title {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--tt);
    margin-top: calc(var(--fs) * var(--lines) * -0.45);
    text-align: center;
    pointer-events: none;
    transition: top 1.5s cubic-bezier(0.65, 0, 0.35, 1) 0.2s;
}

.hero-title-inner {
    position: relative;
    display: inline-block;
    max-width: 96vw;
}

.hero-name {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--fs);
    line-height: 0.9;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    text-wrap: balance;
    padding: 0.04em 0.06em;
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.35));
    background: linear-gradient(to bottom, var(--hero-t1) 5%, var(--hero-t2) 52%, var(--hero-t3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    user-select: none;
}

html.light-mode .hero-name {
    filter: drop-shadow(0 14px 28px rgba(60, 50, 110, 0.18));
}

.hero-meta {
    position: absolute;
    z-index: 3;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: clamp(0.5rem, 1.4vw, 1.1rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.2%;
}

.hero-sub {
    margin: 0;
    font-size: clamp(1.1rem, 2.5vw, 2.1rem);
    color: var(--paper);
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: opacity 1.2s ease 0.7s, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.7s;
}

.hero-sub-strong {
    font-weight: 800;
}

.hero-sub-soft {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--paper-dim);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
    transition: opacity 1.2s ease 0.9s, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.9s;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--hairline-strong);
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    color: var(--paper-dim);
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.06em;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero-pill:hover,
.hero-pill:focus-visible {
    border-color: var(--signal);
    color: var(--signal);
    background: var(--signal-dim);
    transform: translateY(-2px);
}

.hero-pill-icon {
    width: 46px;
}

.hero-pill-icon svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--ease);
}

.hero-pill-icon:hover svg {
    transform: rotate(45deg);
}

.hero-pill-text {
    padding: 0 1.6rem;
}

/* ---- Portrait: sits above the name, below the meta row ---- */
.hero-portrait {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    pointer-events: none;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.9s;
}

.hero-portrait img {
    height: clamp(290px, 68svh, 720px);
    width: auto;
    max-width: 94vw;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 22px 50px rgba(0, 0, 0, 0.5));
}

html.light-mode .hero-portrait img {
    filter: drop-shadow(0 22px 44px rgba(60, 50, 110, 0.28));
}

/* ---- Desktop corner details (typewriter + stats) ---- */
.hero-corner {
    position: absolute;
    z-index: 4;
    bottom: clamp(1.5rem, 5vh, 3rem);
    display: none;
    transition: opacity 1.1s ease 1.6s;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--circuit);
    margin-bottom: 0.9rem;
}

.hero-eyebrow .dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 10px var(--ok);
    animation: pulse 2s infinite;
}

.typewriter-container {
    min-height: 1.6em;
}

.typewriter-text {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--paper-dim);
}

.typewriter-text::after {
    content: '▍';
    color: var(--signal);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-stats {
    display: flex;
    gap: 2.2rem;
}

.hero-stats>div {
    font-family: var(--font-mono);
    text-align: left;
}

.hero-stats .stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--signal);
}

.hero-stats>div>span {
    font-size: 0.7rem;
    color: var(--paper-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (min-width: 1100px) {
    .hero {
        --fs: min(10.6vw, 12rem);
    }

    .hero-corner {
        display: block;
    }

    .hero-corner-left {
        left: max(var(--edge), calc((100vw - 1320px) / 2 + var(--edge)));
        max-width: calc(50vw - 17rem);
    }

    .hero-corner-right {
        display: none;
    }

}

@media (min-width: 1280px) {
    .hero-corner-right {
        display: block;
        right: max(var(--edge), calc((100vw - 1320px) / 2 + var(--edge)));
    }
}

/* ---- Intro states: only when <html> has .hero-anim (set before first paint)
        and the hero hasn't started playing. With no JS / reduced motion /
        deep links / return visits the hero simply shows its final state. ---- */
html.hero-anim .hero:not(.is-play) .hero-title {
    top: 50%;
}

html.hero-anim .hero:not(.is-play) .hero-sub,
html.hero-anim .hero:not(.is-play) .hero-actions {
    opacity: 0;
    transform: translateY(50px);
}

html.hero-anim .hero:not(.is-play) .hero-portrait {
    transform: translateY(105%);
}

html.hero-anim .hero:not(.is-play) .hero-corner {
    opacity: 0;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about {
    position: relative;
    overflow: hidden;
    padding: clamp(4.5rem, 9vw, 8rem) 0 0;
    background: transparent;
}

.about-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 var(--edge);
}

.about-title {
    margin: 0;
}

.about-title-mobile {
    display: none;
    margin-bottom: 1.4rem;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}

.about-figure {
    position: relative;
    margin: 0;
    display: flex;
    justify-content: center;
    will-change: transform;
}

/* soft spotlight behind the cut-out */
.about-figure::before {
    content: '';
    position: absolute;
    inset: 12% 6% 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(221, 154, 59, 0.2), transparent 72%);
    filter: blur(20px);
    z-index: 0;
}

html.light-mode .about-figure::before {
    background: radial-gradient(closest-side, rgba(109, 91, 208, 0.2), transparent 72%);
}

.about-figure img {
    position: relative;
    z-index: 1;
    height: min(78svh, 720px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.5));
}

html.light-mode .about-figure img {
    filter: drop-shadow(0 24px 40px rgba(60, 50, 110, 0.28));
}

.about-body {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.4vw, 2rem);
    min-width: 0;
}

.about-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 28px;
    padding: clamp(1.4rem, 3.2vw, 2.9rem);
    box-shadow: var(--glass-shadow);
}

/* The scroll-lit paragraph: every word brightens as you read down */
.about-text {
    margin: 0;
    font-size: clamp(1.02rem, 1.5vw, 1.4rem);
    line-height: 1.7;
    font-weight: 400;
}

.about-text .word {
    --on: var(--word-on-dim);
    color: color-mix(in srgb, var(--on) calc(var(--p, 1) * 100%), var(--word-off));
}

.about-text .word.k {
    --on: var(--word-on);
    font-weight: 600;
}

.about-text .word.nm {
    --on: var(--signal-strong);
    font-weight: 700;
}

html.light-mode .about-text .word.nm {
    --on: var(--signal);
}

.about-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.7rem;
}

.about-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--hairline-strong);
    background: var(--glass-highlight);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--paper-dim);
}

.about-chip i {
    color: var(--signal);
}

.about-stats {
    display: flex;
    gap: clamp(1.4rem, 4vw, 3rem);
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--hairline);
}

.about-stat {
    display: flex;
    flex-direction: column;
    font-family: var(--font-mono);
}

.about-stat .stat-num {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--signal);
}

.about-stat>span:last-child {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--paper-faint);
}

/* ---- Four-row skills marquee ---- */
.about-marquee {
    --speed: 60;
    margin-top: clamp(3rem, 7vw, 6rem);
    padding: 1.1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid var(--hairline);
    background: transparent;
    overflow: hidden;
}

.am-row {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
}

.am-track {
    display: flex;
    flex: none;
    width: max-content;
    animation: amScroll var(--dur, 40s) linear infinite;
}

.am-row.is-rev .am-track {
    animation-direction: reverse;
}

.about-marquee:hover .am-track {
    animation-play-state: paused;
}

.am-item {
    display: inline-flex;
    align-items: center;
    padding: 0 0.3rem 0 1.5rem;
    font-size: clamp(0.78rem, 1.3vw, 1.05rem);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paper-dim);
}

.am-item::after {
    content: '•';
    padding-left: 1.5rem;
    color: var(--signal);
    opacity: 0.7;
}

@keyframes amScroll {
    to {
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   PROJECTS — "Selected work"
   ========================================================================== */
.projects {
    position: relative;
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(4rem, 8vw, 7rem);
    background: transparent;
}

.projects-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 var(--edge);
}

.projects-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: clamp(3rem, 8vw, 7rem);
}

.projects-title {
    flex: 7;
}

.projects-head-side {
    flex: 4;
    max-width: 440px;
    padding-top: 0.6rem;
}

.projects-head-side p {
    margin: 0 0 1.5rem;
    color: var(--paper-dim);
    font-size: 1rem;
    line-height: 1.7;
}

.pj-list {
    display: flex;
    flex-direction: column;
    gap: clamp(4rem, 9vw, 9rem);
}

.pj-item {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
}

.pj-item:nth-child(even) .pj-media {
    order: 2;
}

.pj-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(120% 120% at 20% 10%, var(--signal-dim), transparent 60%),
        var(--panel);
    border: 1px solid var(--hairline);
    box-shadow: var(--glass-shadow);
}

.pj-media::before {
    /* shown only if the screenshot is missing */
    content: attr(data-initial);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 8rem);
    font-style: italic;
    color: var(--signal);
    opacity: 0.35;
}

.pj-img {
    position: absolute;
    inset: -6% 0;
    width: 100%;
    height: 112%;
    object-fit: cover;
    opacity: 0.92;
    transform: translateY(calc(var(--py, 0) * 1px)) scale(1);
    transition: transform 0.9s var(--ease), opacity 0.5s ease;
    will-change: transform;
}

.pj-item:hover .pj-img {
    opacity: 1;
    transform: translateY(calc(var(--py, 0) * 1px)) scale(1.05);
}

.project-status {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgba(12, 12, 16, 0.6);
    border: 1px solid var(--hairline-strong);
    color: var(--paper);
}

html.light-mode .project-status {
    background: rgba(255, 255, 255, 0.75);
}

.project-status.live {
    color: var(--ok);
    border-color: rgba(127, 184, 127, 0.45);
}

.project-status.progress {
    color: var(--warn);
    border-color: rgba(224, 176, 84, 0.45);
}

.project-status.planned {
    color: var(--iris);
    border-color: rgba(157, 140, 255, 0.45);
}

.pj-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pj-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--signal);
    margin-bottom: 0.9rem;
}

.pj-title {
    margin: 0 0 1.2rem;
    font-family: var(--font-body);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 1.05;
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    color: var(--paper);
}

.pj-title em {
    display: block;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    letter-spacing: -0.02em;
    color: var(--paper-dim);
}

.pj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
}

.pj-tag {
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    font-size: 0.74rem;
    border: 1px solid var(--hairline-strong);
    background: var(--glass-highlight);
    color: var(--paper-dim);
}

.pj-tag.is-cat {
    font-weight: 600;
    color: var(--signal);
    background: var(--signal-dim);
    border-color: rgba(221, 154, 59, 0.3);
}

html.light-mode .pj-tag.is-cat {
    border-color: rgba(185, 116, 30, 0.35);
}

.pj-desc {
    margin: 0 0 1.8rem;
    color: var(--paper-dim);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 52ch;
}

.pj-role {
    margin: -0.8rem 0 1.8rem;
    color: var(--paper-dim);
    font-size: 0.92rem;
    line-height: 1.7;
    max-width: 52ch;
}

.pj-role b {
    color: var(--signal);
    font-weight: 600;
}

.pj-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
}

.pj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--hairline-strong);
    color: var(--paper);
    cursor: pointer;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.pj-btn svg {
    width: 12px;
    height: 12px;
    flex: none;
}

.pj-btn-primary {
    background: var(--signal);
    border-color: var(--signal);
    color: #16130a;
    font-weight: 600;
}

.pj-btn-primary:hover,
.pj-btn-primary:focus-visible {
    background: var(--signal-strong);
    border-color: var(--signal-strong);
    transform: translateY(-2px);
}

.pj-btn-ghost:hover,
.pj-btn-ghost:focus-visible {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
    transform: translateY(-2px);
}

.pj-btn-soon {
    cursor: default;
    color: var(--paper-dim);
    background: var(--glass-highlight);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.pj-btn-soon .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--warn);
    animation: pulse 2s infinite;
}

.pj-btn-soon.is-planned .dot {
    background: var(--iris);
    animation: none;
}

.pj-more {
    margin-top: clamp(3.5rem, 8vw, 7rem);
    padding: clamp(1.6rem, 4vw, 2.6rem);
    border-radius: 28px;
    border: 1px dashed var(--hairline-strong);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.pj-more h3 {
    margin: 0 0 0.3rem;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.pj-more p {
    margin: 0;
    color: var(--paper-dim);
    font-size: 0.95rem;
}

/* ---- Scroll reveals specific to these sections ---- */
.pj-media.reveal {
    transform: translateY(50px) scale(0.96);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

.pj-media.reveal.visible {
    transform: none;
}

.pj-text.reveal {
    transition-delay: 0.12s;
}

/* ==========================================================================
   TABLET / PHONE  (≤ 899px — the mobile app shell takes over the nav)
   ========================================================================== */
@media (max-width: 899px) {

    /* Mobile only: lift the hero cut-out a little, and soften its lower edge
       now that it no longer runs to the very bottom of the screen. */
    .hero-portrait {
        bottom: clamp(26px, 5.2svh, 54px);
    }

    .hero-portrait img {
        -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
    }


    /* ---- Hero ---- */
    .hero {
        --fs: 19.5vw;
        --lines: 2;
        --tt: 23%;
        height: 100svh;
        min-height: 600px;
    }

    .hero-name {
        text-wrap: balance;
    }

    .hero-title-inner {
        max-width: 100vw;
    }

    .hero-meta {
        position: static;
        margin-top: 0.9rem;
        flex-direction: column;
        gap: 0.9rem;
        padding: 0;
    }

    /* meta is part of the flow here, so make the title block reserve no extra height */
    .hero-title-inner {
        display: block;
    }

    .hero-sub {
        font-size: clamp(1.05rem, 4.6vw, 1.5rem);
    }

    .hero-actions {
        gap: 0.6rem;
    }

    .hero-pill {
        height: 44px;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .hero-pill-icon {
        width: 44px;
    }

    .hero-portrait img {
        height: clamp(250px, 50svh, 520px);
        max-width: 90vw;
    }

    .hero-pill,
    .hero-actions {
        pointer-events: auto;
    }

    /* ---- About ---- */
    .about {
        padding-top: 3.2rem;
    }

    .about-title-desktop {
        display: none;
    }

    .about-title-mobile {
        display: block;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .about-figure img {
        height: min(54svh, 440px);
    }

    .about-card {
        border-radius: 26px;
        text-align: left;
    }

    .about-text {
        font-size: 1.04rem;
        line-height: 1.68;
    }

    .about-chips {
        gap: 0.45rem;
    }

    .about-stats {
        justify-content: space-between;
        gap: 1rem;
    }

    .about-marquee {
        margin-top: 2.4rem;
    }

    /* ---- Projects ---- */
    .projects {
        padding: 3rem 0 2.5rem;
    }

    .projects-head {
        flex-direction: column;
        gap: 1.2rem;
        margin-bottom: 2.6rem;
    }

    .projects-head-side {
        max-width: none;
        padding-top: 0;
    }

    .pj-list {
        gap: 3.2rem;
    }

    .pj-item {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .pj-item:nth-child(even) .pj-media {
        order: 0;
    }

    .pj-media {
        border-radius: 22px;
    }

    .pj-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pj-actions .pj-btn {
        width: 100%;
    }

    .pj-more {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 26px;
    }

    .pj-more .pj-btn {
        width: 100%;
    }
}

@media (max-width: 899px) and (min-width: 600px) {
    .hero {
        --fs: 15vw;
        --lines: 2;
    }

    .hero-portrait img {
        height: clamp(300px, 56svh, 560px);
    }
}

@media (max-width: 380px) {
    .hero {
        --fs: 19vw;
        --tt: 22%;
    }

    .about-text {
        font-size: 0.98rem;
    }
}

/* Short landscape phones: keep the portrait from swallowing the title */
@media (max-height: 560px) and (orientation: landscape) {
    .hero-portrait img {
        height: 56svh;
    }
}

@media (prefers-reduced-motion: reduce) {

    .am-track {
        animation: none;
    }

    .pj-img {
        transition: none;
    }
}
