* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: white;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .header {
  background: #2d2d2d;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

body.dark-mode .logo {
  color: #e0e0e0;
}

.logo:hover {
  color: #007bff;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: color 0.3s ease;
}

body.dark-mode .nav-links a {
  color: #b0b0b0;
}

.nav-links a:hover {
  color: #007bff;
}

.theme-toggle {
  background: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.dark-mode .theme-toggle {
  background: #3d3d3d;
  border-color: #555;
  color: #e0e0e0;
}

.theme-toggle:hover {
  border-color: #007bff;
  color: #007bff;
}

.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: #007bff;
  transition: width 0.1s ease;
}

.main-content {
  margin-top: 80px;
  padding: 2rem 0;
}

.profile-section {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 2rem;
  align-items: start;
}

.profile-info h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: #333;
  transition: color 0.3s ease;
}

body.dark-mode .profile-info h1 {
  color: #e0e0e0;
}

.profile-info h1 span {
  color: #999;
}

body.dark-mode .profile-info h1 span {
  color: #888;
}

.profile-info p {
  color: #666;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

body.dark-mode .profile-info p {
  color: #b0b0b0;
}

.profile-info a {
  color: #007bff;
  text-decoration: none;
}

.profile-info a:hover {
  text-decoration: underline;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-image: url("./pictures/avatar-2.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  justify-self: center;
  align-self: center;
}

.thin-line {
  border: none;
  height: 1px;
  background-color: #aaaaaa;
  margin: 1.5rem 0;
  width: 78%;
  transition: background-color 0.3s ease;
}

body.dark-mode .thin-line {
  background-color: #555;
}

.tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: #e9ecef;
  color: #495057;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid #dee2e6;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
}

body.dark-mode .tag {
  background: #3d3d3d;
  color: #b0b0b0;
  border-color: #555;
}

.tag:hover {
  border-color: #007bff;
  color: #007bff;
}

body.dark-mode .tag:hover {
  background: #4d4d4d;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #333;
  transition: color 0.3s ease;
}

body.dark-mode .section-title {
  color: #e0e0e0;
}

.news-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  align-items: flex-start;
}

.news-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.news-date {
  font-weight: 600;
  color: #333;
  min-width: 150px;
  transition: color 0.3s ease;
}

body.dark-mode .news-date {
  color: #e0e0e0;
}

.news-content {
  color: #666;
  transition: color 0.3s ease;
}

body.dark-mode .news-content {
  color: #b0b0b0;
}

.news-content a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.news-content a:hover {
  text-decoration: underline;
}

.news-content h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

body.dark-mode .news-content h4 {
  color: #e0e0e0;
}

.news-content p {
  margin: 0.5rem 0;
  color: #666;
}

body.dark-mode .news-content p {
  color: #b0b0b0;
}

#projects-page {
  padding: 2rem 0;
}

.projects-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

body.dark-mode .project-item {
  background: #2d2d2d;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.project-item:last-child {
  margin-bottom: 0;
}

.project-title {
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
}

.project-title a {
  color: #007bff !important;
  text-decoration: none !important;
}

.project-title a:hover {
  color: #0056b3 !important;
  text-decoration: underline !important;
}

.project-desc {
  color: #555;
  line-height: 1.6;
  margin: 0 0 1.2rem 0;
  font-size: 1rem;
  transition: color 0.3s ease;
}

body.dark-mode .project-desc {
  color: #b0b0b0;
}

.project-tech {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  transition: color 0.3s ease;
}

body.dark-mode .project-tech {
  color: #a0a0a0;
}

.project-tech strong {
  color: #333;
  font-weight: 600;
  transition: color 0.3s ease;
}

body.dark-mode .project-tech strong {
  color: #e0e0e0;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.strengths-weaknesses-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.strengths-container,
.weaknesses-container {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

body.dark-mode .strengths-container,
body.dark-mode .weaknesses-container {
  background: #2d2d2d;
}

.strengths-container h3,
.weaknesses-container h3 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.2rem;
  padding-bottom: 0.5rem;
  transition: color 0.3s ease;
}

body.dark-mode .strengths-container h3,
body.dark-mode .weaknesses-container h3 {
  color: #e0e0e0;
}

.strengths-list,
.weaknesses-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.strengths-list li,
.weaknesses-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #555;
  transition: color 0.3s ease;
}

body.dark-mode .strengths-list li,
body.dark-mode .weaknesses-list li {
  color: #b0b0b0;
}

.strengths-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

.weaknesses-list li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: #ff0707;
  font-weight: bold;
}

.character-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 100px;
  height: 100px;
  z-index: 999;
  cursor: grab;
  transition: transform 0.3s ease;
}

.character-container.dragging {
  cursor: grabbing;
  z-index: 1001;
  transition: none;
}

.character-container.returning {
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.character {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.character-container:hover .character {
  transform: scale(1.1);
}

.character-container.dragging .character {
  transform: scale(1.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.character-eye-left {
  position: absolute;
  width: 16px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 30%;
  left: 28%;
  overflow: hidden;
}

.character-eye-right {
  position: absolute;
  width: 16px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 30%;
  right: 28%;
  overflow: hidden;
}

.character-pupil-left {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.character-pupil-right {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.character-mouth {
  position: absolute;
  width: 30px;
  height: 15px;
  border: 3px solid white;
  border-top: none;
  border-radius: 0 0 30px 30px;
  bottom: 28%;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes blink {
  0%,
  90%,
  100% {
    height: 20px;
  }
  96% {
    height: 2px;
  }
}

.character-container:not(.dragging) .character-eye-left,
.character-container:not(.dragging) .character-eye-right {
  animation: blink 4s infinite;
}

.character-cheek-left {
  position: absolute;
  width: 20px;
  height: 15px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  top: 50%;
  left: 15%;
}

.character-cheek-right {
  position: absolute;
  width: 20px;
  height: 15px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  top: 50%;
  right: 15%;
}

.character-hand {
  position: absolute;
  width: 25px;
  height: 25px;
  background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  border-radius: 50%;
  top: -5px;
  right: -8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(20deg);
  }
  75% {
    transform: rotate(-20deg);
  }
}

.character-container:not(.dragging) .character-hand {
  animation: wave 2s ease-in-out infinite;
  transform-origin: bottom left;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.character-container:not(.dragging) {
  animation: float 3s ease-in-out infinite;
}

@media (max-width: 768px) {
  .character-container {
    width: 80px;
    height: 80px;
    bottom: 20px;
    right: 20px;
  }

  .profile-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-image {
    justify-self: center;
  }

  .nav-links {
    gap: 1rem;
  }

  .news-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  #projects-page {
    padding: 1rem 0;
  }

  .project-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .project-desc {
    font-size: 0.95rem;
  }

  .project-tech {
    font-size: 0.85rem;
  }

  .strengths-weaknesses-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .project-item {
    padding: 1.2rem;
  }

  .project-title {
    font-size: 1.1rem;
  }
}
