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

/* =====================================================
   BASE
===================================================== */
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #050608;
  color: #f3f4f6;
  line-height: 1.6;
}

/* =====================================================
   LAYOUT (MOBILE FIRST)
===================================================== */
.page-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

/* =====================================================
   HEADER
===================================================== */
.site-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: 1.5rem;
}

.header-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.name {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.tagline {
  font-size: 0.95rem;
  color: #cbd5f5;
}

.location {
  font-size: 0.85rem;
  color: #9ca3af;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-links a {
  font-size: 0.85rem;
  text-decoration: none;
  color: #e5e7eb;
  border: 1px solid rgba(156, 163, 175, 0.5);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.quick-links a:hover {
  background: #e5e7eb;
  color: #020617;
}

/* =====================================================
   SECTIONS
===================================================== */
.section {
  margin-top: 2rem;
}

.section-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =====================================================
   ABOUT
===================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.about-card {
  background: radial-gradient(circle at top left, #111827, #020617);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
}

.about-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.about-card p {
  font-size: 0.9rem;
  color: #d1d5db;
}

/* =====================================================
   PROJECTS
===================================================== */
.project-card {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, #020617, #02081a);
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85);
}

.project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.project-text,
.project-role,
.project-tools {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 0.35rem;
}

.project-text a {
  color: #1f6feb;
  text-decoration: underline;
}

/* =====================================================
   🔥 IMAGE — FIX DEFINITIVO MÓVIL
===================================================== */
.project-figure {
  width: 100%;
  margin-top: 0.75rem;
}

.project-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.project-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  opacity: 0.75;
  text-align: center;
}

/* =====================================================
   SKILLS
===================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.skill-group {
  background: #020617;
  border-radius: 0.9rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 0.8rem;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.7);
}

.skill-group h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.skill-group ul {
  list-style: none;
}

.skill-group li {
  font-size: 0.85rem;
  color: #d1d5db;
}

/* =====================================================
   FOOTER
===================================================== */
.site-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
}

/* =====================================================
   DESKTOP BREAKPOINTS
===================================================== */
@media (min-width: 720px) {
  .header-main {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .page-wrapper {
    max-width: 1080px;
    padding: 0 1.5rem;
  }

  .project-figure {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}
