.hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    margin-top: -2rem;
    padding: 60px 0 60px;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(6, 182, 212, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-areas:
        "content visual"
        "buttons visual"
        "social  visual";
    column-gap: 4rem;
    align-items: start;
}

.hero-content { grid-area: content; }
.hero-visual  { grid-area: visual; align-self: center; }
.hero-buttons { grid-area: buttons; }
.social-links { grid-area: social; }

.hero-greeting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #06b6d4, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-title {
    font-size: 58px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ── Subtitle + badge always stacked ─────────────────────────────────────── */
.hero-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    display: block;
    width: fit-content;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(99, 102, 241, 0.1));
    border-left: 3px solid #06b6d4;
    padding: 6px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0;
}

.hero-description {
    color: #475569;
    font-size: 18px;
    line-height: 1.9;
    margin-bottom: 2rem;
    max-width: 480px;
    text-align: justify;
}

.hero-available {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.09);
    border-left: 3px solid #22c55e;
    color: #15803d;
    font-size: 18px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 0 8px 8px 0;
    margin: 0;
    letter-spacing: 0.2px;
}

.hero-available-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
    animation: heroDotPulse 2s ease-in-out infinite;
}

@keyframes heroDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

[data-theme="dark"] .hero-available {
    background: rgba(34, 197, 94, 0.12);
    border-left-color: #22c55e;
    color: #86efac;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    margin-bottom: 2.5rem;
    max-width: 660px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 140px;
    padding-left: 18px !important;
    padding-right: 18px !important;
    font-size: 14px !important;
}

.btn-primary {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
    border-radius: 999px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(6, 182, 212, 0.5);
    filter: brightness(1.05);
}

.hero-buttons .btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #374151;
    border-radius: 999px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.hero-buttons .btn-outline:hover {
    border-color: #06b6d4;
    color: #0284c7;
    background: rgba(6, 182, 212, 0.05);
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.hero-visual-inner {
    position: relative;
    width: 440px;
    height: 440px;
}

.hero-visual-frame {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 2px solid transparent;
}

.hero-visual-frame:nth-child(1) {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--border-color);
}

.hero-visual-frame:nth-child(2) {
    border-color: var(--primary-color);
    transform: rotate(3deg);
    opacity: 0.25;
    pointer-events: none;
}

.hero-visual-frame:nth-child(3) {
    border-color: var(--accent-color);
    transform: rotate(-3deg);
    opacity: 0.25;
    pointer-events: none;
}

.hero-stats {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 10px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.stats-1 {
    top: 0;
    right: -2rem;
    animation: floatBadge 3s ease-in-out infinite;
}

.stats-2 {
    bottom: 4rem;
    left: -3rem;
    animation: floatBadge 3s ease-in-out 1s infinite;
}

.stats-3 {
    bottom: 0;
    right: -2rem;
    animation: floatBadge 3s ease-in-out 2s infinite;
}

.hero-stats-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
}

