:root {
  --bg-button: url('./assets/moon-stars-svgrepo-com.svg');
  --bg-image: url('./assets/grid-me-1920x1080.webp');
  --bg-color: #1a1a1a;
  --bg-filter: linear-gradient(135deg, rgba(20, 20, 20, 0), rgba(30, 30, 30, 0));
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent-color: #f5e6a0;
  --accent-hover: #d9cc75;
  --link-bg: rgba(255, 255, 255, 0.12);
  --border-color: rgba(255, 255, 255, 0.18);
  --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  --link-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  --switch-track-bg: #555;
  --switch-thumb-bg: var(--accent-color);
  --tech-icons-color: var(--accent-color);
  --font-smooth: antialiased;
}

.light {
  --bg-button: url('./assets/sun-svgrepo-com.svg');
  --bg-image: url('./assets/claro.webp');
  --bg-color: #ccd7e3;
  --bg-filter: linear-gradient(135deg, rgba(44, 47, 51, 0.29), rgba(100, 110, 120, 0.5));
  --text-primary: #222831;
  --text-secondary: #4a4a4a;
  --accent-color: #1e5a8a;
  --accent-hover: #144565;
  --link-bg: rgba(180, 185, 190, 0.45);
  --border-color: rgba(0, 0, 0, 0.12);
  --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  --link-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  --switch-track-bg: #999;
  --switch-thumb-bg: var(--accent-color);
  --tech-icons-color: var(--accent-color);
}

/* Reset & base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  -webkit-font-smoothing: var(--font-smooth);
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  background: var(--bg-filter), var(--bg-image) no-repeat center center fixed;
  background-color: var(--bg-color);
  background-size: cover;
  transition: background-color 0.6s, color 0.6s, background 0.6s;
  min-height: 100vh;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  will-change: background-color, color;
}

.background {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  width: 100vw;
  height: 100vh;
  animation: backgroundHide 1.5s ease-in-out 2s forwards;
}

.background h1 {
  color: #fff;
  font-weight: 600;
  font-size: 1.5rem;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.25);
  user-select: none;
}

@keyframes backgroundHide {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-100%);
    visibility: hidden;
  }
}

.container {
  margin: 30px;
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  text-align: center;
  background: var(--link-bg);
  border-radius: 1.5rem;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
  backdrop-filter: saturate(180%) blur(12px);
  transition: background 0.6s, border-color 0.6s, box-shadow 0.6s;
}

.profile img {
  width: 8.75rem;
  height: 8.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 0.25rem solid var(--accent-color);
  margin-bottom: 1rem;
  box-shadow: 0 0 12px var(--accent-color);
  transition: border-color 0.6s, box-shadow 0.6s;
}

.profile h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.profile p {
  font-weight: 500;
  line-height: 1.6;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Switch */
.switch {
  position: relative;
  width: 80px;
  height: 36px;
  margin: 1rem auto 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.switch button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  background-image: var(--bg-button);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70%;
  background-color: var(--switch-thumb-bg);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-color);
  transition: left 0.75s cubic-bezier(0.4, 0, 0.2, 1), background-image 0.75s ease, background-color 0.75s ease;
  will-change: left, background-color;
}

.light .switch button {
  left: calc(100% - 36px);
}

.switch button:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.switch .cont {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--switch-track-bg);
  border-radius: 9999px;
  border: 1.5px solid var(--border-color);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
  transition: background-color 0.75s, border-color 0.75s;
  pointer-events: none;
  user-select: none;
}

/* Links */
.links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2rem;
}

.links li {
  list-style: none;
}

.links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background: var(--link-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  box-shadow: var(--link-shadow);
  transition: background 0.6s, border-color 0.6s, box-shadow 0.4s, color 0.4s;
  user-select: none;
}

.links a i {
  margin-left: 0.75rem;
  font-size: 1.25rem;
  transition: color 0.4s;
}

.links a:hover,
.links a:focus {
  background: var(--accent-color);
  color: var(--bg-color);
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
  outline: none;
}

.links a:hover i,
.links a:focus i {
  color: var(--bg-color);
}

/* Techs */
.techs-title {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  user-select: none;
}

.techs-icons {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  font-size: 2.25rem;
  color: var(--tech-icons-color);
}

/* Footer */
.footer {
  padding-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Responsividade */
@media (max-width: 1024px) {
  .container {
    max-width: 95vw;
    padding: 1.5rem;
  }
  .profile img {
    width: 6.5rem;
    height: 6.5rem;
  }
}

@media (max-width: 650px) {
  body {
    padding: 0.75rem;
  }
  .container {
    padding: 1.25rem;
    border-radius: 1rem;
  }
  .profile img {
    width: 5.5rem;
    height: 5.5rem;
  }
  .profile h1 {
    font-size: 1.5rem;
  }
  .profile p {
    font-size: 0.9rem;
  }
  .switch {
    width: 65px;
    height: 30px;
  }
  .switch button {
    width: 26px;
    height: 26px;
    left: 3px;
  }
  .light .switch button {
    left: calc(100% - 29px);
  }
}

@media (max-width: 400px) {
  .profile img {
    width: 4.5rem;
    height: 4.5rem;
  }
}
