/* --- Global Styles & Variables --- */
:root {
    --primary-color: #0a0a2a; /* Deep Blue/Purple */
    --secondary-color: #6a11cb; /* Vibrant Purple */
    --accent-color: #2575fc; /* Bright Blue */
    --text-color: #e0e0e0; /* Light Gray for dark bg */
    --bg-color: #05051a; /* Very Dark Blue */
    --card-bg: rgba(255, 255, 255, 0.05); /* Subtle Glassmorphism */
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Poppins', sans-serif;
    --transition-speed: 0.4s;
    --transition-timing: ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--body-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-weight: 600;
    color: #fff; /* Brighter headings */
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; position: relative; }
/* Fancy underline for H2 */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

h3 { font-size: 1.8rem; }
h4 { font-size: 1.2rem; font-weight: 600; }

p {
    margin-bottom: 1rem;
    font-weight: 300;
    color: var(--text-color); /* Slightly dimmer than headings */
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-timing);
}

a:hover {
    color: var(--secondary-color);
}

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

section {
    padding: 6rem 0;
    overflow: hidden; /* Contain animations */
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-timing);
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 117, 252, 0.4); /* Brighter shadow on hover */
}

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

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* --- Header & Navigation --- */
#main-header {
    position: fixed; /* Sticky header */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(5, 5, 26, 0.8); /* Slightly transparent dark bg */
    backdrop-filter: blur(10px); /* Glass effect */
    transition: background-color var(--transition-speed) var(--transition-timing);
    padding: 1rem 0;
}

#main-header.scrolled {
    background-color: rgba(5, 5, 26, 0.95); /* Less transparent on scroll */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}
.logo span {
    color: var(--accent-color); /* Highlight 'Aleph' */
}

#main-header nav ul {
    list-style: none;
    display: flex;
}

#main-header nav ul li {
    margin-left: 2rem;
}

#main-header nav ul li a {
    color: var(--text-color);
    font-weight: 400;
    position: relative;
    padding-bottom: 0.3rem;
}
/* Underline animation on hover */
#main-header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width var(--transition-speed) var(--transition-timing);
}

#main-header nav ul li a:hover::after,
#main-header nav ul li a.active::after { /* Add 'active' class via JS */
    width: 100%;
}

#menu-toggle { /* Hamburger Icon */
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Mobile Menu --- */
#mobile-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--primary-color);
    z-index: 1001;
    transition: right 0.5s cubic-bezier(0.23, 1, 0.32, 1); /* Smooth slide */
    padding: 4rem 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

#mobile-menu.open {
    right: 0; /* Slide in */
}

#mobile-menu ul {
    list-style: none;
}

#mobile-menu ul li {
    margin-bottom: 1.5rem;
}

#mobile-menu ul li a {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

#close-menu {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
}


/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--bg-color) 100%);
    overflow: hidden; /* Keep shapes contained */
    padding-top: 80px; /* Offset for fixed header */
}

.hero-content {
    position: relative;
    z-index: 2;
}

#hero h1 {
    font-size: 4rem; /* Larger hero heading */
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

/* Animated Background Shape */
.hero-bg-shape {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 200px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    filter: blur(100px); /* Soft, glowing effect */
    opacity: 0.4;
    animation: pulse 8s infinite alternate ease-in-out;
    z-index: 1;
}

@keyframes pulse {
    0% { transform: translateX(-50%) scale(1); opacity: 0.3; }
    100% { transform: translateX(-50%) scale(1.1); opacity: 0.5; }
}

/* --- About Section --- */
#about {
    background-color: rgba(255, 255, 255, 0.02); /* Slightly different bg */
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
}

.about-content .image-content img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-content strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* --- Services Section --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    text-align: center;
    transition: transform var(--transition-speed) var(--transition-timing),
                box-shadow var(--transition-speed) var(--transition-timing);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.service-icon {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* --- Team Section --- */
#team {
     background-color: rgba(255, 255, 255, 0.02);
}

.team-subheading {
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 2rem;
    font-size: 1.6rem;
    color: var(--accent-color);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-content: center; /* Center items if they don't fill the row */
}

