/* ==========================================================================
   PORTFOLIO INDEX
   --------------------------------------------------------------------------
   Scoped stylesheet for /portfolio. Every selector is prefixed `.pf-` and the
   whole page is wrapped in `.pf-page`, so nothing here can reach another
   screen.

   Colour comes from the tokens declared in `aiart.css`. The only per-project
   value is `--pf-h`, a hue in degrees written inline by the controller's card
   partial; it drives the generated cover art so that 51 projects each get a
   distinct tile without pretending to have screenshots for work that does not
   have any.
   ========================================================================== */

.pf-page {
    --pf-max: 1240px;
    --pf-pad: clamp(1rem, 3vw, 2rem);
    --pf-gap: clamp(1rem, 2vw, 1.5rem);
    --pf-radius: 18px;
    --pf-radius-lg: 24px;
    --pf-border: var(--border-main, #252d50);
    --pf-card: var(--bg-card, #10152b);
    --pf-accent: var(--purple-primary, #7625f5);
    --pf-accent-hi: var(--purple-highlight, #aa42ff);
    --pf-lavender: var(--soft-lavender, #c5a3ff);
    --pf-ink: var(--text-primary, #f8f9ff);
    --pf-ink-2: var(--text-secondary, #b5bdda);
    --pf-ink-3: var(--text-muted, #818aa8);
    --pf-ok: #34d399;

    position: relative;
    padding: clamp(1.25rem, 3vw, 2.5rem) 0 4rem;
    color: var(--pf-ink);
}

.pf-page ::selection {
    background-color: #06b6d4 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    background-image: none !important;
    text-shadow: none !important;
}

.pf-page ::-moz-selection {
    background-color: #06b6d4 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    background-image: none !important;
    text-shadow: none !important;
}

.pf-shell {
    width: 100%;
    max-width: var(--pf-max);
    margin-inline: auto;
    padding-inline: var(--pf-pad);
}

.pf-page svg.icon,
.pf-page .icon {
    display: block;
    flex-shrink: 0;
}

.pf-page a {
    text-decoration: none;
}

.pf-page :focus-visible {
    outline: 2px solid var(--pf-accent-hi);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   1. Utility bar
   -------------------------------------------------------------------------- */

.pf-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
}

.pf-crumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--pf-ink-3);
}

.pf-crumbs a {
    color: var(--pf-ink-3);
    transition: color 0.15s ease;
}

.pf-crumbs a:hover {
    color: var(--pf-lavender);
}

.pf-crumbs [aria-current] {
    color: var(--pf-lavender);
    font-weight: 600;
}

.pf-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--pf-ink-2);
}

.pf-status__dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pf-ok);
    flex-shrink: 0;
}

.pf-status__dot::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--pf-ok);
    opacity: 0;
    animation: pf-ping 2.4s ease-out infinite;
}

.pf-status__label {
    color: var(--pf-ok);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pf-status__link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.pf-status__link:hover .pf-status__label {
    text-decoration: underline;
    filter: brightness(1.2);
}

.pf-status__sep {
    color: var(--pf-border);
}

@keyframes pf-ping {
    0% { transform: scale(0.7); opacity: 0.9; }
    70% { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* --------------------------------------------------------------------------
   2. Hero
   -------------------------------------------------------------------------- */

.pf-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
    padding: clamp(1.5rem, 3.5vw, 2.75rem);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-lg);
    background:
        radial-gradient(ellipse 70% 100% at 0% 0%, rgba(118, 37, 245, 0.16), transparent 60%),
        radial-gradient(ellipse 60% 90% at 100% 100%, rgba(34, 211, 238, 0.08), transparent 65%),
        linear-gradient(160deg, #0d1226 0%, #0a0e1e 100%);
    overflow: hidden;
}

.pf-hero__body {
    min-width: 0;
}

.pf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    margin: 0 0 1rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(170, 66, 255, 0.35);
    border-radius: 9999px;
    background: rgba(118, 37, 245, 0.14);
    color: var(--pf-lavender);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pf-title {
    margin: 0 0 1rem;
    font-family: 'Space Grotesk', var(--font-heading, system-ui), sans-serif;
    font-size: clamp(1.9rem, 3.4vw, 2.85rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: #fff;
    text-wrap: balance;
}

.pf-title__accent {
    background: linear-gradient(100deg, #a845ff 0%, #d889ff 55%, #7dd3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pf-lede {
    max-width: 56ch;
    margin: 0 0 1.5rem;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.65;
    color: var(--pf-ink-2);
}

.pf-lede strong {
    color: var(--pf-ink);
    font-weight: 600;
}

.pf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.72rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.pf-btn:active {
    transform: translateY(1px);
}

.pf-btn--primary {
    background: var(--pf-accent);
    border-color: #8738ff;
    color: #fff;
    box-shadow: 0 6px 18px rgba(118, 37, 245, 0.35);
}

.pf-btn--primary:hover {
    background: #8738ff;
    box-shadow: 0 8px 24px rgba(118, 37, 245, 0.5);
}

.pf-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--pf-border);
    color: var(--pf-ink);
}

.pf-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(170, 66, 255, 0.5);
}

.pf-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem 1rem;
    margin: 1.5rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    list-style: none;
}

