/* ── Portfolio Page ────────────────────────────────────────── */

/* ── Hero ── */
.port-hero {
    padding: calc(var(--nav-height) + 80px) var(--pad-x) 80px;
    background: var(--pure-white);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    border-left: 5px solid var(--accent);
}

.port-hero__inner {
    display: flex;
    gap: 80px;
    align-items: flex-start;
    max-width: var(--max-w);
}

.port-hero__left {
    flex: 0 0 auto;
}

.port-hero__right {
    flex: 1;
    padding-top: 12px;
}

.port-hero__label { margin-bottom: 20px; }

.port-hero__title {
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 0.93;
    margin-bottom: 24px;
}

.port-hero__title-accent {
    color: var(--accent);
}

.port-hero__accent-bar {
    width: 56px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
    border-radius: 2px;
    margin-top: 4px;
}

.port-hero__desc {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.75;
    color: var(--grey-600);
    margin-bottom: 20px;
}

.port-hero__subdesc {
    font-size: 0.88rem;
    font-weight: 200;
    line-height: 1.75;
    color: var(--grey-400);
    margin-bottom: 44px;
}

.port-hero__stats {
    display: flex;
    align-items: center;
    gap: 0;
}

.port-hero__stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 32px;
}

.port-hero__stat:first-child {
    padding-left: 0;
}

.port-hero__stat-val {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

.port-hero__stat-plus {
    color: var(--accent-2);
}

.port-hero__stat-lbl {
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--grey-400);
}

.port-hero__stat-sep {
    width: 1px;
    height: 44px;
    background: rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* ── Filter bar ── */
.port-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 36px var(--pad-x);
    background: var(--pure-white);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    position: sticky;
    top: var(--nav-height);
    z-index: 10;
}

.filter-btn {
    padding: 8px 20px;
    border: 1.5px solid rgba(0,0,0,0.18);
    border-radius: 100px;
    background: none;
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--grey-600);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--grey-100);
    color: var(--black);
    border-color: var(--black);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── CTA ── */
.port-cta {
    padding: 100px var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(0,0,0,0.07);
}

.port-cta__title {
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}

/* ── Shared tile desc panel ── */
.port-tile-row__desc {
    flex-shrink: 0;
    padding: 64px 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    background: var(--pure-white);
    box-sizing: border-box;
}

.port-tile-row__desc--dark {
    background: #0e0e0e;
    color: var(--white);
}

.port-tile-row__tag {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
}

.port-tile-row__desc--dark .port-tile-row__tag {
    color: var(--accent-light);
}

.port-tile-row__heading {
    font-size: clamp(1.6rem, 2.4vw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: -0.01em;
}

.port-tile-row__body {
    font-size: 0.93rem;
    font-weight: 200;
    line-height: 1.78;
    color: var(--grey-600);
    max-width: 440px;
}

.port-tile-row__desc--dark .port-tile-row__body {
    color: rgba(255,255,255,0.5);
}

/* ── Landscape / standalone-portrait rows ── */
.port-tiles {
    border-top: 1px solid rgba(0,0,0,0.07);
}

.port-tile-row {
    display: flex;
    min-height: 560px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    overflow: hidden;
}

.port-tile-row.hidden {
    display: none;
}

.port-tile-row--flip {
    flex-direction: row-reverse;
}

/* Width splits: landscape = 70/30, portrait standalone = 30/70 */
.port-tile-row--landscape .port-tile-row__img  { flex: 0 0 70%; }
.port-tile-row--landscape .port-tile-row__desc { flex: 0 0 30%; }
.port-tile-row--portrait  .port-tile-row__img  { flex: 0 0 30%; }
.port-tile-row--portrait  .port-tile-row__desc { flex: 0 0 70%; }

.port-tile-row__img {
    position: relative;
    overflow: hidden;
    background: var(--grey-200);
    flex-shrink: 0;
}

.port-tile-row__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s var(--ease-out);
    display: block;
}

.port-tile-row:hover .port-tile-row__img img {
    transform: scale(1.04);
}

