/* 
   PORTAIL AARES - ULTRA PREMIUM REDESIGN 
   Design System: Dark Techno / Cyber-Minimalist
*/

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;600&display=swap');

:root {
    /* Palette Principale */
    --bg-deep: #02040a;
    --bg-surface: rgba(255, 255, 255, 0.03);

    /* Accents Couleurs */
    --accent-blue: #00f0ff;
    --accent-purple: #bd00ff;
    --accent-portfolio: #9b59b6;
    --accent-techno: #DC143C;
    /* Crimson Red for Ronny Vergara Techno */
    --accent-rumble: #00bbff;

    /* Textes */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.3);

    /* Effets */
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --neon-glow-blue: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    /* Animated Background */
    background: radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(189, 0, 255, 0.08), transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(220, 20, 60, 0.05), transparent 40%),
        var(--bg-deep);
    background-attachment: fixed;
}

/* Texture Grain Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

/* Header */
.site-header {
    width: 100%;
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    position: relative;
}

.site-logo {
    max-height: 70px;
    width: auto;
    max-width: 80vw;
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    opacity: 0.9;
    transition: all 0.5s ease;
}

.site-logo:hover {
    filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    transform: scale(1.02);
}

/* Hero Identity Section */
.hero-identity {
    text-align: center;
    padding: 2rem 1rem 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
    z-index: 5;
    animation: fadeIn 1.5s ease-out forwards;
}

.hero-identity__subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 8px;
    color: var(--text-secondary);
    /* Crimson or Blue based on preference, keeping neutral metallic for now */
    margin: 0.5rem 0 2rem 0;
    text-transform: uppercase;
}

.hero-identity__separator {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-techno), transparent);
    margin: 0 auto 2rem auto;
    animation: expandLine 1.5s ease-out 0.5s forwards;
    opacity: 0.8;
}

.hero-identity__content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    /* +1rem breathing room */
    align-items: center;
}

.hero-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 300;
    margin: 0;
    max-width: 600px;
}

.hero-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0;
}

.hero-keywords.primary {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.hero-keywords.secondary span {
    font-family: 'Chakra Petch', sans-serif;
    /* Fallback to sans-serif if not loaded, but keeps consistent styling */
    background: rgba(255, 255, 255, 0.02);
    /* More subtle bg */
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* More subtle border */
    color: rgba(255, 255, 255, 0.5);
    /* Ghost text */
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.hero-keywords.secondary span:hover {
    background: var(--accent-blue);
    color: #000;
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px var(--accent-blue);
    opacity: 1;
}

.highlight-text {
    display: inline-block;
    /* Changed from block to inline-block for better clipping */
    margin-top: 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    /* Classy shift */
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
    background-color: var(--accent-blue);
    /* Fallback */
    background-image: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-techno));
    background-size: 100%;
    background-repeat: repeat;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;

    padding: 0.5rem 0;
    text-shadow: none;
    /* Clean look */
    border: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandLine {
    to {
        width: 100px;
    }
}

.apps-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    padding: 2rem;
    width: 100%;
    max-width: 1400px;
    z-index: 5;
    perspective: 2000px;
}

/* App Card - Base */
.app-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2rem;
    width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
}

/* Glow Effect Top Border */
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--card-color, var(--text-primary)), transparent);
    opacity: 0.5;
    transition: opacity 0.3s ease, height 0.3s ease;
}

.app-card:hover::before {
    opacity: 1;
    height: 3px;
    box-shadow: 0 0 20px var(--card-color);
}

/* Icon */
.app-card__icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(20px);
    /* 3D effect */
}

/* Title */
.app-card__title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    transform: translateZ(10px);
}

/* Description */
.app-card__desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    flex-grow: 1;
    font-weight: 300;
    transform: translateZ(5px);
}

/* Button */
.app-card__btn {
    display: inline-block;
    padding: 1rem 2rem;
    color: var(--card-color, var(--text-primary));
    border: 1px solid var(--glass-border);
    border-color: var(--card-color);
    background: rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    /* Tech vibe sharp corners */
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    transform: translateZ(15px);
}

/* Button Hover State */
.app-card__btn:hover {
    background: var(--card-color);
    color: #000;
    /* Contrast text on hover */
    box-shadow: 0 0 30px var(--card-color);
    border-color: transparent;
    font-weight: 900;
}

/* -----------------------------
   THEME VARIANTS
   ----------------------------- */

/* Default (AARES Gen I) */
.app-card {
    --card-color: var(--accent-blue);
}

/* Calculator Style */
.app-card--calc {
    --card-color: var(--accent-purple);
}

/* Portfolio Style */
.app-card--portfolio {
    --card-color: var(--accent-portfolio);
}

/* Techno Style (NEW) */
.app-card--techno {
    --card-color: var(--accent-techno);
}

/* Rumble Kit Style */
.app-card--rumble {
    --card-color: var(--accent-rumble);
}

/* Neural Music Station Style */
.app-card--neural {
    --card-color: #00ff9d;
    /* Cyber Green */
}


/* Footer */
.site-footer {
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 10;
    text-align: center;
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .apps-grid {
        flex-direction: column;
        align-items: center;
        perspective: none;
    }

    .app-card {
        width: 100%;
        max-width: 400px;
        margin-bottom: 1rem;
        transform: none !important;
        /* Disable 3D tilt on mobile */
    }

    .site-logo {
        max-height: 50px;
    }
}

/* -----------------------------
   SEO & UTILITIES
   ----------------------------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* -----------------------------
   SVG ICONS (REPLACING EMOJIS)
   ----------------------------- */
.app-card__icon svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-primary);
    stroke-width: 1.5;
    fill: none;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: all 0.3s ease;
}

.app-card:hover .app-card__icon svg {
    stroke: var(--card-color);
    filter: drop-shadow(0 0 20px var(--card-color));
    transform: scale(1.1);
}

.app-card__icon-img {
    height: 100px;
    width: auto;
    object-fit: contain;
    /* Default: White with soft blue shadow */
    filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(0, 187, 255, 0.3));
    transition: all 0.3s ease;
    max-width: 100%;
}

.app-card:hover .app-card__icon-img {
    /* Transform White to Cyan #00bbff using filter generator approximation */
    filter: brightness(0) saturate(100%) invert(67%) sepia(63%) saturate(4649%) hue-rotate(167deg) brightness(103%) contrast(106%) drop-shadow(0 0 20px rgba(0, 187, 255, 0.8));
    transform: scale(1.05);
}

.rumblekit-icon {
    margin-bottom: 0rem;
}

/* -----------------------------
   CONTACT SECTION
   ----------------------------- */
.contact-section {
    text-align: center;
    padding: 6rem 1rem 4rem 1rem;
    /* More top padding to separate from grid */
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    animation: fadeIn 1.5s ease-out forwards;
}

.contact-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 4px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.contact-text {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(10px);
    border-radius: 4px;
}

.contact-btn:hover {
    background: var(--text-primary);
    color: #000;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    border-color: var(--text-primary);
    transform: translateY(-5px);
}

@media (max-width: 600px) {
    .contact-btn {
        padding: 1rem 1rem;
        /* Reduce padding on mobile */
        font-size: 0.8rem;
        /* Slightly smaller text */
        max-width: 100%;
        /* Force fit */
        word-break: break-all;
        /* Break email if too long */
    }

    .contact-section {
        padding: 4rem 1rem 2rem 1rem;
    }
}