/* ==========================================================================
   Partnigram portfolio — /portfolio
   --------------------------------------------------------------------------
   Scoped page layer, following the same approach as blog.css and shopnodes-go.css.
   Every rule is namespaced under .pf-* so it cannot leak into or alter any other
   Partnigram page. Colours come from the existing --pn-* tokens in
   partnigram-public.css, so the page cannot drift from the site palette.

   Mobile-first: base rules are the small screen, media queries enhance upward.
   Deliberately restrained — no gradients, no glow, no large empty hero, no
   decorative animation. This is a professional developer portfolio.
   ========================================================================== */

/* Desktop-only contact action in the nav (hidden on mobile). */
.public-page .nav-contact {
    display: none;
    padding: 8px 18px;
    border: 1px solid var(--pn-line-strong, #bcdcd2);
    border-radius: 8px;
    color: var(--pn-green-dark, #05694a);
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
}

.public-page .nav-contact:hover,
.public-page .nav-contact:focus-visible {
    border-color: var(--pn-green-dark, #05694a);
    background: var(--pn-mist, #f3fafc);
}

/* --------------------------------------------------------------------------
   Shared section furniture
   -------------------------------------------------------------------------- */
.pf-hero,
.pf-outside,
.pf-tech,
.pf-projects,
.pf-caps,
.pf-approach,
.pf-contact {
    padding: 34px 0;
}

.pf-eyebrow {
    margin: 0 0 12px;
    color: var(--pn-green-dark, #05694a);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pf-section__title {
    margin: 0 0 20px;
    color: var(--pn-navy, #10316b);
    font-size: clamp(23px, 2.7vw, 30px);
    line-height: 1.2;
    letter-spacing: -.025em;
}

.pf-section__head {
    max-width: 660px;
    margin: 0 0 28px;
}

.pf-section__headline {
    margin: 0 0 12px;
    color: var(--pn-navy, #10316b);
    font-size: clamp(27px, 3.4vw, 38px);
    line-height: 1.12;
    letter-spacing: -.035em;
}

.pf-section__lead {
    margin: 0;
    color: var(--pn-copy, #354f78);
    font-size: 16px;
    line-height: 1.65;
}

/* One card surface shared by every panel, so border, radius and shadow match. */
.pf-card {
    padding: 22px;
    background: var(--pn-surface, #fff);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(16, 49, 107, .05);
}

.pf-card__title {
    margin: 0 0 12px;
    color: var(--pn-navy, #10316b);
    font-size: 19px;
    letter-spacing: -.02em;
}

/* --------------------------------------------------------------------------
   Hero — portrait / identity / quick facts
   -------------------------------------------------------------------------- */
.pf-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}

.pf-hero__portrait { order: 1; }

.pf-portrait {
    position: relative;
    max-width: 340px;
}

.pf-portrait__img {
    display: block;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 14px;
    background: var(--pn-mist, #f3fafc);
    overflow: hidden;
}

/* Neutral monogram placeholder. Replaced by the supplied portrait later; the
   ratio and object-fit rules above already suit a real photograph. */
.pf-portrait__monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--pn-navy, #10316b);
    font-size: clamp(40px, 12vw, 62px);
    font-weight: 750;
    letter-spacing: .04em;
}

.pf-hero__identity { order: 2; }

.pf-name {
    margin: 0 0 8px;
    color: var(--pn-navy, #10316b);
    font-size: clamp(32px, 6vw, 50px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.pf-role {
    margin: 0 0 6px;
    color: var(--pn-green-dark, #05694a);
    font-size: clamp(16px, 2.2vw, 19px);
    font-weight: 700;
    letter-spacing: -.01em;
}

.pf-tagline {
    margin: 0 0 18px;
    color: var(--pn-muted, #5d7799);
    font-size: 14px;
}

.pf-bio {
    max-width: 60ch;
    margin: 0 0 24px;
    color: var(--pn-copy, #354f78);
    font-size: 16px;
    line-height: 1.7;
}

.pf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pf-actions--center { justify-content: center; }

.pf-facts {
    order: 3;
    align-self: start;
    padding: 20px;
    background: var(--pn-surface, #fff);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(16, 49, 107, .05);
}

.pf-facts__title {
    margin: 0 0 14px;
    color: var(--pn-navy, #10316b);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.pf-facts__list { margin: 0; }

.pf-fact {
    padding: 13px 0;
    border-top: 1px solid var(--pn-line, #dcece7);
}

.pf-fact:first-child {
    padding-top: 0;
    border-top: 0;
}

.pf-fact dt {
    color: var(--pn-navy, #10316b);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.pf-fact dd {
    margin: 2px 0 0;
    color: var(--pn-muted, #5d7799);
    font-size: 13px;
    line-height: 1.45;
}
/* --------------------------------------------------------------------------
   Outside of Work
   -------------------------------------------------------------------------- */
.pf-outside__quote {
    max-width: 76ch;
    margin: 0 0 20px;
    color: var(--pn-copy, #354f78);
    font-size: 16px;
    line-height: 1.7;
}

.pf-outside__items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-outside__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px;
    background: var(--pn-mist, #f3fafc);
    border-radius: 10px;
}

.pf-outside__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--pn-green-dark, #05694a);
    background: var(--pn-surface, #fff);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 9px;
}

.pf-outside__icon svg {
    width: 19px;
    height: 19px;
}

.pf-outside__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-outside__text strong {
    color: var(--pn-navy, #10316b);
    font-size: 14px;
}

.pf-outside__text span {
    color: var(--pn-muted, #5d7799);
    font-size: 13px;
    line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Technology strip
   -------------------------------------------------------------------------- */
.pf-tech__label {
    margin: 0 0 10px;
    color: var(--pn-navy, #10316b);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* Visually recessed so the secondary group never reads as equal to the primary. */
.pf-tech__label--working {
    margin-top: 22px;
    color: var(--pn-muted, #5d7799);
}

.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-chip {
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
}

.pf-chip--primary {
    color: var(--pn-navy, #10316b);
    background: var(--pn-mist, #f3fafc);
    border-color: var(--pn-line, #dcece7);
}

.pf-chip--working {
    color: var(--pn-muted, #5d7799);
    background: transparent;
    border-color: var(--pn-line, #dcece7);
    border-style: dashed;
    font-weight: 550;
}

.pf-chip--sm {
    padding: 4px 10px;
    font-size: 12px;
}

.pf-chips--compact { gap: 6px; }

/* --------------------------------------------------------------------------
   Featured project cards
   -------------------------------------------------------------------------- */
.pf-project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.pf-project {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.pf-project:hover {
    border-color: var(--pn-green-soft, #a8ddc8);
    box-shadow: 0 14px 34px rgba(16, 49, 107, .09);
}

/* Fixed ratio on every card, with intrinsic width/height attributes on the img,
   so the browser reserves the exact box before the file loads (no CLS) and
   object-fit prevents any stretching. */
.pf-project__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--pn-mist, #f3fafc);
    border-bottom: 1px solid var(--pn-line, #dcece7);
}

.pf-project__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Branded placeholder for products with no genuine imagery. Deliberately plain:
   it signals "no screenshot available" rather than imitating an application. */
.pf-project__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    background: var(--pn-mist, #f3fafc);
}

.pf-project__initials {
    color: var(--pn-navy, #10316b);
    font-size: clamp(30px, 6vw, 42px);
    font-weight: 750;
    letter-spacing: .04em;
}

.pf-project__placeholder-label {
    color: var(--pn-muted, #5d7799);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.pf-project__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.pf-project__title {
    margin: 0;
    color: var(--pn-navy, #10316b);
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.pf-project__desc {
    flex: 1;
    margin: 0;
    color: var(--pn-copy, #354f78);
    font-size: 14px;
    line-height: 1.65;
}

.pf-project__footer {
    padding: 0 20px 20px;
}

.pf-project__link {
    color: var(--pn-green-dark, #05694a);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.pf-project__link:hover,
.pf-project__link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}
/* --------------------------------------------------------------------------
   Capabilities
   -------------------------------------------------------------------------- */
.pf-caps__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.pf-cap {
    padding: 20px;
    background: var(--pn-surface, #fff);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 12px;
}

.pf-cap__title {
    margin: 0 0 6px;
    color: var(--pn-navy, #10316b);
    font-size: 16px;
    letter-spacing: -.015em;
}

.pf-cap__body {
    margin: 0 0 12px;
    color: var(--pn-muted, #5d7799);
    font-size: 14px;
    line-height: 1.55;
}

.pf-cap__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-cap__list li {
    padding: 4px 10px;
    color: var(--pn-copy, #354f78);
    background: var(--pn-mist, #f3fafc);
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Engineering approach flow
   -------------------------------------------------------------------------- */
.pf-approach__body {
    max-width: 78ch;
    margin: 0 0 22px;
    color: var(--pn-copy, #354f78);
    font-size: 15px;
    line-height: 1.7;
}

.pf-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-flow__step {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    background: var(--pn-mist, #f3fafc);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 10px;
}

/* The arrow between steps is a ::after so it is never exposed to assistive
   technology; the ordered list already conveys the sequence. */
.pf-flow__step:not(:last-child)::after {
    content: "\2192";
    margin-left: 4px;
    color: var(--pn-green, #008b5c);
    font-size: 15px;
    font-weight: 700;
}

.pf-flow__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #fff;
    background: var(--pn-green-dark, #05694a);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 750;
}

.pf-flow__label {
    color: var(--pn-navy, #10316b);
    font-size: 13px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Contact CTA
   -------------------------------------------------------------------------- */
.pf-contact__inner {
    padding: clamp(26px, 4vw, 44px);
    text-align: center;
    background: var(--pn-mist, #f3fafc);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 16px;
}

.pf-contact__title {
    margin: 0 0 12px;
    color: var(--pn-navy, #10316b);
    font-size: clamp(23px, 3vw, 32px);
    line-height: 1.15;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.pf-contact__body {
    max-width: 62ch;
    margin: 0 auto 24px;
    color: var(--pn-copy, #354f78);
    font-size: 16px;
    line-height: 1.65;
}

.pf-contact__email {
    margin: 18px 0 0;
    color: var(--pn-muted, #5d7799);
    font-size: 13px;
}
/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Tablet: portrait and identity side by side, quick facts full width beneath,
   so cards are never squeezed. */
@media (min-width: 720px) {
    .pf-hero,
    .pf-outside,
    .pf-tech,
    .pf-projects,
    .pf-caps,
    .pf-approach,
    .pf-contact {
        padding: 44px 0;
    }

    .pf-hero__grid {
        grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
        align-items: start;
        gap: 30px;
    }

    .pf-facts {
        order: 3;
        grid-column: 1 / -1;
    }

    .pf-facts__list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .pf-fact {
        padding: 0 0 0 18px;
        border-top: 0;
        border-left: 1px solid var(--pn-line, #dcece7);
    }

    .pf-fact:first-child {
        padding-left: 0;
        border-left: 0;
    }

    .pf-outside__items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pf-outside__item {
        flex-direction: column;
    }

    .pf-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .pf-caps__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Desktop: the full three-column hero composition from the specification.
   The nav Contact Me action appears only from this width up. */
@media (min-width: 1024px) {
    .public-page .nav-contact {
        display: inline-block;
    }

    .pf-hero,
    .pf-outside,
    .pf-tech,
    .pf-projects,
    .pf-caps,
    .pf-approach,
    .pf-contact {
        padding: 54px 0;
    }

    .pf-hero__grid {
        grid-template-columns: 280px minmax(0, 1fr) 260px;
        gap: 36px;
        align-items: start;
    }

    .pf-facts {
        grid-column: auto;
        order: 3;
    }

    .pf-facts__list {
        display: block;
    }

    .pf-fact {
        padding: 13px 0;
        border-top: 1px solid var(--pn-line, #dcece7);
        border-left: 0;
    }

    .pf-fact:first-child {
        padding-top: 0;
        border-top: 0;
    }

    .pf-portrait { max-width: none; }

    .pf-project-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pf-caps__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pf-flow__step { flex: 0 0 auto; }
}

/* Very wide: stop the hero growing indefinitely so the three columns stay a
   readable composition instead of drifting apart. */
@media (min-width: 1360px) {
    .pf-hero__grid {
        grid-template-columns: 300px minmax(0, 1fr) 280px;
    }
}

/* Narrow phones (360px and below) */
@media (max-width: 380px) {
    .pf-hero,
    .pf-outside,
    .pf-tech,
    .pf-projects,
    .pf-caps,
    .pf-approach,
    .pf-contact {
        padding: 30px 0;
    }

    .pf-card,
    .pf-facts { padding: 17px; }

    .pf-project__body,
    .pf-project__footer { padding: 16px; }

    /* Full-width buttons keep the tap targets comfortable on a small screen. */
    .pf-actions .button {
        width: 100%;
        text-align: center;
    }

    .pf-outside__item { padding: 11px; }

    .pf-flow__step { width: 100%; }

    .pf-flow__step::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pf-project { transition: none; }
}