/* Reset más completo */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables CSS para consistencia */
:root {
    --primary-gold: #d4af37;
    --dark-gold: #b8941f;
    --light-gold: #e6c757;
    --text-dark: #2c2c2c;
    --text-gray: #666;
    --text-light: #999;
    --bg-light: #fafafa;
    --bg-section: #f8f9fa;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-heavy: rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tipografía mejorada */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

/* Hero Section - Mejorado */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%),
                url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    animation: subtle-glow 8s ease-in-out infinite alternate;
}

@keyframes subtle-glow {
    0% { opacity: 0.3; }
    100% { opacity: 0.1; }
}

.hero-content {
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    color: var(--primary-gold);
    text-shadow: 0 2px 20px rgba(212, 175, 55, 0.3);
}

.tagline {
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 1.5px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Navigation - Completamente rediseñada */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 24px var(--shadow-light);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--primary-gold);
    text-decoration: none;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav.scrolled .nav-links a {
    color: var(--text-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-gold);
}

/* Hamburger Menu Mejorado */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--primary-gold);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Secciones mejoradas */
.section {
    padding: clamp(4rem, 10vw, 8rem) 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-dark);
    letter-spacing: 1px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
}

/* About Section */
.about {
    background: var(--bg-section);
}

.about-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    line-height: 1.8;
    color: var(--text-gray);
    font-weight: 400;
    margin-bottom: 2rem;
}

/* Projects Grid - Completamente rediseñado */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow-light);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px var(--shadow-medium);
}

.project-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 2.5rem;
}

.project-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-description {
    color: var(--text-gray);
    font-weight: 400;
    line-height: 1.7;
    font-size: 1rem;
}

/* Contact Section - Rediseñada */
.contact {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: white;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23d4af37" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.contact .container {
    position: relative;
    z-index: 1;
}

.contact .section-title {
    color: white;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--dark-gold) 100%);
    color: white;
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Footer mejorado */
.footer {
    background: #0f0f0f;
    color: #ccc;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
}

/* Social Links - Nuevos estilos */
.social-links {
  margin: 2rem 0 0 0;   /* Solo margen arriba, sin centrado ni margen izquierdo */
  display: flex;        /* Para alinear los íconos en fila */
  gap: 22px;            /* Espacio entre íconos */
}

.social-links a {
  font-size: 2.2rem;      /* Tamaño del icono */
  margin: 0 22px;         /* Separación entre iconos */
  color: #c9a96e;         /* Color principal, ajusta si lo deseas */
  transition: color 0.3s, transform 0.3s;
  display: inline-block;
  vertical-align: middle;
}

.social-links a:hover {
  color: #8d7b4a;         /* Color al pasar el mouse */
  transform: scale(1.2);  /* Efecto de agrandar al pasar el mouse */
}

/* Responsive Design Mejorado */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
        margin: 0 1rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 8px 32px var(--shadow-medium);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        gap: 1.5rem;
    }
    
    .nav-links.open {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-links a {
        color: var(--text-dark) !important;
        font-size: 1.1rem;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .section {
        padding: clamp(3rem, 8vw, 6rem) 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        margin: 0 0.5rem;
    }
    
    .contact-form {
        margin: 0;
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 1rem;
    }
    
    .logo {
        letter-spacing: 2px;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .section {
        padding: clamp(2.5rem, 6vw, 4rem) 1rem;
    }
    
    .section-title {
        margin-bottom: 2.5rem;
    }
    
    .projects-grid {
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem 1rem;
    }
}

/* Animaciones de scroll mejoradas */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth scrolling mejorado */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero {
        background-image: linear-gradient(135deg, rgba(44, 44, 44, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%),
                          url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-4.0.3&auto=format&fit=crop&w=4140&q=80');
    }
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #fff;
  padding: 20px;
  font-size: 18px;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  border-radius: 5px;
  backdrop-filter: blur(10px);
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close:hover,
.close:focus {
  color: #c9a96e;
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.project-image {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-image:hover {
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 80vh;
  }
  
  .modal-caption {
    width: 90%;
    font-size: 16px;
    padding: 15px;
  }
  
  .close {
    top: 10px;
    right: 15px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
}

/* Honeypot: fuera de pantalla, no interfiere con la UX ni con el layout */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.hp label { display: none; }