* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #0d0d0d, #1f005c);
  color: white;
  min-height: 100vh;
  line-height: 1.6;
}

header {
  text-align: center;
  padding: 40px 20px 20px;
  background: linear-gradient(135deg, #0d0d0d, #1f005c);
  box-shadow: 0 0 20px rgba(255, 0, 170, 0.33);
}

header h1 {
  font-size: 36px;
  text-shadow: 0 0 10px rgb(174, 0, 255);
}

nav {
  padding: 10px 20px;
}

.back-btn {
  display: inline-block;
  margin: 15px 0;
  padding: 8px 16px;
  background-color: #ff00dd;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 0, 170, 0.4);
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s;
}

.back-btn:hover,
.back-btn:focus {
  background-color: #00e1ff;
  transform: scale(1.05);
  outline: none;
}

/* MAIN */
main {
  padding: 30px 20px;
  max-width: 1000px;
  margin: auto;
}

.projects h2,
.contact h2,
.about h2 {
  text-align: center;
  margin-bottom: 20px;
  color: rgb(255, 255, 255);
  text-shadow: 0 0 5px rgb(132, 0, 255);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.project-card {
  background: rgba(51, 0, 102, 0.8);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(255, 0, 170, 0.33);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover,
.project-card:focus-within {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(0, 170, 255, 0.53);
}

.project-card h3 {
  color: rgb(255, 255, 255);
  margin-bottom: 10px;
}

a.btn {
  display: inline-block;
  padding: 0.5em 1em;
  background-color: rgb(255, 0, 221);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 0.5em;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

a.btn:hover,
a.btn:focus {
  background-color: rgb(0, 225, 255);
  outline: none;
}

.about-card {
  background: rgba(102, 0, 204, 0.7);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(174, 0, 255, 0.3);
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-card h3 {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 20px;
}

.about-card p {
  font-size: 16px;
  line-height: 1.5;
}

.contact-info {
  text-align: center;
  font-size: 16px;
  background: #6600cc;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(162, 0, 255, 0.33);
}

.contact-info a {
  color: #66ccff;
  text-decoration: none;
}

.contact-info a:hover,
.contact-info a:focus {
  text-decoration: underline;
  outline: none;
}

a {
  transition: color 0.3s, text-decoration 0.3s;
}

.project-card:focus-within,
.back-btn:focus,
a.btn:focus,
.contact-info a:focus {
  outline: 2px solid #00e1ff;
  outline-offset: 2px;
}

.qr-code {
  width: 100px;
  height: auto;
  margin: 10px 0;
  display: block;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.imagenes-portadas {
  width: auto;
  height: 100px;
  margin: 10px 0;
  display: block;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}