.pf-facts li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--pf-ink-2);
}

.pf-facts .icon {
    color: var(--pf-accent-hi);
}

/* Featured spotlight ------------------------------------------------------ */

.pf-spotlight {
    display: block;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    background: var(--pf-card);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.pf-spotlight:hover {
    border-color: rgba(170, 66, 255, 0.55);
    transform: translateY(-2px);
}

.pf-spotlight__label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pf-ink-3);
}

.pf-spotlight__label .icon {
    color: var(--pf-accent-hi);
}

.pf-spotlight__body {
    display: block;
    padding: 1rem;
}

.pf-spotlight__cat {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--pf-lavender);
}

.pf-spotlight__title {
    display: block;
    margin: 0 0 0.4rem;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.pf-spotlight__sub {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--pf-ink-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pf-spotlight__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.72rem;
    color: var(--pf-ink-3);
}

.pf-spotlight__go {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    color: var(--pf-lavender);
}

.pf-spotlight:hover .pf-spotlight__go {
    color: #fff;
}

/* --------------------------------------------------------------------------
   2b. Lead Architect & Founder Profile
   -------------------------------------------------------------------------- */

.pf-architect {
    margin-top: clamp(1rem, 2.5vw, 1.75rem);
    margin-bottom: clamp(2rem, 4.5vw, 3rem);
}

.pf-architect__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 350px);
    gap: clamp(1.5rem, 3.5vw, 3rem);
    align-items: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-lg);
    background:
        radial-gradient(ellipse 60% 80% at 0% 50%, rgba(6, 182, 212, 0.08), transparent 65%),
        radial-gradient(ellipse 70% 90% at 100% 50%, rgba(118, 37, 245, 0.16), transparent 60%),
        linear-gradient(165deg, #0d1226 0%, #0a0e1e 100%);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    position: relative;
    overflow: hidden;
}

.pf-architect__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--pf-accent) 25%, #06b6d4 75%, transparent 100%);
    opacity: 0.8;
}

/* Visual Column */
.pf-architect__visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    position: relative;
    width: 100%;
    justify-self: end;
}

.pf-architect__frame {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    overflow: hidden;
    background: #090d1e;
    border: 1px solid rgba(170, 66, 255, 0.35);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 30px rgba(118, 37, 245, 0.2);
}

.pf-architect__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pf-architect__frame:hover .pf-architect__photo {
    transform: scale(1.03);
}

.pf-architect__glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 14, 30, 0.85) 0%, rgba(10, 14, 30, 0.1) 45%, transparent 100%);
    pointer-events: none;
}

.pf-architect__verified {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(16, 21, 43, 0.85);
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #34d399;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pf-architect__verified .icon {
    color: #34d399;
}

.pf-architect__status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    font-size: 0.74rem;
    color: var(--pf-ink-2);
}

.pf-architect__status-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pf-ok);
}

.pf-architect__status-dot::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--pf-ok);
    opacity: 0;
    animation: pf-ping 2.4s ease-out infinite;
}

/* Content Column */
.pf-architect__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pf-architect__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pf-architect__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.pf-architect__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.75rem;
    border: 1px solid rgba(170, 66, 255, 0.35);
    border-radius: 9999px;
    background: rgba(118, 37, 245, 0.12);
    color: var(--pf-lavender);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.pf-architect__badge--accent {
    border-color: rgba(6, 182, 212, 0.4);
    background: rgba(6, 182, 212, 0.12);
    color: #67e8f9;
}

.pf-architect__name {
    margin: 0;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 2.1rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
}

.pf-architect__role {
    margin: 0.2rem 0 0;
    font-size: 0.86rem;
    font-weight: 500;
    color: #93c5fd;
    line-height: 1.45;
}

.pf-architect__bio {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--pf-ink-2);
}

