/* ----- */
:root {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --secondary-bg: #2a2a2a;
  --accent-color: #808080;
  --hover-color: #007bff;
  --separator-color: rgba(255, 255, 255, 0.2);
  --font-size-large: 1.2em;
  --font-size-small: 0.8em;
}
[data-theme='light'] {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --secondary-bg: #f0f0f0;
  --accent-color: #404040;
  --separator-color: rgba(0, 0, 0, 0.2);
}
/* ----- */
body {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.3;
  margin: 0;
  padding: 20px;
  transition: background-color 0.3s, color 0.3s;
}
.container {
  max-width: 800px;
  margin: 0 auto;
}
header {
  text-align: center;
  margin-bottom: 20px;
}
.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 200px;
  height: 300px;
  margin: 0 auto;
  overflow: hidden;
}
.image-container img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.second {
  opacity: 0;
}
.image-container:hover .second {
  opacity: 1;
}
.image-container:hover .first {
  opacity: 0;
}
h1,
h2 {
  margin-bottom: 8px;
}
.contact-info {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
  font-size: var(--font-size-small);
  color: var(--accent-color);
}
.contact-info a {
  color: var(--accel-color);
  text-decoration: none;
}
.download-btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: var(--font-size-small);
}
.timeline,
.skills,
.projects,
.courses,
.certifications,
.publications,
.contact {
  position: relative;
  padding-top: 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--separator-color);
}
.timeline-item {
  margin-bottom: 20px;
  position: relative;
  padding-left: 50px;
  line-height: 0.8;
}
.timeline-item i {
  position: absolute;
  left: 0;
  top: 0;
  font-size: var(--font-size-large);
  color: var(--bg-color);
  background-color: var(--text-color);
  border-radius: 50%;
  padding: 10px;
  z-index: 2;
}
.timeline-item::after {
  content: '';
  position: absolute;
  margin-top: 18px;
  left: 18px;
  top: 25px;
  width: 2px;
  height: calc(100% - 30px);
  background-color: var(--text-color);
}
.company {
  color: var(--accent-color);
  font-size: var(--font-size-small);
  padding-top: 5px;
  margin-bottom: -5px;
}
.role {
  font-weight: bold;
  color: var(--text-color-tertiary);
  padding-bottom: 5px;
  margin-bottom: 5px;
}
.date {
  color: var(--accent-color);
  font-size: var(--font-size-small);
  position: absolute;
  top: 0;
  right: 0;
}
.skill-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}
.skill-group {
  display: inline-block;
  width: auto;
  vertical-align: top;
  text-align: center;
  margin-right: 20px;
  max-width: 240px;
}
.skill-group h3 {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.skill-group h3 i {
  margin-right: 10px;
}
.skill-group ul {
  list-style: none;
  padding: 0;
  font-size: var(--font-size-small);
}
.skill-group ul li {
  background-color: var(--accent-color);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 5px;
  display: inline-block;
}
.project-item {
  background-color: var(--secondary-bg);
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 5px;
}
.project-tech {
  font-style: italic;
  color: var(--accent-color);
  font-size: var(--font-size-small);
}
.project-links a {
  margin-right: 8px;
  color: var(--accent-color);
  text-decoration: none;
  font-size: var(--font-size-small);
}
.course-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}
.course-group {
  display: inline;
  width: auto;
  vertical-align: top;
  text-align: center;
  max-width: 800px;
}
.course-group ul {
  list-style: none;
  padding: 0;
  font-size: var(--font-size-small);
}
.course-group ul li {
  background-color: var(--accent-color);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 5px;
  display: inline-block;
}
.course-group ul li a {
  color: var(--text-coloraccent-color);
  text-decoration: none;
}
.badge-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
.certification-badge {
  width: 120px;
  height: 120px;
  object-fit: contain;
}
#citation-list {
  font-size: var(--font-size-small);
  line-height: 1.3;
}
.contact-form {
  display: flex;
  flex-direction: column;
}
.form-group {
  margin-bottom: 12px;
  margin-right: 20px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: var(--secondary-bg);
  color: var(--text-color);
}
.form-group textarea {
  height: 90px;
}
button[type='submit'] {
  background-color: var(--accent-color);
  color: #fff;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: var(--font-size-small);
}
footer {
  text-align: center;
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.social-icons a {
  color: var(--text-color);
  margin: 0 8px;
  text-decoration: none;
  font-size: var(--font-size-large);
}
.copyright a {
  color: var(--text-color);
  text-decoration: none;
}
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: var(--font-size-large);
  cursor: pointer;
  z-index: 1000;
}
.back-to-top {
  position: fixed;
  bottom: 10px;
  right: 20px;
  background-color: var(--secondary-bg);
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  display: none;
  font-size: var(--font-size-small);
}
a:hover,
.theme-toggle:hover {
  color: var(--hover-color);
  transition: color 0.3s ease;
}
.skill-group ul li:hover,
.course-group ul li:hover,
.download-btn:hover,
.back-to-top:hover,
button[type='submit']:hover {
  background-color: var(--hover-color);
  color: var(--text-color); /* This ensures text remains readable */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Responsive styles for smaller screens */
@media (max-width: 600px) {
  footer {
    justify-content: center;
  }

  .skill-group {
    margin-right: 20px;
    max-width: 500px;
  }
  .date {
    position: relative;
    top: 0;
    right: 0;
  }
}
