/* 
 * Hassan Maynard - Personal Portfolio
 * Modern, High-Performance, Accessible
 */

:root {
    /* Colors */
    --primary: #4B0082;
    /* Indigo */
    --primary-dark: #2E0259;
    /* Deep Purple */
    --accent: #00D4FF;
    /* Cyan */
    --accent-secondary: #FF0099;
    /* Pink/Magenta */

    --text-main: #1A1A1A;
    --text-muted: #666666;
    --text-light: #FFFFFF;

    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-dark: #121212;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    --gradient-text: linear-gradient(to right, var(--primary), var(--accent));

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-med: 0.4s ease;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --header-height: 80px;
    --container-width: 1200px;
}


/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}


a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}


.text-center {
    text-align: center;
}

.section-header {
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    position: relative;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(75, 0, 130, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 0, 130, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Header & Nav */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
#hero {
    position: relative;
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('assets/images/HaaS.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    /* Force white text for better contrast */
}

/* Interactive Dark Gradient Overlay for Hero */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(46, 2, 89, 0.95) 0%, rgba(46, 2, 89, 0.7) 50%, rgba(46, 2, 89, 0.1) 100%);
    z-index: 1;
    opacity: 0.4;
    /* Slight tint by default */
    transition: opacity 0.5s ease;
    /* Smooth transition */
}


#hero:hover::before {
    opacity: 1;
    /* Show overlay on hover */
}


.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--spacing-lg);
    align-items: center;
    height: 100%;
}

#hero .overline {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
}

#hero h1 {
    color: white;
    font-size: 5rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#hero .hero-desc {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.5rem;
    max-width: 650px;
    font-weight: 400;
    margin-bottom: 4rem;
    /* Spacing out from button */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Boosted readability */
}


#hero .text-gradient {
    /* More vibrant pop: bright Cyan to hot Pink */
    background: linear-gradient(to right, #00F2FF, #FF0099, #00F2FF);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.6));
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: -200% center;
    }
}




/* Adjust button for dark background */
#hero .btn-primary {
    background: linear-gradient(to right, #00F2FF, #FF0099);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#hero .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 153, 0.5);
}

#hero .btn-secondary {
    border-color: white;
    color: white;
}


#hero .btn-secondary:hover {
    background: white;
    color: var(--primary-dark);
}


/* About Section */
/* About Section */
.avatar-container {
    margin-top: var(--spacing-md);
    display: inline-block;
    position: relative;
    z-index: 1;
}

/* Rotating Gradient Ring */
.avatar-container::before {
    content: '';
    position: absolute;
    /* Larger to form the outer ring */
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    background: linear-gradient(45deg, #00F2FF, #FF0099, #00F2FF, #FF0099);
    background-size: 200% 200%;
    border-radius: 50%;
    z-index: -2;
    animation: spin 3s linear infinite;
}

/* White Gap between Avatar and Ring */
.avatar-container::after {
    content: '';
    position: absolute;
    /* Slightly larger than avatar to create the gap */
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    background: var(--bg-white);
    border-radius: 50%;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.avatar-container:hover::after {
    opacity: 0;
    /* Remove white space on hover */
}

.avatar-container:hover::before {
    /* Slightly pull in or glow more on hover */
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    filter: blur(2px);
    transition: all 0.3s ease;
    animation-duration: 0.8s;
    /* Faster spin on hover */
}


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



.avatar-small {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

#about {
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: #f8f9fa;
    /* Fallback color */
}

/* Background Slideshow Logic */
.bg-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    animation: bgFade 15s infinite linear;
}

.bg-layer:nth-child(2) {
    animation-delay: 5s;
}

.bg-layer:nth-child(3) {
    animation-delay: 10s;
}

@keyframes bgFade {

    0%,
    5% {
        opacity: 0;
    }

    15%,
    33.33% {
        opacity: 1;
    }

    43.33%,
    100% {
        opacity: 0;
    }
}


#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    /* Heavy white fade for readability */
    z-index: -1;
}







.about-quote {
    font-style: italic;
    font-size: 1.3rem;
    color: var(--primary);
    line-height: 1.6;
    margin: 0 0 2.5rem 0;
    padding-left: 2rem;
    border-left: 4px solid var(--accent);
    position: relative;
    font-weight: 400;
}

.about-text h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}


.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}


.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Equal split as requested */
    gap: 6rem;
    /* Increased gap for clear separation */
    align-items: center;
}

/* Cyborg Techno-Portrait */
.techno-portrait-container {
    position: relative;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(2deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.techno-portrait-container:hover {
    transform: rotate(0deg) scale(1.03);
}

.techno-portrait {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    background: radial-gradient(circle at center, #001a33 0%, #000 100%);
    /* Cyber Blue Halo */

}

.techno-portrait .feature-img {
    width: 100%;
    display: block;
    filter: contrast(1.1) brightness(1.2);
    mix-blend-mode: screen;
    /* Makes black background transparent */
    position: relative;
    z-index: 1;
}


/* Outer Glow for the entire container */
.techno-portrait-container::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.15), transparent 70%);
    pointer-events: none;
    z-index: -1;
}


/* Half-split cyborg overlay */
.cyborg-tech-layer {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(75, 0, 130, 0.4), rgba(0, 212, 255, 0.4));
    mix-blend-mode: color;
    pointer-events: none;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.circuit-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image:
        radial-gradient(circle at 30% 20%, var(--accent) 1px, transparent 1px),
        radial-gradient(circle at 60% 50%, var(--accent) 2px, transparent 2px),
        radial-gradient(circle at 40% 80%, var(--primary) 2px, transparent 2px);
    background-size: 50px 50px;
    opacity: 0.6;
    mix-blend-mode: screen;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    animation: circuitPulse 3s infinite alternate;
}

