:root {
  --bg-color: #f2f2f2;
  --text-color: #031326;
  --highlight: #f24f13;
  --icon-filter: invert(7%) sepia(19%) saturate(2897%) hue-rotate(177deg)
    brightness(99%) contrast(102%);
}

body.dark-mode {
  --bg-color: #031326;
  --text-color: #f2f2f2;
  --icon-filter: invert(100%) sepia(3%) saturate(229%) hue-rotate(268deg)
    brightness(115%) contrast(90%);
}

body {
  margin: 0;
  font-family: "Poetsen One", cursive;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  padding: 1rem;
}

#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
  opacity: 0.8;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.container {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-icon {
  width: 200px;
  height: 260px;
  border: 5px solid var(--text-color);
  border-radius: 50%;
  margin: auto;
  margin-bottom: 1rem;
  position: relative;
}

.theme-toggle {
  position: absolute;
  top: -1px;
  right: -1px;
  font-size: 1.2rem;
  cursor: pointer;
  background: var(--bg-color);
  border: 3px solid var(--text-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.theme-toggle img {
  width: 24px;
  height: 24px;
  filter: invert(42%) sepia(70%) saturate(4500%) hue-rotate(356deg)
    brightness(98%) contrast(93%);
  cursor: pointer;
}

h1 {
  font-size: 2.8rem;
  margin: 1.5rem 0;
}

h2 {
  font-size: 1.8rem;
  font-weight: 500;
}

h2 span {
  color: var(--highlight);
  font-weight: 700;
  display: inline-block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-15px);
  }
  60% {
    transform: translateY(-10px);
  }
}

.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--highlight);
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 2px;
  font-size: 1.2rem;
  max-width: fit-content;

  animation: typing 8s steps(30) infinite;
  /* 8 saniyede 58 adımlı animasyon (karakter sayısı kadar) */
}

@keyframes typing {
  0% {
    width: 0;
  }
  40% {
    width: 30ch;
  }
  70% {
    width: 30ch; /* yazı görünür halde bir süre bekliyor */
  }
  100% {
    width: 0;
  }
}

.social-icons {
  margin: 1.8rem 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.social-icons a img {
  width: 35px;
  filter: var(--icon-filter);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.social-icons a:hover img {
  transform: scale(1.2);
  filter: invert(42%) sepia(70%) saturate(4500%) hue-rotate(356deg)
    brightness(98%) contrast(93%);
}

footer {
  margin-top: 7rem;
  font-size: 1rem;
  color: var(--text-color);
}

/* 📱 Responsive Tasarım */
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .avatar-icon {
    width: 140px;
    height: 200px;
  }

  .social-icons a img {
    width: 28px;
  }

  .theme-toggle {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    top: -8px;
    right: -8px;
  }

  .typewriter {
    font-size: 0.8rem;
    letter-spacing: 1px;
  }
}