/* Adjust grid for specific groups if needed */
.advisor-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-width: 600px; /* Limit width for advisors */
    margin: 0 auto; /* Center the advisor grid */
}

.engineering-grid {
     grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}


.team-member-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-speed) var(--transition-timing),
                box-shadow var(--transition-speed) var(--transition-timing);
}

.team-member-card:hover {
     transform: translateY(-8px) scale(1.03);
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.team-member-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.team-member-card h4 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.team-member-card p {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0;
}

/* --- Contact Section --- */
#contact {
    text-align: center;
    background: linear-gradient(rgba(5, 5, 26, 0.8), rgba(5, 5, 26, 0.8)),
                url('https://via.placeholder.com/1920x500/0a0a2a/cccccc?text=Abstract+AI+Background') no-repeat center center/cover; /* Placeholder bg */
    background-attachment: fixed; /* Parallax effect */
}

#contact p {
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem; /* Ensure space before footer */
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0 0.7rem;
    opacity: 0.7;
    transition: opacity var(--transition-speed), color var(--transition-speed);
}

.social-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}


/* --- Transitions & Animations --- */

/* Initial states for animations */
.fade-in {
    opacity: 0;
    animation: fadeInAnimation ease 1s forwards;
    animation-delay: 0.2s; /* Slight delay for effect */
}

@keyframes fadeInAnimation {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpAnimation 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Staggered delays */
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.5s; }
.delay-3 { animation-delay: 0.7s; } /* Add more if needed */

@keyframes slideUpAnimation {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition-timing), transform 0.8s var(--transition-timing);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children elements on scroll reveal */
.scroll-reveal.visible .service-card,
.scroll-reveal.visible .team-member-card,
.scroll-reveal.visible .about-content > div { /* Animate children of about grid */
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpAnimation 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Apply staggered delays to children */
.scroll-reveal.visible .service-card:nth-child(1),
.scroll-reveal.visible .team-member-card:nth-child(1),
.scroll-reveal.visible .about-content > div:nth-child(1) { animation-delay: 0.1s; }

.scroll-reveal.visible .service-card:nth-child(2),
.scroll-reveal.visible .team-member-card:nth-child(2),
.scroll-reveal.visible .about-content > div:nth-child(2) { animation-delay: 0.2s; }

.scroll-reveal.visible .service-card:nth-child(3),
.scroll-reveal.visible .team-member-card:nth-child(3) { animation-delay: 0.3s; }

.scroll-reveal.visible .team-member-card:nth-child(4) { animation-delay: 0.4s; }
.scroll-reveal.visible .team-member-card:nth-child(5) { animation-delay: 0.5s; }
.scroll-reveal.visible .team-member-card:nth-child(6) { animation-delay: 0.6s; }
/* Add more nth-child delays as needed */


/* --- Responsiveness --- */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    #hero h1 { font-size: 3.2rem; }
    h2 { font-size: 2.2rem; }
    .container { padding: 0 1.5rem; }
}

@media (max-width: 768px) {
    html { font-size: 15px; } /* Slightly smaller base font */
    h1 { font-size: 2.5rem; }
    #hero h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; margin-bottom: 2rem; }
    section { padding: 4rem 0; }

    #main-header nav ul { display: none; } /* Hide desktop nav */
    #menu-toggle { display: block; } /* Show hamburger */

    .about-content { grid-template-columns: 1fr; text-align: center; }
    .about-content .image-content { order: -1; margin-bottom: 2rem; } /* Move image above text */
    .about-content .image-content img { margin: 0 auto; }

    .service-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
    .advisor-grid { max-width: none; } /* Remove max width for advisors */

    footer .container { text-align: center; }
    .social-links { margin-top: 1rem; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    h1 { font-size: 2.2rem; }
    #hero h1 { font-size: 2.5rem; }
    #hero p { font-size: 1.1rem; }
    h2 { font-size: 1.8rem; }
    .btn { padding: 0.7rem 1.5rem; font-size: 0.8rem; }

    .team-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; }
     .team-member-card img { width: 100px; height: 100px; }
}