/*
Theme Name: Abdullah Farhan Child
Theme URI: https://abdullahfarhan.com/
Description: Lightweight GeneratePress child theme for AbdullahFarhan.com
Author: Abdullah Farhan
Template: generatepress
Version: 2.0.0
Text Domain: abdullah-farhan
*/

:root {
    --af-bg: #07111f;
    --af-primary: #67e8f9;
    --af-secondary: #a78bfa;
    --af-green: #6ee7b7;
    --af-text: #f4f7fb;
    --af-muted: #a9b5c8;
    --af-dim: #8190a5;
    --af-surface: rgba(255, 255, 255, 0.055);
    --af-surface-hover: rgba(255, 255, 255, 0.085);
    --af-border: rgba(255, 255, 255, 0.11);
    --af-radius: 20px;
}

html {
    scroll-behavior: smooth;
}

body.af-science-home {
    margin: 0;
    min-height: 100vh;
    color: var(--af-text);
    background:
        radial-gradient(
            circle at 8% 0%,
            rgba(34, 211, 238, 0.13),
            transparent 28rem
        ),
        radial-gradient(
            circle at 92% 12%,
            rgba(139, 92, 246, 0.14),
            transparent 32rem
        ),
        var(--af-bg);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.af-site,
.af-site *,
.af-site *::before,
.af-site *::after {
    box-sizing: border-box;
}

.af-site {
    width: 100%;
    min-height: 100vh;
    color: var(--af-text);
    overflow: visible;
}

body.af-science-home {
    overflow-x: clip;
}

@supports not (overflow: clip) {
    body.af-science-home {
        overflow-x: hidden;
    }
}

.af-site a {
    color: inherit;
    text-decoration: none;
}

.af-site a:focus-visible {
    outline: 3px solid var(--af-primary);
    outline-offset: 4px;
}

.af-site h1,
.af-site h2,
.af-site h3,
.af-site p {
    margin-top: 0;
}

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

.af-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100000;
    padding: 10px 16px;
    color: #041019 !important;
    background: var(--af-primary);
    border-radius: 10px;
    font-weight: 800;
    transform: translateY(-180%);
}

.af-skip-link:focus {
    transform: translateY(0);
}

/*
|--------------------------------------------------------------------------
| Full-width top panel
|--------------------------------------------------------------------------
*/

.af-topbar {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: none;
    background: rgba(5, 14, 27, 0.76);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/*
|--------------------------------------------------------------------------
| Admin-controlled sticky header
|--------------------------------------------------------------------------
*/

body.af-sticky-header .af-topbar {
    position: sticky;
    top: 0;
    z-index: 9990;
    background: rgba(5, 14, 27, 0.94);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

body.af-sticky-header .af-topbar {
    isolation: isolate;
}

body.af-sticky-header .af-topbar-inner {
    transform: translateZ(0);
}

/*
 * Leave room for the WordPress toolbar when an administrator
 * is logged in.
 */
body.admin-bar.af-sticky-header .af-topbar {
    top: 32px;
}

body.af-nonsticky-header .af-topbar {
    position: relative;
    top: auto;
}

/*
 * WordPress uses a taller admin toolbar on narrow screens.
 */
@media screen and (max-width: 782px) {
    body.admin-bar.af-sticky-header .af-topbar {
        top: 46px;
    }
}

@supports not (backdrop-filter: blur(14px)) {
    body.af-sticky-header .af-topbar {
        background: #07111f;
    }
}

.af-topbar-inner {
    display: flex;
    width: 100%;
    max-width: none;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-inline: clamp(20px, 4vw, 72px);
}

.af-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    color: var(--af-text) !important;
    font-size: 1.08rem;
    font-weight: 850;
    letter-spacing: -0.03em;
}

/*
 * Optional uploaded logo displayed to the left of the AF square.
 */
.af-header-logo {
    display: block;
    width: 42px;
    height: 42px;
    max-width: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    object-position: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.af-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    color: #041019;
    background: linear-gradient(
        135deg,
        var(--af-primary),
        var(--af-green)
    );
    border-radius: 13px;
    box-shadow: 0 8px 30px rgba(103, 232, 249, 0.22);
}

.af-primary-navigation {
    min-width: 0;
    margin-left: auto;
}

.af-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: clamp(12px, 1.7vw, 28px);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.94rem;
    font-weight: 700;
}

.af-navigation > li {
    margin: 0;
    padding: 0;
}

/*
|--------------------------------------------------------------------------
| Automatic styling for every top-menu item
|--------------------------------------------------------------------------
|
| This applies to every existing and future menu item automatically.
| No custom CSS class needs to be entered in Appearance → Menus.
*/

.af-navigation > li > a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 17px;
    color: var(--af-text);
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: 999px;
    white-space: nowrap;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.af-navigation > li > a:hover,
.af-navigation > li > a:focus-visible {
    color: #041019;
    background: linear-gradient(
        135deg,
        var(--af-primary),
        var(--af-green)
    );
    border-color: transparent;
    box-shadow: 0 8px 26px rgba(103, 232, 249, 0.18);
    transform: translateY(-1px);
}


/*
|--------------------------------------------------------------------------
| Hero
|--------------------------------------------------------------------------
*/

.af-hero {
    padding: 82px 0 92px;
}

.af-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    align-items: center;
    gap: 70px;
}

.af-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--af-primary);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.af-eyebrow::before {
    width: 28px;
    height: 1px;
    content: "";
    background: currentColor;
}

.af-hero-title {
    margin-bottom: 24px;
    color: var(--af-text);
    font-size: clamp(3.2rem, 7vw, 6.2rem);
    font-weight: 850;
    line-height: 0.96;
    letter-spacing: -0.067em;
}

.af-gradient-text {
    color: transparent;
    background: linear-gradient(
        90deg,
        var(--af-primary),
        #d7f9ff 47%,
        var(--af-secondary)
    );
    background-clip: text;
    -webkit-background-clip: text;
}

.af-hero-description {
    max-width: 650px;
    margin-bottom: 32px;
    color: var(--af-muted);
    font-size: clamp(1.04rem, 2vw, 1.2rem);
}

.af-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.af-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 1px solid var(--af-border);
    border-radius: 999px;
    font-size: 0.94rem;
    font-weight: 800;
    transition: transform 160ms ease;
}

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

.af-button-primary {
    color: #041019 !important;
    background: linear-gradient(
        135deg,
        var(--af-primary),
        var(--af-green)
    );
    border-color: transparent;
}

.af-button-secondary {
    color: var(--af-text) !important;
    background: var(--af-surface);
}

/*
|--------------------------------------------------------------------------
| Lightweight animated atom artwork
|--------------------------------------------------------------------------
*/

