/*==========================================================
    Home hero (design B "Modern split") — Views/Home/Index.cshtml
    Hero -> floating stats bar -> "What I Do Best" + "Platforms I work with" card.
    Every class is prefixed hb- so the legacy .section-hero / .Hero__* rules
    in style.css and the Index inline <style> cannot leak in.
    Colours, type and radii come from tokens.css.
==========================================================*/

.hb-hero {
    position: relative;
    overflow: hidden;
    /* top padding clears the fixed .Header (76px desktop, 66px mobile) */
    padding: 92px clamp(20px, 5.5vw, 80px) 0;
    background:
        radial-gradient(900px 500px at 85% 20%, color-mix(in srgb, var(--brand) 11%, #fff) 0%, rgba(255, 241, 227, 0) 60%),
        radial-gradient(700px 400px at 0% 100%, #eef2f7 0%, rgba(238, 242, 247, 0) 60%),
        var(--color-bg);
    font-family: var(--font-sans);
    color: var(--color-text);
}

.hb-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    align-items: end;
    max-width: 1330px;
    margin: 0 auto;
}

.hb-copy { padding: 0 0 90px; }

/* ---------- status + phone ---------- */
.hb-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.hb-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium, 500);
    line-height: 1.3;
    text-decoration: none;
}

.hb-pill--status { background: var(--color-success-soft); color: var(--color-success-text); }
.hb-pill--status .hb-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--color-success);
    animation: hb-pulse 2s infinite;
}
.hb-pill--phone { background: #fff; border: 1px solid var(--color-border); color: var(--color-neutral-700); }
.hb-pill--phone i { color: var(--color-primary); }
.hb-pill--phone:hover, .hb-pill--phone:focus-visible { border-color: var(--color-primary); color: var(--color-primary-strong); }

@keyframes hb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); }
    70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ---------- name, role, intro ---------- */
/* h1 wraps the name and the role line; each span keeps its own look. */
.hb-h1 { margin: 0; font-size: inherit; line-height: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; }
.hb-name {
    display: block;
    margin: 18px 0 0;
    font-size: clamp(2.6rem, 4.4vw + .5rem, 4.4rem);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: uppercase;
    color: var(--color-text);
}

.hb-role {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 0;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--color-primary-strong);
}
.hb-role::before { content: ""; flex: none; width: 34px; height: 3px; border-radius: 3px; background: var(--color-primary-bright); }

.hb-intro { margin: 18px 0 0; max-width: 560px; font-size: var(--fs-base); line-height: 1.75; color: var(--color-text-muted); }
/* the Index inline <style> sets .typed { font-size: 16px !important } */
.hb-intro .typed,
.hb-intro .hb-typed { font-size: inherit !important; font-weight: 600; color: var(--color-text); }
.hb-intro .typed-cursor { font-size: inherit; color: var(--color-primary); }

