/* Home page specific performance and layout tuning */
body[data-page="home"] #research,
body[data-page="home"] #impact-snapshot,
body[data-page="home"] #awards,
body[data-page="home"] #credentials,
body[data-page="home"] #skills,
body[data-page="home"] #contact {
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

body[data-page="home"] .parallax-bg {
    opacity: 0.24;
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
    body[data-page="home"] .parallax-bg.layer-3,
    body[data-page="home"] .parallax-bg.layer-4 {
        display: none;
    }
}

body[data-page="home"] .hero .hero-content {
    max-width: 750px;
}

body[data-page="home"] .hero .hero-badge {
    font-family: var(--font-sans);
    letter-spacing: 0.04em;
    font-size: 0.79rem;
    line-height: 1.38;
    font-weight: 600;
    text-wrap: balance;
}

body[data-page="home"] .hero .hero-outcomes {
    margin-top: 0.86rem;
    gap: 0.62rem;
}

body[data-page="home"] .hero .hero-outcome-item {
    padding: 0.62rem 0.78rem;
}

body[data-page="home"] .hero .hero-tools {
    margin-top: 0.66rem;
    gap: 0.42rem;
}

body[data-page="home"] .hero .tool-chip {
    padding: 0.31rem 0.64rem;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
}

body[data-page="home"] .hero .hero-buttons .btn-primary.large,
body[data-page="home"] .hero .hero-buttons .btn-outline.large {
    padding: 0.74rem 1.84rem;
    font-size: 0.93rem;
}

body[data-page="home"] .about-feature-card {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: minmax(0, 248px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    padding: 0.95rem;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    box-shadow: 0 12px 28px rgba(16, 26, 42, 0.1);
    backdrop-filter: blur(12px) saturate(125%);
    -webkit-backdrop-filter: blur(12px) saturate(125%);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body[data-page="home"] .about-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(10, 123, 224, 0.32);
    box-shadow: 0 18px 36px rgba(16, 26, 42, 0.16);
}

body[data-page="home"] .about-feature-media {
    width: 100%;
    min-height: 100%;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(16, 26, 42, 0.12);
    aspect-ratio: 4 / 3;
}

body[data-page="home"] .about-feature-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 24%;
    transition: transform 0.35s ease;
}

body[data-page="home"] .about-feature-card:hover .about-feature-media img {
    transform: scale(1.02);
}

body[data-page="home"] .about-feature-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

body[data-page="home"] .about-feature-kicker {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-primary);
}

body[data-page="home"] .about-feature-title {
    margin: 0.32rem 0 0;
    font-size: clamp(1rem, 1.2vw, 1.22rem);
    line-height: 1.33;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

body[data-page="home"] .about-feature-meta {
    margin: 0.42rem 0 0;
    font-size: 0.82rem;
    color: var(--text-light);
}

body[data-page="home"] .about-feature-summary {
    margin: 0.62rem 0 0;
    font-size: 0.9rem;
    line-height: 1.56;
    color: var(--text-secondary);
}

body[data-page="home"] .about-feature-link {
    margin-top: auto;
    padding-top: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    line-height: 1.25;
}

body[data-page="home"] .about-feature-link:hover {
    text-decoration: underline;
}

body[data-page="home"] .about-feature-media:focus-visible,
body[data-page="home"] .about-feature-link:focus-visible {
    outline: 3px solid rgba(10, 123, 224, 0.38);
    outline-offset: 3px;
    border-radius: 10px;
}

/* Equalize visible project card heights in the home research carousel */
body[data-page="home"] .research-carousel .carousel-track {
    align-items: stretch;
}

body[data-page="home"] .research-carousel .research-card-link {
    display: flex !important;
    align-items: stretch;
    height: auto;
}

body[data-page="home"] .research-carousel .research-card {
    height: 100%;
}

body[data-page="home"] .research-carousel .rc-image {
    height: 214px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-page="home"] .research-carousel .rc-image picture {
    width: 100%;
    height: 100%;
}

body[data-page="home"] .research-carousel .rc-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body[data-page="home"] .research-carousel .rc-content h3 {
    min-height: calc(1.3em * 2);
}

body[data-page="home"] .research-carousel .rc-content p {
    min-height: calc(1.55em * 3);
}

body[data-page="home"] .research-carousel .rc-skills {
    margin-top: auto;
    min-height: 4.2rem;
    align-content: flex-start;
}

@media (max-width: 900px) {
    body[data-page="home"] .research-carousel .rc-image {
        height: 194px;
    }
}

@media (max-width: 700px) {
    body[data-page="home"] .about-feature-card {
        grid-template-columns: 1fr;
        padding: 0.85rem;
    }

    body[data-page="home"] .about-feature-media {
        aspect-ratio: 16 / 10;
    }

    body[data-page="home"] .about-feature-link {
        margin-top: 0.35rem;
    }

    body[data-page="home"] .research-carousel .rc-image {
        height: 182px;
    }

    body[data-page="home"] .research-carousel .rc-content h3,
    body[data-page="home"] .research-carousel .rc-content p,
    body[data-page="home"] .research-carousel .rc-skills {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-page="home"] .about-feature-card,
    body[data-page="home"] .about-feature-media img {
        transition: none;
    }

    body[data-page="home"] .about-feature-card:hover {
        transform: none;
    }

    body[data-page="home"] .about-feature-card:hover .about-feature-media img {
        transform: none;
    }
}
