.topology-section {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    padding: 104px 0 92px;
    background:
        radial-gradient(circle at 76% 48%, rgba(116, 76, 255, 0.09), transparent 34%),
        linear-gradient(180deg, #fbfbfd 0%, #f7f7fb 100%);
}

.topology-section__ambient {
    position: absolute;
    top: 18%;
    right: -12%;
    width: 680px;
    height: 680px;
    border-radius: 50%;
    background: rgba(111, 72, 255, 0.08);
    filter: blur(120px);
    pointer-events: none;
}

.topology-section__container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(520px, 0.82fr) minmax(700px, 1.18fr);
    align-items: center;
    gap: clamp(48px, 4vw, 64px);
}

.topology-section__copy {
    position: relative;
    z-index: 3;
    max-width: 610px;
}

.topology-section__eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
    color: var(--purple);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.topology-section__eyebrow-icon {
    position: relative;
    display: block;
    width: 43px;
    height: 43px;
    border: 1px solid rgba(91, 55, 255, 0.11);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 10px 24px rgba(74, 50, 160, 0.06);
}

.topology-section__eyebrow-icon i {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 8px rgba(91, 55, 255, 0.42);
}

.topology-section__eyebrow-icon i:nth-child(1) {
    top: 9px;
    left: 19px;
}

.topology-section__eyebrow-icon i:nth-child(2) {
    top: 18px;
    left: 9px;
}

.topology-section__eyebrow-icon i:nth-child(3) {
    top: 18px;
    left: 29px;
}

.topology-section__eyebrow-icon i:nth-child(4) {
    top: 29px;
    left: 14px;
}

.topology-section__eyebrow-icon i:nth-child(5) {
    top: 29px;
    left: 25px;
}

.topology-section__eyebrow-icon::before,
.topology-section__eyebrow-icon::after {
    position: absolute;
    content: "";
    background: rgba(91, 55, 255, 0.35);
    transform-origin: left center;
}

.topology-section__eyebrow-icon::before {
    top: 21px;
    left: 11px;
    width: 21px;
    height: 1px;
}

.topology-section__eyebrow-icon::after {
    top: 13px;
    left: 21px;
    width: 18px;
    height: 1px;
    transform: rotate(62deg);
}

