/* --- Global Styles & Variables (Light Mode) --- */
:root {
    --primary-color: #0056b3; /* A professional blue */
    --secondary-color: #0077b5; /* A slightly different blue for accents */
    --tertiary-color: #004d99; /* Darker blue */
    --background-color: #ffffff; /* White background */
    --card-color: #f9f9f9; /* Off-white cards */
    --text-color: #333;
    --heading-color: #1a1a1a;
    --font-main: 'Roboto', sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Dark Mode Styles --- */
body.dark-mode {
    --background-color: #2c3e50; /* Dark gray-blue background */
    --card-color: #34495e;
    --text-color: #ecf0f1; /* Light gray text */
    --heading-color: #fff;
    --primary-color: #3498db; /* A bright, professional blue for dark mode */
    --secondary-color: #2ecc71; /* A green for accents */
    --tertiary-color: #f1c40f; /* A yellow for accents */
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 100;
}

.toggle-checkbox {
    display: none;
}

.toggle-label {
    display: block;
    width: 60px;
    height: 30px;
    background-color: #ccc;
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-checkbox:checked + .toggle-label::after {
    transform: translateX(30px);
}

body:not(.dark-mode) .toggle-icon.dark-icon,
body.dark-mode .toggle-icon.light-icon {
    display: none;
}
body.dark-mode .toggle-icon.dark-icon {
    display: inline-block;
}
body:not(.dark-mode) .toggle-icon.light-icon {
    display: inline-block;
}

.toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1.2rem;
    transition: opacity 0.3s;
}

.light-icon {
    left: 8px;
    opacity: 1;
}
.dark-icon {
    right: 8px;
    opacity: 0;
}
.toggle-checkbox:checked + .toggle-label .light-icon {
    opacity: 0;
}
.toggle-checkbox:checked + .toggle-label .dark-icon {
    opacity: 1;
}
.toggle-checkbox:checked + .toggle-label {
    background-color: var(--primary-color);
}
.toggle-checkbox:checked + .toggle-label::after {
    background-color: #fff;
}


/* --- Other existing CSS remains unchanged but will use the new variables --- */
.container {
    max-width: 1000px;
    margin: auto;
    overflow: hidden;
    padding: 0 1.5rem;
}

header {
    background: var(--tertiary-color); /* Solid dark blue background */
    color: #fff;
    padding-top: 50px;
    padding-bottom: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

header .profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

header .profile-photo:hover {
    transform: scale(1.05) rotate(3deg);
}

header h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-family: var(--font-main);
    font-size: 1.4rem;
    color: #fff;
    margin-top: 0.5rem;
    font-weight: 500;
}

section {
    padding: 3rem 0;
    margin: 2rem 0;
}

.card {
    background: var(--card-color);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s forwards;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h2 {
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.experience-item {
    border-left: 4px solid var(--tertiary-color);
    padding-left: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-item::before {
    content: '\f0b1';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: -20px;
    top: 0;
    font-size: 1.5rem;
    color: var(--tertiary-color);
    background: var(--card-color);
    padding: 5px;
    border-radius: 50%;
}

.experience-item h3 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin-bottom: 0.2rem;
}

.experience-item p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
}
body.dark-mode .experience-item p {
    color: #ccc;
}


.experience-item ul {
    list-style: none;
    padding-left: 0;
}

.experience-item li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.experience-item li::before {
    content: "\f00c";
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-item {
    background: var(--background-color);
    color: var(--text-color);
    padding: 1.2rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-item:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.skill-item i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.skill-item:hover i {
    color: #fff;
}

footer {
    text-align: center;
    padding: 2.5rem 0;
    background: #2b2b2b;
    color: #fff;
}

.contact-info {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-info a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--secondary-color);
}

.contact-info i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2.5rem;
    }
    header p {
        font-size: 1.2rem;
    }
    .card {
        padding: 1.5rem;
    }
    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }
    .contact-info a {
        display: block;
        text-align: center;
    }
    .experience-item::before {
        left: -10px;
    }
}