/* --- Global Styles & CSS Variables --- */
:root {
    /* Bright and Clean Light Theme */
    --primary-color: #FDC84D; /* Golden Yellow */
    --secondary-color: #e8b642; /* Darker Gold for Hover */
    --background-color: #F5F5F5; /* Light Gray */
    --card-background-color: #ffffff;
    --text-color: #2F4858; /* Charcoal Gray */
    --heading-color: #2F4858; /* Charcoal Gray */
    --subtle-text-color: #6c757d;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
}

body.dark-mode {
    /* Modern and Bold Dark Theme */
    --primary-color: #FFD700; /* Muted Gold */
    --secondary-color: #ffe24a; /* Brighter Gold for Hover */
    --background-color: #1F262B; /* Deep Charcoal */
    --card-background-color: #2d3748; /* Lighter Charcoal */
    --text-color: #F0F0F0; /* Soft Off-white */
    --heading-color: #F0F0F0; /* Soft Off-white */
    --subtle-text-color: #a0aec0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

h1, h2, h3 {
    color: var(--heading-color);
    margin-bottom: 10px;
}

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

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-background-color);
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--heading-color);
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* --- Header --- */
.profile-header {
    background: var(--card-background-color);
    color: var(--text-color);
    padding: 40px 20px 20px; /* Adjusted padding */
    text-align: center;
    position: relative;
    border-bottom: 2px solid var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

.profile-header h1 {
    margin: 0;
    color: var(--heading-color);
    font-size: 2.5em;
    font-weight: 600;
}

.profile-header .subtitle {
    margin: 5px 0 20px; /* Added margin-bottom */
    font-size: 1.1em;
    font-weight: 300;
    color: var(--subtle-text-color);
}

/* --- Navigation Bar --- */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-bottom: 10px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    padding: 8px 16px;
    border-radius: 25px;
    border-bottom: 2px solid transparent;
    transition: background-color 0.3s ease, color 0.3s ease, border-bottom-color 0.3s ease;
}

.nav-link:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
    text-decoration: none;
}

.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* --- Card Layout for Sections --- */
.card {
    background: var(--card-background-color);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* --- Skills Section with Pills --- */
.skills-container { display: flex; gap: 30px; flex-wrap: wrap; }
.skill-category { flex: 1; min-width: 250px; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 10px; }

.skill-pills span {
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid var(--primary-color);
}

/* --- Projects Section with Grid --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.project-item {
    background: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.project-item:hover { transform: scale(1.03); }
.project-item h3 { margin-top: 0; }
.project-item p { font-size: 0.95em; margin-bottom: 15px; }

/* --- Project Links/Buttons --- */
.project-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap; 
}

.project-links a {
    background-color: var(--primary-color);
    color: #2F4858; /* Dark text for contrast on button */
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
}

.project-links a:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
    transform: translateY(-2px);
    color: #2F4858;
}

body.dark-mode .project-links a {
     color: #1F262B; /* Keep dark text on gold button even in dark mode */
}

/* --- Certifications List --- */
#certs ul { list-style-type: '✅  '; padding-left: 20px; }

/* --- Footer --- */
footer {
    background: var(--heading-color);
    color: var(--background-color);
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

footer h2 { color: var(--background-color); }
footer a { color: var(--background-color); }
footer a:hover { color: var(--background-color); opacity: 0.8; }

/* --- Animation Styles --- */
.hidden { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.show { opacity: 1; transform: translateY(0); }

/* --- Social Media Icon Styles --- */
.social-icons { margin-top: 20px; display: flex; justify-content: center; gap: 25px; }

.social-icons a {
    color: var(--background-color);
    font-size: 1.8rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    color: var(--background-color);
    transform: scale(1.2) translateY(-3px);
    text-decoration: none;
    opacity: 0.8;
}