/* ============================================
   MODERN 2025 HERO SECTION
   Animated gradient background, rotating titles, CSS 3D sphere
   ============================================ */

/* Define color variables for this section */
:root {
    --color-primary: #9d4edd;
    --color-primary-light: #a78bfa;
    --color-primary-dark: #7b2cbf;
    --color-accent: #ffd60a;
    --color-accent-dark: #f59e0b;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-primary: rgba(157, 78, 221, 0.3);
}

/* === HERO CONTAINER === */
.hero-2025 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 6rem 0 4rem;
    isolation: isolate;
}

/* === ANIMATED GRADIENT BACKGROUND === */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    opacity: 0.6;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    will-change: transform;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.6) 0%, transparent 70%);
    top: -15%;
    left: -10%;
    animation: floatOrb 25s ease-in-out infinite;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 214, 10, 0.5) 0%, transparent 70%);
    bottom: -10%;
    right: -5%;
    animation: floatOrb 20s ease-in-out infinite;
    animation-delay: 8s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.5) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: floatOrb 30s ease-in-out infinite;
    animation-delay: 16s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(40px, -40px) scale(1.15);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* === PARTICLE NETWORK === */
.particle-network {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-primary-light);
    border-radius: 50%;
    left: var(--x);
    top: var(--y);
    animation: particlePulse 4s ease-in-out infinite;
    animation-delay: calc(var(--x) * 0.02s);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.6);
}

.particle::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 80px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(157, 78, 221, 0.3),
        transparent
    );
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(var(--angle, 45deg));
}

@keyframes particlePulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.8);
    }
}

/* === MAIN CONTENT CONTAINER === */
.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 4rem;
    align-items: center;
}

/* === LEFT SIDE: CONTENT === */
.hero-left {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* === PROFILE IMAGE === */
.profile-card {
    flex-shrink: 0;
    position: relative;
}

.profile-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-primary);
    box-shadow:
        0 10px 40px rgba(157, 78, 221, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

.profile-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    opacity: 0.6;
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.8;
    }
}

/* === TEXT CONTENT === */
.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* === ROTATING TITLES === */
.title-rotator {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    min-height: 3rem;
    flex-wrap: wrap;
}

.title-prefix {
    color: var(--text-secondary);
    font-weight: 600;
}

.rotating-text {
    position: relative;
    display: inline-block;
    min-width: 280px;
    height: 3rem;
    overflow: hidden;
}

.title-item {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transform: translateY(30px) rotateX(90deg);
    transform-origin: center top;
    color: var(--color-primary-light);
    white-space: nowrap;
    transition: all 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    perspective: 1000px;
}

