header {
    background: linear-gradient(to right, #007bff, #0056b3);
    padding: 50px 0;
    text-align: center;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
}

h1, h2 {
    font-weight: 600;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    display: inline-block;
    padding-bottom: 5px;
}

h3 {
    font-size: 1.5rem !important;
    margin-bottom: 10px;
}

p {
    font-size: 1.1rem;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.navbar {
    position: sticky !important;
    top: 0;
    z-index: 1000; /* Ensures it stays above other elements */
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.navbar-nav {
    align-items: center;
}

.switch {
    display: inline-block;
    width: 42px;
    height: 22px;
    position: relative;
    margin-left: 8px; /* Adjust left margin */
}

.navbar { transition: background 0.3s; }
.btn-toggle { cursor: pointer; font-size: 1.2rem; margin-left: 10px; }

/* General Fixes */
.dark-mode {
    background: #121212;
    color: #fff;
}

/* Navbar Dark Mode Fix */
.dark-mode .navbar {
    background: #1e1e1e !important;
}

.dark-mode .navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;
}

/* Header Fix */
.dark-mode header {
    background: linear-gradient(to right, #333, #000);
}

/* Card Fix */
.dark-mode .card {
    background: #1e1e1e;
    color: #fff;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

/* Footer Fix */
.dark-mode footer {
    background: #1e1e1e;
}

/* Buttons */
.dark-mode .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.dark-mode .btn-primary:hover {
    background-color: #0056b3;
    border-color: #004494;
}

/* Contact Form */
.dark-mode .form-control {
    background-color: #222;
    color: #fff;
    border: 1px solid #555;
}

.dark-mode .form-control::placeholder {
    color: #bbb;
}

/* CV PDF Viewer */
.dark-mode #pdf-container iframe {
    filter: invert(0.9);
}


.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: white;
    font-size: 18px;
}

footer {
    background: #343a40;
    color: white;
}

.pdf-container {
    width: 100%;
    max-width: 100%;
    height: 600px;
    overflow: hidden;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
}