.hero {
    position: relative;
    overflow: hidden;
}

.hero-background-3d {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(53, 70, 190, 0.24), transparent 38%),
        radial-gradient(circle at 78% 22%, rgba(107, 70, 220, 0.22), transparent 40%),
        radial-gradient(circle at 42% 78%, rgba(0, 93, 180, 0.16), transparent 48%),
        radial-gradient(circle at 88% 86%, rgba(140, 70, 230, 0.14), transparent 42%),
        linear-gradient(180deg, #03030b 0%, #08091d 46%, #02020a 100%);
}

.hero-background-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-background-embed iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.hero-background-3d canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-background-3d::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 0%, rgba(3, 3, 11, 0.18) 54%, rgba(3, 3, 11, 0.72) 100%),
        linear-gradient(90deg, rgba(3, 3, 11, 0.20), transparent 42%, rgba(3, 3, 11, 0.22));
}

.hero-background-3d::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: 92px 92px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 88%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.tech-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 120, 255, 0.18);
    background: rgba(7, 15, 32, 0.78);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.tech-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.10), 0 0 38px rgba(168, 85, 247, 0.10);
}

.card-kicker,
.card-label,
.symptom-label,
.method-number,
.step-number {
    color: inherit;
}

.tech-card:nth-child(odd) {
    border-color: rgba(0, 229, 255, 0.24);
}

.tech-card:nth-child(even) {
    border-color: rgba(168, 85, 247, 0.24);
}

.tech-card:nth-child(odd) .card-kicker,
.tech-card:nth-child(odd) .card-label,
.tech-card:nth-child(odd) .section-kicker,
.tech-card:nth-child(odd) .symptom-label,
.tech-card:nth-child(odd) .method-number,
.tech-card:nth-child(odd) .step-number {
    color: #00E5FF !important;
}

.tech-card:nth-child(even) .card-kicker,
.tech-card:nth-child(even) .card-label,
.tech-card:nth-child(even) .section-kicker,
.tech-card:nth-child(even) .symptom-label,
.tech-card:nth-child(even) .method-number,
.tech-card:nth-child(even) .step-number {
    color: #A855F7 !important;
}

.tech-card:nth-child(odd):hover {
    border-color: rgba(0, 229, 255, 0.62);
    box-shadow: 0 0 22px rgba(0, 229, 255, 0.12), inset 0 0 18px rgba(0, 229, 255, 0.04);
}

.tech-card:nth-child(even):hover {
    border-color: rgba(168, 85, 247, 0.62);
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.12), inset 0 0 18px rgba(168, 85, 247, 0.04);
}

/* Custom Selection Styling to resolve background-clip: text selection bug and make highlights premium */
::selection {
    background: rgba(0, 223, 255, 0.25);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

::-moz-selection {
    background: rgba(0, 223, 255, 0.25);
    color: #ffffff !important;
}

/* Ensure headings and major titles only take up the width of their content, preventing empty selection blocks to the right */
h1, h2, h3, h4, h5, h6 {
    width: fit-content;
    max-width: 100%;
}
