/* ============================================
   1. IMPORT GOOGLE FONTS
   ============================================ */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&family=Syne:wght@700;800&display=swap");

/* ============================================
   2. VARIABLES
   ============================================ */
:root {
  --color-bg: #0d1b2a;       /* fondo principal, hero, navbar */
  --color-surface: #1a2e45;  /* fondo de cards y secciones secundarias */
  --color-accent: #e8621a;   /* naranja — títulos destacados, botones, hover */
  --color-text: #f0f4f8;     /* texto principal */
  --color-muted: #8a9bb0;    /* subtítulos, descripciones, badges */
  --color-border: #243b55;   /* bordes sutiles */

  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;

  --max-width: 1100px;
}

/* ============================================
   3. RESET
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* ============================================
   4. BODY
   ============================================ */
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--color-text);
  text-align: center;
}

/* ============================================
   5. NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-accent);
  letter-spacing: 0.5px;
}

.logo-full {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

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

/* ============================================
   6. HERO
   ============================================ */
.hero {
  background-color: var(--color-bg);
  /* patrón de puntos sutiles — solo CSS */
  background-image: radial-gradient(
    var(--color-border) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 7rem 1.5rem;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-muted);
  margin-bottom: 2.25rem;
}

/* ============================================
   7. ABOUT
   ============================================ */
.about {
  background: var(--color-surface);
  padding: 5rem 1.5rem;
}

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

.about .section-title {
  margin-bottom: 1.25rem;
}

.about p {
  color: var(--color-muted);
  font-size: 1.05rem;
}

/* ============================================
   8. PROJECTS GRID
   ============================================ */
.projects {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.projects .section-title {
  margin-bottom: 2.75rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ============================================
   9. CARD
   ============================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 6px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  border-color: var(--color-accent);
}

.card-icon {
  font-size: 1.6rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.card-tagline {
  color: var(--color-accent);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.card-desc {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* ============================================
   10. BADGES
   ============================================ */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.badge {
  font-size: 0.78rem;
  color: var(--color-muted);
  background: rgba(138, 155, 176, 0.08);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
}

/* ============================================
   11. BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.btn-cta {
  background: var(--color-accent);
  color: #fff;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 6px;
}

.btn-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-card {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 5px;
  font-size: 0.95rem;
  margin-top: auto;
}

.btn-card:hover {
  opacity: 0.9;
}

.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   12. FOOTER
   ============================================ */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--color-muted);
  font-size: 1.25rem;
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-copy {
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ============================================
   13. MEDIA QUERIES
   ============================================ */

/* Tablet → 2 columnas */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    gap: 1.25rem;
  }

  .nav-links a {
    font-size: 0.88rem;
  }
}

/* Mobile → 1 columna, nav compacta */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .logo-full {
    display: none; /* ocultar labels en mobile */
  }

  .hero-title {
    font-size: 2.4rem;
  }
}

/* Mobile chico → ajustes de tipografía y padding */
@media (max-width: 480px) {
  .nav-inner {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero-inner {
    padding: 4.5rem 1.25rem;
  }

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

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .about,
  .projects {
    padding: 3.5rem 1.25rem;
  }

  .card {
    padding: 1.5rem;
  }
}
