:root {
    --apm-primary: #2563EB;
    --apm-accent: #06B6D4;
    --apm-dark: #07111F;
    --apm-slate: #101828;
    --apm-text: #EAF1FA;
    --apm-muted: #9FB0C6;
    --apm-border: rgba(159, 176, 198, 0.18);
    --apm-card: rgba(16, 24, 40, 0.88);
    --apm-radius: 20px;
    --apm-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.apm-projects,
.apm-single-project,
.apm-project-archive {
    color: var(--apm-text);
    font-family: inherit;
}

.apm-shell {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.apm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--apm-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.apm-eyebrow::before {
    width: 24px;
    height: 2px;
    background: currentColor;
    content: "";
}

.apm-projects__intro,
.apm-section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.apm-projects__intro h2,
.apm-section-heading h2,
.apm-case-study-sections h2,
.apm-project-cta h2 {
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.apm-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
    margin: 0 0 30px;
    padding: 18px;
    border: 1px solid var(--apm-border);
    border-radius: 16px;
    background: rgba(7, 17, 31, 0.72);
}

.apm-filters label {
    display: grid;
    flex: 1 1 220px;
    gap: 7px;
    margin: 0;
    color: var(--apm-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apm-filters select {
    min-height: 48px;
    margin: 0;
    padding: 0 42px 0 14px;
    border: 1px solid var(--apm-border);
    border-radius: 11px;
    background-color: var(--apm-slate);
    color: var(--apm-text);
    font: inherit;
    text-transform: none;
}

.apm-filter-reset {
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--apm-border);
    border-radius: 11px;
    background: transparent;
    color: var(--apm-text);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.apm-filter-reset:hover,
.apm-filter-reset:focus-visible {
    border-color: var(--apm-accent);
    color: var(--apm-accent);
}

.apm-project-grid {
    display: grid;
    gap: 24px;
}

.apm-columns-1 { grid-template-columns: minmax(0, 1fr); }
.apm-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apm-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apm-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.apm-project-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.98), rgba(7, 17, 31, 0.98));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.apm-project-card:hover {
    border-color: rgba(6, 182, 212, 0.52);
    box-shadow: var(--apm-shadow);
    transform: translateY(-5px);
}

.apm-project-card[hidden] {
    display: none !important;
}

.apm-project-card__image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(6, 182, 212, 0.12));
}

.apm-project-card__image img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform 300ms ease;
}

.apm-project-card:hover .apm-project-card__image img {
    transform: scale(1.035);
}

.apm-project-card__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.18), transparent 38%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(7, 17, 31, 0.8));
}

.apm-project-card__placeholder span {
    color: rgba(234, 241, 250, 0.28);
    font-size: 84px;
    font-weight: 800;
}

.apm-project-card__status {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.82);
    color: var(--apm-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.apm-project-card__body {
    padding: 24px;
}

.apm-project-card__types {
    margin-bottom: 10px;
    color: var(--apm-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.apm-project-card h3 {
    margin: 0 0 10px;
    color: var(--apm-text);
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.apm-project-card h3 a,
.apm-project-card__link {
    color: inherit;
    text-decoration: none;
}

.apm-project-card__subtitle {
    margin: 0 0 10px !important;
    color: #D9E5F5 !important;
    font-weight: 600;
}

.apm-project-card__body > p:not(.apm-project-card__subtitle) {
    margin: 0 0 18px;
    color: var(--apm-muted);
    font-size: 15px;
    line-height: 1.65;
}

.apm-project-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 19px;
}

.apm-project-card__meta span {
    padding: 6px 9px;
    border: 1px solid var(--apm-border);
    border-radius: 999px;
    color: #C8D4E4;
    font-size: 12px;
}

.apm-project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--apm-text);
    font-weight: 700;
}

.apm-project-card__link span {
    color: var(--apm-accent);
    transition: transform 160ms ease;
}

.apm-project-card__link:hover span {
    transform: translateX(4px);
}

.apm-empty,
.apm-no-results {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px solid var(--apm-border);
    border-radius: 14px;
    background: rgba(16, 24, 40, 0.72);
    color: var(--apm-muted);
    text-align: center;
}

.apm-project-hero,
.apm-archive-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(80px, 10vw, 150px) 0 clamp(70px, 9vw, 120px);
    background:
        radial-gradient(circle at 86% 14%, rgba(6, 182, 212, 0.16), transparent 32%),
        radial-gradient(circle at 8% 70%, rgba(37, 99, 235, 0.18), transparent 38%),
        var(--apm-dark);
}