.topology-section__copy h2 {
    color: #0b0d18;
    font-size: clamp(54px, 4.7vw, 76px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.topology-section__copy h2 span {
    color: var(--purple);
}

.topology-section__description {
    max-width: 560px;
    margin-top: 30px;
    color: #656a7b;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: -0.018em;
}

.topology-system {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 1.18 / 1;
    justify-self: end;
    isolation: isolate;
}

.topology-system__grid {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(94, 66, 188, 0.055);
    border-radius: 28px;
    opacity: 0.9;
    background-image:
        linear-gradient(rgba(101, 79, 198, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(101, 79, 198, 0.055) 1px, transparent 1px);
    background-size: 86px 86px;
    mask-image: radial-gradient(circle at center, #000 33%, rgba(0, 0, 0, 0.78) 66%, transparent 94%);
}

.topology-system__rings {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: 60%;
    aspect-ratio: 1;
    border: 1px solid rgba(102, 70, 228, 0.1);
    border-radius: 50%;
    box-shadow:
        0 0 0 44px rgba(107, 73, 236, 0.035),
        0 0 0 88px rgba(107, 73, 236, 0.025),
        0 0 0 132px rgba(107, 73, 236, 0.018),
        0 0 90px rgba(102, 65, 226, 0.11);
    transform: translate(-50%, -50%);
    transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 520ms ease;
}

.topology-system__connections {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.topology-system__connections path {
    fill: none;
    stroke: rgba(103, 66, 239, 0.55);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    transition: opacity 240ms ease, stroke 240ms ease, stroke-width 240ms ease, filter 240ms ease;
}

.topology-system__connections [data-topology-line] {
    opacity: 0.78;
}

.topology-system__connections .topology-system__axis {
    stroke: rgba(105, 77, 204, 0.18);
    stroke-width: 1.2;
}

.topology-system__connections circle {
    fill: #ffffff;
    stroke: rgba(107, 69, 244, 0.42);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.topology-card {
    position: absolute;
    z-index: 3;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    width: 36%;
    min-height: 220px;
    padding: 25px 24px 21px;
    appearance: none;
    color: #171925;
    border: 1px solid rgba(96, 70, 190, 0.12);
    border-radius: 21px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    font: inherit;
    box-shadow:
        0 16px 34px rgba(45, 31, 102, 0.045),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
    cursor: pointer;
    text-align: left;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 260ms ease,
        box-shadow 260ms ease,
        background 260ms ease;
}

.topology-card--personal {
    top: 3%;
    left: 3%;
}

.topology-card--service {
    top: 3%;
    right: 3%;
}

.topology-card--compute {
    bottom: 3%;
    left: 3%;
}

.topology-card--infrastructure {
    right: 3%;
    bottom: 3%;
}

.topology-card__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: var(--purple);
    border: 1px solid rgba(95, 62, 231, 0.08);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(249, 247, 255, 0.98), rgba(237, 232, 255, 0.86));
    box-shadow: 0 8px 20px rgba(91, 55, 255, 0.08);
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}

.topology-card__icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topology-card__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.topology-card__content strong {
    color: #181a25;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.topology-card__content em {
    margin-top: 5px;
    color: var(--purple);
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
}

.topology-card__content > span {
    margin-top: 22px;
    color: #666b7b;
    font-size: 12px;
    line-height: 1.52;
}

.topology-card__content small {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin-top: auto;
    padding: 7px 10px;
    color: #77718e;
    border-radius: 999px;
    background: rgba(96, 62, 218, 0.055);
    font-size: 9px;
    white-space: nowrap;
}

.topology-card__content small i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--purple);
}

.topology-card__port {
    position: absolute;
    z-index: 4;
    width: 10px;
    height: 10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 0 3px rgba(91, 55, 255, 0.11), 0 0 12px rgba(91, 55, 255, 0.38);
}

.topology-card--personal .topology-card__port,
.topology-card--service .topology-card__port {
    bottom: -5px;
}

.topology-card--personal .topology-card__port,
.topology-card--compute .topology-card__port {
    right: -5px;
}

.topology-card--service .topology-card__port,
.topology-card--infrastructure .topology-card__port {
    left: -5px;
}

.topology-card--compute .topology-card__port,
.topology-card--infrastructure .topology-card__port {
    top: -5px;
}

.topology-card:hover,
.topology-card:focus-visible,
.topology-card.is-active {
    border-color: rgba(99, 61, 235, 0.38);
    background: rgba(255, 255, 255, 0.97);
    box-shadow:
        0 0 0 1px rgba(106, 70, 235, 0.08),
        0 0 30px rgba(103, 65, 232, 0.15),
        0 24px 46px rgba(45, 31, 102, 0.1);
}

.topology-card--personal:hover,
.topology-card--personal:focus-visible,
.topology-card--personal.is-active {
    transform: translate(6px, 6px);
}

.topology-card--service:hover,
.topology-card--service:focus-visible,
.topology-card--service.is-active {
    transform: translate(-6px, 6px);
}

.topology-card--compute:hover,
.topology-card--compute:focus-visible,
.topology-card--compute.is-active {
    transform: translate(6px, -6px);
}

.topology-card--infrastructure:hover,
.topology-card--infrastructure:focus-visible,
.topology-card--infrastructure.is-active {
    transform: translate(-6px, -6px);
}

.topology-card:hover .topology-card__icon,
.topology-card:focus-visible .topology-card__icon,
.topology-card.is-active .topology-card__icon {
    box-shadow: 0 0 24px rgba(91, 55, 255, 0.18);
    transform: translateY(-2px) scale(1.04);
}

.topology-core-card {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    width: 50%;
    min-height: 150px;
    padding: 23px 28px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 17%, rgba(255, 255, 255, 0.28), transparent 27%),
        linear-gradient(135deg, #805cff 0%, #5d33ee 48%, #4620d4 100%);
    box-shadow:
        0 0 0 1px rgba(96, 57, 232, 0.14),
        0 0 52px rgba(101, 61, 234, 0.36),
        0 25px 55px rgba(66, 35, 166, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: translate(-50%, -50%);
    transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms ease;
}

.topology-core-card__icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    color: var(--purple);
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 28px rgba(40, 18, 125, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.topology-core-card__icon svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topology-core-card__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.topology-core-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.topology-core-card__heading strong {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.topology-core-card__heading small {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(28, 12, 92, 0.16);
    font-size: 10px;
    font-weight: 600;
}

.topology-core-card__heading small i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ce5a7;
    box-shadow: 0 0 10px rgba(44, 229, 167, 0.8);
}

.topology-core-card__content em {
    margin-top: 6px;
    color: #e8e0ff;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
}

.topology-core-card__content > span {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.45;
}

.topology-system[data-active="personal"] [data-topology-line="personal"],
.topology-system[data-active="service"] [data-topology-line="service"],
.topology-system[data-active="compute"] [data-topology-line="compute"],
.topology-system[data-active="infrastructure"] [data-topology-line="infrastructure"] {
    stroke: #6c42f5;
    stroke-width: 2.8;
    stroke-dasharray: 8 10;
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(100, 59, 236, 0.58));
    animation: topology-line-flow 850ms linear infinite;
}

.topology-system[data-active="personal"] .topology-core-card {
    transform: translate(calc(-50% - 4px), calc(-50% - 4px));
}

.topology-system[data-active="service"] .topology-core-card {
    transform: translate(calc(-50% + 4px), calc(-50% - 4px));
}

.topology-system[data-active="compute"] .topology-core-card {
    transform: translate(calc(-50% - 4px), calc(-50% + 4px));
}

.topology-system[data-active="infrastructure"] .topology-core-card {
    transform: translate(calc(-50% + 4px), calc(-50% + 4px));
}

.topology-system[data-active]:not([data-active=""]) .topology-core-card {
    box-shadow:
        0 0 0 1px rgba(96, 57, 232, 0.18),
        0 0 68px rgba(101, 61, 234, 0.48),
        0 29px 62px rgba(66, 35, 166, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.topology-system[data-active]:not([data-active=""]) .topology-system__rings {
    box-shadow:
        0 0 0 44px rgba(107, 73, 236, 0.052),
        0 0 0 88px rgba(107, 73, 236, 0.036),
        0 0 0 132px rgba(107, 73, 236, 0.026),
        0 0 112px rgba(102, 65, 226, 0.17);
    transform: translate(-50%, -50%) scale(1.025);
}

@keyframes topology-line-flow {
    to {
        stroke-dashoffset: -18;
    }
}

@media (max-width: 1320px) {
    .topology-section__container {
        grid-template-columns: minmax(360px, 0.7fr) minmax(620px, 1.3fr);
        gap: 48px;
    }

    .topology-section__copy h2 {
        font-size: clamp(50px, 5vw, 70px);
    }

    .topology-card {
        min-height: 205px;
        padding: 21px 20px 18px;
    }

    .topology-card__content > span {
        margin-top: 16px;
    }
}

@media (max-width: 1080px) {
    .topology-section {
        min-height: auto;
        padding: 88px 0 76px;
    }

    .topology-section__container {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .topology-section__copy {
        max-width: 760px;
    }

    .topology-section__copy h2 {
        font-size: clamp(49px, 7vw, 76px);
    }

    .topology-system {
        width: min(100%, 900px);
        justify-self: center;
    }
}

@media (max-width: 760px) {
    .topology-section {
        padding: 70px 0 60px;
    }

    .topology-section__eyebrow {
        margin-bottom: 24px;
        font-size: 10px;
    }

    .topology-section__copy h2 {
        font-size: clamp(42px, 12vw, 62px);
    }

    .topology-section__description {
        margin-top: 24px;
        font-size: 14px;
    }

    .topology-system {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        aspect-ratio: auto;
    }

    .topology-system__grid,
    .topology-system__rings,
    .topology-system__connections {
        display: none;
    }

    .topology-card,
    .topology-core-card {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        min-height: 0;
        transform: none !important;
    }

    .topology-card {
        grid-template-columns: 52px minmax(0, 1fr);
        padding: 20px;
    }

    .topology-card__icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .topology-card__content > span {
        margin-top: 12px;
    }

    .topology-card__content small {
        margin-top: 14px;
    }

    .topology-card__port {
        display: none;
    }

    .topology-core-card {
        grid-row: 3;
        grid-template-columns: 70px minmax(0, 1fr);
        padding: 22px;
    }

    .topology-core-card__icon {
        width: 66px;
        height: 66px;
        border-radius: 20px;
    }

    .topology-core-card__icon svg {
        width: 34px;
        height: 34px;
    }
}
