#home-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding: 120px 0 72px;
    display: flex;
    align-items: flex-end;
    /* Grounded text */
    overflow: hidden;
    color: #2C292C;
    /* Updated theme color */
    background-color: var(--primary);
}

.home-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.home-hero__media-picture {
    width: 100%;
    height: 100%;
    display: block;
}

.home-hero__media-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}

#home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100% 120px, 120px 100%;
    opacity: 0.16;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 92%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 92%);
    pointer-events: none;
}

#home-hero::after {
    content: '';
    position: absolute;
    inset: auto -10rem -12rem auto;
    z-index: 1;
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 192, 197, 0.2) 0%, rgba(200, 192, 197, 0) 72%);
    filter: blur(8px);
    opacity: 0.9;
    pointer-events: none;
    animation: homeHeroGlow 16s ease-in-out infinite;
}

.home-hero__layout {
    position: relative;
    z-index: 2;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: clamp(28px, 4vw, 60px);
    align-items: center;
}

.home-hero__copy {
    max-width: 760px;
    opacity: 1;
    transform: none;
    transition: none;
}



.home-hero__title {
    margin: 0;
    font-size: clamp(3.8rem, 7vw, 7rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
    text-wrap: balance;
}

.home-hero__title-line {
    display: block;
}

.home-hero__title-line--accent {
    color: #2C292C;
    text-shadow: none;
    letter-spacing: -0.056em;
}

.home-hero__lead {
    margin-top: 20px;
    max-width: 680px;
    font-size: 1.38rem;
    line-height: 1.75;
    color: #2C292C;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.home-hero .btn-ghost {
    background: #2C292C;
    border: 1.5px solid #2C292C;
    color: #fff;
}

.home-hero .btn-ghost:hover {
    background: transparent;
    color: #2C292C;
    transform: translateY(-2px);
}

.homepage-marquee {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.homepage-marquee__line {
    width: 100%;
}

.homepage-marquee__track {
    display: flex;
    width: max-content;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: marqueeScroll var(--marquee-duration, 45s) linear infinite;
}

.homepage-marquee__line--reverse .homepage-marquee__track {
    animation-direction: reverse;
}

.homepage-marquee__segment {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    margin-right: clamp(18px, 3vw, 48px);
}

.homepage-marquee__group {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 8vw;
    line-height: 1;
    font-weight: 300;
    letter-spacing: -2px;
    color: rgba(31, 27, 31, 0.95);
}

.homepage-marquee__line--soft {
    opacity: 0.6;
}

@keyframes marqueeScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes homeHeroGlow {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.grid-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.home-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.bg-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 60px 40px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.home-media-card {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: transparent;
    padding: 15px;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.home-media-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.home-media-card img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 20px;
    flex-shrink: 0;
}

.home-media-card>div {
    min-width: 0;
}

.home-portfolio-preview {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: all 0.5s ease;
    filter: brightness(0.8) grayscale(20%);
}

.portfolio-img-link:hover .home-portfolio-preview {
    filter: brightness(1) grayscale(0%);
    transform: scale(1.02);
}

.home-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 60px;
}

.home-section-header__copy {
    max-width: 860px;
    text-align: left;
}

.home-section-header__title {
    color: var(--primary);
    margin-bottom: 10px;
}

.home-section-header__lead {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.home-section-header__body {
    margin-top: 12px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.72);
}

.home-section-header__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

#home-career {
    padding-bottom: 0 !important;
}

#home-career .carousel-container {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding: 0;
    margin-top: 60px;

    display: flex;
    flex-direction: column;
    gap: 0px !important;
}

.homepage-carousel-row {
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.homepage-carousel-track {
    gap: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
    box-sizing: border-box;
}

.homepage-carousel-track img {
    max-height: 70px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) !important;
    opacity: 0.5 !important;
    transition: opacity 0.3s ease;
}

.homepage-carousel-item:hover img {
    opacity: 0.9 !important;
}

.homepage-carousel-item {
    flex: 0 0 340px;
    /* Increased to reduce column count by 1 */
    height: 160px;
    /* Increased track row height height */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0px;

    background: rgba(255, 255, 255, 0.015);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0;
    padding: 24px 38px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-sizing: border-box;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.homepage-carousel-item:hover {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.03);
}

/* Border-track multiplier removed to fix single border tall edge overlap */

section[id^="home-"] {
    scroll-margin-top: 120px;
}

@media (max-width: 1100px) {
    #home-hero {
        min-height: auto;
        padding: 120px 0 92px;
    }

    .home-hero__layout {
        grid-template-columns: 1fr;
    }

    .grid-projects,
    .home-media-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .bg-panel {
        padding: 40px 28px;
    }
}

