:root {
    --primary-color: #2563eb; /* Royal Blue */
    --secondary-color: #1e293b; /* Slate 800 */
    --accent-color: #3b82f6; /* Lighter Blue */
    --bg-color: #f8fafc; /* Slate 50 */
    --card-bg: #ffffff;
    --text-color: #334155; /* Slate 700 */
    --heading-color: #0f172a; /* Slate 900 */
    --border-color: #e2e8f0; /* Slate 200 */
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    /* Subtle geometric pattern */
    background-image: 
        radial-gradient(#e2e8f0 0.5px, transparent 0.5px), 
        linear-gradient(to bottom, #f8fafc, #eff6ff);
    background-size: 30px 30px, 100% 100%;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Section refinement for visibility against the new background */
section:not(.hero):not(.contact-section) {
    position: relative;
    z-index: 1;
}

section:not(.hero):not(.contact-section) .container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; position: relative; display: inline-block;}
h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--primary-color);
    margin-top: 0.5rem;
    border-radius: 2px;
}
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; color: var(--secondary-color); }
h5 { font-size: 1rem; font-weight: 500; color: var(--text-color); font-style: italic; margin-bottom: 0.5rem;}

p { margin-bottom: 1rem; }

/* Layout Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 4rem 0;
}

/* Header & Nav */
header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--heading-color);
    letter-spacing: -0.025em;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--heading-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.mobile-menu-btn:hover {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
}

nav a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        z-index: 101;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease-in-out;
        z-index: 100;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    nav a {
        font-size: 1.1rem;
        width: 100%;
        display: block;
    }
}


/* Hero Section */
.hero {
    padding: 8rem 0;
    background-color: #ffffff;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--secondary-color) 30%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-role {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-image-container {
    flex-shrink: 0;
    position: relative;
}

/* Decorative background behind the image */
.hero-image-container::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 2.5rem;
    z-index: -1;
}

.profile-img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 8px solid white;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.02) rotate(1deg);
}

.hero-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
    transition: transform 0.2s, background-color 0.2s;
}

.hero-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    color: white;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}

/* Experience Section */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.job-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.job-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.job-card::before {
    content: '';
    position: absolute;
    left: -2.6rem; /* Adjust based on padding/border */
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border: 3px solid var(--bg-color);
    border-radius: 50%;
}

.role-badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.skill-list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.skill-list li {
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.skill-list li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact & Footer */
.contact-section {
    text-align: center;
    background-color: var(--secondary-color);
    background-image: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 6rem 0;
}

.contact-section h2 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 2.5rem;
    background: transparent; /* Remove the white box */
}

.contact-section h2::after {
    background: var(--accent-color);
    width: 80px;
    height: 6px;
    margin-left: auto;
    margin-right: auto;
}

.email-link {
    display: inline-block;
    font-size: 1.75rem;
    color: white;
    font-weight: 800;
    padding: 1.25rem 3rem;
    border: 3px solid var(--accent-color);
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.email-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

footer {
    text-align: center;
    padding: 3rem;
    background-color: #050a14;
    color: #94a3b8;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Grid & Cards for Achievements/Certifications */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: #eff6ff;
    padding: 0.75rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.card-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.card-content p {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: var(--text-color);
}

.card-date {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .hero-content {
        gap: 2rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    section:not(.hero):not(.contact-section) .container {
        padding: 2rem 1.5rem;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        height: 70px;
        padding: 0 1.5rem;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 101;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 80px 1.5rem 2rem;
        transition: right 0.3s ease-in-out;
        z-index: 100;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-role {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .profile-img {
        width: 260px;
        height: 260px;
    }

    .about-grid {
        padding: 1.5rem;
    }

    .timeline {
        padding-left: 0;
        border-left: none;
    }

    .job-card {
        padding: 1.25rem;
    }

    .job-card::before {
        display: none;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .email-link {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    nav ul {
        gap: 0.75rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    .profile-img {
        width: 220px;
        height: 220px;
    }
}