.af-science-visual {
    position: relative;
    min-width: 0;
    min-height: 460px;
    isolation: isolate;
    overflow: visible;
}

.af-custom-atom {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(430px, calc(100vw - 40px));
    height: 430px;
    overflow: visible;
    transform: translate(-50%, -50%);
    isolation: isolate;
}

/*
 * Large atmospheric glow.
 */
.af-atom-stage::before {
    position: absolute;
    inset: 4%;
    z-index: -3;
    content: "";
    background:
        radial-gradient(
            circle,
            rgba(103, 232, 249, 0.14) 0,
            rgba(103, 232, 249, 0.05) 35%,
            transparent 70%
        );
    border-radius: 50%;
    filter: blur(12px);
}

/*
 * Subtle background sphere.
 */
.af-atom-stage::after {
    position: absolute;
    inset: 10%;
    z-index: -2;
    content: "";
    background:
        radial-gradient(
            circle at 38% 34%,
            rgba(255, 255, 255, 0.08),
            transparent 18%
        ),
        linear-gradient(
            135deg,
            rgba(103, 232, 249, 0.08),
            rgba(167, 139, 250, 0.09)
        );
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 50%;
    box-shadow:
        inset 0 0 60px rgba(103, 232, 249, 0.06),
        0 0 60px rgba(103, 232, 249, 0.05);
}

/*
 * Decorative halos behind the nucleus.
 */
.af-atom-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.af-atom-halo-one {
    width: 49%;
    height: 49%;
}

.af-atom-halo-two {
    width: 72%;
    height: 72%;
    border-color: rgba(103, 232, 249, 0.09);
}

/*
 * Nucleus.
 */
.af-nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 6;
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(
            circle at 35% 30%,
            #d9fbff 0,
            var(--af-primary) 22%,
            #42cbe1 72%
        );
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    box-shadow:
        0 0 20px rgba(103, 232, 249, 0.82),
        0 0 50px rgba(103, 232, 249, 0.44),
        0 0 95px rgba(103, 232, 249, 0.2);
}

.af-nucleus-core {
    width: 24%;
    height: 24%;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    filter: blur(2px);
}

/*
 * Orbit rings.
 *
 * The rings rotate using transform only. This normally stays on the
 * compositor and does not trigger continuous layout calculations.
 */
.af-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    border: 1px solid rgba(215, 233, 255, 0.22);
    border-radius: 50%;
    transform-origin: center;
    will-change: transform;
}

.af-orbit-one {
    width: 92%;
    height: 39%;
    transform: translate(-50%, -50%) rotate(-18deg);
}

.af-orbit-two {
    width: 52%;
    height: 98%;
    transform: translate(-50%, -50%) rotate(33deg);
}

.af-orbit-three {
    width: 90%;
    height: 43%;
    transform: translate(-50%, -50%) rotate(145deg);
    border-color: rgba(167, 139, 250, 0.19);
}

/*
 * Electrons sit on the edge of their orbit.
 */
.af-electron {
    position: absolute;
    top: 50%;
    right: -9px;
    z-index: 7;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    background:
        radial-gradient(
            circle at 35% 30%,
            #ffffff 0 20%,
            var(--af-primary) 24% 72%,
            #21a9bd 100%
        );
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow:
        0 0 10px var(--af-primary),
        0 0 25px rgba(103, 232, 249, 0.7);
}

.af-electron-two {
    width: 15px;
    height: 15px;
    background:
        radial-gradient(
            circle at 35% 30%,
            #ffffff 0 20%,
            var(--af-secondary) 24% 72%,
            #7657d9 100%
        );
    box-shadow:
        0 0 10px var(--af-secondary),
        0 0 25px rgba(167, 139, 250, 0.7);
}

.af-electron-three {
    width: 12px;
    height: 12px;
    background:
        radial-gradient(
            circle at 35% 30%,
            #ffffff 0 20%,
            var(--af-green) 24% 72%,
            #39af83 100%
        );
    box-shadow:
        0 0 9px var(--af-green),
        0 0 22px rgba(110, 231, 183, 0.65);
}

/*
 * Small background stars.
 */
.af-star {
    position: absolute;
    width: 4px;
    height: 4px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 0 9px rgba(255, 255, 255, 0.65);
}

.af-star-one {
    top: 16%;
    left: 16%;
}

.af-star-two {
    top: 21%;
    right: 9%;
    width: 3px;
    height: 3px;
}

.af-star-three {
    right: 15%;
    bottom: 14%;
    background: var(--af-primary);
    box-shadow: 0 0 9px var(--af-primary);
}

/*
 * Floating labels.
 */
.af-visual-label {
    position: absolute;
    z-index: 10;
    padding: 9px 14px;
    color: var(--af-muted);
    background: rgba(5, 14, 27, 0.88);
    border: 1px solid var(--af-border);
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 750;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.af-label-one {
    top: 10%;
    left: 0;
}

.af-label-two {
    right: 0;
    bottom: 18%;
}

.af-label-three {
    bottom: 1%;
    left: 10%;
}

/*
 * Animations are enabled only when the admin option is enabled.
 */
.af-atom-animation-enabled .af-orbit-one {
    animation:
        af-orbit-one
        var(--af-atom-speed, 14s)
        linear
        infinite;
}

.af-atom-animation-enabled .af-orbit-two {
    animation:
        af-orbit-two
        var(--af-atom-speed-two, 16.5s)
        linear
        infinite
        reverse;
}

.af-atom-animation-enabled .af-orbit-three {
    animation:
        af-orbit-three
        var(--af-atom-speed-three, 11.5s)
        linear
        infinite;
}

.af-atom-animation-enabled .af-nucleus {
    animation:
        af-nucleus-pulse
        3.4s
        ease-in-out
        infinite;
}

.af-atom-animation-enabled .af-atom-halo-one {
    animation:
        af-halo-pulse
        4.2s
        ease-in-out
        infinite;
}

.af-atom-animation-enabled .af-atom-halo-two {
    animation:
        af-halo-pulse
        4.2s
        1.2s
        ease-in-out
        infinite;
}

.af-atom-animation-enabled .af-star-one {
    animation: af-star-twinkle 2.8s ease-in-out infinite;
}

.af-atom-animation-enabled .af-star-two {
    animation:
        af-star-twinkle
        3.4s
        0.8s
        ease-in-out
        infinite;
}

.af-atom-animation-enabled .af-star-three {
    animation:
        af-star-twinkle
        2.5s
        1.4s
        ease-in-out
        infinite;
}

.af-atom-animation-enabled .af-label-one {
    animation: af-label-float 4.5s ease-in-out infinite;
}

.af-atom-animation-enabled .af-label-two {
    animation:
        af-label-float
        5s
        0.8s
        ease-in-out
        infinite;
}

.af-atom-animation-enabled .af-label-three {
    animation:
        af-label-float
        4.8s
        1.5s
        ease-in-out
        infinite;
}

@keyframes af-orbit-one {
    from {
        transform:
            translate(-50%, -50%)
            rotate(-18deg);
    }

    to {
        transform:
            translate(-50%, -50%)
            rotate(342deg);
    }
}

@keyframes af-orbit-two {
    from {
        transform:
            translate(-50%, -50%)
            rotate(33deg);
    }

    to {
        transform:
            translate(-50%, -50%)
            rotate(393deg);
    }
}

@keyframes af-orbit-three {
    from {
        transform:
            translate(-50%, -50%)
            rotate(145deg);
    }

    to {
        transform:
            translate(-50%, -50%)
            rotate(505deg);
    }
}

@keyframes af-nucleus-pulse {
    0%,
    100% {
        transform:
            translate(-50%, -50%)
            scale(1);
    }

    50% {
        transform:
            translate(-50%, -50%)
            scale(1.08);
    }
}

@keyframes af-halo-pulse {
    0%,
    100% {
        opacity: 0.45;
        transform:
            translate(-50%, -50%)
            scale(0.94);
    }

    50% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(1.06);
    }
}