.apm-project-hero .apm-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
    align-items: center;
    gap: clamp(40px, 7vw, 90px);
}

.apm-project-hero h1,
.apm-archive-hero h1 {
    max-width: 920px;
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(46px, 7.2vw, 90px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.apm-project-hero__subtitle,
.apm-archive-hero p {
    max-width: 760px;
    margin: 22px 0 0;
    color: #D8E4F3;
    font-size: clamp(20px, 2.3vw, 30px);
    line-height: 1.35;
}

.apm-project-hero__summary {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--apm-muted);
    font-size: 17px;
    line-height: 1.7;
}

.apm-project-hero__image {
    overflow: hidden;
    border: 1px solid var(--apm-border);
    border-radius: 24px;
    background: rgba(16, 24, 40, 0.8);
    box-shadow: var(--apm-shadow);
    transform: rotate(1.2deg);
}

.apm-project-hero__image img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.apm-project-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.apm-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 700;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.apm-button:hover {
    transform: translateY(-2px);
}

.apm-button--primary {
    background: linear-gradient(135deg, var(--apm-primary), var(--apm-accent));
    color: #FFFFFF !important;
}

.apm-button--ghost {
    border-color: var(--apm-border);
    background: rgba(16, 24, 40, 0.56);
    color: var(--apm-text) !important;
}

.apm-project-content,
.apm-archive-content {
    padding-top: clamp(60px, 8vw, 100px);
    padding-bottom: clamp(70px, 10vw, 130px);
}

.apm-project-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 0 0 44px;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: var(--apm-border);
}

.apm-project-facts > div {
    min-width: 0;
    padding: 20px;
    background: var(--apm-card);
}

.apm-project-facts dt {
    margin-bottom: 7px;
    color: var(--apm-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.apm-project-facts dd {
    margin: 0;
    color: var(--apm-text);
    font-size: 15px;
    line-height: 1.55;
}

.apm-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 clamp(70px, 9vw, 110px);
}

.apm-stats > div {
    padding: 30px;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.12), rgba(16, 24, 40, 0.82));
}

.apm-stats strong {
    display: block;
    margin-bottom: 10px;
    color: var(--apm-text);
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.apm-stats span {
    color: var(--apm-muted);
    line-height: 1.5;
}

.apm-case-study-sections {
    display: grid;
    gap: clamp(60px, 8vw, 100px);
}

.apm-case-study-sections section {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    column-gap: clamp(35px, 7vw, 100px);
    align-items: start;
    padding-top: 34px;
    border-top: 1px solid var(--apm-border);
}

.apm-case-study-sections .apm-eyebrow,
.apm-case-study-sections h2 {
    grid-column: 1;
}

.apm-case-study-sections .apm-rich-text {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.apm-rich-text,
.apm-editor-content {
    color: var(--apm-muted);
    font-size: 18px;
    line-height: 1.82;
}

.apm-rich-text p:first-child,
.apm-editor-content > *:first-child {
    margin-top: 0;
}

.apm-editor-content,
.apm-gallery-section,
.apm-related-projects {
    margin-top: clamp(70px, 10vw, 130px);
}

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

.apm-gallery-grid a {
    overflow: hidden;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: var(--apm-card);
}

.apm-gallery-grid img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    transition: transform 240ms ease;
}

.apm-gallery-grid a:hover img {
    transform: scale(1.02);
}

.apm-project-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: clamp(80px, 11vw, 140px);
    padding: clamp(30px, 5vw, 62px);
    border: 1px solid rgba(6, 182, 212, 0.26);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.16), transparent 38%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(16, 24, 40, 0.95));
}

.apm-project-cta h2 {
    max-width: 760px;
    font-size: clamp(30px, 4vw, 50px);
}

.apm-project-cta .apm-button {
    flex: 0 0 auto;
}

.apm-archive-hero .apm-shell {
    text-align: left;
}

.apm-archive-hero p {
    max-width: 800px;
    color: var(--apm-muted);
    font-size: 19px;
    line-height: 1.65;
}

.apm-project-archive,
.apm-single-project {
    background: #081321;
}

.apm-project-archive .navigation.pagination {
    margin-top: 50px;
}