.pf-architect__quote {
    margin: 0;
    padding: 0.75rem 1rem 0.75rem 1.1rem;
    border-left: 3px solid var(--pf-accent-hi);
    background: rgba(255, 255, 255, 0.025);
    border-radius: 0 10px 10px 0;
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.55;
    color: #e2e8f0;
}

.pf-architect__quote p {
    margin: 0;
}

/* Metrics */
.pf-architect__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pf-architect__metric {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pf-architect__metric-val {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 30%, var(--pf-lavender) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pf-architect__metric-lbl {
    font-size: 0.68rem;
    color: var(--pf-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

/* Specialties */
.pf-architect__specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
}

.pf-architect__spec-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    transition: border-color 0.18s ease;
}

.pf-architect__spec-item:hover {
    border-color: rgba(170, 66, 255, 0.3);
}

.pf-architect__spec-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.pf-architect__spec-head .icon {
    color: #38bdf8;
    flex-shrink: 0;
}

.pf-architect__spec-desc {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--pf-ink-3);
}

/* Actions */
.pf-architect__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.pf-architect__actions .pf-btn {
    flex: 1 1 auto;
    white-space: nowrap;
    text-align: center;
}

/* --------------------------------------------------------------------------
   3. Generated cover art
   --------------------------------------------------------------------------
   The catalogue carries four stock illustrations across fifty-one projects, so
   using them as thumbnails would repeat the same picture seventeen times. Each
   tile is instead generated from the project's own hue, which is honest about
   the absence of screenshots and still gives every card a distinct identity.
   -------------------------------------------------------------------------- */

.pf-art {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(ellipse 120% 100% at 8% -10%, hsl(var(--pf-h, 265) 88% 62% / 0.46), transparent 64%),
        radial-gradient(ellipse 100% 100% at 102% 104%, hsl(calc(var(--pf-h, 265) + 46) 85% 60% / 0.3), transparent 66%),
        linear-gradient(158deg, #121c33 0%, #080c17 100%);
}

/* Faint blueprint grid, faded at the edges. */
.pf-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 78% 78% at 50% 45%, #000 20%, transparent 80%);
    mask-image: radial-gradient(ellipse 78% 78% at 50% 45%, #000 20%, transparent 80%);
    pointer-events: none;
}

.pf-art__glyph {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: hsl(var(--pf-h, 265) 88% 72% / 0.6);
}

.pf-art__glyph::after {
    content: "";
    position: absolute;
    inset: -34%;
    border-radius: 50%;
    border: 1px solid hsl(var(--pf-h, 265) 88% 70% / 0.16);
    pointer-events: none;
}

.pf-art__idx {
    position: absolute;
    top: 0.7rem;
    left: 0.8rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.42);
}

.pf-art__wm {
    position: absolute;
    right: 0.55rem;
    bottom: 0.06rem;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: clamp(3rem, 7vw, 4.2rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
    color: hsl(var(--pf-h, 265) 92% 76% / 0.14);
    pointer-events: none;
    user-select: none;
}

.pf-art__flag {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    padding: 0.16rem 0.45rem;
    border-radius: 9999px;
    background: rgba(10, 14, 26, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pf-lavender);
    backdrop-filter: blur(4px);
}

.pf-art__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
    z-index: 1;
}

.pf-card:hover .pf-art__img,
.pf-spotlight:hover .pf-art__img {
    transform: scale(1.05);
}

.pf-art__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 12, 23, 0.2) 0%, rgba(8, 12, 23, 0.65) 100%);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.pf-card:hover .pf-art__overlay {
    opacity: 0.65;
}

.pf-art--has-img .pf-art__idx {
    display: none;
}

.pf-art--has-img .pf-art__flag {
    z-index: 3;
}

.pf-art--has-img::before {
    display: none;
}

/* --------------------------------------------------------------------------
   4. Filters
   -------------------------------------------------------------------------- */

.pf-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-top: clamp(1.75rem, 4vw, 2.75rem);
    padding: 0.85rem;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    background: var(--pf-card);
}

.pf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.pf-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--pf-ink-2);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.pf-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.pf-tab[aria-current="page"] {
    background: rgba(118, 37, 245, 0.2);
    border-color: rgba(170, 66, 255, 0.5);
    color: #fff;
}

.pf-tab__count {
    padding: 0.05rem 0.35rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--pf-ink-3);
}

.pf-tab[aria-current="page"] .pf-tab__count {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.pf-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 220px;
    max-width: 320px;
}

.pf-search__field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.pf-search__field .icon {
    position: absolute;
    top: 50%;
    left: 0.7rem;
    transform: translateY(-50%);
    color: var(--pf-ink-3);
    pointer-events: none;
}

