/* my css */
:root {
  /* Light mode colors */
  --bg-color: #F4F7F5;
  --header-bg-color: #F4F7F5;
  --text-color: #002050;
  --primary-color: #002050;
  --secondary-color: #748CAB;
  --hover-color: #6E8898;
  --base-font-size: 16px;
}

body {
  font-family: 'Lato', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 1rem; /* 16px */
}

.container {
  max-width: 75rem; /* 1200px */
  margin: 0 auto;
  padding: 0 1.25rem; /* 20px */
}

header {
  background-color: var(--primary-color);
  color: var(--bg-color);
  padding: 1.25rem 0; /* 20px */
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(255,255,255,0));
  pointer-events: none;
}

.logo {
  max-width: 9.375rem; /* 150px */
  filter: drop-shadow(0 0.125rem 0.25rem rgba(0,0,0,0.1)); /* 2px 4px */
}

.header-content {
  text-align: center;
  flex-grow: 1;
}

.header-content h1 {
  margin-bottom: 0.3125rem; /* 5px */
  font-size: 2.5rem; /* 40px */
}

.header-content p {
  margin: 0.3125rem 0; /* 5px */
  font-size: 1.1rem; /* 17.6px */
}

.contact {
  text-align: center;
  margin: 1.25rem 0; /* 20px */
  font-size: 1.2rem; /* 19.2px */
}

.contact a {
  color: var(--primary-color);
  text-decoration: none;
}

.skills {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem; /* 40px */
  margin-top: 2.5rem; /* 40px */
}

.skill-item {
  flex: 1;
  background-color: var(--bg-color);
  border: 0.0625rem solid var(--secondary-color); /* 1px */
  border-radius: 0.5rem; /* 8px */
  padding: 1.25rem; /* 20px */
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.1); /* 2px 4px */
}

.skill-item h3 {
  margin: 0 0 1.25rem 0; /* 20px */
  color: var(--primary-color);
  font-size: 1.5rem; /* 24px */
  text-align: center;
}

.skill-details ul {
  padding-left: 1.25rem; /* 20px */
}

.skill-details li {
  margin-bottom: 0.625rem; /* 10px */
}

.job {
  margin-bottom: 1.875rem; /* 30px */
  border-bottom: 0.0625rem solid var(--secondary-color); /* 1px */
  padding-bottom: 1.25rem; /* 20px */
}

.job-header {
  display: flex;
/*   justify-content: flex-start; */  
  justify-content: space-between;
  align-items: center;
}

.job:last-child {
  border-bottom: none;
}

.company-logo {
  margin-left: 1rem;
  height: auto;
  max-width: 7.5rem;
  align-self: flex-start;
}

.company-name {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1.3rem; /* 19.2px */
}

.job-title {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1rem; /* 19.2px */
}

.job-title, .company-name, .experience-period {
  margin: 0;
}

.job-details {
  display: flex;
  flex-direction: column;
}

.experience-period {
  font-style: italic;
  font-weight: bold;
  color: var(--text-color);
}

.experience-footer {
  text-align: center;
  font-weight: bold;
}

.theme-toggle-btn {
  width: 2.875rem; /* 46px */
  height: 2.875rem; /* 46px */
  box-sizing: border-box;
  padding: 0.75rem; /* 12px */
  background: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 1.25rem; /* 20px */
  right: 1.25rem; /* 20px */
  z-index: 1000;
  cursor: pointer;
}

.theme-toggle-sun {
  width: 50%;
  height: 50%;
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6) rotate(0deg);
  transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0) 50%,
    var(--text-color) 50%
  );
}

.theme-toggle-sun:before {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    var(--text-color) 30%,
    rgba(0, 0, 0, 0) 31%,
    rgba(0, 0, 0, 0) 50%,
    var(--text-color) 50%
  );
  transform: rotate(45deg);
}

.theme-toggle-sun.visible {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1) rotate(180deg);
}

.theme-toggle-moon {
  width: 50%;
  height: 50%;
  pointer-events: none;
  position: absolute;
  left: 12.5%;
  top: 18.75%;
  background-color: transparent;
  border-radius: 50%;
  box-shadow: 0.5625rem 0.1875rem 0px 0px var(--text-color); /* 9px 3px */
  opacity: 0;
  transform: scale(0.3) rotate(65deg);
  transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
}

