/**
 * HERO COMPONENT
 */

/* Hero Section */
.hero {
    background-color: var(--bg-color);
    padding: 100px 0 3rem;
    overflow: visible;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero .container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    z-index: 2;
}

/* Hero Content */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    position: relative;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

/* Text styling */
.hero-greeting {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
    animation: fadeIn 0.8s ease-out;
}

.hero-name {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    animation: fadeIn 1s ease-out;
}

.hero-title {
    font-size: 1.5rem;
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    animation: fadeIn 1.2s ease-out;
}

.hero-description {
    margin-bottom: 2rem;
    color: var(--text-color-light);
    font-size: 1.1rem;
    line-height: 1.6;
    animation: fadeIn 1.4s ease-out;
}

/* Hero CTA & Socials */
.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    animation: fadeIn 1.6s ease-out;
}

.hero-cta .btn {
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.hero-cta .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.hero-cta .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.hero-cta .btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.hero-cta .btn-secondary:hover {
    background-color: var(--bg-color-alt);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    animation: fadeIn 1.8s ease-out;
}

.social-link {
    width: 40px; height: 40px;
    border-radius: 50%;
    background-color: var(--bg-color-alt);
    display: flex;
    align-items: center; justify-content: center;
    color: var(--primary-color);
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Hero Image & Background */
.hero-image {
    flex-shrink: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    animation: float 4s ease-in-out infinite, fadeIn 1.5s ease-out;
}

.hero-image:before {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    opacity: 0.1;
    z-index: -1;
    animation: pulse 3s infinite;
}

.hero-image img.profile-image {
    width: 280px; height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.hero-bg-circle {
    width: 600px; height: 600px;
    border-radius: 50%;
    background-color: var(--primary-color);
    position: absolute;
    top: -100px; right: -200px;
    z-index: 0;
    opacity: 0.05;
}

/* --- GROK AI QA SECTION --- */
#ai-chat {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    padding: 2.4rem 0;
}

.grok-ai-wrapper {
    max-width: 1080px;
    margin: 0 auto;
    padding: calc(var(--spacing-md) * 1.2);
    width: 100%;
}

.grok-ai-qa {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 2.4rem;
    box-shadow: 0 9.6px 28.8px var(--shadow-color);
    border: 1.2px solid var(--border-color);
}

.grok-title { 
    font-size: 2.16rem; 
    font-weight: 700; 
    text-align: center; 
    margin-bottom: 0.6rem; 
    color: var(--text-color); 
}

.grok-subtitle { 
    font-size: 1.2rem; 
    color: var(--text-color-light); 
    text-align: center; 
    margin-bottom: 1.8rem; 
}

/* Suggestions */
.grok-suggestions {
    display: flex; 
    flex-wrap: wrap;
    gap: 0.6rem; 
    justify-content: center;
    margin-bottom: 1.8rem;
}

.grok-suggestions button {
    background: transparent;
    border: 1.2px solid var(--border-color);
    color: var(--text-color-light);
    padding: 0.72rem 1.44rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.08rem;
}

.grok-suggestions button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Hiding the blank area when not in use */
.grok-chat {
    display: none;
    max-height: 576px;
    overflow-y: auto;
    background-color: var(--bg-color-alt);
    border-radius: var(--border-radius-md);
    border: 1.2px solid var(--border-color);
    transition: all 0.4s ease;
}

/* Triggered by JS when a message is added */
.grok-chat.has-messages {
    display: block; 
    padding: calc(var(--spacing-md) * 1.2);
    margin-bottom: calc(var(--spacing-md) * 1.2);
    animation: slideDown 0.3s ease-out;
}

/* Message Bubbles */
.ai-message {
    margin-bottom: calc(var(--spacing-sm) * 1.2);
    padding: 1.08rem 1.44rem;
    border-radius: var(--border-radius-md);
    max-width: 85%;
    line-height: 1.8;
    word-wrap: break-word;
    font-size: 1.08rem;
}

.ai-message.ai-user {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4.8px;
}

.ai-message.ai-bot {
    background-color: var(--bg-color);
    border: 1.2px solid var(--border-color);
    color: var(--text-color);
    border-bottom-left-radius: 4.8px;
}

/* Input Bar */
.grok-input { 
    display: flex; 
    gap: 12px; 
    margin-bottom: 1.8rem; 
}

.grok-input input {
    flex: 1;
    background: var(--bg-color-alt);
    border: 1.2px solid var(--border-color);
    color: var(--text-color);
    padding: 1.08rem 1.68rem;
    border-radius: 999px;
    outline: none;
    font-size: 1.08rem;
}

.grok-input button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 57.6px; 
    height: 57.6px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.grok-input button svg {
    width: 24px;
    height: 24px;
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
}

.scroll-down a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    box-shadow: 0 5px 15px var(--shadow-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.scroll-down a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.05); opacity: 0.15; }
}

/* Responsive fixes */
@media (max-width: 768px) {
    .hero-content { flex-direction: column-reverse; text-align: center; }
    .hero-cta, .social-links { justify-content: center; }
    .hero-image img.profile-image { width: 220px; height: 220px; }
}