/*
---
PORTFOLIO: Ayush Bajaj
DESIGN: Conversion-Focused Googley (Material Inspired)
FONT: Roboto
---
*/

/* ======== 0. ROOT & VARIABLES ======== */
:root {
    /* Primary Conversion Color (LinkedIn) */
    --primary-color: #0A66C2; 
    --primary-hover: #004182;
    
    /* Google Brand Accent Colors */
    --google-blue: #4285F4;
    --google-red: #DB4437;
    --google-yellow: #F4B400;
    --google-green: #0F9D58;

    /* Typography & Layout */
    --dark-text: #1D2434;
    --light-text: #586070;
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --border-color: #EAECEF;
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --container-width: 1140px;
    
    /* Material-Inspired UI */
    --border-radius: 4px; /* Material Design standard */
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* ======== 1. BASE STYLES ======== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--light-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

section {
    padding: 5rem 0;
}

section:nth-of-type(odd) {
    background-color: var(--card-bg);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-text);
    font-weight: 500; /* Roboto default medium */
    line-height: 1.3;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700; /* Roboto bold */
}

h2.section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 500;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.25rem;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

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

/* ======== 2. SHARED COMPONENTS ======== */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--primary-color);
    color: var(--card-bg);
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.9rem 1.75rem;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cta-button i {
    font-size: 1.2rem;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    color: var(--card-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

.section-cta h3 {
    font-size: 1.5rem;
    color: var(--dark-text);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.section-cta p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


/* ======== 3. HEADER & NAVIGATION ======== */
header {
    width: 100%;
    background-color: var(--card-bg);
    /* Material "App Bar" shadow */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); 
    padding: 1.25rem 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu li a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--light-text);
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--google-blue); /* Google accent */
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    color: var(--dark-text);
    cursor: pointer;
}


/* ======== 4. HERO SECTION ======== */
#hero {
    background-color: var(--card-bg);
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 10rem;
    padding-bottom: 6rem;
    position: relative; /* Make it the positioning context */
    overflow: hidden; /* Clip icons that float outside */
}

.hero-container {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
    max-width: 1100px;
    position: relative; /* Ensure content is above icons */
    z-index: 2; /* Ensure content is above icons */
}

.hero-content {
    text-align: left;
}

#hero h1 {
    margin-bottom: 0; /* Was 1.25rem */
}

.hero-google-dots {
    display: flex;
    gap: 0.6rem;
    margin: 1.5rem 0; /* Adds space above and below the dots */
}

.hero-google-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color); /* Uses inline variable from HTML */
}

#hero .subtitle {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 2.5rem;
    font-weight: 300; /* Roboto light */
    margin-top: 0; /* Add this to remove default top margin */
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper img {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--bg-color);
    box-shadow: var(--card-shadow-hover);
}

/* ======== 5. ABOUT SECTION ======== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
}

.about-content p {
    font-size: 1.1rem;
}

/* ======== 6. SKILLS SECTION (Google Colors) ======== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.skill-category:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* --- Applying Google Accent Colors --- */
#skill-cat-google h3 { color: var(--google-blue); }
#skill-cat-web h3 { color: var(--google-red); }
#skill-cat-cloud h3 { color: var(--google-yellow); }
#skill-cat-security h3 { color: var(--google-green); }

.skill-category ul {
    margin-top: 1.25rem;
}

.skill-category ul li {
    padding: 0.4rem 0;
    font-weight: 500;
    color: var(--light-text);
}


/* ======== 7. EXPERIENCE SECTION ======== */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.timeline-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.timeline-item h3 span {
    color: var(--light-text);
    font-weight: 400; /* Roboto regular */
}

.date-location {
    color: var(--google-blue); /* Google Blue accent */
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.timeline-item ul {
    list-style-type: disc;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}


/* ======== 8. PROJECTS SECTION ======== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
}

.project-placeholder {
    height: 200px;
    background-color: #EAECEF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-style: italic;
    font-weight: 500;
}

.project-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 500;
}

.project-content p {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.project-link {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link i {
    font-size: 0.8rem;
}


/* ======== 9. EDUCATION SECTION ======== */
.education-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}

.education-item {
    max-width: 400px;
}

.education-item .institution {
    font-weight: 500;
    color: var(--light-text);
    margin-bottom: 0.25rem;
}

.education-item .date {
    font-size: 0.9rem;
    color: var(--google-blue); /* Google Blue accent */
    font-weight: 500;
}


/* ======== 10. FOOTER SECTION ======== */
footer {
    background-color: var(--dark-text);
    color: #C0C8D8;
    padding: 4rem 0;
}

.footer-content {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

footer h2 {
    color: var(--card-bg);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

footer p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.copyright {
    margin-top: 3rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #7a869a;
}

/* --- Hero Floating Icons --- */
.hero-floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits behind hero content */
    pointer-events: none; /* Icons are not interactive */
}

.hero-floating-icons i {
    position: absolute;
    color: var(--color); /* Uses variable from inline style */
    font-size: var(--size); /* Uses variable from inline style */
    opacity: 0.15; /* Subtle and in the background */
    animation: floatAnimation 6s ease-in-out infinite;
}

/* Position and delay each icon */
.hero-floating-icons i:nth-child(1) { /* Analytics */
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}
.hero-floating-icons i:nth-child(2) { /* Code */
    top: 65%;
    left: 10%;
    animation-delay: -2s;
}
.hero-floating-icons i:nth-child(3) { /* Cloud */
    top: 15%;
    right: 15%;
    animation-delay: -1s;
}
.hero-floating-icons i:nth-child(4) { /* Shield */
    top: 70%;
    right: 20%;
    animation-delay: -4s;
}
.hero-floating-icons i:nth-child(5) { /* Ads */
    top: 45%;
    left: 40%;
    animation-delay: -3s;
}

/* ======== 11. RESPONSIVENESS ======== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    #hero .subtitle {
        font-size: 1.25rem;
    }

    h2.section-title {
        font-size: 1.8rem;
    }
    
    section {
        padding: 3.5rem 0;
    }

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

    .hero-content {
        text-align: center;
        order: 2;
    }

    .hero-google-dots {
        justify-content: center; /* This will center the dots */
    }

    .hero-image-wrapper {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .hero-image-wrapper img {
        max-width: 280px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: var(--card-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 1.5rem;
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }
    
    .nav-menu.active {
        right: 0;
    }

    .nav-menu li a {
        font-size: 1.2rem;
        color: var(--dark-text);
        font-weight: 500;
    }
    
    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-toggle.active i::before {
        content: "\f659";
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .education-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* .hero-floating-icons {
        display: none;
    } */
    
    .timeline {
        padding: 0 1rem;
    }
}

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