/* ===========================
   HERO SECTION
   =========================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background: var(--bg-primary);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: opacity 1s ease-in-out;
}

.hero-img-dark {
    opacity: 1;
}

.hero-img-light {
    opacity: 0;
}

@media (max-width: 768px) {
    .hero-bg img {
        object-position: center center;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    z-index: 1;
    transition: background var(--transition-smooth);
}

.hero-name-container {
    position: relative;
    z-index: 2;
    padding: 0 0 0 24px;
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: -80px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    box-sizing: border-box;
}

.hero-desc-container {
    position: relative;
    z-index: 2;
    padding: 0 20px 0 24px;
    max-width: 1000px;
    width: 100%;
    margin-left: auto;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    box-sizing: border-box;
}

/* Slower reveal animation specifically for the hero description */
.hero-desc-container.fade-in {
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    white-space: nowrap;
}

.hero-name em {
    font-style: italic;
    font-weight: 400;
}

.hero-tagline {
    position: absolute;
    top: 120px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #D4A373;
}

@keyframes travelBlackWord {
    0% {
        background-position: 100% 0;
    }

    33.33%,
    100% {
        background-position: 0% 0;
    }
}

.color-cycle {
    display: inline-block;
    background: linear-gradient(to right,
            #D4A373 0%,
            #D4A373 30%,
            #FFFFFF 35%,
            #FFFFFF 65%,
            #D4A373 70%,
            #D4A373 100%);
    background-size: 500% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: travelBlackWord 9s infinite linear;
    /* Anti-blur fixes */
    text-shadow: none !important;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    will-change: background-position;
}

.color-cycle.delay-1 {
    animation-delay: 0s;
}

.color-cycle.delay-2 {
    animation-delay: 3s;
}

.color-cycle.delay-3 {
    animation-delay: 6s;
}

.hero-subtext {
    font-size: 1rem;
    color: var(--text-primary);
    opacity: 0.9;
    font-weight: 300;
    max-width: 600px;
    margin: 30px 0 40px auto;
    line-height: 1.6;
    text-align: right;
}

/* Typewriter */
.typewriter-container {
    display: inline-block;
    position: relative;
    text-align: left;
    width: 7.2em;
    white-space: nowrap;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background-color: var(--accent);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {

    from,
    to {
        background-color: transparent
    }

    50% {
        background-color: var(--accent);
    }
}

/* Hero Buttons */
.hero-buttons {
    position: absolute;
    bottom: 100px;
    right: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

/* Hero Mobile Responsive */
@media (max-width: 768px) {
    .hero-name-container {
        padding-right: 0;
        margin-right: -30px;
        margin-top: -80px;
        margin-bottom: 80px;
    }

    .hero-desc-container {
        padding-right: 20px;
    }

    .hero-name {
        font-size: clamp(1.8rem, 6.5vw, 2.5rem);
    }

    .hero-tagline {
        top: 100px;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 0.55rem;
        letter-spacing: 0.1em;
        white-space: nowrap;
    }

    .hero-subtext {
        font-size: 0.85rem;
        max-width: 260px;
    }

    .hero-buttons {
        bottom: 90px;
        right: 20px;
        gap: 12px;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        padding: 14px 20px;
        font-size: 0.7rem;
        min-width: 160px;
    }

    /* Mobile Hero Description Animation */
    .mobile-line {
        display: inline-block;
        opacity: 0;
        transform: translateX(100vw);
    }

    .visible .mobile-line {
        animation: slideInRightMobile 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .mobile-line.m-delay-1 { animation-delay: 0.2s; }
    .mobile-line.m-delay-2 { animation-delay: 0.5s; }
    .mobile-line.m-delay-3 { animation-delay: 0.8s; }
    .mobile-line.m-delay-4 { animation-delay: 1.1s; }
    .mobile-line.m-delay-5 { animation-delay: 1.4s; }
}

@keyframes slideInRightMobile {
    0% {
        opacity: 0;
        transform: translateX(100vw);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Section Light Mode Contrast Overrides */
[data-theme="light"] .hero-img-dark {
    opacity: 0;
}

[data-theme="light"] .hero-img-light {
    opacity: 1;
}

[data-theme="light"] .hero-tagline {
    color: #4a4a4a;
    font-weight: 500;
}

[data-theme="light"] .color-cycle {
    background: linear-gradient(to right,
            #8A9A5B 0%,
            #8A9A5B 30%,
            #000000 35%,
            #000000 65%,
            #8A9A5B 70%,
            #8A9A5B 100%);
    background-size: 500% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .hero-name {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hero-subtext {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .hero-tagline {
    color: #D4A373;
}