.apm-project-archive .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.apm-project-archive .page-numbers {
    display: grid;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 12px;
    place-items: center;
    border: 1px solid var(--apm-border);
    border-radius: 9px;
    background: var(--apm-slate);
    color: var(--apm-text);
    text-decoration: none;
}

.apm-project-archive .page-numbers.current,
.apm-project-archive .page-numbers:hover {
    border-color: var(--apm-accent);
    color: var(--apm-accent);
}

@media (max-width: 1024px) {
    .apm-columns-3,
    .apm-columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apm-project-hero .apm-shell {
        grid-template-columns: 1fr;
    }

    .apm-project-hero__image {
        max-width: 760px;
        transform: none;
    }
}

@media (max-width: 760px) {
    .apm-shell {
        width: min(100% - 28px, 1180px);
    }

    .apm-columns-2,
    .apm-columns-3,
    .apm-columns-4,
    .apm-project-facts,
    .apm-stats,
    .apm-gallery-grid {
        grid-template-columns: 1fr;
    }

    .apm-case-study-sections section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .apm-case-study-sections .apm-eyebrow,
    .apm-case-study-sections h2,
    .apm-case-study-sections .apm-rich-text {
        grid-column: 1;
        grid-row: auto;
    }

    .apm-project-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .apm-project-cta .apm-button {
        width: 100%;
    }

    .apm-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .apm-filter-reset {
        width: 100%;
    }
}

/* Case study system */
.apm-case-study-card__metric {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    max-width: calc(100% - 28px);
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(7, 17, 31, 0.88);
    color: #D7E3F2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.025em;
    backdrop-filter: blur(10px);
}

.apm-case-study-card__metric strong {
    color: var(--apm-accent);
    font-size: 20px;
    line-height: 1;
}

.apm-case-study-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    align-items: start;
    gap: clamp(34px, 6vw, 80px);
    margin-top: clamp(50px, 8vw, 90px);
}

.apm-case-study-main {
    min-width: 0;
}

.apm-case-section {
    padding: 0 0 clamp(52px, 7vw, 82px);
    scroll-margin-top: 110px;
}

.apm-case-section + .apm-case-section {
    padding-top: clamp(52px, 7vw, 82px);
    border-top: 1px solid var(--apm-border);
}

.apm-case-section h2 {
    max-width: 780px;
    margin: 13px 0 22px;
    color: var(--apm-text);
    font-size: clamp(31px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.apm-case-section .apm-rich-text,
.apm-case-section .apm-rich-text p,
.apm-case-section.apm-editor-content {
    color: var(--apm-muted);
    font-size: 18px;
    line-height: 1.82;
}

.apm-case-section .apm-rich-text p:last-child {
    margin-bottom: 0;
}

.apm-case-section--results {
    position: relative;
}

.apm-case-section--results::before {
    position: absolute;
    inset: clamp(34px, 5vw, 58px) -24px 24px;
    z-index: 0;
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.09), rgba(6, 182, 212, 0.05));
    content: "";
    pointer-events: none;
}

.apm-case-section--results > * {
    position: relative;
    z-index: 1;
}

.apm-case-study-sidebar {
    position: relative;
}

.apm-case-study-sidebar__inner {
    position: sticky;
    top: 110px;
    padding: 24px;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: rgba(16, 24, 40, 0.82);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
}

.apm-case-study-sidebar nav {
    display: grid;
    gap: 2px;
    margin: 16px 0 22px;
}

.apm-case-study-sidebar nav a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #D7E3F2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    transition: color 150ms ease, padding-left 150ms ease;
}

.apm-case-study-sidebar nav a:hover {
    padding-left: 5px;
    color: var(--apm-accent);
}

.apm-case-study-sidebar .apm-button {
    width: 100%;
    text-align: center;
}

.apm-deliverables-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.apm-deliverables-list li {
    position: relative;
    margin: 0;
    padding: 16px 16px 16px 46px;
    border: 1px solid var(--apm-border);
    border-radius: 12px;
    background: rgba(16, 24, 40, 0.68);
    color: #DCE7F4;
    line-height: 1.5;
}

.apm-deliverables-list li::before {
    position: absolute;
    top: 16px;
    left: 16px;
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.13);
    color: var(--apm-accent);
    content: "✓";
    font-size: 12px;
    font-weight: 800;
}

