@charset "UTF-8";

/* Reset do CSS padrão do browser */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: #fafafa;
}

.dark {
  /* Cores padrões do darkmode */
  --text-color: #d1d7e0;
  --bg: #212830;
  /* --stroke-color: rgba(255, 255, 255, .5); */
  --stroke-color: #3d444d;
  /* --surface-color: rgba(255, 255, 255, .1)*/
  --surface-color: #2f3742;
  --surface-color-hover: rgba(255, 255, 255, 0.05);
  /* --highlight-color: rgba(255, 255, 255, .2); */
  --highlight-color: #3d444d;
  --switch-bg-url: url(../img/moon-stars.svg);
}

.light {
  /* Cores padrões do lightmode */
  --text-color: #2a2a2a;
  /* --bg: rgba(0, 0, 0, .05); */
  --bg: #fafafa;
  --stroke-color: rgba(0, 0, 0, 0.5);
  --surface-color: rgba(0, 0, 0, 0.01);
  --surface-color-hover: rgba(0, 0, 0, 0.04);
  --highlight-color: rgba(0, 0, 0, 0.1);
  --switch-bg-url: url(../img/sun.svg);
}
/* Usam a mesma variável - com valores diferentes nos modos */

body {
  /* background-image: var(--bg-url); */
  /* background-repeat: no-repeat; */
  /* background-position: top center; */
  /* background-size: cover; */
  background: var(--bg);
}

body * {
  color: var(--text-color);
}

h2 {
  font-size: 1.8rem;
}

#container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 5em 0 0 0;
  height: 100vh;
}

/* Estilização da div profile */
.profile {
  text-align: center;
}

.profile img {
  width: 112px;
  border-radius: 50%;
  border: 3px solid var(--stroke-color);
}

.profile p {
  font-weight: 500;
  line-height: 1em;
  margin-top: 0.5em;
}

/* SWITCH */
#switch {
  padding: 16px 0;
  position: relative; /* para que o button fique absoluto dentro do switch */
  width: 64px;

  /* Como o switch é display block, alinhar ao centro com o margin auto */
  margin: 4px auto;
}

#switch button {
  width: 32px;
  height: 32px;
  background: #fff var(--switch-bg-url) no-repeat center;
  border: 0;
  border-radius: 50%;

  position: absolute; /* dentro do switch */
  top: 50%; /* com o transform vai ficar exatamente no centro */
  left: 0;
  z-index: 1; /* ficar na frente|sobre */
  transform: translateY(-50%);

  animation: slide-back 0.4s;
}

#switch span {
  display: block; /* para o span aceitar altura e largura */
  width: 64px;
  height: 24px;

  background: var(--surface-color);
  border: 1px solid var(--stroke-color);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 9999px;
}

.light #switch button {
  /* Por que o .light está em primeiro? Porque a classe está no html
     * e só será ativada quando a .light estiver ativa */
  /* right: 0; */
  /* left: initial; */
  animation: slide-in 0.4s forwards; /* manter as propriedades finais do slide-in */
}

#switch button:hover {
  outline: 8px solid var(--highlight-color);
}

/* LINKS */
.links-home {
  width: 80%;
}

ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin: 0 auto;
}

ul li a,
.voltar a {
  display: flex; /* Faz com que o <a> ocupe toda a <li>*/
  justify-content: center;
  align-items: center;
  padding: 1em;

  /* font-weight: bold; */
  text-decoration: none;

  background: var(--surface-color);
  border: 1px solid var(--stroke-color);
  border-radius: 0.5em;

  /* backdrop-filter: blur(4px); Efeito Blur */
  /* -webkit-backdrop-filter: blur(4px); compatibilidade */

  transition: background 0.2s;
}

ul li a:hover,
.voltar a:hover {
  transition: 0.3s;
  background: var(--surface-color-hover);
  border: 1.5px solid var(--text-color);
}

/* Social links */
#social-links {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

#social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8em;
  border-radius: 50%;
  transition: background 0.2s;
}

#social-links a:hover {
  background-color: var(--highlight-color);
}

ion-icon {
  font-size: 1.5rem;
}

/* FOOTER */
footer {
  text-align: center;
  font-size: 1rem;
  padding: 2rem 0;
}

/* Media queries */
/* @media (min-width: 700px) {
    :root {
        --bg-url: url(../img/bg-desktop.jpg);
    }

    .light {
        --bg-url: url(../img/bg-desktop-light.jpg);
    }
} */

@keyframes slide-in {
  from {
    left: 0;
  }
  to {
    left: 50%;
  }
}

@keyframes slide-back {
  from {
    left: 50%;
  }
  to {
    left: 0;
  }
}

/* PÁGINA MEUS PROJETOS */
.projetos {
  padding: 0 1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 2rem;
}

.card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  box-shadow: 0px 0px 3px var(--stroke-color);
  /* border: 1px solid var(--stroke-color); */
  border-radius: 0.5rem;
  padding: 1rem;

  .description {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .links {
    display: flex;
    gap: 1rem;
  } 

  a {
    display: inline-block;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid var(--stroke-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;

    &:hover {
      background-color: var(--bg)
    }
  }

  a:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
}

.card img {
  max-width: 400px;
  border-radius: .5rem;
}

.voltar {
  padding: 0 1rem;
  margin-top: 2rem;
}

/* PÁGINA INDICAÇÕES DE CANAIS */
.header-indicacoes {
  text-align: center;
  margin: 2rem 0;
}

.indicacoes-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.indicacoes-item {
  height: auto;
}

/* Faz com que o último item da lista ocupe o espaço de uma linha no grid*/
.indicacoes-item:last-child {
  grid-column: 1 / 3;
}

.indicacoes-item a {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.indicacoes-list img {
  margin-bottom: 0.5rem;
  border-radius: 50%;
}

.indicacoes-list p {
  font-size: 1rem;
  color: var(--text-color);
}

@media screen and (max-width: 850px) {
  /* PÁGINA MEUS PROJETOS */
  .card {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.5rem;

    .description {
      gap: 1.5rem;
    }

    p,
    .links {
      font-size: 0.9rem;
    }

    img {
      width: 100%;
      margin-bottom: 1rem;
    }
  }

  .indicacoes-list {
    display: flex;
  }
}
