/* =========================================
   HOME PAGE CSS
   ========================================= */

/* ── Hero ───────────────────────────────────────────────────────── */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 2rem 3.5rem;
    position: relative;
    overflow: hidden;
}

/* Ambient glow */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(34, 211, 238, 0.09) 0%, transparent 70%),
        radial-gradient(ellipse 45% 45% at 85% 55%, rgba(15, 118, 110, 0.07) 0%, transparent 60%);
    pointer-events: none;
}

.hero_inner {
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
    position: relative;
}

/* ── Hero text ── */

.hero_tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hero_tag::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.hero_name {
    font-family: var(--font-sans);
    font-size: clamp(3rem, 6.5vw, 4.8rem);
    font-weight: 800;
    line-height: 1.0;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.hero_handle {
    font-family: var(--font-mono);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 1.25rem;
    white-space: nowrap;
}

.hero_description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 1.75rem;
    line-height: 1.75;
}

.hero_cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── Hero avatar ── */

.hero_avatar {
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Decorative pulsing rings */
.hero_avatar::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.25);
    animation: ringPulse 3s ease-in-out infinite;
}

.hero_avatar::after {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.1);
    animation: ringPulse 3s ease-in-out infinite 0.4s;
}

.hero_avatar-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.15),
        0 0 48px rgba(34, 211, 238, 0.22),
        0 8px 40px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    animation: avatarFloat 5s ease-in-out infinite;
}

/* ── Keyframes ── */

@keyframes heroItemIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroAvatarIn {
    from {
        opacity: 0;
        transform: scale(0.82);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ringPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.04);
        opacity: 0.55;
    }
}

@keyframes avatarFloat {

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

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

/* ── Hero entrance (fires on every page-entering transition) ── */

.page-content.page-entering .hero_avatar-img {
    animation:
        heroAvatarIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards 0.05s,
        avatarFloat 5s ease-in-out infinite 1s;
}

.page-content.page-entering .hero_tag {
    animation: heroItemIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) backwards 0.2s;
}

.page-content.page-entering .hero_name {
    animation: heroItemIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) backwards 0.32s;
}

.page-content.page-entering .hero_handle {
    animation: heroItemIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards 0.42s;
}

.page-content.page-entering .hero_description {
    animation: heroItemIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards 0.52s;
}

.page-content.page-entering .hero_cta {
    animation: heroItemIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards 0.62s;
}

/* ── Scroll-reveal system ─────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.65s ease,
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal--left {
    opacity: 0;
    transform: translateX(-32px);
    transition:
        opacity 0.65s ease,
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal.visible,
.reveal--left.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ── About ──────────────────────────────────────────────────────── */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 0.65rem;
    line-height: 1.75;
    font-size: 1rem;
}

.about-text p strong {
    color: var(--text-primary);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.25rem;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    cursor: default;
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.08);
}

.stat-card_num {
    font-family: var(--font-mono);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.45rem;
}

.stat-card_label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ── Tech Stack ─────────────────────────────────────────────────── */

.skills-bg {
    /* intentionally transparent */
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    transition: border-color var(--transition);
}

.skill-category:hover {
    border-color: rgba(34, 211, 238, 0.35);
}

.skill-category_title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ── Highlights ─────────────────────────────────────────────────── */

.highlights-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.highlight-item {
    display: flex;
    gap: 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.4rem;
    transition: border-color var(--transition), transform var(--transition);
}

.highlight-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.highlight-item_icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1.5;
}

.highlight-item_text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.97rem;
    margin-bottom: 0.3rem;
}

.highlight-item_text span {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .hero {
        padding: 3rem 2rem 2.5rem;
    }

    .hero_inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .hero_tag {
        justify-content: center;
    }

    .hero_description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero_cta {
        justify-content: center;
    }

    .hero_avatar {
        order: -1;
    }

    .hero_avatar-img {
        width: 140px;
        height: 140px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .hero_avatar-img {
        width: 120px;
        height: 120px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }
}