.apm-testimonial {
    margin: clamp(60px, 9vw, 110px) 0;
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 0, rgba(6, 182, 212, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 24, 40, 0.92));
}

.apm-testimonial blockquote {
    max-width: 950px;
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(26px, 3.5vw, 44px);
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.apm-testimonial figcaption {
    margin-top: 22px;
    color: var(--apm-accent);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.apm-linked-project .apm-project-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
}

.apm-linked-project .apm-project-card__image {
    min-height: 100%;
}

@media (max-width: 1024px) {
    .apm-case-study-layout {
        grid-template-columns: 1fr;
    }

    .apm-case-study-sidebar__inner {
        position: static;
    }

    .apm-case-study-sidebar nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px 16px;
    }
}

@media (max-width: 760px) {
    .apm-deliverables-list,
    .apm-case-study-sidebar nav,
    .apm-linked-project .apm-project-card {
        grid-template-columns: 1fr;
    }

    .apm-case-section--results::before {
        right: -10px;
        left: -10px;
    }

    .apm-case-study-card__metric {
        right: 10px;
        bottom: 10px;
        left: 10px;
        justify-content: center;
    }
}

/* Version 1.2: editorial case studies and improved archives */
.apm-archive-hero--compact {
    padding: clamp(72px, 8vw, 112px) 0 clamp(58px, 7vw, 88px);
}

.apm-archive-hero--compact h1 {
    font-size: clamp(52px, 6.4vw, 82px);
}

.apm-archive-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 34px;
}

.apm-archive-intro > div {
    max-width: 760px;
}

.apm-archive-intro h2 {
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.apm-archive-count {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--apm-border);
    border-radius: 999px;
    background: rgba(16, 24, 40, 0.75);
    color: var(--apm-muted);
    font-size: 13px;
    font-weight: 700;
}

.apm-grid-count-1 {
    grid-template-columns: minmax(0, 1fr) !important;
}

.apm-grid-count-1 > .apm-project-card {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
    min-height: 430px;
}

.apm-grid-count-1 > .apm-project-card .apm-project-card__image {
    height: 100%;
    min-height: 430px;
    aspect-ratio: auto;
}

.apm-grid-count-1 > .apm-project-card .apm-project-card__body {
    display: flex;
    padding: clamp(34px, 5vw, 66px);
    flex-direction: column;
    justify-content: center;
}

.apm-grid-count-1 > .apm-project-card h3 {
    max-width: 680px;
    font-size: clamp(34px, 4vw, 54px);
}

.apm-grid-count-1 > .apm-project-card .apm-project-card__body > p:not(.apm-project-card__subtitle) {
    max-width: 680px;
    font-size: 17px;
}

.apm-case-study-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(78px, 9vw, 126px) 0 clamp(68px, 8vw, 106px);
    background:
        radial-gradient(circle at 88% 10%, rgba(6, 182, 212, 0.16), transparent 30%),
        radial-gradient(circle at 8% 80%, rgba(37, 99, 235, 0.18), transparent 38%),
        var(--apm-dark);
}

.apm-case-study-hero__inner {
    max-width: 1040px;
}

.apm-case-study-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--apm-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.apm-case-study-breadcrumb a {
    color: var(--apm-accent);
    text-decoration: none;
}

