/* ==============================
   HOME PAGE - Full Viewport Layout
   ============================== */
.home-page {
    overflow: hidden;
    height: 100vh;
}

/* Home Video Background - Cinematic */
.home-video-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.home-video-bg video {
    --vx: 0px;
    --vy: 0px;
    width: 110%;
    height: 110%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + var(--vx)), calc(-50% + var(--vy))) scale(1);
    opacity: 0.22;
    filter: grayscale(1) brightness(0.45) contrast(1.3);
    animation: videoBreathe 20s ease-in-out infinite;
}

@keyframes videoBreathe {

    0%,
    100% {
        transform: translate(calc(-50% + var(--vx, 0px)), calc(-50% + var(--vy, 0px))) scale(1);
    }

    50% {
        transform: translate(calc(-50% + var(--vx, 0px)), calc(-50% + var(--vy, 0px))) scale(1.1);
    }
}

/* Deep vignette over video */
.home-video-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 55% 50% at center, transparent 0%, rgba(var(--bg-primary-rgb), 0.85) 100%),
        linear-gradient(to bottom, rgba(var(--bg-primary-rgb), 0.7) 0%, transparent 18%, transparent 82%, rgba(var(--bg-primary-rgb), 0.9) 100%),
        linear-gradient(to right, rgba(var(--bg-primary-rgb), 0.6) 0%, transparent 18%, transparent 82%, rgba(var(--bg-primary-rgb), 0.6) 100%);
}

/* Ambient light leak - slow drifting glow */
.home-video-bg::before {
    content: '';
    position: absolute;
    inset: -20%;
    /* Oversized for transform movement */
    z-index: 1;
    background:
        radial-gradient(circle 600px at 30% 30%, rgba(var(--text-primary-rgb), 0.03) 0%, transparent 100%),
        radial-gradient(circle 500px at 70% 70%, rgba(var(--text-primary-rgb), 0.025) 0%, transparent 100%);
    animation: ambientDrift 25s ease-in-out infinite alternate;
    pointer-events: none;
    will-change: transform;
}

@keyframes ambientDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, -5%) scale(1.05);
    }

    66% {
        transform: translate(-5%, 5%) scale(0.95);
    }

    100% {
        transform: translate(-2%, 8%) scale(1.1);
    }
}

/* Slow ambient pulse overlay */
.home-video-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(var(--text-primary-rgb), 0.02) 0%, transparent 70%);
    animation: ambientPulse 8s ease-in-out infinite;
}

@keyframes ambientPulse {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

/* Film grain on home */
.home-video-grain {
    position: absolute;
    inset: -10px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    animation: grainShift 0.3s steps(6) infinite;
}

.home-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 75px var(--spacing-xl) 50px;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Home Hero */
.home-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    position: relative;
}

/* Horizontal line removed per user request */

/* Hero content wrapper */
.home-hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Scroll hint */
.home-hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: fadeIn 1s ease-out 1.5s backwards;
}

.home-hero-scroll-hint span {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(var(--text-primary-rgb), 0.2);
}

/* Profile Mark */
.hero-profile {
    margin-bottom: var(--spacing-sm);
    animation: heroProfileReveal 1.2s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

.hero-profile-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--text-primary-rgb), 0.3);
    filter: grayscale(1) contrast(1.1);
    box-shadow:
        0 0 0 1px rgba(var(--bg-primary-rgb), 0.8),
        0 0 40px rgba(var(--text-primary-rgb), 0.08),
        0 8px 24px rgba(var(--bg-primary-rgb), 0.9);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    animation: profileBreathe 6s ease-in-out 1.5s infinite;
}

@keyframes heroProfileReveal {
    0% {
        opacity: 0;
        transform: scale(0.4);
    }

    60% {
        opacity: 1;
        transform: scale(1.08);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes profileBreathe {

    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(var(--bg-primary-rgb), 0.8),
            0 0 40px rgba(var(--text-primary-rgb), 0.08),
            0 8px 24px rgba(var(--bg-primary-rgb), 0.9);
        border-color: rgba(var(--text-primary-rgb), 0.3);
    }

    50% {
        box-shadow:
            0 0 0 1px rgba(var(--bg-primary-rgb), 0.8),
            0 0 60px rgba(var(--text-primary-rgb), 0.15),
            0 8px 24px rgba(var(--bg-primary-rgb), 0.9);
        border-color: rgba(var(--text-primary-rgb), 0.5);
    }
}

.hero-profile-img:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(var(--text-primary-rgb), 0.7);
    box-shadow:
        0 0 0 1px rgba(var(--bg-primary-rgb), 0.8),
        0 0 80px rgba(var(--text-primary-rgb), 0.25),
        0 12px 32px rgba(var(--bg-primary-rgb), 0.95);
    animation-play-state: paused;
}

