/* =========================
   BASE
========================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   LAYOUT GENERAL
========================= */
.section {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section h2 {
  font-size: 1.9rem;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-intro {
  color: #94a3b8;
  max-width: 700px;
  margin: 0 0 24px;
}

/* =========================
   COMPONENTES REUTILIZABLES
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn.primary {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #2563eb;
}

.btn.primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn.secondary {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(229, 231, 235, 0.22);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(229, 231, 235, 0.38);
}

.project-status {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-status.live {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

/* =========================
   HERO
========================= */
.hero {
  padding: 48px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
}

.hero-text h1 {
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 0.98;
  margin: 0 0 14px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.03em;
}

.hero-text h2 {
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.05;
  margin: 0 0 20px;
  font-weight: 700;
  color: #38bdf8;
}

.hero-text p {
  max-width: 580px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #94a3b8;
  margin: 0 0 24px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 280px;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

/* =========================
   SOBRE MÍ
========================= */
.about {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.about-text p {
  color: #94a3b8;
  line-height: 1.75;
  margin: 0 0 16px;
  max-width: 700px;
}

.about-cards {
  display: grid;
  gap: 16px;
}

.about-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.about-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.25);
}

.about-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #f8fafc;
}

.about-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.65;
}

/* =========================
   PROYECTO DESTACADO
========================= */
.featured-project {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}


.featured-content,
.detail-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  height: 100%;
}

.featured-content {
  transition: transform 0.2s ease, border-color 0.2s ease;
  align-self: start;
  
}

.featured-content:hover,
.detail-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.25);
}

.featured-content h3 {
  font-size: 2rem;
  margin: 0 0 14px;
}

.featured-description {
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 12px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.project-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #1f2937;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.featured-details {
  display: block;
}

.detail-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.detail-card h4 {
  margin: 0 0 12px;
  color: #f8fafc;
  font-size: 1.05rem;
}

.detail-subtitle {
  margin-top: 24px;
}

.detail-card ul {
  margin: 0;
  padding-left: 18px;
  color: #94a3b8;
  line-height: 1.5;
}

.detail-card li {
  margin-bottom: 6px;
}

.project-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.preview-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  min-height: 420px;
  min-width: 0;
}

.preview-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.25);
}

.preview-card h4 {
  margin: 0 0 14px;
  color: #f8fafc;
}

.preview-card pre {
  margin: 0;
  padding: 18px;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  max-height: 340px;
}

.preview-card code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre;
}
.technical-details {
  margin-top: 20px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  width: 100%;
  grid-column: span 2;
}

.technical-details h4 {
  margin: 0 0 10px;
  color: #f8fafc;
}

.technical-details ul {
  margin: 0;
  padding-left: 18px;
  color: #94a3b8;
  line-height: 1.5;
  column-count: 2;
  column-gap: 40px;
}

.technical-details li {
  margin-bottom: 8px;
  break-inside: avoid;
}

.technical-details li:last-child {
  margin-bottom: 0;
}

/* =========================
   PROYECTOS
========================= */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.25);
}

.project-card h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.project-card p {
  color: #94a3b8;
  margin: 0 0 18px;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.project-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #1f2937;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.project-link {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

/* =========================
   CONTACTO
========================= */
#contact p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1.05rem;
}

.contact-box {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 8px 0;
}

.contact-box .section-intro {
  margin-left: auto;
  margin-right: auto;
}

.contact-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .hero {
    padding: 36px 0 20px;
  }

  .hero-grid,
  .about,
  .featured-project,
  .projects {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero-image {
    order: -1;
    justify-content: flex-start;
  }

  .hero-image img {
    max-width: 220px;
  }

  .preview-card {
  min-width: 0;
  }

  .preview-card pre {
  padding: 14px;
  max-width: 100%;
  }

  .preview-card code {
  font-size: 0.82rem;
  line-height: 1.5;
  }
  
  .project-preview {
    grid-template-columns: 1fr;
  }

  .technical-details ul {
    column-count: 1;
  }
}