/* ============================================================================
   MOBILE HOME PAGE STYLES
   Optimized for mobile screens
   Theme: Red, Black, White, Engineering Grid, Architectural
   ============================================================================ */

/* Reset active states when element loses focus to prevent persistent "clicked" appearance */
*:not(:active) {
    transition: transform 0.15s ease-out, opacity 0.15s ease-out, box-shadow 0.15s ease-out !important;
}

/* Hero Section */
.mobile-hero {
    position: relative;
    padding: 60px 0 40px;
    overflow: hidden;
}

.mobile-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.hero-grid-lines {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(90deg, rgba(204, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(204, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.hero-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
}

.hero-glow-1 {
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--primary-red), transparent);
    animation: float 8s ease-in-out infinite;
}

.hero-glow-2 {
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, var(--dark-red), transparent);
    animation: float 10s ease-in-out infinite reverse;
}

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

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

/* Profile Image */
.hero-profile-image {
    position: relative;
    width: 210px;
    height: 210px;
    margin: 0 auto 24px;
}

.profile-image-border {
    display: none;
}

.hero-profile-image img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    object-fit: cover;
    border: 2px solid rgba(139, 0, 0, 0.7);
    box-shadow:
        0 0 15px 5px rgba(139, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.6);
    transition: box-shadow 0.3s ease;
}

.hero-profile-image img:active {
    box-shadow:
        0 0 25px 8px rgba(139, 0, 0, 0.6),
        0 8px 32px rgba(0, 0, 0, 0.6);
}

.profile-status {
    display: none;
}

/* Hero Title */
.hero-title {
    margin-bottom: 16px;
}

.hero-greeting {
    display: block;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hero-name {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff, var(--primary-red), #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 12px;
}

/* Premium underline accent with red-white glow */
.hero-name::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.6) 20%,
        #CC0000 50%,
        rgba(255, 255, 255, 0.6) 80%,
        transparent 100%
    );
    border-radius: 2px;
    box-shadow: 
        0 0 12px rgba(204, 0, 0, 0.6),
        0 0 6px rgba(255, 255, 255, 0.4);
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(204, 0, 0, 0.15);
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero-badge i {
    font-size: 14px;
}

/* Hero Description */
.hero-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Stats */
.hero-stats {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(20, 0, 0, 0.85),
        rgba(0, 0, 0, 0.95)
    );
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 3px 12px rgba(0, 0, 0, 0.4);
}

.hero-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(139, 0, 0, 0.04) 20px,
            rgba(139, 0, 0, 0.04) 21px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(139, 0, 0, 0.04) 20px,
            rgba(139, 0, 0, 0.04) 21px
        );
    pointer-events: none;
}

.stat-item {
    position: relative;
    text-align: center;
    z-index: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: #8B0000;
    line-height: 1;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(139, 0, 0, 0.3));
}

.stat-label {
    font-size: 11px;
    color: rgba(180, 180, 180, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    position: relative;
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, 
        transparent, 
        rgba(139, 0, 0, 0.5), 
        transparent
    );
    z-index: 1;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

.hero-actions .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
}

/* Quick Links Section */
.quick-links-section {
    background: linear-gradient(180deg, transparent, rgba(204, 0, 0, 0.03), transparent);
    padding: 40px 16px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-link-card.full-width {
    grid-column: 1 / -1;
}

.quick-link-card {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(25, 0, 0, 0.85),
        rgba(0, 0, 0, 0.95)
    );
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(139, 0, 0, 0.6),
        transparent
    );
    opacity: 0.6;
}

.quick-link-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 15px,
            rgba(139, 0, 0, 0.02) 15px,
            rgba(139, 0, 0, 0.02) 16px
        );
    pointer-events: none;
}

.quick-link-card:active {
    transform: scale(0.95);
    border-color: rgba(139, 0, 0, 0.6);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 4px 12px rgba(139, 0, 0, 0.25),
        inset 0 0 35px rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(30, 0, 0, 0.88),
        rgba(0, 0, 0, 0.95)
    );
}

/* Reset on blur/focus loss */
.quick-link-card:not(:active):not(:focus) {
    transform: none;
}

.quick-link-icon {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.2), 
        rgba(0, 0, 0, 0.6)
    );
    border: 1px solid rgba(139, 0, 0, 0.5);
    border-radius: 12px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    z-index: 1;
}

.quick-link-icon i {
    font-size: 24px;
    color: #8B0000;
    filter: drop-shadow(0 2px 4px rgba(139, 0, 0, 0.3));
}

.quick-link-card:active .quick-link-icon {
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.35), 
        rgba(0, 0, 0, 0.7)
    );
    transform: scale(1.1);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(139, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.12);
}

/* Reset icon transform */
.quick-link-card:not(:active) .quick-link-icon {
    transform: none;
}

.quick-link-card h3 {
    position: relative;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #FFFFFF;
    z-index: 1;
}

.quick-link-card p {
    position: relative;
    font-size: 12px;
    color: rgba(180, 180, 180, 0.8);
    margin-bottom: 0;
    line-height: 1.4;
    z-index: 1;
}