@keyframes af-star-twinkle {
    0%,
    100% {
        opacity: 0.28;
        transform: scale(0.75);
    }

    50% {
        opacity: 1;
        transform: scale(1.35);
    }
}

@keyframes af-label-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

/*
 * Animation-disabled admin setting.
 */
.af-atom-animation-disabled .af-orbit,
.af-atom-animation-disabled .af-nucleus,
.af-atom-animation-disabled .af-atom-halo,
.af-atom-animation-disabled .af-star,
.af-atom-animation-disabled .af-visual-label {
    animation: none;
}

/*
 * Accessibility: never animate for users who request reduced motion.
 */
@media (prefers-reduced-motion: reduce) {
    .af-orbit,
    .af-nucleus,
    .af-atom-halo,
    .af-star,
    .af-visual-label {
        animation: none !important;
    }
}

/*
|--------------------------------------------------------------------------
| Main three-column area
|--------------------------------------------------------------------------
*/

.af-content-area {
    padding: 78px 0 90px;
    background: rgba(255, 255, 255, 0.015);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.af-page-grid {
    display: grid;
    width: min(calc(100% - 40px), 1700px);
    margin-inline: auto;
    grid-template-columns:
        minmax(190px, 240px)
        minmax(0, 1fr)
        minmax(190px, 240px);
    align-items: start;
    gap: clamp(22px, 2.5vw, 40px);
}

.af-center-content {
    min-width: 0;
}

.af-content-section {
    margin-bottom: 82px;
}

.af-content-section:last-child {
    margin-bottom: 0;
}

.af-section-heading {
    margin-bottom: 32px;
}

.af-section-heading h2,
.af-about-panel h2 {
    margin-bottom: 10px;
    color: var(--af-text);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 820;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.af-section-heading p {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--af-muted);
}

.af-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 25px;
}

.af-text-link {
    flex: 0 0 auto;
    color: var(--af-primary) !important;
    font-weight: 800;
}

/*
|--------------------------------------------------------------------------
| Sidebars and widgets
|--------------------------------------------------------------------------
*/

.af-sidebar-sticky {
    position: sticky;
    top: 34px;
    display: grid;
    gap: 20px;
}

body.af-sticky-header .af-sidebar-sticky {
    top: 116px;
}

body.admin-bar .af-sidebar-sticky {
    top: 66px;
}

body.admin-bar.af-sticky-header .af-sidebar-sticky {
    top: 148px;
}

@media screen and (max-width: 782px) {
    body.admin-bar.af-sticky-header .af-sidebar-sticky {
        top: 162px;
    }
}

.af-sidebar-panel {
    min-width: 0;
    padding: 21px;
    color: var(--af-muted);
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: 17px;
}

.af-sidebar-title,
.af-widget .wp-block-heading,
.af-widget .widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--af-text);
    font-size: 0.86rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.af-sidebar-title::before {
    width: 18px;
    height: 2px;
    content: "";
    background: var(--af-primary);
}

.af-sidebar-list,
.af-values,
.af-recent-posts,
.af-widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.af-sidebar-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: var(--af-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.87rem;
}

.af-sidebar-list li:last-child a {
    border-bottom: 0;
}

.af-sidebar-list a:hover,
.af-widget a:hover {
    color: var(--af-primary);
}

.af-values {
    display: grid;
    gap: 11px;
    font-size: 0.84rem;
}

.af-values li {
    position: relative;
    padding-left: 17px;
}

.af-values li::before {
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 6px;
    height: 6px;
    content: "";
    background: var(--af-green);
    border-radius: 50%;
}

.af-recent-posts {
    display: grid;
    gap: 15px;
}

.af-recent-posts li {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.af-recent-posts li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.af-recent-posts a {
    display: block;
    color: var(--af-text);
    font-size: 0.87rem;
    font-weight: 750;
    line-height: 1.4;
}

.af-recent-posts a:hover {
    color: var(--af-primary);
}

.af-recent-posts time {
    display: block;
    margin-top: 5px;
    color: var(--af-dim);
    font-size: 0.72rem;
}

.af-sidebar-copy {
    color: var(--af-muted);
    font-size: 0.85rem;
}

.af-sidebar-button {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    color: #041019 !important;
    background: linear-gradient(
        135deg,
        var(--af-primary),
        var(--af-green)
    );
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 850;
}

.af-widget li {
    margin-bottom: 8px;
}

.af-widget a {
    color: var(--af-muted);
}

/*
|--------------------------------------------------------------------------
| Featured article
|--------------------------------------------------------------------------
*/

.af-featured-card {
    display: grid;
    grid-template-columns: 0.84fr 1.16fr;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.af-featured-art {
    display: grid;
    min-height: 340px;
    place-items: center;
    background:
        linear-gradient(
            rgba(103, 232, 249, 0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(103, 232, 249, 0.08) 1px,
            transparent 1px
        ),
        radial-gradient(
            circle,
            rgba(103, 232, 249, 0.22),
            transparent 62%
        );
    background-size: 32px 32px, 32px 32px, auto;
}

.af-formula {
    max-width: calc(100% - 30px);
    padding: 22px 25px;
    color: var(--af-primary);
    background: rgba(7, 17, 31, 0.84);
    border: 1px solid rgba(103, 232, 249, 0.28);
    border-radius: 15px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.15rem, 2.6vw, 1.9rem);
    text-align: center;
}

.af-featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 4vw, 47px);
}

