/* --- Global Styles & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #333;
    --subtle-text: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* --- Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.navbar .nav-links a {
    text-decoration: none;
    color: var(--subtle-text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: var(--primary-color);
}

/* --- Hero Section (Homepage) --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: 30vh;
    gap: 5rem; /* Adjust this value to bring them closer or farther */
}

.hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.hero-text h1 span {
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--subtle-text);
    margin: 1rem 0;
    max-width: 500px;
}

.hero-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    /* This new line pulls the image down to show more of the top */
    object-position: center 25%; 
    border: 5px solid var(--primary-color);
}

/* --- Generic Sections (About, Skills, Connect) --- */
.section {
    padding: 4rem 0;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--subtle-text);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* Skills Section */
.skills-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-card {
    background-color: var(--card-background);
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

/* Connect Section */
.connect-card {
    background-color: var(--card-background);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 2rem auto;
}

/* --- Talks Section --- */
.talks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* LinkedIn Card Fallback */
.talk-card.linkedin-card {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: left;
}

.linkedin-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: #0077b5; /* LinkedIn Blue */
    margin-bottom: 1rem;
}

.linkedin-card-header span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.linkedin-card-body {
    flex-grow: 1; /* Pushes the button to the bottom */
}

.btn-linkedin {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: #0077b5;
    color: #fff;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- Blue Header for Blog/Books --- */
.page-header {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 4rem 1rem;
    border-bottom-left-radius: 80px;
}

.page-header h1 {
    font-size: 3rem;
}

.page-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.page-content {
    background-color: var(--card-background);
    max-width: 900px;
    margin: -3rem auto 3rem auto;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-height: 40vh;
}

.page-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.page-content h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
}

/* --- Book & Blog List Items --- */
.item-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.item-card h3 {
    margin-bottom: 0.25rem;
}

.item-card .author {
    color: var(--subtle-text);
    margin-bottom: 1rem;
    font-style: italic;
}

.item-card .read-more {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Social Links Icon --- */
.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 2rem; 
    text-decoration: none;
    margin-right: 1.5rem; 
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color); 
}

/* ========================================= */
/* --- Responsive Design & Media Queries --- */
/* ========================================= */

.menu-icon {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

/* --- For Tablets (Screens smaller than 992px) --- */
@media (max-width: 992px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 3rem 2rem;
    }
    .hero-image {
        margin-bottom: 2rem;
    }
    .hero-text {
        margin-bottom: 0;
    }
    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- For Mobile Phones (Screens smaller than 768px) --- */
@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 80px;
        left: 0;
        background-color: #fff;
        width: 100%;
        flex-direction: column;
        text-align: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        z-index: 1000;
    }

    .nav-links.active {
        max-height: 500px;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links li {
        padding: 0.5rem 0;
    }

    .section {
        padding: 3rem 1.5rem; 
    }

    .skills-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .skill-card {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }

    .page-content, .connect-card {
        padding: 2rem 1.5rem;
    }

    .hero-image img {
        width: 250px;
        height: 250px;
    }
}