/* ── Ticker gutter between rows ── */
.port-row-gutter {
    height: 38px;
    background: var(--pure-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.port-row-gutter.hidden {
    display: none;
}

.port-row-gutter__track {
    display: flex;
    white-space: nowrap;
    animation: gutter-scroll 24s linear infinite;
}

.port-row-gutter__item {
    font-family: var(--font-primary);
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.2);
    user-select: none;
}

.port-row-gutter__item em {
    font-style: normal;
    color: var(--accent);
    opacity: 0.5;
    margin: 0 8px;
}

@keyframes gutter-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Portrait-pair rows (25 / 25 / 25 / 25) ── */
.port-tile-pair {
    display: flex;
    min-height: 600px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    overflow: hidden;
}

.port-tile-pair.hidden {
    display: none;
}

.port-tile-pair__img {
    flex: 0 0 25%;
    position: relative;
    overflow: hidden;
    background: var(--grey-200);
}

.port-tile-pair__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s var(--ease-out);
    display: block;
}

.port-tile-pair__img:hover img {
    transform: scale(1.04);
}

/* Desc panels inside a pair are 25% wide */
.port-tile-pair .port-tile-row__desc {
    flex: 0 0 25%;
    padding: 48px 40px;
    max-width: none;
}

/* Tighter heading for narrow 25% column */
.port-tile-pair .port-tile-row__heading {
    font-size: clamp(1.2rem, 1.6vw, 2rem);
}

.port-tile-pair .port-tile-row__body {
    font-size: 0.85rem;
    max-width: none;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .port-hero__inner { gap: 48px; }
    .port-tile-row__desc { padding: 48px 48px; }
}

@media (max-width: 900px) {
    .port-hero {
        padding: calc(var(--nav-height) + 60px) var(--pad-x-sm) 64px;
        border-left: 4px solid var(--accent);
    }
    .port-hero__inner { flex-direction: column; gap: 36px; }
    .port-hero__stat { padding: 0 20px; }
    .port-filter { padding: 28px var(--pad-x-sm); top: var(--nav-height); }
    .port-cta { padding: 70px var(--pad-x-sm); }

    /* Stack landscape/portrait rows vertically */
    .port-tile-row,
    .port-tile-row--flip { flex-direction: column !important; min-height: auto; }
    .port-tile-row--landscape .port-tile-row__img { flex: none; height: 400px; width: 100%; }
    .port-tile-row--portrait  .port-tile-row__img { flex: none; height: auto; width: 100%; }
    .port-tile-row--portrait  .port-tile-row__img img { height: auto; object-fit: initial; }
    .port-tile-row--landscape .port-tile-row__desc,
    .port-tile-row--portrait  .port-tile-row__desc { flex: none; width: 100%; }
    .port-tile-row__desc { padding: 48px var(--pad-x-sm); }

    /* Portrait pair: 2-column above 600px, natural image height */
    .port-tile-pair { flex-wrap: wrap; min-height: auto; }
    .port-tile-pair__img { flex: 0 0 50%; height: auto; }
    .port-tile-pair__img img { height: auto; object-fit: initial; }
    .port-tile-pair .port-tile-row__desc { flex: 0 0 50%; padding: 40px 28px; }
}

@media (max-width: 600px) {
    .port-hero {
        padding: calc(var(--nav-height) + 40px) var(--pad-x-xs) 52px;
    }
    .port-hero__stats { flex-wrap: wrap; gap: 24px; }
    .port-hero__stat-sep { display: none; }
    .port-hero__stat { padding: 0; }
    .port-filter { padding: 20px var(--pad-x-xs); gap: 6px; }
    .port-cta { padding: 60px var(--pad-x-xs); flex-direction: column; }

    .port-tile-row--landscape .port-tile-row__img { height: 280px; }
    .port-tile-row__desc { padding: 40px var(--pad-x-xs); }

    /* Portrait pair: full-width on small mobile, image uncropped */
    .port-tile-pair { flex-direction: column; }
    .port-tile-pair__img { flex: none; width: 100%; height: auto; }
    .port-tile-pair .port-tile-row__desc { flex: none; width: 100%; padding: 36px var(--pad-x-xs); }
}