.apm-case-study-hero h1 {
    max-width: 1000px;
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(46px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.apm-case-study-hero__subtitle {
    max-width: 900px;
    margin: 26px 0 0;
    color: #DDE8F6;
    font-size: clamp(21px, 2.5vw, 31px);
    font-weight: 600;
    line-height: 1.35;
}

.apm-case-study-hero__summary {
    max-width: 820px;
    margin: 18px 0 0;
    color: var(--apm-muted);
    font-size: 18px;
    line-height: 1.75;
}

.apm-case-study-page {
    padding-top: clamp(44px, 6vw, 80px);
    padding-bottom: clamp(80px, 10vw, 140px);
}

.apm-case-study-cover {
    overflow: hidden;
    margin: 0 0 clamp(44px, 7vw, 82px);
    border: 1px solid var(--apm-border);
    border-radius: 26px;
    background: var(--apm-card);
    box-shadow: var(--apm-shadow);
}

.apm-case-study-cover img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.apm-case-study-layout--editorial {
    grid-template-columns: minmax(0, 790px) minmax(290px, 340px);
    justify-content: space-between;
    gap: clamp(40px, 6vw, 78px);
    margin-top: clamp(44px, 6vw, 76px);
}

.apm-case-study-article {
    min-width: 0;
}

.apm-case-study-body {
    color: #C6D3E3;
    font-size: 18px;
    line-height: 1.82;
}

.apm-case-study-body > *:first-child {
    margin-top: 0;
}

.apm-case-study-body p {
    margin: 0 0 1.45em;
}

.apm-case-study-body .apm-lead,
.apm-case-study-body > p:first-child {
    color: #E5EDF8;
    font-size: clamp(20px, 2.1vw, 24px);
    line-height: 1.65;
}

.apm-case-study-body h2,
.apm-case-study-body h3,
.apm-case-study-body h4 {
    color: var(--apm-text);
    scroll-margin-top: 120px;
}

.apm-case-study-body h2 {
    margin: clamp(64px, 8vw, 96px) 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--apm-border);
    font-size: clamp(32px, 4.2vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.apm-case-study-body h2:first-child {
    margin-top: 0;
}

.apm-case-study-body h3 {
    margin: 44px 0 18px;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.apm-case-study-body h4 {
    margin: 34px 0 14px;
    font-size: 22px;
    line-height: 1.3;
}

.apm-case-study-body ul,
.apm-case-study-body ol {
    margin: 0 0 28px;
    padding-left: 1.35em;
}

.apm-case-study-body li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.apm-case-study-body a {
    color: var(--apm-accent);
    text-underline-offset: 3px;
}

.apm-case-study-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 18px;
}

.apm-case-study-body figure {
    margin: 38px 0 44px;
}

.apm-case-study-body figure img {
    display: block;
    width: 100%;
    margin: 0;
    border: 1px solid var(--apm-border);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.apm-case-study-body figcaption,
.apm-case-study-body .wp-caption-text {
    margin-top: 12px;
    color: var(--apm-muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

.apm-case-study-body blockquote {
    margin: 42px 0;
    padding: 28px 30px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-left: 4px solid var(--apm-accent);
    border-radius: 16px;
    background: rgba(16, 24, 40, 0.82);
    color: #E3EDF8;
    font-size: 21px;
    line-height: 1.65;
}

.apm-case-study-body table {
    width: 100%;
    margin: 34px 0;
    border-collapse: collapse;
    border: 1px solid var(--apm-border);
    color: #D6E2F1;
}

.apm-case-study-body th,
.apm-case-study-body td {
    padding: 14px 16px;
    border: 1px solid var(--apm-border);
    text-align: left;
    vertical-align: top;
}

.apm-case-study-body th {
    background: rgba(37, 99, 235, 0.13);
    color: var(--apm-text);
}

.apm-content-callout,
.apm-result-callout {
    margin: 38px 0;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: rgba(16, 24, 40, 0.8);
}

.apm-result-callout {
    border-color: rgba(6, 182, 212, 0.26);
    background:
        radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.11), rgba(16, 24, 40, 0.9));
}

.apm-content-callout > *:last-child,
.apm-result-callout > *:last-child {
    margin-bottom: 0;
}

.apm-check-list {
    display: grid;
    gap: 12px;
    margin: 28px 0 38px !important;
    padding: 0 !important;
    list-style: none;
}

.apm-check-list li {
    position: relative;
    margin: 0 !important;
    padding: 15px 16px 15px 48px !important;
    border: 1px solid var(--apm-border);
    border-radius: 12px;
    background: rgba(16, 24, 40, 0.68);
}

.apm-check-list li::before {
    position: absolute;
    top: 15px;
    left: 16px;
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.13);
    color: var(--apm-accent);
    content: "✓";
    font-size: 12px;
    font-weight: 800;
}

.apm-case-study-sidebar--contact {
    min-width: 0;
}

.apm-case-study-sidebar__sticky {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 18px;
}

.apm-sticky-contact-card,
.apm-sidebar-panel {
    padding: 24px;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: rgba(16, 24, 40, 0.9);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(14px);
}

.apm-sticky-contact-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(6, 182, 212, 0.3);
    background:
        radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.19), transparent 42%),
        linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(16, 24, 40, 0.96));
}

