/* Enhanced Hero Section */
.hero {
    margin-top: 106px;
    padding: 2rem 0 4rem 0;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        var(--accent) 0%,
        transparent 70%
    );
    opacity: 0.03;
    animation: rotate 20s linear infinite;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    transform-style: preserve-3d;
}

.hero-content {
    transform-style: preserve-3d;
    animation: fadeInUp 1s ease;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    /* Tagline is now the main title - keep orange */
    color: #ffa347;
    background: none;
    background-clip: initial;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    text-shadow:
        0 0 15px rgba(255, 163, 71, 0.6),
        0 0 30px rgba(255, 163, 71, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.6);
    transform: translateZ(30px);
    font-weight: 600;
}

.tagline {
    font-size: 1.1rem;
    color: #ffa347;
    margin-bottom: 1.5rem;
    transform: translateZ(20px);
    font-weight: 600;
}

.lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 2rem;
    transform: translateZ(15px);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    transform: translateZ(25px);
    justify-content: center;
    align-items: center;
}

.btn {
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    text-shadow: 0 0 12px rgba(160, 245, 200, 0.4);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(124, 92, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff0080, #ff8c00, #00e6a8, #7c5cff, #ff0080);
    background-size: 300% 300%;
    animation: gradientShift 6s linear infinite;
    z-index: -1;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.4s ease;
}

.btn:not(.ghost) {
    color: #a0f5c8;
    background: rgba(18, 18, 27, 0.9);
    background-image: 
        linear-gradient(rgba(18, 18, 27, 0.9), rgba(18, 18, 27, 0.9)),
        linear-gradient(135deg, #ff0080, #ff8c00, #00e6a8, #7c5cff);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.btn.ghost {
    color: #a0f5c8;
    background: rgba(18, 18, 27, 0.8);
    background-image: 
        linear-gradient(rgba(18, 18, 27, 0.8), rgba(18, 18, 27, 0.8)),
        linear-gradient(135deg, #7c5cff, #00e6a8, #ff8c00, #ff0080);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.btn:hover {
    transform: translateY(-4px) translateZ(20px) scale(1.05);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(124, 92, 255, 0.5),
        0 0 60px rgba(0, 230, 168, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #c0ffd8;
    text-shadow: 
        0 0 20px rgba(160, 245, 200, 0.8),
        0 0 40px rgba(160, 245, 200, 0.5);
}

.btn:hover::before {
    opacity: 1;
}

.skills-inline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    transform: translateZ(10px);
}

.skills-inline li {
    padding: 0.5rem 1rem;
    background: var(--glass);
    border-radius: 20px;
    color: var(--accent-2);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: var(--border-glow);
}

.skills-inline li:hover {
    transform: translateZ(15px);
    box-shadow: var(--glow);
    background: var(--glass-2);
}

/* Enhanced Portrait Section */
.hero-portrait {
    position: relative;
    transform-style: preserve-3d;
    animation: fadeInRight 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
}

.portrait-frame {
    position: relative;
    width: 300px;
    height: 300px;
    margin: auto;
    border-radius: 20px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.portrait-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0.1;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.portrait-frame:hover {
    transform: var(--rotate-md) scale(1.02);
}

.portrait-frame:hover::before {
    opacity: 0.2;
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 0.5s ease;
    filter: brightness(1.1) contrast(1.1);
    animation: floatingImage 6s ease-in-out infinite;
}

@keyframes floatingImage {
    0%, 100% {
        transform: scale(1.1) translateY(0);
    }
    25% {
        transform: scale(1.1) translateY(-10px);
    }
    50% {
        transform: scale(1.1) translateY(-5px);
    }
    75% {
        transform: scale(1.1) translateY(-8px);
    }
}

.portrait-frame:hover img {
    transform: scale(1.15);
    animation-play-state: paused;
}

.portrait-accolade {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(0) translateZ(20px);
    background: var(--card);
    padding: 1rem 2rem;
    border-radius: 25px;
    color: var(--accent-2);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2),
                0 5px 15px rgba(0, 0, 0, 0.1),
                0 0 20px rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.portrait-accolade:hover {
    transform: translateX(-50%) translateY(-5px) translateZ(20px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25),
                0 8px 20px rgba(0, 0, 0, 0.15),
                0 0 30px rgba(var(--accent-rgb), 0.2);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .skills-inline {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    .hero-content .lead {
        font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-grid {
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        line-height: 1.3;
    }

    .hero-content .tagline {
        font-size: clamp(1.2rem, 4vw, 1.5rem) !important;
    }

    .hero-content .lead {
        font-size: clamp(0.9rem, 3vw, 1rem);
        padding: 0 0.5rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        padding: 0.875rem 1.5rem;
    }

    .skills-inline {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .skills-inline li {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
    }

    .portrait-frame {
        width: 200px;
        height: 200px;
    }

    .portrait-accolade {
        font-size: 0.8rem;
        padding: 0.75rem 1.5rem;
        bottom: -20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 0 2rem;
    }

    .hero-content h1 {
        font-size: clamp(1.3rem, 7vw, 1.8rem);
    }

    .hero-content .tagline {
        font-size: clamp(1rem, 5vw, 1.3rem) !important;
    }

    .hero-content .lead {
        font-size: 0.875rem;
    }

    .portrait-frame {
        width: 160px;
        height: 160px;
    }

    .skills-inline li {
        flex: 1 1 100%;
        font-size: 0.85rem;
    }

    .portrait-accolade {
        font-size: 0.75rem;
        padding: 0.6rem 1.2rem;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}