.af-tag {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 16px;
    padding: 6px 11px;
    color: var(--af-primary);
    background: rgba(103, 232, 249, 0.09);
    border: 1px solid rgba(103, 232, 249, 0.2);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.af-featured-content h3 {
    margin-bottom: 15px;
    color: var(--af-text);
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    font-weight: 780;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.af-featured-content p {
    color: var(--af-muted);
}

.af-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 17px;
    margin: 7px 0 22px;
    color: var(--af-dim);
    font-size: 0.8rem;
}

.af-read-link {
    color: var(--af-text) !important;
    font-size: 0.9rem;
    font-weight: 850;
}

.af-read-link:hover,
.af-text-link:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

/*
|--------------------------------------------------------------------------
| Article cards
|--------------------------------------------------------------------------
*/

.af-article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.af-article-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    padding: 24px;
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease;
}

.af-article-card:hover {
    transform: translateY(-4px);
    background: var(--af-surface-hover);
    border-color: rgba(103, 232, 249, 0.3);
}

.af-article-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 22px;
    place-items: center;
    color: #c3f7ff;
    background: rgba(103, 232, 249, 0.14);
    border-radius: 14px;
    font-family: Georgia, serif;
    font-size: 0.95rem;
    font-weight: 850;
}

.af-article-card:nth-child(3n+2) .af-article-icon {
    color: #d8ccff;
    background: rgba(167, 139, 250, 0.15);
}

.af-article-card:nth-child(3n) .af-article-icon {
    color: #bff7dc;
    background: rgba(110, 231, 183, 0.14);
}

.af-category {
    margin-bottom: 8px;
    color: var(--af-primary);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.af-article-card h3 {
    margin-bottom: 12px;
    color: var(--af-text);
    font-size: 1.2rem;
    font-weight: 760;
    line-height: 1.25;
}

.af-article-card p {
    flex: 1;
    color: var(--af-muted);
    font-size: 0.9rem;
}

.af-empty {
    padding: 30px;
    color: var(--af-muted);
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
}

.af-empty h3 {
    color: var(--af-text);
}

/*
|--------------------------------------------------------------------------
| Topics, about, and RSS
|--------------------------------------------------------------------------
*/

.af-topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.af-topic-card {
    padding: 23px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--af-border);
    border-radius: 16px;
}

.af-topic-symbol {
    margin-bottom: 14px;
    color: var(--af-primary);
    font-size: 1.5rem;
}

.af-topic-card h3 {
    margin-bottom: 7px;
    color: var(--af-text);
    font-size: 1.08rem;
}

.af-topic-card h3 a:hover {
    color: var(--af-primary);
}

.af-topic-card p {
    margin-bottom: 0;
    color: var(--af-muted);
    font-size: 0.87rem;
}

.af-about-panel {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 42px;
    padding: clamp(30px, 5vw, 52px);
    background:
        radial-gradient(
            circle at 0% 0%,
            rgba(103, 232, 249, 0.1),
            transparent 38%
        ),
        var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
}

.af-about-panel p {
    color: var(--af-muted);
}

.af-rss-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 30px 34px;
    background: linear-gradient(
        135deg,
        rgba(103, 232, 249, 0.1),
        rgba(167, 139, 250, 0.1)
    );
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
}

