/* Fuentes importadas */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap');

/* Fuentes descargadas */
@font-face {
  font-family: 'AmazDooMleft';
  src: url(./fonts/amazdoom/AmazDooMLeft.ttf);
}

@font-face {
  font-family: 'AmazDooMright';
  src: url(./fonts/amazdoom/AmazDooMRight.ttf);
}

/* =========================
   VARIABLES DE COLOR
   ========================= */
:root {
  --bg-color: #f9f9f9;
  --text-color: #333;
  --header-bg: #657362;
  --header-text: #fff;
  --card-bg: #fff;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --btn-bg: #7a7a7a;
  --btn-bg-hover: #657362;
  --btn-bg-hoveralter: #1e2a1d;
  --link-color: #0077cc;
  --footer-bg: #222;
  --footer-text: #fff;
}

body.dark-mode {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --header-bg: #1e2a1d;
  --header-text: #e0e0e0;
  --card-bg: #1e1e1e;
  --card-shadow: rgba(255, 255, 255, 0.05);
  --btn-bg: #444;
  --btn-bg-hover: #1e2a1d;
  --btn-bg-hoveralter: #657362;
  --link-color: #4dabf7;
  --footer-bg: #111;
  --footer-text: #aaa;
}

/* =========================
   ESTILOS GENERALES
   ========================= */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  line-height: 1.6;
  background: var(--bg-color);
  color: var(--text-color);
}

header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 1rem 2rem;
  text-align: center;
}

.menu {
  font-size: 1.5em;
  font-weight: bolder;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* Ajustes letras logo */
#logo {
  font-family: 'AmazDooMleft';
  font-size: clamp(2.5rem, 11rem, 11rem);
  color: white;
  letter-spacing: 8px;
  margin: 8rem auto 4rem;
  text-align: center;
  width: fit-content;
  z-index: 1;
}

.mayus {
  text-transform: uppercase;
}

.minus {
  text-transform: lowercase;
}

.right {
  font-family: 'AmazDooMright';
}

.left {
  font-family: 'AmazDooMleft';
}

nav {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem;
  /* overflow-x: hidden; */
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

nav a {
  color: var(--header-text);
  text-decoration: none;
  transition: all 0.3s ease;

  &:hover {
    text-decoration: underline;
  }
}

.hero {
  padding: 2rem;
}

section {
  padding: 2rem;
  max-width: 900px;
  margin: auto;
}

h2 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* =========================
   PROYECTOS
   ========================= */
.project-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--card-bg);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px var(--card-shadow);
}

.project-card img {
  width: 40%;
  max-width: 300px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.project-info {
  flex: 1;
}

.project-card a {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--link-color);
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

/* =========================
   BOTONES
   ========================= */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--btn-bg);
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
}

.btn:hover {
  background: var(--btn-bg-hover);
}

/* boton oculto */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================
   BOTON TOGGLE DARCK
   ========================= */

.mode-toggle {
  background: var(--btn-bgalter);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* margin-left: 1rem; */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  position: absolute;
  top: 0px;
  left: -10px;
  z-index: 10;
}

.mode-toggle:hover {
  background: var(--btn-bg-hoveralter);
  transform: scale(1.1);
  /* box-shadow: 0 2px 6px rgba(255, 255, 255, 0.25); */
}

/* =========================
   FOOTER
   ========================= */
footer {
  text-align: center;
  padding: 1rem;
  background: var(--footer-bg);
  color: var(--footer-text);
}

/* =========================
   BOTÓN VOLVER ARRIBA
   ========================= */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background-color: var(--btn-bg);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
  z-index: 1000;
}

#backToTop:hover {
  background-color: var(--btn-bg-hover);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: center;
  }

  #logo {
    font-size: 9rem;
    padding-top: 2rem;
  }

  .menu {
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    flex-direction: column;
    text-align: center;
  }

  .project-card img {
    width: 100%;
    max-width: 100%;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}