.apm-sticky-contact-card__label {
    display: block;
    margin-bottom: 12px;
    color: var(--apm-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.apm-sticky-contact-card h2,
.apm-sidebar-panel h2 {
    margin: 0;
    color: var(--apm-text);
    letter-spacing: -0.025em;
}

.apm-sticky-contact-card h2 {
    font-size: 29px;
    line-height: 1.15;
}

.apm-sticky-contact-card p {
    margin: 14px 0 20px;
    color: var(--apm-muted);
    font-size: 15px;
    line-height: 1.65;
}

.apm-sticky-contact-card .apm-button {
    width: 100%;
}

.apm-sidebar-panel h2 {
    margin-bottom: 16px;
    font-size: 18px;
}

.apm-sidebar-toc nav {
    display: grid;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.apm-sidebar-toc a {
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #CBD8E8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
    transition: color 160ms ease, padding-left 160ms ease;
}

.apm-sidebar-toc a:hover,
.apm-sidebar-toc a.is-active {
    padding-left: 5px;
    color: var(--apm-accent);
}

.apm-sidebar-toc .apm-toc-level-3 {
    padding-left: 14px;
    color: var(--apm-muted);
    font-size: 12px;
}

.apm-sidebar-details dl,
.apm-sidebar-details dd {
    margin: 0;
}

.apm-sidebar-details dl {
    display: grid;
    gap: 14px;
}

.apm-sidebar-details dl > div {
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.apm-sidebar-details dl > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.apm-sidebar-details dt {
    margin-bottom: 4px;
    color: var(--apm-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.apm-sidebar-details dd {
    color: #D8E4F2;
    font-size: 13px;
    line-height: 1.55;
}

.apm-testimonial--inside-article {
    margin: clamp(60px, 8vw, 90px) 0 0;
}

.apm-testimonial--inside-article blockquote {
    font-size: clamp(24px, 3vw, 38px);
}

.apm-case-study-article .apm-gallery-section {
    margin-top: clamp(60px, 8vw, 92px);
}

@media (max-width: 1024px) {
    .apm-grid-count-1 > .apm-project-card {
        grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
    }

    .apm-case-study-layout--editorial {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 38px;
    }
}

@media (max-width: 860px) {
    .apm-case-study-layout--editorial {
        grid-template-columns: 1fr;
    }

    .apm-case-study-sidebar__sticky {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apm-sticky-contact-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .apm-archive-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .apm-grid-count-1 > .apm-project-card {
        display: block;
        min-height: 0;
    }

    .apm-grid-count-1 > .apm-project-card .apm-project-card__image {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .apm-grid-count-1 > .apm-project-card .apm-project-card__body {
        padding: 26px;
    }

    .apm-grid-count-1 > .apm-project-card h3 {
        font-size: 30px;
    }

    .apm-case-study-hero {
        padding-top: 64px;
    }

    .apm-case-study-body {
        font-size: 17px;
        line-height: 1.75;
    }

    .apm-case-study-body h2 {
        margin-top: 58px;
    }

    .apm-case-study-sidebar__sticky {
        grid-template-columns: 1fr;
    }

    .apm-sticky-contact-card {
        grid-column: auto;
    }
}

/* v2 visual portfolio showcase */
.apm-project-showcase-hero {
    background:
        radial-gradient(circle at 15% 0, rgba(37, 99, 235, 0.2), transparent 36%),
        radial-gradient(circle at 88% 10%, rgba(6, 182, 212, 0.14), transparent 30%),
        var(--apm-dark);
}

.apm-project-cover {
    max-height: 760px;
}

.apm-project-cover img {
    width: 100%;
    max-height: 760px;
    object-fit: cover;
    object-position: center top;
}

.apm-gallery-section .apm-section-heading p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--apm-muted);
    font-size: 15px;
    line-height: 1.7;
}

.apm-showcase-stack {
    display: grid;
    gap: clamp(24px, 4vw, 46px);
}

.apm-showcase-item {
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
}

.apm-showcase-item > a {
    display: block;
    cursor: zoom-in;
}

.apm-showcase-item img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.apm-showcase-item figcaption {
    padding: 14px 18px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.apm-gallery-section--grid .apm-showcase-item {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.apm-project-fixed-sections {
    margin-top: clamp(55px, 8vw, 90px);
}

.apm-lightbox-open {
    overflow: hidden;
}

.apm-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(8px);
}

.apm-lightbox__stage {
    display: grid;
    max-width: min(94vw, 1500px);
    max-height: 91vh;
    gap: 12px;
    justify-items: center;
}

.apm-lightbox__stage img {
    display: block;
    max-width: 100%;
    max-height: calc(91vh - 44px);
    width: auto;
    height: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

.apm-lightbox__stage p {
    margin: 0;
    color: #dbeafe;
    font-size: 13px;
    text-align: center;
}

.apm-lightbox__close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

.apm-lightbox__close:hover {
    border-color: var(--apm-accent);
    color: var(--apm-accent);
}

@media (max-width: 760px) {
    .apm-lightbox {
        padding: 14px;
    }

    .apm-lightbox__close {
        top: 10px;
        right: 10px;
    }

    .apm-showcase-stack {
        gap: 20px;
    }

    .apm-showcase-item {
        border-radius: 12px;
    }
}

.apm-filters input[type="search"] {
    min-height: 48px;
    width: 100%;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--apm-border);
    border-radius: 11px;
    background-color: var(--apm-slate);
    color: var(--apm-text);
    font: inherit;
    text-transform: none;
}

.apm-filters input[type="search"]::placeholder {
    color: #7f8da3;
}

/* v2.1 project hero screenshot layout */
.apm-project-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
    align-items: center;
    gap: clamp(44px, 6vw, 90px);
    max-width: 1320px;
}

.apm-project-hero__inner .apm-case-study-hero__copy {
    min-width: 0;
}

.apm-project-hero__inner .apm-case-study-hero h1,
.apm-project-hero__inner h1 {
    max-width: 760px;
    font-size: clamp(44px, 5.4vw, 76px);
}

.apm-project-hero__screenshot {
    position: relative;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
    transform: perspective(1500px) rotateY(-3deg) rotateX(1deg);
}

.apm-project-hero__browserbar {
    display: flex;
    height: 42px;
    align-items: center;
    gap: 8px;
    padding: 0 17px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    background: #101828;
}

.apm-project-hero__browserbar i {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
}

.apm-project-hero__screenshot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 650px;
    margin: 0;
    object-fit: cover;
    object-position: center top;
}

.apm-case-study-page > .apm-stats:first-child {
    margin-top: 0;
}

@media (max-width: 1080px) {
    .apm-project-hero__inner {
        grid-template-columns: 1fr;
    }

    .apm-project-hero__screenshot {
        max-width: 920px;
        transform: none;
    }
}

@media (max-width: 760px) {
    .apm-project-hero__inner {
        gap: 38px;
    }

    .apm-project-hero__screenshot {
        border-radius: 16px;
    }

    .apm-project-hero__browserbar {
        height: 34px;
    }

    .apm-project-hero__screenshot img {
        max-height: 440px;
    }
}

/* APM 3.0 Autopilot editorial visuals */
.apm-inline-project-image {
    margin: 42px 0 48px;
    padding: 0;
}
.apm-inline-project-image a {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: #0b1626;
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 20px 50px rgba(2, 8, 23, .12);
}
.apm-inline-project-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 760px;
    object-fit: cover;
    object-position: top center;
}
.apm-inline-project-image figcaption {
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}
.apm-inline-cta {
    margin: 48px 0;
    padding: 34px;
    border-radius: 20px;
    background: linear-gradient(135deg, #07111F 0%, #0b2340 62%, #0e5064 100%);
    border: 1px solid rgba(6, 182, 212, .28);
    color: #fff;
    box-shadow: 0 24px 60px rgba(2, 8, 23, .16);
}
.apm-inline-cta .apm-eyebrow { color: #67e8f9; }
.apm-inline-cta h3 {
    margin: 8px 0 10px;
    color: #fff;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.12;
}
.apm-inline-cta p {
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.75;
}
.apm-showcase-item img { width: 100%; height: auto; display: block; }

@media (max-width: 767px) {
    .apm-inline-project-image { margin: 28px 0 34px; }
    .apm-inline-project-image a { border-radius: 12px; }
    .apm-inline-cta { margin: 34px 0; padding: 24px 20px; border-radius: 16px; }
}
.apm-inline-project-image[data-apm-project-visual="2"] img,
.apm-inline-project-image[data-apm-project-visual="3"] img {
    height: clamp(340px, 46vw, 620px);
    object-fit: cover;
}
.apm-inline-project-image[data-apm-project-visual="2"] img { object-position: center center; }
.apm-inline-project-image[data-apm-project-visual="3"] img { object-position: center bottom; }