.scan-line {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    opacity: 0.5;
    z-index: 10;
    animation: scanAnimation 4s linear infinite;
}

.glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 212, 255, 0.05);
    opacity: 0;
    pointer-events: none;
}

.techno-portrait:hover .glitch-effect {
    animation: glitchQuick 0.2s infinite;
}

@keyframes scanAnimation {
    0% {
        top: -5%;
    }

    100% {
        top: 105%;
    }
}

@keyframes circuitPulse {
    0% {
        opacity: 0.3;
        filter: brightness(1);
    }

    100% {
        opacity: 0.8;
        filter: brightness(1.5);
    }
}

@keyframes glitchQuick {
    0% {
        opacity: 0.2;
        transform: translateX(2px);
    }

    50% {
        opacity: 0.5;
        transform: translateX(-2px);
    }

    100% {
        opacity: 0.2;
        transform: translateX(0);
    }
}


/* Solutions Cards */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.card {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid #EEE;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(75, 0, 130, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(75, 0, 130, 0.05);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.card p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.card-link {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-link i {
    transition: transform 0.2s;
}

.card-link:hover i {
    transform: translateX(5px);
}

/* Testimonials */
.quote-icon-large {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.2;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    animation: quoteFloat 5s ease-in-out infinite;
    /* Slightly slower for smoother color transition */
}

@keyframes quoteFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.2;
        color: var(--primary);
    }

    33% {
        color: var(--accent);
    }

    50% {
        transform: translateY(-10px) scale(1.1);
        opacity: 0.5;
        color: var(--accent-secondary);
    }

    66% {
        color: var(--accent);
    }
}



/* Testimonials Revamp - Mosaic Edition */
.testimonials-section {
    background: #fdfdfd;
    position: relative;
    overflow: hidden;
    perspective: 1500px;
    /* Crucial for 3D Tilt */
}

.testimonial-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.15;
}

.orb-1 {
    background: var(--accent);
    top: -50px;
    right: -50px;
}

.orb-2 {
    background: var(--primary);
    bottom: -50px;
    left: -50px;
}

.testimonials-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Column Staggered */
    gap: 3rem;
    align-items: start;
}

.mosaic-column {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    padding: 2.5rem;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease, background 0.3s ease;
    /* Removed transform from here to fix sluggishness */
    transform-style: preserve-3d;
    /* For Tilt Depth */
}

/* Smooth reset animation ONLY when mouse leaves */
.testimonial-card:not(:hover) {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 25px 50px -12px rgba(31, 38, 135, 0.25);
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent);
}

.mini-quote-mark {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.quote-text {
    font-family: var(--font-body);
    /* Unified font */
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    position: relative;
    z-index: 2;
    transform: translateZ(50px);
    /* Makes text pop on tilt */
}

.quote-text.mini {
    font-size: 1.05rem;
    font-style: italic;
    color: #666;
}

.user-profile,
.user-mini {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
    transform: translateZ(30px);
    font-family: var(--font-heading);
    /* Unified font */
}


.user-profile img,
.user-mini img {
    width: 50px;
    /* Normalized size */
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.user-profile h4,
.user-mini span {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

.user-profile span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}


#contact {
    position: relative;
    padding: var(--spacing-xl) 0;
    background-image: url('assets/images/HaaS2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(46, 2, 89, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    opacity: 0.4;
    /* Slight tint by default */
    transition: opacity 0.5s ease;
    /* Smooth transition */
}


#contact:hover::before {
    opacity: 1;
    /* Show fade on hover */
}


#contact .container {
    position: relative;
    z-index: 10;
    /* Forces all content within container above overlay */
}



#contact .section-header h2,
#contact .section-header p {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.security-badge {
    transition: color 0.3s ease;
    cursor: default;
}

.security-badge:hover {
    color: var(--accent) !important;
}



.contact-wrapper {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.5);
    /* Darker background for visibility */
    backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}


.form-row {
    display: flex;
    gap: var(--spacing-md);
}

.form-group {
    flex-grow: 1;
}

.half {
    width: 50%;
}

input,
textarea,
select {
    width: 100%;
    padding: 15px;
    border: 2px solid #EEE;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition-fast);
}

#contact input,
#contact textarea,
#contact select {
    background: rgba(255, 255, 255, 0.1);
    /* Slightly more opaque */
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}


#contact input::placeholder,
#contact textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#contact select option {
    background: var(--primary-dark);
}


input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(75, 0, 130, 0.1);
}

textarea {
    resize: vertical;
}

.main-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid #EEE;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.2rem;
    color: var(--text-main);
}

.social-links a:hover {
    color: var(--primary);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    #hero h1 {
        font-size: 3rem;
    }

    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image,
    .about-art {
        order: -1;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-desc {
        margin: 0 auto var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: white;
        flex-direction: column;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: block;
    }

    .solutions-grid,
    .testimonials-mosaic {
        grid-template-columns: 1fr;
    }

    .testimonials-mosaic {
        gap: 2rem;
    }

    #hero h1 {
        font-size: 3rem;
    }

    .form-row {
        flex-direction: column;
    }

    .half {
        width: 100%;
    }
}