/* === GOOGLE FONT IMPORT === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* === VARIABLES - Enterprise IT & Security Theme === */
:root {
    --primary-blue: #00427a; /* Deep trust/corporate blue */
    --accent-blue: #0066cc;  /* Brighter action blue */
    --bg-page: #f4f7f9;      /* Very soft cool gray for the body */
    --bg-card: #ffffff;      /* Clean white for content areas */
    --text-dark: #0f172a;    /* High contrast Slate 900 for headings */
    --text-body: #475569;    /* Readable Slate 600 for paragraphs */
    --border-color: #cbd5e1; /* Soft structural borders */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

body {
    font-family: "Inter", "system-ui", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    background-color: var(--bg-page);
    color: var(--text-body);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

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

/* === HEADER & NAVIGATION === */
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 24px;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 2rem;
}

header nav a {
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.95rem;
}

header nav a:hover {
    color: var(--accent-blue);
}

/* === HERO SECTION === */
.hero {
    /* Use padding math to simulate a centered 1000px container while keeping the background full width */
    padding: 6rem max(24px, calc(50vw - 476px));
    background: linear-gradient(135deg, var(--primary-blue) 0%, #001f3f 100%);
    color: var(--bg-card);
    border-bottom: 4px solid var(--accent-blue);
    
    /* Grid layout to put image on the right without changing HTML */
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.5rem 4rem;
    align-items: center;
}

.hero img {
    grid-column: 2;
    grid-row: 1 / 3; /* Spans across both text rows */
    max-width: 280px; /* Controls size while showing the full uncropped image */
    height: auto;
    border-radius: 8px; /* Soft enterprise edge instead of a circle */
    border: 4px solid var(--bg-card);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.hero h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    text-align: left;
    align-self: end;
}

.hero .tagline {
    grid-column: 1;
    grid-row: 2;
    font-size: 1.5rem;
    font-weight: 300;
    color: #e2e8f0;
    margin: 0;
    text-align: left;
    align-self: start;
}

/* === MAIN CONTENT SECTIONS === */
section {
    padding: 5rem 0;
}

section h2.section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3.5rem;
    position: relative;
}

/* Clean underline instead of a floating bar */
section h2.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-blue);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* --- About Section --- */
#about p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: var(--text-dark);
}

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

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

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

.skill-category h3 {
    margin-top: 0;
    color: var(--primary-blue);
    font-size: 1.25rem;
    border-bottom: 2px solid var(--bg-page);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.skill-category ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Accessible checklist style */
.skill-category li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.75rem;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.skill-category li::before {
    content: '✓'; 
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: 700;
}

/* --- Experience & Education (Timeline) --- */
.timeline {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    margin-left: 3.5rem;
    position: relative;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s ease;
}

.timeline-item:hover {
    box-shadow: var(--hover-shadow);
}

/* Timeline anchor dot */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -3.5rem; /* Aligns dot perfectly with the vertical line */
    top: 2.25rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    border: 4px solid var(--bg-page);
    box-shadow: 0 0 0 1px var(--border-color);
}

.timeline-item h3 {
    margin: 0 0 0.25rem 0;
    color: var(--text-dark);
    font-size: 1.35rem;
}

.timeline-item .subheading {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.timeline-item .date {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-item ul {
    margin: 0;
    padding-left: 1.25rem;
}

.timeline-item li {
    margin-bottom: 0.5rem;
    color: var(--text-body);
}

/* --- Footer --- */
footer {
    background-color: var(--text-dark);
    color: #cbd5e1;
    text-align: center;
    padding: 4rem 1rem;
    border-top: 4px solid var(--primary-blue);
}

footer img {
    width: 140px;
    margin-bottom: 1.5rem;
    opacity: 0.4;
    filter: invert(1);
    transition: opacity 0.3s ease;
}

footer img:hover {
    opacity: 0.8;
}

footer p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    header nav ul {
        gap: 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
/* Mobile adjustments for the Hero grid */
    .hero {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 4rem 24px;
    }
    .hero img {
        grid-column: 1;
        grid-row: 1; /* Move image back to top on mobile */
        max-width: 220px;
        margin: 0 auto 1.5rem auto;
    }
    .hero h2 {
        grid-column: 1;
        grid-row: 2;
        text-align: center;
        font-size: 2.5rem;
    }
    .hero .tagline {
        grid-column: 1;
        grid-row: 3;
        text-align: center;
        font-size: 1.15rem;
    }
    .timeline::before {
        left: 0;
    }
    .timeline-item {
        margin-left: 1.5rem;
        padding: 1.5rem;
    }
    .timeline-item::before {
        left: -1.5rem;
        top: 1.75rem;
    }
}