/* Hero Social Links */
.hero-social-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-md);
}

.hero-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--text-primary-rgb), 0.04);
    border: 1px solid rgba(var(--text-primary-rgb), 0.15);
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.hero-social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(var(--text-primary-rgb), 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-social-link:hover::before,
.hero-social-link:focus::before {
    opacity: 1;
}

.hero-social-link:hover,
.hero-social-link:focus {
    background: rgba(var(--text-primary-rgb), 0.08);
    border-color: rgba(var(--text-primary-rgb), 0.4);
    color: var(--text-primary);
    transform: translateY(-3px) scale(1.1);
    box-shadow:
        0 8px 20px rgba(var(--bg-primary-rgb), 0.8),
        0 0 30px rgba(var(--text-primary-rgb), 0.1);
}

.hero-social-link i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.hero-social-link:hover i,
.hero-social-link:focus i {
    transform: scale(1.15);
}

.hero-social-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* Staggered social icon pop-in */
.hero-social-link:nth-child(1) {
    animation: iconPopIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1s backwards;
}

.hero-social-link:nth-child(2) {
    animation: iconPopIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1.1s backwards;
}

.hero-social-link:nth-child(3) {
    animation: iconPopIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1.2s backwards;
}

@keyframes iconPopIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Cinematic Frame Accents */
.hero-frame-tl,
.hero-frame-tr,
.hero-frame-bl,
.hero-frame-br {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
}

.hero-frame-tl {
    top: 0;
    left: 0;
    border-top: 2px solid rgba(var(--text-primary-rgb), 0.25);
    border-left: 2px solid rgba(var(--text-primary-rgb), 0.25);
    animation: frameReveal 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.8s forwards;
}

.hero-frame-tr {
    top: 0;
    right: 0;
    border-top: 2px solid rgba(var(--text-primary-rgb), 0.25);
    border-right: 2px solid rgba(var(--text-primary-rgb), 0.25);
    animation: frameReveal 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.9s forwards;
}

.hero-frame-bl {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid rgba(var(--text-primary-rgb), 0.25);
    border-left: 2px solid rgba(var(--text-primary-rgb), 0.25);
    animation: frameReveal 1.2s cubic-bezier(0.23, 1, 0.32, 1) 1s forwards;
}

.hero-frame-br {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid rgba(var(--text-primary-rgb), 0.25);
    border-right: 2px solid rgba(var(--text-primary-rgb), 0.25);
    animation: frameReveal 1.2s cubic-bezier(0.23, 1, 0.32, 1) 1.1s forwards;
}

@keyframes frameReveal {
    from {
        opacity: 0;
        width: 0;
        height: 0;
    }

    to {
        opacity: 0.35;
        width: 60px;
        height: 60px;
    }
}

/* Home Cards */
.home-cards {
    display: flex;
    gap: clamp(1.5rem, 5vw, 3rem);
    width: 100%;
    max-width: 750px;
    justify-content: center;
    flex-shrink: 0;
    padding-bottom: var(--spacing-md);
}

.home-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.home-card:nth-child(1) {
    animation-delay: 1.3s;
}

.home-card:nth-child(2) {
    animation-delay: 1.5s;
}

.home-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(var(--text-primary-rgb), 0.06);
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Icon fill from bottom */
.home-card-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--text-primary-rgb), 0.1);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-card-icon i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.home-card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-card-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    transition: letter-spacing 0.3s ease;
}

.home-card-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    transition: color 0.3s ease;
}

.home-card-arrow {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Shimmer sweep */
.home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--text-primary-rgb), 0.08), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient border glow */
.home-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, transparent, var(--text-primary), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(var(--text-primary-rgb), 0.15);
}

.home-card:hover::before {
    left: 100%;
}

.home-card:hover::after {
    opacity: 0.3;
}

/* Icon: scale + rotate + fill */
.home-card:hover .home-card-icon {
    background: rgba(var(--text-primary-rgb), 0.1);
    transform: scale(1.15) rotate(8deg);
}

.home-card:hover .home-card-icon::before {
    transform: translateY(0);
}

.home-card:hover .home-card-icon i {
    transform: scale(1.1);
    animation: iconBounce 0.6s ease;
}

/* Title letter-spacing expand */
.home-card:hover .home-card-title {
    letter-spacing: 0.03em;
}

.home-card:hover .home-card-sub {
    color: var(--text-primary);
}

/* Arrow: slide + pulse */
.home-card:hover .home-card-arrow {
    color: var(--text-primary);
    opacity: 1;
    transform: translateX(8px);
    animation: arrowSlide 0.8s ease infinite;
}