.quick-link-arrow {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    z-index: 1;
}

.quick-link-arrow i {
    font-size: 12px;
    color: #8B0000;
}

/* Featured Section */
.featured-section {
    padding: 40px 16px;
}

.featured-projects {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.featured-item {
    position: relative;
    display: flex;
    gap: 16px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(20, 0, 0, 0.9),
        rgba(0, 0, 0, 0.95)
    );
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    box-shadow: 
        inset 2px 0 0 rgba(139, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.featured-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(139, 0, 0, 0.03) 20px,
            rgba(139, 0, 0, 0.03) 21px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(139, 0, 0, 0.03) 20px,
            rgba(139, 0, 0, 0.03) 21px
        );
    pointer-events: none;
}

.featured-item:active {
    transform: scale(0.98);
    border-color: rgba(139, 0, 0, 0.6);
    box-shadow: 
        inset 2px 0 0 rgba(139, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 4px 12px rgba(139, 0, 0, 0.25),
        inset 0 0 45px rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(30, 0, 0, 0.95),
        rgba(0, 0, 0, 0.95)
    );
}

/* Reset on inactive */
.featured-item:not(:active) {
    transform: none;
}

.featured-item:not(:active) .featured-icon {
    transform: none;
}

.featured-icon {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.2), 
        rgba(0, 0, 0, 0.6)
    );
    border: 1px solid rgba(139, 0, 0, 0.5);
    border-radius: 12px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: all 0.3s ease;
}

.featured-icon i {
    font-size: 28px;
    color: #8B0000;
    filter: drop-shadow(0 2px 4px rgba(139, 0, 0, 0.3));
}

.featured-item:active .featured-icon {
    transform: scale(1.05);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(139, 0, 0, 0.4),
        inset 0 0 25px rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.35), 
        rgba(0, 0, 0, 0.7)
    );
}

.featured-content {
    position: relative;
    flex: 1;
    z-index: 1;
}

.featured-content h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #FFFFFF;
}

.featured-content p {
    font-size: 13px;
    color: rgba(200, 200, 200, 0.9);
    margin-bottom: 10px;
    line-height: 1.5;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #8B0000;
    text-decoration: none;
    transition: all 0.3s ease;
    pointer-events: none;
}

.featured-link i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.featured-item:active .featured-link i {
    transform: translateX(4px);
}

/* Social Section */
.social-section {
    padding: 40px 16px 20px;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.social-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(20, 0, 0, 0.85),
        rgba(0, 0, 0, 0.95)
    );
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #E8E8E8;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(139, 0, 0, 0.15) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 12px,
            rgba(139, 0, 0, 0.02) 12px,
            rgba(139, 0, 0, 0.02) 13px
        );
    pointer-events: none;
}

.social-link i {
    position: relative;
    font-size: 20px;
    color: #8B0000;
    filter: drop-shadow(0 1px 3px rgba(139, 0, 0, 0.3));
    z-index: 1;
}

.social-link span {
    position: relative;
    z-index: 1;
}

.social-link:active {
    transform: scale(0.95);
    border-color: rgba(139, 0, 0, 0.6);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 3px 8px rgba(139, 0, 0, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.09);
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(30, 0, 0, 0.88),
        rgba(0, 0, 0, 0.95)
    );
}

/* Reset social link transform */
.social-link:not(:active) {
    transform: none;
}

.social-link:active::before {
    opacity: 1;
}

/* Footer */
.mobile-footer {
    position: relative;
    text-align: center;
    padding: 24px 16px 16px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(15, 0, 0, 0.9),
        rgba(0, 0, 0, 0.95)
    );
    border-top: 2px solid rgba(139, 0, 0, 0.3);
    overflow: hidden;
}

.mobile-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(139, 0, 0, 0.03) 20px,
            rgba(139, 0, 0, 0.03) 21px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(139, 0, 0, 0.03) 20px,
            rgba(139, 0, 0, 0.03) 21px
        );
    pointer-events: none;
}

.footer-text {
    position: relative;
    font-size: 14px;
    color: rgba(200, 200, 200, 0.9);
    margin-bottom: 8px;
    z-index: 1;
}

.footer-credit {
    position: relative;
    font-size: 13px;
    color: rgba(170, 170, 170, 0.8);
    margin-bottom: 4px;
    z-index: 1;
}

.footer-credit strong {
    color: #8B0000;
    font-weight: 700;
}

.footer-tagline {
    position: relative;
    font-size: 12px;
    color: rgba(160, 160, 160, 0.7);
    font-style: italic;
    z-index: 1;
}

/* Small Screens (< 360px) */
@media (max-width: 359px) {
    .hero-name {
        font-size: 1.75rem;
    }
    
    .hero-stats {
        gap: 12px;
        padding: 16px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-profile-image {
        width: 110px;
        height: 110px;
    }
    
    .hero-stats {
        padding: 12px;
    }
    
    .mobile-section {
        padding: 20px 16px;
    }
}
