body.dark-mode {
    color: #ffffff;
}

body.dark-mode header,
body.dark-mode footer {
    background-color: #7a7a7a;
}

body.dark-mode header .logo h1 {
    color: #ffffff;
}

body.dark-mode header nav ul li a {
    color: #ffffff;
}

body.dark-mode #hero,
body.dark-mode #about,
body.dark-mode #projects,
body.dark-mode #skills {
    background-color: #bfbfbf;
    color: #ffffff;
}

body.dark-mode #hero h2,
body.dark-mode #hero h3,
body.dark-mode #hero p,
body.dark-mode #about h2,
body.dark-mode #projects h2,
body.dark-mode #skills h2,
body.dark-mode p,
body.dark-mode .skill-category span {
    color: #ffffff;
}

body.dark-mode #hero h3 {
    color: #7db8f7;
}

body.dark-mode .skill-category span {
    background-color: #9e9e9e;
}

body.dark-mode .contact-icons img {
    filter: brightness(0.9);
}

body.dark-mode .cv-download {
    color: #ffffff;
}

body.dark-mode .contact-section {
    background-color: #bfbfbf;
    color: #ffffff;
}

body.dark-mode .contact-section h2,
body.dark-mode .contact-section .location-text,
body.dark-mode .contact-section p,
body.dark-mode .contact-section span {
    color: #ffffff;
}

body.dark-mode .contact-section .contact-icons img {
    filter: brightness(0.9);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #ffffff;
    color: #111111;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo h1 { margin: 0; font-size: 2.5rem; }

header nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

header nav ul li a {
    color: #111111;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

header nav ul li a:hover {
    color: #007BFF;
    text-decoration: underline;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

.header-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.header-buttons button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.header-buttons img {
    width: 24px;
    height: 24px;
}

#hero, #about, #skills, #contact {
    position: relative;
    background-color: #ffffff;
    background-image: url('../assets/backgrounds/scattered-forcefields.svg');
    background-repeat: repeat;
    background-size: cover;
    background-attachment: fixed;
    transition: background-color 0.3s ease;
    z-index: 0;
}

#hero::before, #about::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
}

#hero > *, #about > * {
    position: relative;
    z-index: 2;
}

body.dark-mode #hero::before, body.dark-mode #about::before {
    background: rgba(0, 0, 0, 0.3);
}

#hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
    min-height: 50vh;
}

#hero h2 {
    font-size: 2.5rem;
    color: #111111;
    margin-bottom: 0.25rem;
}

#hero h3 {
    font-size: 1.3rem;
    color: #007BFF;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 1rem;
}

#hero p {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #333333;
    max-width: 600px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-primary {
    background-color: #007BFF;
    color: #ffffff;
}

.cv-download {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #111111;
    font-size: 0.95rem;
}

.cv-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.cv-download:hover .cv-icon {
    transform: scale(1.1);
}

#about { padding: 4rem 2rem; display: flex; flex-direction: column; align-items: center; }

#about h2 { font-size: 2rem; color: #111111; text-align: center; margin-bottom: 0;}

.about-content { display: flex; gap: 2rem; max-width: 1000px; width: 100%; align-items: center; }

.about-text { flex: 1; }
.about-text p { font-size: 1.1rem; line-height: 1.6; color: #333333; }

.about-photo { flex: 1; display: flex; justify-content: center; }
.about-photo img { width: 200px; height: auto; border-radius: 50%; max-width: 100%; }

.project-card { width: 100%; max-width: 400px; text-align: center; }
.project-card > img { width: 100%; height: auto; object-fit: contain; display: block; margin: 0 auto 1rem; }

.github-icon { width: 24px; height: 24px; display: inline-block; vertical-align: middle; transition: transform 0.2s ease; }
.github-icon:hover { transform: scale(1.1); }

#projects { padding-top: 2rem; }
#projects h2 { text-align: center; margin-bottom: 2rem; }

.projects-container { display: flex; flex-direction: column; align-items: center; }
.swiper { padding: 1rem 0; width: 100%; }
.swiper-slide { display: flex; justify-content: center; }

.carousel-bar { width: 60%; height: 8px; background-color: #e0e0e0; border-radius: 4px; margin-top: 1rem; overflow: hidden; }
.carousel-progress { height: 100%; width: 0%; background-color: #007BFF; border-radius: 4px; transition: width 0.3s ease; }

.project-card > img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    margin-bottom: 1rem;
}

.projects-container {
    display: flex;
    justify-content: center;
}

.swiper {
    width: 100%;
    max-width: 1200px;
}

#skills { padding-top: 1rem; padding-bottom: 2rem; }
#skills h2 { text-align: center; margin-bottom: 2rem; }

.skill-category { margin: 2rem 0 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.skill-category h3 { width: 100%; text-align: center; margin-bottom: 0.75rem; }
.skill-category span { background-color: #f0f0f0; padding: 0.5rem 0.75rem; border-radius: 4px; font-size: 0.95rem; color: #111111; }

#contact { padding: 2rem 0; }
#contact h2 { text-align: center; margin-top: 0; }
.contact-icons { display: flex; gap: 1.5rem; justify-content: center; align-items: center; margin: 1.5rem 0; }
.contact-icons img { width: 32px; height: 32px; transition: transform 0.2s ease; }
.contact-icons img:hover { transform: scale(1.1); }

.contact-location { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.location-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.location-icon img { width: 100%; height: 100%; object-fit: contain; }
.location-text { font-size: 1rem; color: #333333; }

footer { background-color: #d9d9d9; padding: 2rem 1.5rem; text-align: center; color: #333333; }
footer p { margin: 0.5rem 0; font-size: 0.9rem; }
footer a { color: #007BFF; text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    header { flex-direction: column; align-items: center; gap: 0.75rem; }
    header nav ul { flex-direction: column; gap: 0.5rem; text-align: center; }
    #hero h2 { font-size: 1.75rem; }
    #hero h3 { font-size: 1.1rem; }
    #hero p { font-size: 1rem; padding: 0 1rem; }
    .about-content { flex-direction: column; text-align: center; }
    .about-photo img { width: 120px; }
    .carousel-bar { width: 90%; }
    .swiper { padding: 0.5rem 0; }
    .skill-category span { font-size: 0.85rem; padding: 0.4rem 0.6rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    header { flex-direction: column; align-items: center; gap: 1rem; }
    header nav ul { flex-direction: column; gap: 0.75rem; text-align: center; }
    #hero h2 { font-size: 2rem; }
    #hero h3 { font-size: 1.2rem; }
    #hero p { font-size: 1.1rem; }
    .about-content { flex-direction: column; text-align: center; }
    .about-photo img { width: 150px; }
    .carousel-bar { width: 80%; }
    .swiper { padding: 1rem 0; }
    .skill-category span { font-size: 0.9rem; padding: 0.45rem 0.65rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .carousel-bar { width: 70%; }
}