/* ---------- buttons + trust line ---------- */
.hb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s, color .2s, transform .2s;
}
.hb-btn--primary { background: var(--gradient-primary); color: var(--color-on-primary); box-shadow: var(--shadow-primary); }
.hb-btn--primary:hover, .hb-btn--primary:focus-visible { background: var(--gradient-primary-hover); color: var(--color-on-primary); transform: translateY(-2px); }
.hb-btn--secondary { background: #fff; color: var(--color-text); border: 1.5px solid var(--color-text); }
.hb-btn--secondary:hover, .hb-btn--secondary:focus-visible { background: var(--color-text); color: #fff; }

.hb-trust { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: var(--fs-sm); color: var(--color-text-muted); }
.hb-trust i { color: var(--color-primary); }
.hb-trust b { color: var(--color-text); }

/* ---------- social buttons ---------- */
.hb-socials { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.hb-socials a {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--color-border);
    color: var(--color-neutral-700);
    font-size: 18px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.hb-socials a:hover, .hb-socials a:focus-visible { background: var(--color-primary-strong); border-color: var(--color-primary-strong); color: #fff; transform: translateY(-2px); }
.hb-socials a::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--color-neutral-900);
    color: #fff;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
}
.hb-socials a:hover::after, .hb-socials a:focus-visible::after { opacity: 1; }
.hb-teams { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: currentColor; font: 800 13px/1 var(--font-sans); }
.hb-teams span { color: #fff; }
.hb-socials a:hover .hb-teams span, .hb-socials a:focus-visible .hb-teams span { color: var(--color-primary-strong); }

/* ---------- photo ---------- */
.hb-visual { position: relative; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; min-height: 600px; }
/* margin-left centres ring/blob so transform stays free for the animations */
.hb-ring {
    position: absolute; left: 50%; bottom: 20px;
    width: 600px; height: 600px; margin-left: -300px;
    border-radius: 50%;
    border: 2px dashed color-mix(in srgb, var(--brand) 25%, transparent);
    animation: hb-spin 60s linear infinite;
}
.hb-blob {
    position: absolute; left: 50%; bottom: 60px;
    width: 510px; height: 510px; margin-left: -255px;
    border-radius: 44% 56% 62% 38% / 44% 40% 60% 56%;
    background: linear-gradient(145deg, var(--brand-light), var(--color-primary-bright));
    opacity: .9;
    animation: hb-bubble 12s ease-in-out infinite;
}
.hb-photo { position: relative; z-index: 1; width: 600px; max-width: 100%; height: auto; }

/* bubble: the outline morphs while it gently floats and breathes */
@keyframes hb-bubble {
    0%   { border-radius: 44% 56% 62% 38% / 44% 40% 60% 56%; transform: translateY(0) scale(1) rotate(0deg); }
    25%  { border-radius: 58% 42% 38% 62% / 52% 60% 40% 48%; transform: translateY(-14px) scale(1.03) rotate(6deg); }
    50%  { border-radius: 38% 62% 56% 44% / 62% 44% 56% 38%; transform: translateY(-6px) scale(.98) rotate(-4deg); }
    75%  { border-radius: 60% 40% 44% 56% / 40% 58% 42% 60%; transform: translateY(-18px) scale(1.02) rotate(3deg); }
    100% { border-radius: 44% 56% 62% 38% / 44% 40% 60% 56%; transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes hb-spin { to { transform: rotate(360deg); } }

.hb-float {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: var(--shadow-md);
    font-size: 13px;
    color: var(--color-text);
}
/* badges sit in the empty space beside the person, never over face or body
   (photo is bottom-aligned in .hb-visual) */
.hb-float { line-height: 1.3; }
.hb-float--experience { top: 130px; left: 0; font-weight: 700; }
.hb-float--upwork { top: 110px; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
.hb-float--ai { bottom: 100px; right: 0; font-weight: 700; }
.hb-upwork-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); background: #14a800; color: #fff; font-size: 12px; font-weight: 600; }

.hb-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 17px;
}
.hb-float .hb-ico { width: 34px; height: 34px; font-size: 15px; }

/* ---------- stats bar ---------- */
.hb-stats {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1150px;
    margin: -48px auto 0;
    padding: 22px 10px;
    list-style: none;
    border-radius: 24px;
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .14);
}
.hb-stat { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 10px; border-right: 1px solid var(--color-border); }
.hb-stat:last-child { border-right: 0; }
.hb-stat__value { display: block; font-size: 1.6rem; line-height: 1.1; font-weight: 800; color: var(--color-text); }
.hb-stat__value--text { font-size: 1.05rem; }
.hb-stat__label { font-size: 13px; color: var(--color-text-subtle); }

/* ---------- scroll cue ---------- */
.hb-scroll { display: flex; justify-content: center; padding: 22px 0 6px; }
.hb-scroll a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--color-text-subtle); text-decoration: none; }
.hb-mouse { position: relative; width: 26px; height: 40px; border: 2px solid var(--color-neutral-400); border-radius: 14px; }
.hb-mouse::after { content: ""; position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--color-primary); animation: hb-wheel 1.6s infinite; }
@keyframes hb-wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- What I Do Best + Platforms card ---------- */
.hb-below { padding: 40px clamp(20px, 5.5vw, 80px) 50px; background: var(--color-bg); }
.hb-card { max-width: 1330px; margin: 0 auto; overflow: hidden; border: 1px solid var(--color-border); border-radius: 24px; background: #fff; box-shadow: var(--shadow-sm); }
.hb-card__top { padding: 28px; }
.hb-heading { margin: 0 0 18px; font-size: 1.35rem; font-weight: 700; color: var(--color-text); }
.hb-heading span { color: var(--color-primary); }

/* minmax(0, 1fr): columns stay equal and inside the card even when a title is long */
.hb-best { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.hb-best-card { min-width: 0; }
.hb-best-card h3, .hb-best-card p { overflow-wrap: break-word; }
.hb-best-card {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px 14px;
    align-content: start;
    padding: 18px 30px 18px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.hb-best-card:hover, .hb-best-card:focus-visible { border-color: var(--color-primary-soft-border); box-shadow: var(--shadow-md); transform: translateY(-4px); color: inherit; }
.hb-best-card .hb-ico { grid-row: span 2; width: 44px; height: 44px; font-size: 18px; }
.hb-best-card h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--color-text); }
.hb-best-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--color-text-subtle); }
.hb-best-card__go { position: absolute; top: 16px; right: 14px; font-size: 13px; color: var(--color-neutral-300); transition: color .2s, transform .2s; }
.hb-best-card:hover .hb-best-card__go, .hb-best-card:focus-visible .hb-best-card__go { color: var(--color-primary); transform: translateX(3px); }