@media (max-width: 640px) {
    #home-hero {
        padding: 120px 0 96px;
    }

    .home-hero__title {
        font-size: clamp(3.1rem, 16vw, 4.8rem);
    }

    .home-hero__actions {
        flex-direction: column;
    }

    .home-hero__actions .btn {
        width: 100%;
    }

    .home-section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 36px;
    }

    .home-section-header__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .home-section-header__actions .btn {
        width: 100%;
    }

    .grid-projects,
    .home-media-grid {
        gap: 20px;
    }

    .bg-panel {
        padding: 28px 18px;
    }

    .homepage-marquee__group {
        font-size: clamp(1.8rem, 10vw, 3rem) !important;
        letter-spacing: -0.04em !important;
    }

    .homepage-marquee__segment {
        margin-right: 18px;
    }

    .home-media-card {
        align-items: flex-start;
        padding: 12px;
    }

    .home-media-card img {
        width: 68px;
        height: 68px;
        margin-right: 14px;
    }

    .homepage-carousel-item {
        flex: 0 0 72vw;
        height: 136px;
        padding: 20px 24px;
    }

    .homepage-carousel-track img {
        max-width: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {

    #home-hero::after,
    .section-orb {
        animation: none !important;
    }

    .homepage-marquee__track {
        animation: none !important;
        transform: translate3d(0, 0, 0) !important;
    }
}

/* Section Ambient Backgrounds */
.section-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.section-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
    animation: orbFloat 14s ease-in-out infinite;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* Specific Section Configurations */
#home-career {
    position: relative;
    overflow: hidden;
}

#home-career .section-orb--1 {
    top: 20%;
    right: -5%;
    width: 22rem;
    height: 22rem;
    background: rgba(212, 175, 55, 0.3);
    /* Gold */
}

#home-career .section-orb--2 {
    bottom: 15%;
    left: -5%;
    width: 18rem;
    height: 18rem;
    background: rgba(200, 192, 197, 0.18);
}

#home-impact {
    position: relative;
    overflow: hidden;
}

#home-impact .section-orb--1 {
    top: 30%;
    left: -8%;
    width: 24rem;
    height: 24rem;
    background: rgba(255, 255, 255, 0.25);
    /* Bright */
}

#home-impact .section-orb--2 {
    bottom: 20%;
    right: -5%;
    width: 16rem;
    height: 16rem;
    background: rgba(200, 192, 197, 0.15);
}

#home-impact .home-impact-card {
    align-items: stretch;
    gap: 0;
    min-height: 520px;
    text-align: left;
    background: linear-gradient(135deg, rgba(24, 20, 26, 0.94), rgba(35, 29, 36, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

#home-impact .home-impact-card .split-image {
    display: flex;
    flex: 1.08;
    min-width: 0;
    border-radius: 0;
    background: #100d11;
}

#home-impact .home-impact-card .split-image img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#home-impact .home-impact-card .split-content {
    flex: 0.92;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    min-width: 0;
    padding: clamp(32px, 4vw, 60px);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    background: radial-gradient(circle at top right, rgba(200, 192, 197, 0.05), transparent 36%);
}

#home-impact .home-impact-card .split-content h3 {
    margin-bottom: 16px;
    font-size: clamp(1.85rem, 3.6vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--primary);
}

#home-impact .home-impact-card .split-content p {
    max-width: 56ch;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.85;
}

#home-impact .home-impact-card .split-content .btn {
    align-self: flex-start;
}

#home-portfolio {
    position: relative;
    overflow: hidden;
}

#home-portfolio .section-orb--1 {
    top: 15%;
    right: -5%;
    width: 26rem;
    height: 26rem;
    background: rgba(147, 112, 219, 0.2);
    /* Purple */
}

#home-portfolio .section-orb--2 {
    bottom: 10%;
    left: -5%;
    width: 20rem;
    height: 20rem;
    background: rgba(200, 192, 197, 0.15);
}

#home-podcasts {
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.28);
}

#home-podcasts .section-orb--1 {
    top: 20%;
    right: -6%;
    width: 24rem;
    height: 24rem;
    background: rgba(212, 175, 55, 0.22);
}

#home-podcasts .section-orb--2 {
    bottom: 18%;
    left: -6%;
    width: 18rem;
    height: 18rem;
    background: rgba(200, 192, 197, 0.16);
}

#home-podcasts .podcast-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

#home-podcasts .podcast-card__description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#home-media {
    position: relative;
    overflow: hidden;
}

#home-media .section-orb--1 {
    top: 25%;
    left: -5%;
    width: 22rem;
    height: 22rem;
    background: rgba(255, 250, 240, 0.22);
    /* Warm */
}

#home-media .section-orb--2 {
    bottom: 25%;
    right: -5%;
    width: 20rem;
    height: 20rem;
    background: rgba(200, 192, 197, 0.15);
}

@media (max-width: 900px) {
    #home-impact .home-impact-card {
        flex-direction: column;
        min-height: 0;
    }

    #home-impact .home-impact-card .split-image {
        width: 100%;
        aspect-ratio: 16 / 10;
    }

    #home-impact .home-impact-card .split-content {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding: 28px 22px 34px;
    }

    #home-impact .home-impact-card .split-content .btn {
        width: 100%;
        align-self: stretch;
    }
}