body {
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f9;
  color: #333;
  text-align: center;
  transition: background-color 0.3s ease;
}
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: #0077b6;
  color: white;
  padding: 15px 0;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}
header a {
  display: inline-block;
}
header a img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}
header .email {
  margin: 8px 0 10px;
  font-size: 13px;
  letter-spacing: 0.5px;
}
header .email a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}
header .email a:hover,
header .email a:focus {
  opacity: 0.8;
  text-decoration: underline;
}
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
}
nav ul li {
  position: relative;
}
nav ul li a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  transition: background 0.3s;
  border-radius: 5px;
  outline: none;
}
nav ul li a:hover,
nav ul li a:focus {
  background-color: #014463;
}
nav ul li ul.dropdown {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background-color: #02669c;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  padding: 10px 0;
}
nav ul li ul.dropdown li {
  width: 100%;
}
nav ul li ul.dropdown li a {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
}
nav ul li:hover ul.dropdown {
  display: block;
  width: 120px;
  height: auto;
}
.icon {
  width: 20px;
  height: 20px;
}
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 200px 20px 50px;
}
section {
  margin-bottom: 40px;
  scroll-snap-align: center;
  section {
    margin-bottom: 40px;
  }
  color: #005a96;
  margin-bottom: 20px;
  font-weight: 700;
}
section p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: #333;
}
section img {
  max-width: 100%;
  height: auto;
  margin-top: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
#projects h3 {
  font-size: 24px;
  color: #1298e0;
  margin-bottom: 15px;
  font-weight: 700;
}
.badges img {
  margin: 10px;
  transition: transform 0.3s ease;
}
.badges img:hover {
  transform: scale(1.05);
}
.project-container {
  display: flex;
  flex-direction: column;
  gap: 50px;
}
.project-item {
  display: flex;
  align-items: center;
  gap: 20px;
}
.project-item:nth-child(odd) {
  flex-direction: row;
}
.project-item:nth-child(even) {
  flex-direction: row-reverse;
}
.project-text {
  flex: 1;
  padding: 0 20px;
}
.project-image-wrapper {
  flex: 0 0 302px;
  text-align: center;
  transition: transform 0.3s ease;
  overflow: hidden;
}
.project-image-wrapper:hover {
  transform: scale(1.1);
}
.project-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
@media (max-width: 900px) {
  .project-item {
    flex-direction: column;
    text-align: center;
  }
  .project-text {
    padding: 0;
    text-align: center;
  }
  .project-image-wrapper {
    margin-top: 20px;
  }
}
.toggle-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}
.checkbox {
  opacity: 0;
  position: absolute;
}
.checkbox-label {
  background-color: #6698b6;
  width: 40px;
  height: 16px;
  border-radius: 50px;
  position: relative;
  padding: 5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.checkbox-label .fas {
  font-size: 18px;
}
.fa-moon {
  color: #f1c40f;
}
.fa-sun {
  color: #f3872e;
}
.checkbox-label .ball {
  background-color: #fff;
  width: 22px;
  height: 22px;
  position: absolute;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  transition: transform 0.2s linear;
}
.checkbox:checked + .checkbox-label .ball {
  transform: translateX(24px);
}
html[data-theme="dark"],
html[data-theme="dark"] body {
  background-color: #333;
  color: #e8e8e8;
}
html[data-theme="dark"] header {
  background-color: #1d1c1c;
  border-bottom: 1px solid #333;
}
html[data-theme="dark"] header a {
  color: #ffffff;
}
html[data-theme="dark"] header .email a {
  color: #e0e0e0;
}
html[data-theme="dark"] header .email a:hover,
html[data-theme="dark"] header .email a:focus {
  color: #ffffff;
}
html[data-theme="dark"] nav ul li a {
  color: #ffffff;
}
html[data-theme="dark"] nav ul li a:hover,
html[data-theme="dark"] nav ul li a:focus {
  background-color: #333;
}
html[data-theme="dark"] nav ul li ul.dropdown {
  background-color: #333;
}
html[data-theme="dark"] nav ul li ul.dropdown li a {
  color: #e8e8e8;
}
html[data-theme="dark"] nav ul li ul.dropdown li a:hover {
  background-color: #333;
  color: #ffffff;
}
html[data-theme="dark"] section h2 {
  color: #ffd700;
}
html[data-theme="dark"] section p {
  color: #d0d0d0;
}
html[data-theme="dark"] .icon {
  filter: invert(100%);
}
.ibm-logo {
  filter: saturate(1.1) brightness(0.97);
}
html[data-theme="dark"] .ibm-logo {
  filter: invert(88%) hue-rotate(180deg) brightness(1.08) saturate(1.1);
}
html[data-theme="dark"] .checkbox-label {
  background-color: #444;
}
html[data-theme="dark"] #projects h3 {
  color: #f59e2c;
}
html[data-theme="dark"] #projects p {
  color: #d0d0d0;
}
html[data-theme="dark"] section {
  color: #d0d0d0;
}
html[data-theme="dark"] a {
  color: #64b5f6;
}
html[data-theme="dark"] a:hover {
  color: #90caf9;
}
html[data-theme="dark"] a:focus {
  outline: 2px solid #ffd700;
}
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 14px;
  background-color: #0077b6;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  z-index: 100;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 0.8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
#back-to-top:hover {
  background-color: #005a96;
}
html[data-theme="dark"] #back-to-top {
  background-color: #1a1a1a;
  color: #ffd700;
}
html[data-theme="dark"] #back-to-top:hover {
  background-color: #2a2a2a;
}
@media (max-width: 768px) {
  header {
    padding: 12px 0;
  }
  header .email {
    font-size: 11px;
  }
  nav ul {
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
  }
  nav ul li ul.dropdown {
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
  }
  main {
    padding: 180px 10px 50px;
  }
  section h2 {
    font-size: 24px;
  }
  .toggle-container {
    top: 10px;
    right: 10px;
  }
}
@media (max-width: 480px) {
  header {
    padding: 10px;
  }
  nav ul {
    flex-direction: row;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
  }
  main {
    padding: 160px 10px 50px;
  }
  section h2 {
    font-size: 20px;
  }
}
