/*
|--------------------------------------------------------------------------
| CSS Refactor for Jawad Azeem Portfolio (Updated for White Background)
|--------------------------------------------------------------------------
|
| Changes:
| 1. Removed global body background (the blue gradient).
| 2. Applied the blue gradient specifically to the .hero section.
| 3. Set a standard white background for all other content sections.
|
*/

:root {
    /* Colors */
    --color-primary: #1b4586;
    --color-primary-light: #1b46867e; /* Accent-2 */
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-on-dark: #ffffff;
    --color-border: #e5e7eb;
    --color-surface: #ffffff; /* Adjusted to white for all sections */
    --color-card-bg: rgba(255, 255, 255, 0.96);
    --color-alt-bg: #f8f9fb; /* Retained for visual separation between white sections */

    /* Background Gradient (For Hero Only) */
    --bg-gradient: linear-gradient(
        135deg,
        #132f55 0%,
        #1b4586 50%,
        #3a6fb5 100%
    );

    /* Spacing & Effects */
    --space-section: 80px;
    --radius-default: 12px;
    --radius-card: 14px;
    --shadow-default: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-card-hover: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* -- Dynamic Gradient Animation for Hero Background -- */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-surface); /* Global background is now white */
    overflow-x: hidden;
}

/* ---------------------------------- 2. Layout & Typography ---------------------------------- */

.container {
    max-width: 1230px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    align-items: center;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: 700;
}

h1 {
    font-size: clamp(28px, 4vw, 44px);
}

h2 {
    font-size: clamp(24px, 3.2vw, 34px);
}

h3 {
    font-size: 22px;
}

h4 {
    font-size: 18px;
}

p {
    margin: 0 0 16px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-primary);
    font-weight: 600;
}

.muted {
    color: var(--color-muted);
}

.small {
    font-size: 14px;
}

.accent {
    color: var(--color-primary);
}

/* ---------------------------------- 3. Components (Buttons, Cards, Forms) ---------------------------------- */

.cta-row {
    display: flex;
    gap: 12px;
    margin: 16px 0 8px;
}

/* Base Button Style */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-default);
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

/* Primary Button (Solid) */
.btn.primary {
    background: var(--color-primary);
    color: var(--color-on-dark);
    font-weight: 600;
    border: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary:hover {
    transform: translateY(-2px);
    background: var(--color-primary-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ghost Button (On Hero) */
.btn.ghost {
    background: transparent;
    color: var(--color-text);
    font-size: x-large;
    border-color: var(--color-border);
}

.btn.ghost:hover {
    transform: translateY(-1px);
    background: var(--color-primary);
    color: #e5e7eb;
    border-color: var(--color-primary);
}

/* Project Link Button */
.project-link-btn {
    background: var(--color-primary);
    color: var(--color-on-dark);
    font-family: inherit;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    margin-top: 20px;
    padding: 10px 32px;
    border-radius: var(--radius-default);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.project-link-btn:hover {
    transform: translateY(-2px);
    background: var(--color-primary-light);
}

/* Card Styles (Skills/About) */
.skill-card,
.about-card,
.skill-card-wide,
.experience-card,
.project-card {
    background: var(--color-card-bg); /* Cards stay slightly transparent white */
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-default); /* Apply default shadow to cards */
}

.skill-card:hover,
.about-card:hover,
.skill-card-wide:hover,
.experience-card:hover,
.project-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-card-hover);
}

.skill-card-wide {
    grid-column: span 2;
}

/* Form Styles */
input, textarea {
    font-family: inherit;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-default);
    border: 1px solid var(--color-border);
    background: var(--color-card-bg);
    color: var(--color-text);
    outline: none;
    margin-top: 4px;
}

input:focus, textarea:focus {
    border-color: var(--color-primary);
}

/* ---------------------------------- 4. Sections ---------------------------------- */

.section {
    padding: var(--space-section) 0;
    position: relative;
    background: var(--color-surface); /* Default section background is white */
}

.section.alt {
    background: var(--color-alt-bg); /* Retain the slight separation for alt sections */
}

/* --- Hero (The ONLY section with the blue gradient) --- */
.hero {
    /* Overrides the default .section background */
    background: var(--bg-gradient); 
    background-size: 300% 300%; /* Make the background large enough to shift */
    animation: gradient-shift 25s ease infinite; /* Apply the slow, repeating animation */
    
    padding-top: 96px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-centered .cta-row {
    justify-content: center;
}

.hero-name-card {
    /* Hero card styling */
    background: var(--color-card-bg);
    border-radius: 20px;
    padding: 90px 98px;
    text-align: center;
    border: 1px solid var(--color-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    max-width: 1020px;
    margin: 0 auto;
}

/* --- About --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.about-aside {
    display: grid;
    gap: 16px;
}

.cert-list {
    list-style: disc;
    padding-left: 25px;
    margin: 0;
}

/* --- Experience --- */
.experience-card {
    /* Resetting specific styles from previous block where they were grouped */
    max-width: 800px;
    margin: 18px auto 0;
    padding: 24px;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.job-header h3 {
    margin-bottom: 0;
}

.dates {
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

.company-name {
    color: var(--color-muted);
    font-style: italic;
    margin-bottom: 12px;
}

.job-points {
    padding-left: 20px;
    margin: 0;
}

.job-points li {
    margin-bottom: 8px;
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.project-card {
    /* Resetting specific styles from previous block where they were grouped */
    padding: 16px;
}

.project-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.badge {
    border: 1px solid var(--color-border);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--color-primary);
    white-space: nowrap;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 10px 0 0;
    list-style: none;
}

.tags li {
    border: 1px solid var(--color-border);
    padding: 6px 10px;
    border-radius: 999px;
    list-style: none;
}

.links-row {
    margin-top: 10px;
}

.link {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-primary);
    transition: opacity 0.2s ease;
}

.link:hover {
    opacity: 0.9;
}

/* --- Contact --- */
.contact-form {
    margin-top: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

label {
    display: block;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 28px 0;
    background: var(--color-surface);
    color: var(--color-muted);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.socials {
    display: flex;
    gap: 14px;
}

.socials a {
    color: var(--color-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.socials a:hover {
    color: var(--color-text);
}

/* ---------------------------------- 5. Media Queries ---------------------------------- */

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .job-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-name-card {
        padding: 60px 30px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        flex-direction: column;
        gap: 10px;
    }
}