.hb-platforms { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 20px; padding: 20px 28px; background: var(--color-surface-muted); border-top: 1px solid var(--color-border); }
.hb-platforms__label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--color-text-subtle); }
.hb-logos { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; justify-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
/* The logo files are 360x240 with the mark in the middle ~50px: crop the empty canvas instead of shrinking the mark. */
.hb-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; overflow: hidden; }
.hb-logo img { flex: none; width: auto; max-width: none; height: 150px; filter: grayscale(1); opacity: .6; transition: filter .25s, opacity .25s; }
.hb-logo:hover img { filter: none; opacity: 1; }

/* ---------- small laptop: 5 cards still fit in a row, icon sits above the title ---------- */
@media (min-width: 1200px) and (max-width: 1399px) {
    .hb-best-card { grid-template-columns: minmax(0, 1fr); }
    .hb-best-card .hb-ico { grid-row: auto; }
}

/* ---------- tablet ---------- */
@media (max-width: 1199px) {
    .hb-best { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hb-photo { width: 500px; }
    .hb-blob { width: 430px; height: 430px; margin-left: -215px; }
    /* not enough room beside the person: badges line up above the head */
    /* anchored from the bottom so they stay just above the head (photo ~326px tall here) */
    .hb-visual { min-height: 560px; }
    .hb-float--experience { top: auto; bottom: 400px; left: 0; }
    .hb-float--ai { top: auto; bottom: 400px; right: 0; }
    .hb-float--upwork { top: auto; bottom: 340px; right: 0; left: auto; flex-direction: row; align-items: center; }
    .hb-ring { width: 510px; height: 510px; margin-left: -255px; }
}

@media (max-width: 991px) {
    .hb-grid { grid-template-columns: 1fr; }
    .hb-copy { padding: 0 0 10px; }
    .hb-visual { min-height: 540px; }
    /* stacked layout: photo ~389px tall */
    .hb-float--experience, .hb-float--ai { bottom: 470px; }
    .hb-float--upwork { bottom: 410px; }
    .hb-stats { grid-template-columns: repeat(2, 1fr); gap: 16px 0; margin-top: -30px; }
    .hb-stat { justify-content: flex-start; border-right: 0; }
    .hb-platforms { grid-template-columns: 1fr; }
}

/* ---------- mobile ---------- */
@media (max-width: 767px) {
    /* bottom padding: .hb-scroll is hidden here, so without it the stats card
       sits on the hero's clipped edge and looks fused to "What I Do Best" */
    .hb-hero { padding: 80px 18px 28px; }
    .hb-name { font-size: 2.4rem; }
    .hb-actions .hb-btn { flex: 1 1 100%; }
    .hb-visual { min-height: 360px; }
    .hb-blob { width: 300px; height: 300px; margin-left: -150px; bottom: 40px; }
    .hb-ring { width: 350px; height: 350px; margin-left: -175px; }
    .hb-photo { width: 360px; }
    .hb-float { padding: 7px 10px; font-size: 12px; }
    .hb-visual { min-height: 420px; }
    .hb-float--experience { top: 0; bottom: auto; left: 0; }
    .hb-float--ai { top: 0; bottom: auto; right: 0; }
    .hb-float--upwork { top: 60px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }
    .hb-float .hb-ico { width: 28px; height: 28px; font-size: 13px; }
    /* smaller shadow so .hb-hero's overflow:hidden doesn't cut it off */
    .hb-stats { margin: -24px 0 0; padding: 18px 6px; box-shadow: 0 12px 30px rgba(15, 23, 42, .10); }
    .hb-scroll { display: none; }
    .hb-below { padding: 20px 18px 30px; }
    .hb-card__top { padding: 20px; }
    .hb-best { grid-template-columns: 1fr; }
    .hb-platforms { padding: 18px 20px; }
    .hb-logos { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    /* odd logo count: centre the last one instead of leaving it alone on the left */
    .hb-logo:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .hb-logo { height: 40px; }
    .hb-logo img { height: 115px; }
}

@media (prefers-reduced-motion: reduce) {
    .hb-pill--status .hb-dot,
    .hb-mouse::after,
    .hb-blob, .hb-ring { animation: none; }
    .hb-btn, .hb-socials a, .hb-best-card, .hb-best-card__go { transition: none; }
}