.hero-stats-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-stats-value {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.scroll-indicator-line {
    width: 1px;
    height: 44px;
    background: var(--border-color);
    position: relative;
    overflow: hidden;
}

.scroll-indicator-dot {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: scrollDot 1.6s ease-in-out infinite;
}

@keyframes scrollDot {
    0% {
        top: -4px;
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.hero-album {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-album-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-album-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-album-slide.active {
    display: block;
}

.hero-album-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.hero-album-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.hero-album-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-album-btn i {
    font-size: 12px;
}

.hero-album-prev {
    left: -44px;
}

.hero-album-next {
    right: -44px;
}

.hero-album-slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-album-slide-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.hero-album-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.hero-album-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-album-dot.active {
    background: #fff;
}

.hero-fallback-img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 15px;
}


@keyframes floatBadge {
    0% {
        transform: translateY(0px);
    }

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

    100% {
        transform: translateY(0px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-stats {
        animation: none !important;
    }

    .scroll-indicator-dot {
        animation: none !important;
    }
}

[dir="rtl"] .stats-1 {
    right: auto;
    left: -2rem;
}

[dir="rtl"] .stats-2 {
    left: auto;
    right: -3rem;
}

[dir="rtl"] .stats-3 {
    right: auto;
    left: -2rem;
}

[dir="rtl"] .hero-album-prev {
    left: auto;
    right: -44px;
}

[dir="rtl"] .hero-album-next {
    right: auto;
    left: -44px;
}

[dir="rtl"] .hero-album-btn i {
    transform: scaleX(-1);
}

[dir="rtl"] .hero-description {
    text-align: justify;
}

[dir="rtl"] .hero-subtitle {
    border-left: none;
    border-right: 3px solid #06b6d4;
    border-radius: 8px 0 0 8px;
}

[dir="rtl"] .hero-available {
    border-left: none;
    border-right: 3px solid #22c55e;
    border-radius: 8px 0 0 8px;
}

@media (max-width: 1200px) {
    .hero-title {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-visual-inner {
        width: 370px;
        height: 370px;
    }
}

@media (max-width: 1024px) {
    .hero {
        margin-top: -1.5rem;
        padding: 48px 0 48px;
    }

    .hero-container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero-title {
        font-size: 44px;
    }

    .hero-visual-inner {
        width: 300px;
        height: 300px;
    }

    .stats-1 {
        right: 0;
    }

    .stats-3 {
        right: 0;
    }

    .stats-2 {
        left: -1rem;
    }
}

@media (min-width: 993px) {
    .hero-description {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .hero-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .hero-greeting {
        justify-content: center;
    }

    .hero-description {
        max-width: 100%;
        text-align: justify;
    }

    /* subtitle + badge centred on single-column layout */
    .hero-identity {
        align-items: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 540px;
    }

    .hero .social-links {
        justify-content: center;
        width: 100%;
    }

    .hero-visual {
        margin-top: 0;
    }

    .hero-stats {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 768px) {

    /* Remove the full-viewport dual radial-gradient overlay on mobile.
       It covers the entire hero (100dvh) and is a paint hotspot for the
       tile rasterizer on the very first frame. On a small screen the
       subtle 5-6% opacity gradient is invisible anyway. */
    .hero-background {
        background: none;
    }

    .hero {
        margin-top: -1rem;
        padding: 24px 16px 32px !important;
        box-sizing: border-box !important;
    }


    .hero-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 24px !important;
        padding: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }


    .hero-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }


    .hero-title {
        font-size: 32px !important;
        line-height: 1.2 !important;
    }

    .hero-greeting {
        font-size: 13px;
        letter-spacing: 2px;
        justify-content: center;
    }

    .hero-identity {
        align-items: center;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
        max-width: calc(100% - 2px);
        box-sizing: border-box;
    }

    .hero-available {
        font-size: 15px;
    }

    .hero-description {
        font-size: 16px;
        max-width: 100%;
        text-align: justify;
        padding: 0;
    }


    /* Buttons — 2-up then single wrap on very small screens */
    .hero-buttons {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 400px !important;
        gap: 0.6rem !important;
        margin: 0 auto 1.5rem !important;
    }

    .hero-btn {
        flex: 1 1 calc(50% - 0.6rem) !important;
        min-width: 130px !important;
        max-width: 100% !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        white-space: nowrap !important;
        justify-content: center !important;
    }

    /* "Let's Work Together" is longest — give it full row on its own */
    .hero-buttons .hero-btn:first-child {
        flex: 1 1 100% !important;
    }


    .hero .social-links {
        justify-content: center;
    }


    .hero-stats,
    .stats-1,
    .stats-2,
    .stats-3 {
        display: none !important;
    }

    .scroll-indicator {
        display: none;
    }


    .hero-visual {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 340px !important;
        height: 340px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        position: relative !important;
    }


    .hero-visual-inner {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 340px !important;
        height: 340px !important;
        margin: 0 auto !important;
        overflow: visible !important;
        position: relative !important;
    }


    .hero-visual-frame:nth-child(1) {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        border-radius: 16px !important;
    }


    .hero-visual-frame:nth-child(2),
    .hero-visual-frame:nth-child(3) {
        display: none !important;
    }


    .hero-album {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
    }


    .hero-album-slides {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
    }


    .hero-album-slide {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }


    .hero-album-slide img,
    .hero-album-slide-link img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: top center !important;
        border-radius: 0 !important;
    }


    .hero-album-slide-link {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
    }


    .hero-fallback-img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: top center !important;
        border-radius: 0 !important;
    }


    .hero-album-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
    }

    .hero-album-prev {
        left: 8px !important;
        right: auto !important;
    }

    .hero-album-next {
        right: 8px !important;
        left: auto !important;
    }

    [dir="rtl"] .hero-album-prev {
        right: 8px !important;
        left: auto !important;
    }

    [dir="rtl"] .hero-album-next {
        left: 8px !important;
        right: auto !important;
    }


    .hero-album-prev {
        left: 8px;
    }

    .hero-album-next {
        right: 8px;
    }
}

@media (min-width: 1440px) {
    .hero-title {
        font-size: 68px;
    }

    .hero-description {
        font-size: 18px;
        max-width: 100%;
    }
}

@media (min-width: 1920px) {
    .hero-title {
        font-size: 78px;
    }

    .hero-description {
        font-size: 20px;
        max-width: 100%;
    }
}

@media (min-width: 2560px) {
    .hero-title {
        font-size: 96px;
    }

    .hero-description {
        font-size: 22px;
        max-width: 100%;
    }
}

/* ── Dark mode overrides ─────────────────────────────────────────────────── */
[data-theme="dark"] .hero-subtitle {
    color: #e2e8f0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(99, 102, 241, 0.15));
}

[data-theme="dark"] .hero-description {
    color: #94a3b8;
}

[data-theme="dark"] .hero-buttons .btn-outline {
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .hero-buttons .btn-outline:hover {
    border-color: #06b6d4;
    color: #60a5fa;
    background: rgba(6, 182, 212, 0.1);
}

[data-theme="dark"] .hero-stats {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .hero-stats-value {
    color: #e2e8f0;
}


@media (max-width: 480px) {
    .hero {
        margin-top: -0.75rem;
    }

    .hero-title {
        font-size: 28px !important;
    }

    .hero-visual,
    .hero-visual-inner {
        max-width: 280px !important;
        height: 280px !important;
    }

    .hero-buttons {
        max-width: 320px !important;
        gap: 0.5rem !important;
    }

    .hero-btn {
        padding: 11px 14px !important;
        font-size: 13px !important;
        min-width: 110px !important;
    }
}

@media (min-width: 769px) {

    .hero {
        padding-bottom: 40px !important;
        margin-bottom: 0 !important;
    }
}

/* ── Scroll-down indicator ────────────────────────────────────────────────── */
.scroll-down-indicator {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    z-index: 2;
}

.scroll-down-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.scroll-down-indicator:hover .scroll-down-label {
    color: #06b6d4;
}

.scroll-down-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, #06b6d4, transparent);
    position: relative;
    border-radius: 2px;
}

.scroll-down-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #06b6d4;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDownDot 2s ease-in-out infinite;
}

@keyframes scrollDownDot {
    0%   { top: 0;    opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

[data-theme="dark"] .scroll-down-label {
    color: #475569;
}

@media (max-width: 992px) {
    .scroll-down-indicator {
        display: none;
    }
}