.af-rss-panel h2 {
    margin-bottom: 6px;
    color: var(--af-text);
    font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.af-rss-panel p {
    margin-bottom: 0;
    color: var(--af-muted);
}

/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

.af-footer {
    width: 100%;
    padding: 46px clamp(20px, 4vw, 72px);
    color: var(--af-muted);
    border-top: 1px solid var(--af-border);
    font-size: 0.86rem;
}

.af-footer-inner {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.af-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.af-footer-links a {
    color: var(--af-muted);
}

.af-footer-links a:hover {
    color: var(--af-text);
}

/*
|--------------------------------------------------------------------------
| Responsive behavior
|--------------------------------------------------------------------------
*/

@media (max-width: 1280px) {
    .af-page-grid {
        grid-template-columns: minmax(0, 1fr);
        width: min(calc(100% - 40px), 1100px);
    }

    .af-center-content {
        grid-row: 1;
    }

    .af-left-sidebar,
    .af-right-sidebar {
        display: grid;
    }

    .af-sidebar-sticky {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .af-hero-grid,
    .af-featured-card,
    .af-about-panel {
        grid-template-columns: 1fr;
    }

    .af-featured-art {
        min-height: 270px;
    }
}

@media (max-width: 680px) {
    .af-topbar-inner {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .af-brand {
        font-size: 0.98rem;
    }

    .af-primary-navigation {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    
    .af-navigation {
        width: max-content;
        min-width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 15px;
        padding-bottom: 7px;
        white-space: nowrap;
    }
    
    .af-navigation > li {
        flex: 0 0 auto;
    }
    
    .af-navigation > li > a {
        min-height: 38px;
    }
    
    .af-navigation > li > a {
        min-height: 38px;
        padding: 6px 12px;
    }

    .af-main-width {
        width: min(calc(100% - 28px), 1180px);
    }

    .af-hero {
        padding: 48px 0 58px;
    }

    .af-hero-title {
        font-size: clamp(3rem, 16vw, 4.6rem);
    }

    .af-content-area {
        padding: 60px 0 70px;
    }

    .af-page-grid {
        width: min(calc(100% - 28px), 1100px);
    }

    .af-content-section {
        margin-bottom: 65px;
    }

    .af-heading-row,
    .af-rss-panel,
    .af-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .af-article-grid,
    .af-topic-grid,
    .af-sidebar-sticky {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .af-atom-stage {
        width: 310px;
        height: 310px;
    }

    .af-nucleus {
        width: 54px;
        height: 54px;
    }

    .af-visual-label {
        padding: 7px 10px;
        font-size: 0.7rem;
    }

    .af-label-one {
        top: 7%;
        left: 2%;
    }

    .af-label-two {
        right: 2%;
        bottom: 17%;
    }

    .af-label-three {
        bottom: 0;
        left: 8%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .af-site *,
    .af-site *::before,
    .af-site *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/*
|--------------------------------------------------------------------------
| GeneratePress compatibility and full-width enforcement
|--------------------------------------------------------------------------
*/

html,
body.af-science-home {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.af-science-home .af-site {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.af-science-home .af-topbar {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.af-science-home .af-topbar-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-right: clamp(20px, 4vw, 72px);
    padding-left: clamp(20px, 4vw, 72px);
}

/*
 * Prevent long titles, menus, and URLs from breaking the layout.
 */
.af-brand,
.af-featured-content,
.af-article-card,
.af-sidebar-panel,
.af-topic-card {
    min-width: 0;
}

.af-featured-content h3,
.af-article-card h3,
.af-recent-posts a,
.af-widget {
    overflow-wrap: anywhere;
}

/*
 * Ensure sidebar widgets fit their columns.
 */
.af-sidebar,
.af-sidebar-sticky {
    width: 100%;
    min-width: 0;
}

/*
 * Correct responsive sidebar ordering:
 * center content first, left sidebar second, right sidebar third.
 */
@media (max-width: 1280px) {
    .af-center-content {
        grid-column: 1;
        grid-row: 1;
    }

    .af-left-sidebar {
        grid-column: 1;
        grid-row: 2;
    }

    .af-right-sidebar {
        grid-column: 1;
        grid-row: 3;
    }
}

/* AF-STYLESHEET-VERSION-3 */


/*
|--------------------------------------------------------------------------
| Unified styling for every top-level menu item
|--------------------------------------------------------------------------
|
| This deliberately overrides current-menu and Contact-specific styles.
| All present and future top-level menu items receive the same appearance.
*/

.af-navigation > li > a,
.af-navigation > li.af-contact-menu-item > a,
.af-navigation > li.current-menu-item > a,
.af-navigation > li.current-menu-ancestor > a,
.af-navigation > li.current_page_item > a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 17px;
    color: #041019;
    background: linear-gradient(
        135deg,
        var(--af-primary),
        var(--af-green)
    );
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 7px 22px rgba(103, 232, 249, 0.12);
    white-space: nowrap;
    transition:
        color 160ms ease,
        background 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.af-navigation > li > a:hover,
.af-navigation > li > a:focus-visible,
.af-navigation > li.af-contact-menu-item > a:hover,
.af-navigation > li.af-contact-menu-item > a:focus-visible,
.af-navigation > li.current-menu-item > a:hover,
.af-navigation > li.current-menu-item > a:focus-visible,
.af-navigation > li.current_page_item > a:hover,
.af-navigation > li.current_page_item > a:focus-visible {
    color: var(--af-text);
    background: linear-gradient(
        135deg,
        rgba(103, 232, 249, 0.2),
        rgba(167, 139, 250, 0.22)
    );
    border-color: rgba(103, 232, 249, 0.4);
    box-shadow:
        0 9px 26px rgba(103, 232, 249, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

/*
 * Mobile sizing for every menu item.
 */
@media (max-width: 680px) {
    .af-navigation > li > a,
    .af-navigation > li.af-contact-menu-item > a,
    .af-navigation > li.current-menu-item > a,
    .af-navigation > li.current_page_item > a {
        min-height: 38px;
        padding: 6px 12px;
    }
}

/* AF-UNIFIED-MENU-VERSION-1 */

/*
|--------------------------------------------------------------------------
| Admin-controlled custom atom container
|--------------------------------------------------------------------------
*/

/*
 * If the atom is hidden, let the text use more of the hero area.
 */
body.af-atom-mode-hidden .af-hero-grid {
    grid-template-columns: minmax(0, 780px);
    justify-content: start;
}

/*
 * Custom animations should also respect reduced-motion preferences.
 */
@media (prefers-reduced-motion: reduce) {
    .af-custom-atom,
    .af-custom-atom *,
    .af-custom-atom *::before,
    .af-custom-atom *::after {
        animation: none !important;
        transition: none !important;
    }
}

/*
 * Disable custom atom animations when the admin animation
 * checkbox is unchecked.
 */
body.af-atom-animation-disabled .af-custom-atom,
body.af-atom-animation-disabled .af-custom-atom *,
body.af-atom-animation-disabled .af-custom-atom *::before,
body.af-atom-animation-disabled .af-custom-atom *::after {
    animation: none !important;
    transition: none !important;
}

/*
|--------------------------------------------------------------------------
| Mobile animation and global responsive corrections
|--------------------------------------------------------------------------
*/

/*
 * Do not use paint containment here. Paint containment clips planets,
 * labels, comet tails, glows, and other effects extending outside the
 * nominal animation box.
 */
.af-science-visual,
.af-custom-atom {
    contain: layout;
    overflow: visible;
}

/*
 * General responsive protection for front-page and WordPress content.
 */
img,
picture,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

table {
    max-width: 100%;
}

.af-site,
.af-main-width,
.af-page-grid,
.af-hero-grid,
.af-center-content,
.af-science-visual {
    min-width: 0;
}

/*
 * Tablet and mobile hero.
 */
@media (max-width: 900px) {
    .af-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    /*
     * Give the visual a real layout height instead of scaling a larger
     * element inside a smaller box.
     */
    .af-science-visual {
        width: 100%;
        min-height: 470px;
        margin: 0;
        transform: none;
        overflow: visible;
    }

    .af-custom-atom {
        width: min(430px, calc(100vw - 32px));
        height: 430px;
        overflow: visible;
    }
}

/*
 * Phone layout.
 */
/*
 * Small phones.
 */
@media (max-width: 420px) {
    .af-main-width,
    .af-page-grid {
        width: min(calc(100% - 24px), 1180px);
    }

    .af-science-visual {
        width: 100%;
        min-height: 410px;
        margin-inline: auto;
        transform: none;
    }

    .af-custom-atom {
        width: min(350px, calc(100vw - 24px));
        height: 390px;
    }

    .af-visual-label {
        max-width: 105px;
        padding: 7px 10px;
        font-size: 0.68rem;
        line-height: 1.25;
        white-space: normal;
    }

    body.af-atom-mode-custom .af-label-one {
        top: 4%;
        left: 1%;
    }

    body.af-atom-mode-custom .af-label-two {
        right: 1%;
        bottom: 17%;
    }

    body.af-atom-mode-custom .af-label-three {
        bottom: 3%;
        left: 3%;
    }
}

/*
|--------------------------------------------------------------------------
| Final responsive media and animation corrections
|--------------------------------------------------------------------------
*/

/*
 * Keep media within its content area on the front page and standard
 * WordPress content pages.
 */
.af-site img,
.af-site picture,
.af-site video,
.af-site canvas,
.af-site svg,
.entry-content img,
.entry-content picture,
.entry-content video,
.entry-content canvas,
.entry-content svg {
    max-width: 100%;
    height: auto;
}

.af-site iframe,
.entry-content iframe,
.wp-block-embed__wrapper iframe {
    max-width: 100%;
}

.entry-content pre,
.entry-content table {
    max-width: 100%;
    overflow-x: auto;
}

.entry-content pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.af-site,
.af-main-width,
.af-page-grid,
.af-hero-grid,
.af-center-content,
.af-science-visual,
.af-custom-atom {
    min-width: 0;
}

/*
 * Never clip custom animation artwork, labels, rings, or comet tails
 * inside the hero animation area.
 */
.af-science-visual,
.af-custom-atom {
    overflow: visible;
}

/*
 * Tablet and mobile layout.
 */
@media (max-width: 900px) {
    .af-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    /*
     * A 500px layout box gives artwork and labels approximately
     * 35px of vertical clearance around the 430px animation.
     */
    .af-science-visual {
        width: 100%;
        min-height: 500px;
        margin: 0 auto;
        transform: none;
    }

    .af-custom-atom {
        width: min(430px, calc(100vw - 40px));
        height: 430px;
    }
}

/*
 * Standard phones.
 */
@media (max-width: 680px) {
    .af-hero {
        padding-top: 42px;
        padding-bottom: 52px;
    }

    .af-hero-grid {
        gap: 28px;
    }

    .af-actions {
        gap: 12px;
    }

    .af-button {
        min-height: 48px;
        padding-inline: 18px;
    }

    /*
     * Do not scale this wrapper with transform. Its actual layout
     * height must remain large enough for the artwork.
     */
    .af-science-visual {
        width: 100%;
        min-height: 480px;
        margin-inline: auto;
        transform: none;
    }

    .af-custom-atom {
        width: min(390px, calc(100vw - 32px));
        height: 410px;
    }

    .af-atom-stage {
        width: min(390px, calc(100vw - 32px));
        height: min(390px, calc(100vw - 32px));
    }

    /*
     * Keep custom-animation labels inside the visible hero area.
     */
    body.af-atom-mode-custom .af-label-one {
        top: 5%;
        left: 2%;
    }

    body.af-atom-mode-custom .af-label-two {
        right: 2%;
        bottom: 16%;
    }

    body.af-atom-mode-custom .af-label-three {
        bottom: 3%;
        left: 4%;
    }
}

/*
 * Small phones.
 */
@media (max-width: 420px) {
    .af-main-width,
    .af-page-grid {
        width: min(calc(100% - 24px), 1180px);
    }

    .af-hero-title {
        font-size: clamp(2.75rem, 15vw, 4rem);
        overflow-wrap: normal;
    }

    .af-hero-description {
        font-size: 1rem;
    }

    .af-actions {
        align-items: stretch;
    }

    .af-button {
        padding-inline: 16px;
        font-size: 0.88rem;
    }

    /*
     * This is deliberately taller than the animation itself. It gives
     * rings, glows, labels, and comet tails vertical breathing room.
     */
    .af-science-visual {
        width: 100%;
        min-height: 455px;
        margin-inline: auto;
        transform: none;
    }

    .af-custom-atom {
        width: min(350px, calc(100vw - 28px));
        height: 385px;
    }

    .af-atom-stage {
        width: min(330px, calc(100vw - 34px));
        height: min(330px, calc(100vw - 34px));
    }

    .af-nucleus {
        width: 54px;
        height: 54px;
    }

    .af-visual-label {
        max-width: 104px;
        padding: 7px 10px;
        font-size: 0.68rem;
        line-height: 1.25;
        white-space: normal;
    }

    body.af-atom-mode-custom .af-label-one {
        top: 4%;
        left: 1%;
    }

    body.af-atom-mode-custom .af-label-two {
        right: 1%;
        bottom: 15%;
    }

    body.af-atom-mode-custom .af-label-three {
        bottom: 2%;
        left: 2%;
    }
}

/*
 * Very narrow phones.
 */
@media (max-width: 360px) {
    .af-hero-title {
        font-size: clamp(2.45rem, 14.5vw, 3.4rem);
    }

    .af-science-visual {
        min-height: 430px;
    }

    .af-custom-atom {
        width: min(320px, calc(100vw - 24px));
        height: 360px;
    }

    .af-atom-stage {
        width: min(300px, calc(100vw - 32px));
        height: min(300px, calc(100vw - 32px));
    }

    .af-visual-label {
        max-width: 94px;
        padding: 6px 8px;
        font-size: 0.64rem;
    }

    body.af-atom-mode-custom .af-label-one {
        top: 3%;
    }

    body.af-atom-mode-custom .af-label-two {
        bottom: 14%;
    }

    body.af-atom-mode-custom .af-label-three {
        bottom: 1%;
    }
}

/*
 * Disable both built-in and custom animations when requested by the
 * visitor or when the administrator disables animation.
 */
body.af-atom-animation-disabled .af-custom-atom,
body.af-atom-animation-disabled .af-custom-atom *,
body.af-atom-animation-disabled .af-custom-atom *::before,
body.af-atom-animation-disabled .af-custom-atom *::after {
    animation: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .af-custom-atom,
    .af-custom-atom *,
    .af-custom-atom *::before,
    .af-custom-atom *::after {
        animation: none !important;
        transition: none !important;
    }
}

/*
|--------------------------------------------------------------------------
| Universal primary-navigation dropdowns
|--------------------------------------------------------------------------
|
| WordPress automatically assigns .menu-item-has-children to every
| menu item that contains a submenu. These rules therefore apply to
| every current and future top-level submenu automatically.
*/

/*
 * Parent link and arrow sit in one horizontal row.
 */
.af-navigation > li.menu-item-has-children {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0;
    padding: 0 !important;
}

/*
 * Keep the parent as a normal, independent level-one link.
 */
.af-navigation > li.menu-item-has-children > a {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding-right: 17px;
    pointer-events: auto;
}

/*
 * Separate submenu button positioned immediately to the right
 * of its corresponding parent menu link.
 */
.af-navigation
    > li.menu-item-has-children
    > .af-submenu-toggle {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 3;
    display: inline-grid;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    flex: 0 0 30px;
    align-self: center;
    margin: 0;
    padding: 0;
    place-items: center;
    color: var(--af-primary);
    appearance: none;
    -webkit-appearance: none;
    background: rgba(7, 17, 31, 0.96);
    border: 1px solid rgba(103, 232, 249, 0.34);
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    font: inherit;
    line-height: 1;
    cursor: pointer;
    transform: none !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

/*
 * Downward chevron inside the button.
 */
.af-navigation
    > li.menu-item-has-children
    > .af-submenu-toggle
    > span {
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform:
        translateY(-2px)
        rotate(45deg);
    transition: transform 180ms ease;
}

/*
 * Arrow button states.
 */
.af-navigation
    > li.menu-item-has-children
    > .af-submenu-toggle:hover,
.af-navigation
    > li.menu-item-has-children
    > .af-submenu-toggle:focus-visible,
.af-navigation
    > li.menu-item-has-children.af-submenu-open
    > .af-submenu-toggle {
    color: #041019;
    background: linear-gradient(
        135deg,
        var(--af-primary),
        var(--af-green)
    );
    border-color: transparent;
    box-shadow:
        0 7px 18px rgba(103, 232, 249, 0.24);
}

.af-navigation
    > li.menu-item-has-children
    > .af-submenu-toggle:focus-visible {
    outline: 2px solid var(--af-primary);
    outline-offset: 3px;
}

/*
 * Point the chevron upward while the submenu is open.
 */
.af-navigation
    > li.menu-item-has-children:hover
    > .af-submenu-toggle
    > span,
.af-navigation
    > li.menu-item-has-children:focus-within
    > .af-submenu-toggle
    > span,
.af-navigation
    > li.menu-item-has-children.af-submenu-open
    > .af-submenu-toggle
    > span {
    transform:
        translateY(2px)
        rotate(225deg);
}

/*
|--------------------------------------------------------------------------
| Submenu panel
|--------------------------------------------------------------------------
*/

.af-navigation
    > li.menu-item-has-children
    > .sub-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    z-index: 1000;
    display: grid;
    width: max-content;
    min-width: 190px;
    max-width: min(320px, calc(100vw - 28px));
    margin: 0;
    padding: 9px;
    list-style: none;
    color: var(--af-text);
    background: rgba(7, 17, 31, 0.98);
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 15px;
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.38),
        inset 0 1px rgba(255, 255, 255, 0.04);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform:
        translateY(-7px)
        scale(0.98);
    transform-origin: top right;
    transition:
        opacity 160ms ease,
        transform 160ms ease,
        visibility 160ms ease;
}

/*
 * Invisible bridge across the gap between the controls and submenu.
 */
.af-navigation
    > li.menu-item-has-children
    > .sub-menu::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 13px;
    content: "";
}

.af-navigation .sub-menu > li {
    display: block;
    margin: 0;
    padding: 0;
}

/*
 * Submenu links.
 */
.af-navigation .sub-menu > li > a {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 14px;
    padding: 9px 13px;
    color: var(--af-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: none;
    font-size: 0.88rem;
    font-weight: 750;
    white-space: nowrap;
    transform: none;
    transition:
        color 150ms ease,
        background-color 150ms ease,
        border-color 150ms ease,
        transform 150ms ease;
}

.af-navigation .sub-menu > li > a::after {
    margin-left: auto;
    padding-left: 12px;
    color: var(--af-primary);
    content: "→";
}

.af-navigation .sub-menu > li > a:hover,
.af-navigation .sub-menu > li > a:focus-visible {
    color: var(--af-text);
    background: rgba(103, 232, 249, 0.1);
    border-color: rgba(103, 232, 249, 0.2);
    transform: translateX(2px);
}

/*
 * Open on desktop hover, keyboard focus, or arrow-button click.
 */
.af-navigation
    > li.menu-item-has-children:hover
    > .sub-menu,
.af-navigation
    > li.menu-item-has-children:focus-within
    > .sub-menu,
.af-navigation
    > li.menu-item-has-children.af-submenu-open
    > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform:
        translateY(0)
        scale(1);
}

/*
|--------------------------------------------------------------------------
| Compact mobile submenu
|--------------------------------------------------------------------------
*/

@media (max-width: 680px) {
    .af-topbar,
    .af-topbar-inner,
    .af-primary-navigation,
    .af-navigation {
        overflow: visible !important;
    }

    .af-topbar {
        z-index: 10000;
    }

    .af-primary-navigation {
        position: relative;
        width: 100%;
        margin-left: 0;
        padding: 4px 0 8px;
    }

    .af-navigation {
        display: flex;
        width: 100%;
        min-width: 0;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        padding: 0;
        white-space: normal;
    }

    .af-navigation > li {
        flex: 0 0 auto;
    }

    /*
     * Parent title and arrow remain tightly grouped.
     */
    .af-navigation > li.menu-item-has-children {
        position: relative;
        display: inline-flex !important;
        align-items: center;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 2px;
        padding: 0 !important;
    }

    .af-navigation
        > li.menu-item-has-children
        > a {
        padding-right: 10px;
        transform: none;
    }

    .af-navigation
        > li.menu-item-has-children
        > .af-submenu-toggle {
        position: static !important;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        flex: 0 0 32px;
        margin: 0;
        transform: none !important;
    }

    /*
     * Compact panel aligned to the left of its parent group.
     */
    .af-navigation
        > li.menu-item-has-children
        > .sub-menu {
        top: calc(100% + 7px);
        right: auto;
        left: 0;
        width: max-content;
        min-width: 155px;
        max-width: min(230px, calc(100vw - 28px));
        padding: 6px;
        transform: translateY(-5px);
        transform-origin: top left;
    }

    .af-navigation .sub-menu > li > a {
        min-height: 38px;
        padding: 7px 10px;
        gap: 8px;
        font-size: 0.8rem;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .af-navigation .sub-menu > li > a::after {
        padding-left: 6px;
    }

    .af-navigation
        > li.menu-item-has-children.af-submenu-open
        > .sub-menu,
    .af-navigation
        > li.menu-item-has-children:focus-within
        > .sub-menu {
        transform: translateY(0);
    }
}

/*
 * On touch devices, use the explicit open state rather than
 * the browser's persistent simulated hover state.
 */
@media (max-width: 680px) and (hover: none) {
    .af-navigation
        > li.menu-item-has-children:hover
        > .sub-menu {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-5px);
    }

    .af-navigation
        > li.menu-item-has-children.af-submenu-open
        > .sub-menu,
    .af-navigation
        > li.menu-item-has-children:focus-within
        > .sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .af-topbar {
        z-index: 10000;
    }
}

/*
|--------------------------------------------------------------------------
| Submenu arrow direction on desktop and mobile
|--------------------------------------------------------------------------
*/

/* Closed: point down. */
.af-navigation
    > li.menu-item-has-children
    > .af-submenu-toggle
    > span {
    display: block;
    width: 7px;
    height: 7px;
    border: 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform:
        translateY(-2px)
        rotate(45deg) !important;
    transition: transform 180ms ease;
}

/* Click/tap-open and keyboard-open: point up. */
.af-navigation
    > li.menu-item-has-children.af-submenu-open
    > .af-submenu-toggle
    > span,
.af-navigation
    > li.menu-item-has-children:focus-within
    > .af-submenu-toggle
    > span,
.af-navigation
    > li.menu-item-has-children
    > .af-submenu-toggle[aria-expanded="true"]
    > span {
    transform:
        translateY(2px)
        rotate(225deg) !important;
}

/* Desktop mouse hover: point up. */
@media (hover: hover) and (pointer: fine) {
    .af-navigation
        > li.menu-item-has-children:hover
        > .af-submenu-toggle
        > span,
    .af-navigation
        > li.menu-item-has-children:hover
        > .af-submenu-toggle[aria-expanded="false"]
        > span {
        transform:
            translateY(2px)
            rotate(225deg) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .af-navigation
        > li.menu-item-has-children
        > .af-submenu-toggle
        > span {
        transition: none;
    }
}

/*
|--------------------------------------------------------------------------
| Compact front-page hero spacing
|--------------------------------------------------------------------------
*/

body[class*="af-atom-mode-"] .af-hero {
    padding-top: 38px;
    padding-bottom: 42px;
}

@media (max-width: 680px) {
    body[class*="af-atom-mode-"] .af-hero {
        padding-top: 24px;
        padding-bottom: 28px;
    }
}

/*
|--------------------------------------------------------------------------
| Default layout for all ordinary pages
|--------------------------------------------------------------------------
*/

body.af-standard-page {
    margin: 0;
    min-height: 100vh;
    color: var(--af-text);
    background:
        radial-gradient(
            circle at 8% 0%,
            rgba(34, 211, 238, 0.12),
            transparent 28rem
        ),
        radial-gradient(
            circle at 92% 12%,
            rgba(139, 92, 246, 0.13),
            transparent 32rem
        ),
        var(--af-bg);
}

.af-standard-page-main,
.af-standard-page-article {
    width: 100%;
    min-width: 0;
}

.af-standard-page-container {
    width: min(calc(100% - 40px), 920px);
    margin-inline: auto;
}

.af-standard-page-hero {
    padding: 28px 0 30px;
    border-bottom: 1px solid var(--af-border);
    text-align: center;
}

.af-standard-page-eyebrow {
    margin: 0 0 9px;
    color: var(--af-primary);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.af-standard-page-hero h1 {
    max-width: 850px;
    margin: 0 auto;
    color: var(--af-text);
    font-size: clamp(2.1rem, 4.2vw, 4rem);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.af-standard-page-image {
    margin: 48px 0 0;
}

.af-standard-page-image img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
}

.af-standard-page-content {
    min-height: 40vh;
    padding: 50px 0 70px;
    color: var(--af-muted);
    font-size: 1.06rem;
    line-height: 1.8;
}

.af-standard-page-content > *:first-child {
    margin-top: 0;
}

.af-standard-page-content > *:last-child {
    margin-bottom: 0;
}

.af-standard-page-content h2,
.af-standard-page-content h3,
.af-standard-page-content h4,
.af-standard-page-content h5,
.af-standard-page-content h6 {
    color: var(--af-text);
    line-height: 1.2;
}

.af-standard-page-content h2 {
    margin-top: 2em;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.af-standard-page-content h3 {
    margin-top: 1.7em;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.af-standard-page-content a {
    color: var(--af-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.af-standard-page-content img,
.af-standard-page-content picture,
.af-standard-page-content video,
.af-standard-page-content canvas,
.af-standard-page-content svg {
    max-width: 100%;
    height: auto;
}

.af-standard-page-content iframe {
    max-width: 100%;
}

.af-standard-page-content blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    color: var(--af-text);
    background: rgba(103, 232, 249, 0.07);
    border-left: 4px solid var(--af-primary);
    border-radius: 0 12px 12px 0;
}

.af-standard-page-content pre,
.af-standard-page-content table {
    max-width: 100%;
    overflow-x: auto;
}

.af-standard-page-content pre {
    padding: 20px;
    color: var(--af-text);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--af-border);
    border-radius: 12px;
}

.af-standard-page-content table {
    display: block;
    width: 100%;
    border-collapse: collapse;
}

.af-standard-page-content th,
.af-standard-page-content td {
    padding: 10px 13px;
    border: 1px solid var(--af-border);
}

@media (max-width: 680px) {
    .af-standard-page-container {
        width: min(calc(100% - 28px), 920px);
    }

    .af-standard-page-hero {
        padding: 20px 0 22px;
    }

    .af-standard-page-hero h1 {
        font-size: clamp(1.9rem, 9vw, 2.8rem);
        line-height: 1.1;
        letter-spacing: -0.03em;
    }

    .af-standard-page-content {
        padding: 40px 0 60px;
        font-size: 1rem;
    }
}

/*
|--------------------------------------------------------------------------
| Final standard-page spacing and title
|--------------------------------------------------------------------------
*/

body.af-standard-page .af-standard-page-main,
body.af-standard-page .af-standard-page-article {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
}

body.af-standard-page .af-standard-page-hero {
    display: block;
    width: 100%;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 8px 0 10px;
    border-bottom: 1px solid var(--af-border);
    text-align: center;
}

body.af-standard-page .af-standard-page-hero
    .af-standard-page-container {
    min-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
}

body.af-standard-page .af-standard-page-eyebrow {
    margin: 0 0 3px;
    padding: 0;
    font-size: 0.68rem;
    line-height: 1.25;
}

body.af-standard-page .af-standard-page-hero h1 {
    max-width: 850px;
    margin: 0 auto;
    padding: 0;
    color: var(--af-text);
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

body.af-standard-page .af-standard-page-image {
    margin-top: 22px;
}

body.af-standard-page .af-standard-page-content {
    min-height: 40vh;
    padding-top: 22px;
    padding-bottom: 60px;
}

@media (max-width: 680px) {
    body.af-standard-page .af-standard-page-hero {
        padding-top: 6px;
        padding-bottom: 8px;
    }

    body.af-standard-page .af-standard-page-eyebrow {
        margin-bottom: 2px;
        font-size: 0.64rem;
    }

    body.af-standard-page .af-standard-page-hero h1 {
        font-size: clamp(1.55rem, 7vw, 2.2rem);
        line-height: 1.1;
        letter-spacing: -0.025em;
    }

    body.af-standard-page .af-standard-page-image {
        margin-top: 18px;
    }

    body.af-standard-page .af-standard-page-content {
        padding-top: 18px;
        padding-bottom: 50px;
    }
}

/*
|--------------------------------------------------------------------------
| Protect site navigation from post-content CSS
|--------------------------------------------------------------------------
*/

.af-site .af-topbar .af-navigation > li > a,
.af-site .af-topbar .af-navigation > li.current-menu-item > a,
.af-site .af-topbar .af-navigation > li.current-menu-ancestor > a,
.af-site .af-topbar .af-navigation > li.current_page_item > a {
    color: #041019 !important;
}

.af-site .af-topbar .af-navigation > li > a:hover,
.af-site .af-topbar .af-navigation > li > a:focus-visible {
    color: var(--af-text) !important;
}

.af-site .af-topbar .af-navigation .sub-menu > li > a {
    color: var(--af-muted) !important;
}

.af-site .af-topbar .af-navigation .sub-menu > li > a:hover,
.af-site .af-topbar .af-navigation .sub-menu > li > a:focus-visible {
    color: var(--af-text) !important;
}