:root {
  /* Colors */
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --text-muted: #eef5ff;
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --accent-color: #8b5cf6;
  --card-bg: #1e293b;
  --border-color: #334155;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;

  /* Fonts */
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* Utilities */
.text-gradient {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--accent-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Button Overrides */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  border: none;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
  background: linear-gradient(
    135deg,
    var(--primary-hover),
    var(--accent-color)
  );
}

/* Container Menu (Navbar) */
.container-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: transparent; /* Overridden by .glass on header if needed */
}

/* Navbar specific adjustments */
.navbar {
    padding: 0.5rem 1rem;
    transition: background 0.3s ease;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    position: relative;
}

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

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

.nav-link:hover {
    color: var(--text-color) !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 80px; /* Account for fixed navbar */
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--bg-color);
}

/* Background Animation Elements */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: 0;
    animation: float 10s infinite alternate;
}

.hero::before {
    background: var(--primary-color);
    top: -100px;
    left: -100px;
    animation-delay: -5s;
}

.hero::after {
    background: var(--accent-color);
    bottom: -100px;
    right: -100px;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Hero Badge */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Outline Button */
.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem; /* Match btn-primary padding */
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-color);
    transform: translateY(-2px);
}

/* Projects Section */
.proyectos {
    padding: var(--spacing-lg) 0;
    background-color: var(--bg-color);
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 130, 246, 0.3);
}

.card-img-wrapper {
    overflow: hidden;
    position: relative;
    padding-top: 60%; /* Aspect ratio */
}

.card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

.card-body {
    padding: 1.5rem;
    z-index: 1;
    position: relative;
    background-color: var(--card-bg);
}

.card-title {
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Contact Section */
.contacto {
    background-color: var(--bg-color);
    padding: var(--spacing-lg) 0;
    position: relative;
    overflow: hidden;
}

/* Add subtle background glow to contact section */
.contacto::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    filter: blur(120px);
    opacity: 0.1;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}


.contact-form {
    position: relative; /* Ensure it seats above the background glow */
    z-index: 1;
}

.form-control {
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 0.75rem;
    padding: 1rem;
}

.form-control:focus {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    color: var(--text-color);
}

.form-floating label {
    color: var(--text-muted);
    padding-left: 1rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
    background-color: transparent; 
}

/* Ensure placeholder is hidden */
.form-control::placeholder {
    color: transparent;
}

/* Footer */
footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
    position: relative;
    z-index: 10;
}

.hover-text-primary {
    transition: color 0.3s ease;
}

.hover-text-primary:hover {
    color: var(--primary-color) !important;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .container-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .lead {
        font-size: 1.1rem;
    }

    .card:hover {
        transform: none; /* Disable hover lift on touch devices */
    }

    .contacto::before {
        width: 300px;
        height: 300px;
    }

  .container-menu {
    flex-direction: column;
    gap: 1rem;
  }

  .menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

/* Coming Soon / In Development Styles */
.card.coming-soon .card-img-wrapper::after {
    content: 'En Desarrollo';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card.coming-soon .btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.card.coming-soon .btn:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}