.title-item.active {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

.title-item.exit {
    opacity: 0;
    transform: translateY(-30px) rotateX(-90deg);
    transition: all 0.5s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

/* Animated cursor */
.rotating-text::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: var(--color-accent);
    animation: blink 1.2s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* === BIO TEXT === */
.hero-bio {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0;
}

/* === META INFO === */
.hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.meta-divider {
    color: var(--color-primary);
    font-weight: 700;
}

/* === CTA BUTTONS === */
.hero-ctas {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(157, 78, 221, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.cta-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cta-primary:hover::before {
    opacity: 1;
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(157, 78, 221, 0.6);
}

.cta-primary:active {
    transform: translateY(-1px);
}

.cta-primary span,
.cta-primary svg {
    position: relative;
    z-index: 1;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.cta-primary:hover .arrow-icon {
    transform: translateX(5px);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(157, 78, 221, 0.05);
    color: var(--color-primary-light);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.cta-secondary:hover {
    background: rgba(157, 78, 221, 0.15);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(157, 78, 221, 0.2);
}

/* === TAGS === */
.hero-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-tag {
    padding: 0.5rem 1.125rem;
    background: rgba(157, 78, 221, 0.12);
    border: 1px solid var(--border-primary);
    border-radius: 9999px;
    color: var(--color-primary-light);
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-tag:hover {
    background: rgba(157, 78, 221, 0.2);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* === RIGHT SIDE: CSS 3D SPHERE === */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 400px;
}

.sphere-container {
    width: 350px;
    height: 350px;
    perspective: 1200px;
    perspective-origin: center;
}

.sphere {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateSphere 30s linear infinite;
}

@keyframes rotateSphere {
    from {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    to {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

.sphere-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(157, 78, 221, 0.4);
    border-radius: 50%;
    animation: ringGlow 4s ease-in-out infinite;
}

.ring-1 {
    transform: rotateX(0deg) rotateY(0deg);
    animation-delay: 0s;
    border-color: rgba(157, 78, 221, 0.5);
}

.ring-2 {
    transform: rotateX(60deg) rotateY(0deg);
    animation-delay: 1.3s;
    border-color: rgba(167, 139, 250, 0.4);
}

.ring-3 {
    transform: rotateX(120deg) rotateY(0deg);
    animation-delay: 2.6s;
    border-color: rgba(196, 181, 253, 0.3);
}

@keyframes ringGlow {
    0%, 100% {
        border-color: rgba(157, 78, 221, 0.4);
        box-shadow:
            0 0 20px rgba(157, 78, 221, 0.3),
            inset 0 0 20px rgba(157, 78, 221, 0.1);
    }
    50% {
        border-color: rgba(255, 214, 10, 0.6);
        box-shadow:
            0 0 40px rgba(255, 214, 10, 0.5),
            inset 0 0 30px rgba(255, 214, 10, 0.2);
    }
}

.sphere-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 214, 10, 0.9),
        rgba(157, 78, 221, 0.8)
    );
    border-radius: 50%;
    box-shadow:
        0 0 60px rgba(157, 78, 221, 0.8),
        0 0 100px rgba(255, 214, 10, 0.4),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
    animation: corePulse 3s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow:
            0 0 60px rgba(157, 78, 221, 0.8),
            0 0 100px rgba(255, 214, 10, 0.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow:
            0 0 80px rgba(157, 78, 221, 1),
            0 0 120px rgba(255, 214, 10, 0.6);
    }
}

/* === RESPONSIVE DESIGN === */

/* Tablet landscape (1024px - 1279px) */
@media (max-width: 1279px) {
    .hero-content {
        grid-template-columns: 1.5fr 1fr;
        gap: 3rem;
    }

    .sphere-container {
        width: 300px;
        height: 300px;
    }
}

/* Tablet portrait (768px - 1023px) */
@media (max-width: 1023px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-left {
        flex-direction: column;
        align-items: center;
    }

    .hero-text {
        align-items: center;
    }

    .hero-bio,
    .title-rotator {
        text-align: center;
    }

    .title-rotator {
        justify-content: center;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-meta {
        justify-content: center;
    }

    .hero-tags {
        justify-content: center;
    }

    .sphere-container {
        width: 280px;
        height: 280px;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .hero-2025 {
        padding: 5rem 0 3rem;
        min-height: auto;
    }

    .hero-container {
        padding: 0 1.25rem;
    }

    .hero-left {
        gap: 1.5rem;
    }

    .profile-image-wrapper {
        width: 140px;
        height: 140px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .title-rotator {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
        min-height: 4rem;
    }

    .rotating-text {
        min-width: 200px;
        height: 2rem;
    }

    .hero-bio {
        font-size: 1rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Hide sphere on mobile for performance */
    .hero-right {
        display: none;
    }

    /* Reduce orb sizes */
    .orb-1 {
        width: 400px;
        height: 400px;
    }

    .orb-2 {
        width: 350px;
        height: 350px;
    }

    .orb-3 {
        width: 300px;
        height: 300px;
    }
}

/* Small mobile (up to 480px) */
@media (max-width: 480px) {
    .hero-2025 {
        padding: 4rem 0 2rem;
    }

    .hero-text {
        gap: 1.25rem;
    }

    .profile-image-wrapper {
        width: 120px;
        height: 120px;
    }

    .hero-name {
        font-size: 1.75rem;
    }

    .title-rotator {
        font-size: 1.125rem;
    }

    .rotating-text {
        min-width: 180px;
    }

    .cta-primary,
    .cta-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-2025 *,
    .hero-2025 *::before,
    .hero-2025 *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
