* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header y Navegación */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Require */
.project-section img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* opcional: ajusta la imagen si hay altura fija */
}

.project-section {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(35,41,70,0.07);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.project-description {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.code-viewer {
  background: #16161a;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(35,41,70,0.1);
  overflow: auto;
  padding: 1.2rem 1rem;
  font-size: 1rem;
}
.code-viewer pre {
  margin: 0;
}

/* footer */
.footer-container {
    max-width: auto;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    background: #f9f9f9;
}

.footer-section {
    /*
    margin-bottom: 2rem;
    padding-left:4rem;
    border: 1px solid black;
    */
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;   /* ⬅️ Esto centra horizontalmente */
    text-align: left;    /* ⬅️ Esto centra el texto */
    padding: 1rem;
}

.footer-section h3 {
    color: black;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: black;
}

.footer-projects{
    text-align:left;
}

#select_project_tag{
    font-weight: bold;
}

.about-me a{
    font-size:0.9rem;
}

#nav-photo{
    width: 150px;
    height: 150px;
    border-radius: 50%; /* más claro que 180px */
    overflow: hidden;   /* Esto es crucial para que se recorte la imagen */
}

#nav-photo img{
	width: 100%;
    height: 100%;
    object-fit: cover;  /* 🔥 Esto hace que la imagen se escale y recorte manteniendo proporción */
    display: block;
}


/* Contacto */
.contacto {
    padding: 4rem 1rem;
    text-align: center;
    background: #f9f9f9;
}

.contact-info {
    margin-top: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

#modal-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 25px;
        height: 3px;
        background: #2c3e50;
        transition: 0.3s;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}
