/* ============================================================
   Hero section — full-viewport 2-column layout
   ============================================================ */

/* ── Section shell ───────────────────────────────────────── */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-bg);
}

/* ── Three.js canvas ─────────────────────────────────────── */
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Grid overlay ────────────────────────────────────────── */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(color-mix(in srgb, var(--color-accent) 6%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--color-accent) 6%, transparent) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 80% at 40% 50%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 40% 50%, black 30%, transparent 80%);
}

/* ── Radial glow blobs ───────────────────────────────────── */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 1;
}
.hero-blob-1 {
    width: 600px; height: 600px;
    top: -180px; left: -140px;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 18%, transparent), transparent 65%);
    animation: floatY 9s ease-in-out infinite;
}
.hero-blob-2 {
    width: 460px; height: 460px;
    bottom: -100px; right: -80px;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-accent-2) 13%, transparent), transparent 65%);
    animation: floatY 11s ease-in-out infinite reverse;
}

/* Bottom-left warm accent blob */
.hero-blob::after {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    bottom: 15%; left: 35%;
    border-radius: 50%;
    filter: blur(90px);
    background: radial-gradient(circle, rgba(35, 209, 139, 0.06), transparent 70%);
    pointer-events: none;
}

/* ── Inner 2-column grid ─────────────────────────────────── */
.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--nav-height) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    min-height: 100vh;
}

/* ── Left: text content ──────────────────────────────────── */
.hero-left {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-top: 1rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent-3);
    animation: fadeInUp 0.6s ease 0.1s both;
    padding: 0.3rem 0.9rem 0.3rem 0.75rem;
    border: 1px solid rgba(35, 209, 139, 0.25);
    border-radius: 50px;
    background: rgba(35, 209, 139, 0.06);
    width: fit-content;
}
.hero-eyebrow::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent-3);
    box-shadow: 0 0 8px rgba(35, 209, 139, 0.7);
    animation: pulseOpacity 2s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-name {
    font-family: 'Archivo', sans-serif;
    font-size: clamp(2.8rem, 6.5vw, 5.2rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.025em;
    background: var(--gradient-text);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation:
        heroNameReveal 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s both,
        gradientShift 8s ease-in-out 1.2s infinite;
}

/* ── Typewriter ──────────────────────────────────────────── */
.hero-typewriter {
    display: flex;
    align-items: center;
    gap: 0;
    height: 2.6rem;
    animation: fadeInUp 0.6s ease 0.45s both;
}

.typewriter-label {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.typewriter-text {
    font-family: 'Archivo', sans-serif;
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 600;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ── Tagline ─────────────────────────────────────────────── */
.hero-tagline {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 500px;
    animation: fadeInUp 0.6s ease 0.55s both;
}

/* ── Currently building ──────────────────────────────────── */
.hero-building {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    animation: fadeInUp 0.6s ease 0.62s both;
}

.hero-building-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-building-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent-3);
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(35,209,139,0.7);
    animation: pulseOpacity 2s ease-in-out infinite;
}

.hero-building-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.hero-building-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.7rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--color-border-dim);
    cursor: default;
    transition: border-color var(--t-fast), color var(--t-fast);
}
.hero-building-chip:hover {
    border-color: var(--color-border);
    color: var(--color-text);
}
.hero-building-chip svg { opacity: 0.7; flex-shrink: 0; }

/* ── CTA buttons ─────────────────────────────────────────── */
.hero-cta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeInUp 0.6s ease 0.65s both;
}

/* ── Social links ────────────────────────────────────────── */
.hero-socials {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    animation: fadeInUp 0.6s ease 0.75s both;
}

.hero-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.hero-social-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: rgba(108, 99, 255, 0.1);
    transform: translateY(-2px);
}

.hero-social-sep {
    width: 1px;
    height: 20px;
    background: var(--color-border);
    margin: 0 0.25rem;
}

.hero-social-email {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    padding: 0 0.5rem;
    transition: color var(--t-fast);
}
.hero-social-email:hover { color: var(--color-accent-2); }

/* ── Stats row ───────────────────────────────────────────── */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding-top: 0.5rem;
    animation: fadeInUp 0.6s ease 0.85s both;
    background: rgba(108, 99, 255, 0.06);
    border: 1px solid rgba(108, 99, 255, 0.14);
    border-radius: 14px;
    padding: 1rem 0.5rem;
    width: fit-content;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    padding: 0 1.5rem;
}

.hero-stat-number {
    font-family: 'Archivo', sans-serif;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 4px;
}

.hero-stat-divider {
    width: 1px;
    background: rgba(108, 99, 255, 0.2);
    align-self: stretch;
}

/* ── Right: profile image ────────────────────────────────── */
.hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease 0.5s both;
}

.profile-wrap {
    position: relative;
    width: clamp(220px, 28vw, 340px);
    height: clamp(220px, 28vw, 340px);
    flex-shrink: 0;
    animation: floatY 5s ease-in-out infinite;
}

/* Outer ambient glow */
.profile-wrap::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.22) 0%, rgba(0, 212, 255, 0.1) 50%, transparent 70%);
    z-index: 0;
    animation: pulseOpacity 4s ease-in-out infinite;
}

/* Rotating gradient ring */
.profile-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #6C63FF 0%, #00D4FF 40%, #6C63FF 70%, #00D4FF 100%);
    animation: spin 5s linear infinite;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 4px));
    z-index: 1;
}

/* Gap ring (dark background colour) */
.profile-gap {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    outline: 5px solid var(--color-bg);
    z-index: 2;
    pointer-events: none;
}

.profile-img {
    position: absolute;
    inset: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    z-index: 3;
}

/* Placeholder when image is missing */
.profile-placeholder {
    position: absolute;
    inset: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    border-radius: 50%;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    font-family: 'Archivo', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-2));
    color: var(--color-accent);
}

/* ── Scroll indicator ────────────────────────────────────── */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 3;
    opacity: 0.5;
    animation: fadeIn 1s ease 1.5s both;
}

.hero-scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: pulseOpacity 2s ease-in-out infinite;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        padding-top: calc(var(--nav-height) + 2rem);
        padding-bottom: 4rem;
        min-height: auto;
        gap: 2rem;
    }

    .hero-right {
        order: -1;
        margin-bottom: 0.5rem;
    }

    .profile-wrap {
        width: clamp(160px, 45vw, 220px);
        height: clamp(160px, 45vw, 220px);
    }

    .hero-left { align-items: center; }
    .hero-eyebrow { margin: 0 auto; }
    .hero-tagline { text-align: center; max-width: 100%; }
    .hero-building { justify-content: center; }
    .hero-cta { justify-content: center; }
    .hero-socials { justify-content: center; flex-wrap: wrap; }
    .hero-stats { justify-content: center; width: 100%; }
    .hero-typewriter { justify-content: center; }
    .hero-stat { padding: 0 1rem; }
}

@media (max-width: 480px) {
    .hero-name { font-size: clamp(2.2rem, 10vw, 2.8rem); }

    .hero-stats {
        width: 100%;
        justify-content: space-around;
        border-radius: 12px;
    }

    .hero-stat-number { font-size: 1.4rem; }

    .hero-cta { flex-direction: column; align-items: center; width: 100%; }
    .hero-cta .btn-primary,
    .hero-cta .btn-outline { width: 100%; justify-content: center; }

    .hero-social-email { font-size: 0.75rem; }
}
