/* ========== HERO ========== */
.hero-section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000000;
    z-index: 2;
}

.hero-bg-canvas-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#hero3DCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.85;
    pointer-events: none;
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 40%, transparent 0%, rgba(3,4,6,0.55) 100%);
    pointer-events: none;
}

.hero-scanlines {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0, 0, 0, 0.18) 3px, rgba(0, 0, 0, 0.18) 6px);
    opacity: 0.65;
}

.hero-mesh {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: 
        radial-gradient(ellipse 50% 40% at 20% 30%, rgba(6, 182, 212, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 80% 70%, rgba(139, 92, 246, 0.07) 0%, transparent 55%);
    pointer-events: none;
    animation: meshPulse 12s ease-in-out infinite alternate;
}

@keyframes meshPulse {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-container {
    position: relative;
    z-index: 50;
    max-width: 1250px;
    width: 100%;
    margin: 0 auto;
    padding: 8rem 1.5rem 4rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.hero-tags span {
    color: var(--color-primary);
}

.hero-grid {
    display: block;
    width: 100%;
    max-width: 100%;
}

/* Hero Name Animations */
.hero-heading {
    font-family: var(--font-mono);
    font-size: clamp(2.6rem, 4.8vw, 4.8rem);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 2.2rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    user-select: none;
    cursor: pointer;
}

.name-line {
    display: inline-block;
    white-space: nowrap;
}

.name-line.indent {
    margin-left: 8%;
}

.hero-char-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding: 0 1px;
}

.hero-char {
    display: inline-block;
    transform: translateY(125%);
    opacity: 0;
    transition: color 0.25s, text-shadow 0.25s, transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
}

.hero-char.scrambling {
    color: var(--color-primary);
    text-shadow: 0 0 16px var(--color-primary-glow), 0 0 30px rgba(139, 92, 246, 0.4);
}

.hero-heading:hover .hero-char {
    color: #ffffff;
    animation: charPulse 0.45s ease-in-out;
}

@keyframes charPulse {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.15); color: var(--color-primary); text-shadow: 0 0 20px var(--color-primary), 0 0 30px var(--color-accent); }
    100% { transform: translateY(0) scale(1); }
}

.hero-cursor-blink {
    display: inline-block;
    color: var(--color-primary);
    text-shadow: 0 0 24px var(--color-primary-glow);
    animation: blinkGlow 1s infinite alternate;
}

@keyframes blinkGlow {
    0% { opacity: 1; text-shadow: 0 0 24px var(--color-primary-glow); }
    100% { opacity: 0.2; text-shadow: 0 0 4px var(--color-primary-glow); }
}

.hero-bio {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    width: 100%;
    max-width: 100%;
    line-height: 1.7;
    font-weight: 400;
    margin-bottom: 2.5rem;
}        .hero-card-side {
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid var(--border-bright);
    border-radius: 1.5rem;
    padding: 0.75rem;
    backdrop-filter: blur(24px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    z-index: 30;
    overflow: hidden;
    width: 100%;
    max-width: 360px;
}

.hero-card-side:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 255, 255, 0.22);
    border-color: #ffffff;
}

.hero-portrait-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 500px;
    border-radius: 1.15rem;
    overflow: hidden;
    background: #141414;
}

.hero-portrait-img {
    position: relative;
    z-index: 999999 !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
    opacity: 1;
    filter: brightness(1.05) contrast(1.05);
    transition: transform 0.75s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-card-side:hover .hero-portrait-img {
    transform: scale(1.06);
}

.hero-portrait-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
}

.hero-portrait-badge {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 5;
}

.hero-badge-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.hero-badge-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.hero-card-side:hover .hero-avatar-name {
    color: var(--color-primary);
}

.hero-avatar-role {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.hero-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    width: 100%;
}

.btn-davies {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.95rem 1.7rem;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.35s, 
                background-color 0.3s, 
                border-color 0.3s,
                color 0.3s;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.btn-davies::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-davies:hover::after {
    transform: translateX(100%);
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    font-weight: 800;
    box-shadow: 0 4px 24px rgba(255, 255, 255, 0.3);
}

.btn-chip {
    padding: 0.45rem 1.05rem !important;
    font-size: 0.68rem !important;
    border-radius: 999px !important;
    letter-spacing: 0.08em !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: #e5e5e5;
    box-shadow: 0 10px 35px rgba(255, 255, 255, 0.5);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.2);
}

/* ========== INFINITE TICKER MARQUEE (CHIPS) ========== */
.marquee-band {
    overflow: hidden;
    white-space: nowrap;
    padding: 1rem 0;
    border-top: none;
    border-bottom: none;
    background: transparent;
    margin: 2.5rem 0;
    position: relative;
    z-index: 10;
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.marquee-content {
    display: inline-flex;
    gap: 1rem;
    align-items: center;
    padding-right: 1rem;
    animation: marquee 32s linear infinite;
}

.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(13, 17, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.08em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.tech-chip::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.tech-chip:hover {
    border-color: var(--color-primary);
    background: rgba(6, 182, 212, 0.12);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
    transform: translateY(-2px);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