.pf-search__input {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2rem;
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.32);
    color: #fff;
    font-size: 0.8rem;
}

.pf-search__input::placeholder {
    color: var(--pf-ink-3);
}

.pf-search__input:focus {
    border-color: rgba(170, 66, 255, 0.6);
    outline: none;
    box-shadow: 0 0 0 3px rgba(118, 37, 245, 0.18);
}

.pf-search__submit {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--pf-ink);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.pf-search__submit:hover {
    background: rgba(118, 37, 245, 0.3);
    border-color: rgba(170, 66, 255, 0.55);
}

.pf-resultline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin: 1.1rem 0 1.25rem;
    font-size: 0.78rem;
    color: var(--pf-ink-3);
}

.pf-resultline strong {
    color: var(--pf-ink);
    font-weight: 600;
}

.pf-resultline__clear {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--pf-lavender);
    font-weight: 600;
}

.pf-resultline__clear:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   5. Project grid
   -------------------------------------------------------------------------- */

.pf-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pf-gap);
}

.pf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    background: var(--pf-card);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pf-card:hover {
    border-color: rgba(170, 66, 255, 0.55);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -22px rgba(118, 37, 245, 0.7);
}

.pf-card:focus-within {
    border-color: var(--pf-accent-hi);
}

.pf-card__title a {
    color: inherit;
}

/* The whole card is the hit area. */
.pf-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.pf-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.45rem;
    padding: 1rem 1.1rem 1.1rem;
}

.pf-card__cat {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--pf-lavender);
}

.pf-card__title {
    margin: 0;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #fff;
}

.pf-card__platform {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--pf-ink-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pf-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.15rem 0 0;
    padding: 0;
    list-style: none;
}

.pf-card__tags li {
    padding: 0.14rem 0.42rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    color: var(--pf-ink-2);
}

.pf-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding: 0.7rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.7rem;
    color: var(--pf-ink-3);
}

.pf-card__year {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.pf-card__go {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: var(--pf-lavender);
}

.pf-card:hover .pf-card__go {
    color: #fff;
}

/* Empty state ------------------------------------------------------------- */

.pf-empty {
    padding: clamp(2rem, 5vw, 3.5rem);
    border: 1px dashed rgba(170, 66, 255, 0.3);
    border-radius: var(--pf-radius);
    background: rgba(118, 37, 245, 0.05);
    text-align: center;
}

.pf-empty__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 14px;
    background: rgba(118, 37, 245, 0.14);
    color: var(--pf-accent-hi);
}

.pf-empty__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.pf-empty__text {
    max-width: 44ch;
    margin: 0 auto 1.25rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--pf-ink-3);
}

/* --------------------------------------------------------------------------
   6. Pagination
   -------------------------------------------------------------------------- */

.pf-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
}

.pf-pager__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--pf-ink-2);
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.pf-pager__item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(170, 66, 255, 0.45);
}

.pf-pager__item[aria-current="page"] {
    background: var(--pf-accent);
    border-color: #8738ff;
    color: #fff;
}

.pf-pager__item.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pf-pager__gap {
    padding: 0 0.25rem;
    color: var(--pf-ink-3);
    font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   7. Section frame
   -------------------------------------------------------------------------- */

.pf-section {
    margin-top: clamp(2.5rem, 6vw, 4rem);
    scroll-margin-top: 90px;
}

.pf-section__head {
    margin-bottom: 1.5rem;
}

.pf-section__eyebrow {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pf-accent-hi);
}

.pf-section__title {
    margin: 0;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
    text-wrap: balance;
}

.pf-section__sub {
    max-width: 56ch;
    margin: 0.45rem 0 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--pf-ink-3);
}

/* --------------------------------------------------------------------------
   8. Strengths
   -------------------------------------------------------------------------- */

