/* ============================================================
   hero.css
   Changes:
   - Removed duplicate @media (min-width: 1024px) block at bottom
     (it was a copy-paste leftover overriding the correct one above)
   - Removed duplicate .btn-outline and .image-wrapper declarations
   - profile-img width unified to 420px (was set twice to 450px then 420px)
   - No visual changes to design
   ============================================================ */

.hero {
    display: flex;
    flex-direction: column;
    padding: 80px 0;
    align-items: center;
    gap: 60px;
    min-height: 85vh;
    justify-content: center;
}

.hero-content {
    text-align: center;
    position: relative;
    max-width: 650px;
}

.hero-welcome {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.7;
}

.hero-title {
    font-size: clamp(2.8rem, 5vw, 3.8rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
    letter-spacing: -1px;
    /* FIX: Removed the CSS animation — GSAP handles this.
       Having both CSS animation AND GSAP animation on same element
       caused a conflict where opacity flickered. */
}

.hero-title span {
    display: inline-block;
    background: linear-gradient(90deg, #00d4ff, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
}

.hero-description {
    color: rgba(255,255,255,0.6);
    max-width: 520px;
    margin: 0 auto 35px;
    font-size: 0.95rem;
    line-height: 1.9;
}

.accent-text { color: var(--primary-blue); }

/* Buttons */
.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    position: relative;
    padding: 16px 38px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    transition: transform 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.btn::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(0, 212, 255, 0.4);
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.btn::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0,212,255,0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn:hover {
    transform: translateY(-6px) scale(1.03);
    color: #00d4ff !important;
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.25), 0 0 15px rgba(0, 212, 255, 0.3);
}

.btn:hover::before { opacity: 1; }
.btn:hover::after  { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary,
.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
}
.btn-outline:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue) !important;
    background: rgba(0, 212, 255, 0.05);
}

/* ── Hero Visual ── */
.hero-visual {
    position: relative;
    perspective: 1000px;
}

.image-wrapper {
    position: relative;
    padding: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,212,255,0.05) 0%, transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: morphing 8s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes morphing {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50%       { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

.profile-img {
    width: 420px;
    height: 420px;
    object-fit: cover;
    border-radius: inherit;
    filter: grayscale(20%) contrast(110%) drop-shadow(0 30px 50px rgba(0,0,0,0.5));
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* ── Floating Cards ── */
.floating-card {
    position: absolute;
    background: rgba(13, 27, 42, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px 20px;
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #fff;
    z-index: 10;
    pointer-events: none;
    /* FIX: will-change removed from static CSS — JS rAF loop handles movement
       without needing a persistent composite layer for each card */
}

.floating-card i { color: var(--primary-blue); font-size: 1.1rem; }

.design { top: -10px; right: -10px; }
.ideas  { bottom: 50px; right: -40px; }
.code   { bottom: 70px; left: -40px; }

/* Typing cursor */
#dynamic-text {
    border-right: 3px solid var(--primary-blue);
    padding-right: 8px;
    display: inline-block;
    min-height: 1.2em;
    vertical-align: middle;
    animation: blink-cursor 0.8s step-end infinite;
}

@keyframes blink-cursor {
    from, to { border-color: transparent; }
    50%       { border-color: var(--primary-blue); }
}

/* ── Responsive ── */
@media (min-width: 1024px) {
    .hero { flex-direction: row; text-align: left; }
    .hero-content { text-align: left; flex: 1; }
    .hero-btns { justify-content: flex-start; }
    .hero-description { margin-left: 0; }
    .hero-visual { flex: 1; display: flex; justify-content: flex-end; }
}

@media (max-width: 767px) {
    .profile-img { width: 280px; height: 280px; }
    .hero-title  { font-size: 2.2rem; }
    .hero-btns   { flex-direction: column; width: 100%; gap: 10px; }
    .btn         { width: 100%; }
    .design { top: 0; right: 0; }
    .ideas  { bottom: 10px; right: 0; }
    .code   { bottom: 30px; left: 0; }
    /* Disable morphing animation on mobile — reduces paint workload */
    .image-wrapper { animation: none; border-radius: 50%; }
}