.theme-toggle-moon.visible {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle-star {
  position: absolute;
  top: 25%;
  left: 5%;
  display: block;
  width: 0px;
  height: 0px;
  border-right: 0.4375rem solid transparent; /* 7px */
  border-bottom: 0.3125rem solid var(--text-color); /* 5px */
  border-left: 0.4375rem solid transparent; /* 7px */
  transform: scale(0.55) rotate(35deg);
  opacity: 0;
  transition: all 0.2s ease-in 0.4s;
}

.theme-toggle-star:before {
  border-bottom: 0.3125rem solid var(--text-color); /* 5px */
  border-left: 0.1875rem solid transparent; /* 3px */
  border-right: 0.1875rem solid transparent; /* 3px */
  position: absolute;
  height: 0;
  width: 0;
  top: -0.1875rem; /* 3px */
  left: -0.3125rem; /* 5px */
  display: block;
  content: "";
  transform: rotate(-35deg);
}

.theme-toggle-star:after {
  position: absolute;
  display: block;
  top: 0px;
  left: -0.4375rem; /* 7px */
  width: 0px;
  height: 0px;
  border-right: 0.4375rem solid transparent; /* 7px */
  border-bottom: 0.3125rem solid var(--text-color); /* 5px */
  border-left: 0.4375rem solid transparent; /* 7px */
  transform: rotate(-70deg);
  content: "";
}

.theme-toggle-moon.visible .theme-toggle-star {
  opacity: 0.8;
}

.theme-toggle-star.small {
  transform: scale(0.35) rotate(35deg);
  position: relative;
  top: 50%;
  left: 37.5%;
  opacity: 0;
  transition: all 0.2s ease-in 0.45s;
}

.theme-toggle-moon.visible .theme-toggle-star.small {
  opacity: 0.7;
  transform: scale(0.45) rotate(35deg);
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(1.625rem); /* 26px */
}

/* Responsive adjustments */
@media screen and (max-width: 48rem) { /* 768px */
  header .container {
    flex-direction: column;
  }

  .logo {
    display: none;
  }

  .skills {
    flex-direction: column;
  }

  .skill-item {
    margin-bottom: 1.25rem; /* 20px */
  }

  .theme-toggle {
    top: 0.625rem; /* 10px */
    right: 0.625rem; /* 10px */
  }

  .company-logo {
    display: none;
  }

  #chat-container {
    width: 100%;
    height: 50vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }

  #chat-container.chat-hidden {
    width: 100%;
    bottom: 0;
    border-radius: 0;
  }

  #chat-container.chat-visible {
      height: 50vh;
  }

  #chat-output {
    max-height: calc(100% - 4.375rem); /* 70px */
  }

  #chat-user-input {
    width: 80%;
  }
}

[data-theme="dark"] {
  /* Dark mode colors */
  --bg-color: #333;
  --header-bg-color: #748CAB; 
  --text-color: #f0f0f0;
  --primary-color: #72879e;
  --secondary-color: #5e5e5e;
  --hover-color: rgba(255,255,255,0.1);

  .header {
    background-color: var(--bg-color);
  }

  .dark-mode .skill-item {
    background-color: var(--bg-color);
    border-color: var(--secondary-color);
  }

  .dark-mode .job {
    border-color: var(--secondary-color);
  }

  .dark-mode .company-name {
    color: var(--secondary-color);
  }

  .dark-mode .experience-period {
    color: var(--primary-color);
  }
}

#chat-container {
  position: fixed;
  bottom: 1.25rem; /* 20px */
  right: 1.25rem; /* 20px */
  width: 18.75rem; /* 300px */
  height: 25rem; /* 400px */
  background-color: var(--bg-color);
  border: 0.0625rem solid var(--secondary-color); /* 1px */
  border-radius: 0.5rem; /* 8px */
  box-shadow: 0 0.125rem 0.625rem rgba(0,0,0,0.1); /* 2px 10px */
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

#chat-output {
  flex-grow: 1;
  overflow-y: auto; 
  padding: 0.625rem; /* 10px */
  border-bottom: 0.0625rem solid var(--secondary-color); /* 1px */
  font-size: smaller;
}

#chat-input-wrapper {
  display: flex; 
  border-top: 0.0625rem solid var(--secondary-color); /* 1px */
}

#chat-container.chat-hidden {
  transform: translateY(calc(100% - 2.5rem)); /* 40px */
  height: auto;
  width: 18.75rem; /* 300px */
}

#chat-container.chat-visible {
  transform: translateY(0);
  height: 25rem; /* 400px */
  transition: transform 0.3s ease;
}


#chat-user-input {
  width: 100%;
  padding: 0.625rem; /* 10px */
  border: none;
  outline: none;
}

#chat-toggle {
  width: 100%;
  padding: 0.625rem; /* 10px */
  background-color: var(--bg-color);
  color: var(--primary-color);
  border: none;
  border-radius: 0.5rem 0.5rem 0 0; /* 8px */
  cursor: pointer;
}

#chat-interface {
  height: calc(100% - 2.5rem); /* 40px */
  overflow-y: auto;
}

button[type="button"] {
  padding: 0.625rem; /* 10px */
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
}

#chat-header {
  display: flex;
  font-size: 1rem;
  font-weight: bold;
  text-align: left;
  justify-content: flex-end;
  padding: 0.5rem;
  background-color: var(--primary-color);
  color: var(--bg-color);
  border-bottom: 0.0625rem solid var(--secondary-color);
}

#chat-minimize-btn {
  background: none;
  border: none;
  color: var(--bg-color);
  font-size: 1.2rem;
  cursor: pointer;
}