.pf-strengths {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-strength {
    padding: 1.05rem;
    border: 1px solid var(--pf-border);
    border-radius: 14px;
    background: var(--pf-card);
}

.pf-strength--link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.pf-strength--link:hover {
    transform: translateY(-3px);
    border-color: var(--pf-accent);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.pf-strength__top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.pf-strength__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 9px;
    background: rgba(118, 37, 245, 0.14);
    color: var(--pf-accent-hi);
}

.pf-strength__num {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.64rem;
    color: var(--pf-ink-3);
}

.pf-strength__title {
    /* Titles run to one or two lines; reserving two keeps the descriptions on
       a shared baseline across the row. */
    min-height: 2.5em;
    margin: 0 0 0.3rem;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

.pf-strength__desc {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.5;
    color: var(--pf-ink-3);
}

/* --------------------------------------------------------------------------
   9. Toolbox
   -------------------------------------------------------------------------- */

.pf-toolbox {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 1.1rem;
    border: 1px dashed rgba(170, 66, 255, 0.28);
    border-radius: var(--pf-radius);
    background: rgba(118, 37, 245, 0.05);
    list-style: none;
}

.pf-toolbox li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.74rem;
    color: var(--pf-ink-2);
}

.pf-toolbox__link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.pf-toolbox__link:hover {
    transform: translateY(-2px);
    border-color: var(--pf-accent) !important;
    background: rgba(124, 58, 237, 0.15) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.pf-quote__project-link {
    color: var(--pf-accent);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.pf-quote__project-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.pf-toolbox__count {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    color: var(--pf-ink-3);
}

/* --------------------------------------------------------------------------
   10. Testimonials
   -------------------------------------------------------------------------- */

.pf-quotes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pf-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-quote {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.25rem;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    background: var(--pf-card);
}

.pf-quote__mark {
    color: rgba(170, 66, 255, 0.55);
}

.pf-quote__text {
    flex: 1;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--pf-ink-2);
}

.pf-quote__foot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pf-quote__avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(118, 37, 245, 0.18);
    color: var(--pf-lavender);
}

.pf-quote__who {
    min-width: 0;
}

.pf-quote__client {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.pf-quote__project {
    display: block;
    font-size: 0.68rem;
    color: var(--pf-ink-3);
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   11. Closing call to action
   -------------------------------------------------------------------------- */

.pf-cta {
    position: relative;
    margin-top: clamp(2.5rem, 6vw, 4rem);
    padding: clamp(1.75rem, 4vw, 3rem);
    border: 1px solid rgba(170, 66, 255, 0.35);
    border-radius: var(--pf-radius-lg);
    background:
        radial-gradient(ellipse 60% 120% at 50% 0%, rgba(118, 37, 245, 0.3), transparent 70%),
        linear-gradient(160deg, #120a26 0%, #0a0e1e 100%);
    text-align: center;
}

.pf-cta__eyebrow {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pf-lavender);
}

.pf-cta__title {
    max-width: 24ch;
    margin: 0 auto 0.75rem;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
    text-wrap: balance;
}

.pf-cta__sub {
    max-width: 54ch;
    margin: 0 auto 1.5rem;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--pf-ink-2);
}

.pf-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.pf-cta__lead {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 0.45rem 1.15rem 0.45rem 0.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pf-cta__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 2px solid var(--pf-accent-hi);
    display: block;
}

.pf-cta__lead-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.pf-cta__lead-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.pf-cta__lead-note {
    font-size: 0.68rem;
    color: var(--pf-ink-3);
    line-height: 1.2;
}

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .pf-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .pf-architect__card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
        gap: 2rem;
    }

    .pf-strengths {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pf-quotes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 721px) and (max-width: 1100px) {
    .pf-spotlight {
        display: grid;
        grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
        align-items: stretch;
    }

    .pf-spotlight__label {
        grid-column: 1 / -1;
    }

    .pf-spotlight .pf-art {
        aspect-ratio: auto;
        min-height: 210px;
    }

    .pf-spotlight__body {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 980px) {
    .pf-architect__card {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: left;
    }

    .pf-architect__visual {
        max-width: 320px;
        width: 100%;
        order: -1;
        justify-self: center;
    }

    .pf-architect__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 1rem;
    }

    .pf-architect__specs {
        grid-template-columns: minmax(0, 1fr);
    }

    .pf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pf-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .pf-search {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .pf-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pf-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pf-strengths,
    .pf-quotes {
        grid-template-columns: minmax(0, 1fr);
    }

    .pf-spotlight {
        max-width: none;
    }

    .pf-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
        -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
        mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
    }
}

@media (max-width: 640px) {
    .pf-architect__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .pf-architect__actions .pf-btn {
        width: 100%;
        padding: 0.7rem 0.5rem;
        font-size: 0.78rem;
    }
}

/* --------------------------------------------------------------------------
   13. Motion, print
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .pf-page *,
    .pf-page *::before,
    .pf-page *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .pf-card:hover,
    .pf-spotlight:hover {
        transform: none;
    }
}

@media print {
    .pf-filters,
    .pf-pager,
    .pf-cta {
        display: none;
    }

    .pf-card,
    .pf-quote,
    .pf-strength {
        border-color: #ccc;
        background: #fff;
    }
}
