/* RESET GENERAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  line-height: 1.6;
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAVBAR */
.navbar {
  background-color: #000;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.navbar-logo h1 {
  font-size: 1.5rem;
  color: #fff;
}

.navbar-logo p {
  font-size: 0.9rem;
  color: #ccc;
}

.navbar-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.navbar-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
  text-decoration: underline;
  color: #0d6efd;
}

/* MAIN */
.main-content {
  flex: 1;
  padding: 2rem;
}

body.inicio .main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: 80vh;
}


/* INTRO CARD (index + acerca) */
.intro-card,
.about-section {
  background-color: #212529;
  color: #f8f9fa;
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
  flex-wrap: wrap;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.profile-img {
  width: 180px;
  height: 240px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.profile-img-large {
  width: 220px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
}

.intro-text,
.about-text {
  flex: 1;
  min-width: 280px;
}

.intro-text h2,
.about-text h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.intro-text p,
.about-text p {
  margin-bottom: 1rem;
}

.buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.5rem 1rem;
  background-color: #343a40;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s ease;
}

.btn:hover,
.btn:focus {
  background-color: #495057;
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* FORMULARIO (contacto) */
.form-card {
  background-color: #ffffff;
  padding: 2rem;
  max-width: 600px;
  margin: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-card h2 {
  margin-bottom: 1rem;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
}

form label {
  margin-top: 1rem;
  font-weight: bold;
}

form input,
form textarea {
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  margin-top: 0.5rem;
  font-size: 1rem;
}

form button {
  margin-top: 1.5rem;
  cursor: pointer;
}

/* PROYECTOS */
.projects-section {
  max-width: 1200px;
  margin: auto;
}

.projects-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.projects-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
  background-color: #212529;
  color: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  text-align: center;
}

.project-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
  object-fit: cover;
  height: 180px;
}

.project-card h3 {
  margin-bottom: 0.5rem;
}

/* SKILLS */
.skills-section {
  max-width: 1200px;
  margin: auto;
  text-align: center;
}

.skills-section h2 {
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background-color: #212529;
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-align: left;
}

.skill-card h3 {
  margin-bottom: 0.5rem;
}

.skill-card ul {
  padding-left: 1.2rem;
}

.skill-card li {
  margin-bottom: 0.4rem;
}

/* FOOTER */
.footer {
  background-color: #000;
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
  margin-top: auto;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* ACCESIBILIDAD */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar-menu {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .intro-card,
  .about-section {
    flex-direction: column;
    text-align: center;
  }

  .profile-img,
  .profile-img-large {
    width: 160px;
    height: auto;
  }
}
