/* Color palette */
:root {
  color-scheme: light dark;
}

[data-theme="dark"] {
  --bg-color: #000000;
  --text-color: #ffffff;
  --secondary-text-color: #bbbbbb;
  --bio-link-bg: #333333;
  --bio-link-hover-bg: #444444;
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #000000;
  --secondary-text-color: #555555;
  --bio-link-bg: #e0e0e0;
  --bio-link-hover-bg: #d0d0d0;
}

/* Base layout */
body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Roboto Mono", monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 64px;
  box-sizing: border-box;
  position: relative;
}

#theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bio-link-bg);
  color: var(--text-color);
  border: none;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle:hover {
  background: var(--bio-link-hover-bg);
}

.theme-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  stroke: currentColor;
  fill: none;
  transition: transform 0.3s;
}

.theme-icon.spin {
  animation: spin 0.5s ease;
}

#theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] #theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] #theme-toggle .moon-icon {
  display: inline-block;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Profile layout */
.profile {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 1200px;
}

.profile__photo {
  width: 160px;
  height: 160px;
  border-radius: 60px;
  object-fit: cover;
  filter: grayscale(100%);
}

.profile__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile__name {
  font-size: 32px;
  font-weight: bold;
  margin: 0 0 8px;
}

.profile__location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--secondary-text-color);
}

.profile__bio {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--secondary-text-color);
}

.profile__bio a {
  display: inline-block;
  padding: 2px 6px;
  margin: 0 2px;
  border-radius: 4px;
  background: var(--bio-link-bg);
  color: var(--text-color);
  text-decoration: none;
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.profile__bio a:hover {
  background: var(--bio-link-hover-bg);
  transform: translateY(-1px);
}

.no-wrap {
  white-space: nowrap;
}

/* Links */
.profile__links {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--bio-link-bg);
  color: var(--text-color);
  text-decoration: none;
  transition:
    background-color 0.3s,
    transform 0.2s;
  min-width: 100px;
  justify-content: center;
}

.profile__links a:hover {
  background: var(--bio-link-hover-bg);
  transform: translateY(-2px);
}

.icon {
  fill: currentColor;
  width: 20px;
  height: 20px;
}

@media (max-width: 600px) {
  body {
    padding: 24px;
  }

  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile__photo {
    width: 120px;
    height: 120px;
  }

  .profile__info {
    align-items: center;
  }

  .profile__links {
    justify-content: center;
  }
}
