/* ─────────────────────────────────────────
   sections.css
   Styles for all content sections
───────────────────────────────────────── */

/* ══ SOBRE MÍ ══════════════════════════ */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text {
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.85;
}

.about-text p + p { margin-top: 1rem; }

.about-text strong { color: var(--text); font-weight: 600; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  transition: box-shadow 0.15s;
}

.highlight-item:hover {
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
}

.hl-icon  { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.hl-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.hl-sub   { font-size: 12.5px; color: var(--text2); }

/* ══ SKILLS ════════════════════════════ */

.skills-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.skill-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.skill-block:hover {
  border-color: var(--blue-mid);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.07);
}

.skill-block-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text3);
  margin-bottom: 1rem;
}

.pill-wrap { display: flex; flex-wrap: wrap; gap: 6px; }

.pill {
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  transition: all 0.12s;
}

.pill:hover {
  background: var(--blue-light);
  border-color: var(--blue-mid);
  color: var(--blue);
}

.pill.featured {
  background: var(--blue-light);
  border-color: var(--blue-mid);
  color: var(--blue);
  font-weight: 600;
}

/* ══ PROYECTOS ══════════════════════════ */

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

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.18s;
}

.project-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.project-icon {
  width: 36px; height: 36px;
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-icon svg { width: 17px; height: 17px; color: var(--blue); }

.project-stars {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  color: var(--text3);
}

.project-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  flex: 1;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.lang-dot {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
}

.lang-dot::before {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #f59e0b;
}

.lang-dot.doc::before { background: var(--text3); }

.project-link-arrow {
  font-size: 12px;
  color: var(--blue);
  opacity: 0;
  transition: opacity 0.15s;
  font-weight: 500;
}

.project-card:hover .project-link-arrow { opacity: 1; }

/* ══ EXPERIENCIA ════════════════════════ */

.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 20px; bottom: 20px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1.25rem;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot-inner {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.tl-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.tl-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.tl-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tl-date {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  color: var(--text3);
  white-space: nowrap;
  padding-top: 3px;
}

.tl-company {
  font-size: 13px;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.tl-desc {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.7;
}

.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.75rem; }

.tl-tag {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  color: var(--blue);
  font-family: 'DM Mono', monospace;
}

/* Placeholder entry */
.tl-placeholder .timeline-dot       { border-color: var(--border2); }
.tl-placeholder .timeline-dot-inner { background: var(--border2); }
.tl-placeholder .tl-box             { border-style: dashed; background: var(--bg2); }
.tl-placeholder .tl-role            { color: var(--text3); }
.tl-placeholder .tl-company         { color: var(--text3); }

/* ══ EDUCACIÓN ══════════════════════════ */

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

.edu-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.edu-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 0.85rem;
}

.edu-badge.degree { background: var(--blue-light); color: var(--blue);   border: 1px solid var(--blue-mid); }
.edu-badge.cert   { background: var(--amber-bg);   color: var(--amber);  border: 1px solid #fde68a; }
.edu-badge.study  { background: var(--green-bg);   color: var(--green);  border: 1px solid #bbf7d0; }
.edu-badge.ph     { background: var(--bg3);        color: var(--text3);  border: 1px solid var(--border); }

.edu-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.35;
}

.edu-card-sub { font-size: 13px; color: var(--text2); }

.edu-card.placeholder { border-style: dashed; background: var(--bg2); }
.edu-card.placeholder .edu-card-title { color: var(--text3); }
.edu-card.placeholder .edu-card-sub   { color: var(--text3); }

/* ══ PROYECTO PROPIO ════════════════════ */

.kernex-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.kernex-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}

.kernex-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.kernex-card.yt::before { background: linear-gradient(90deg, #ef4444, #f97316); }
.kernex-card.li::before { background: linear-gradient(90deg, var(--blue), #0ea5e9); }

.kernex-card:hover {
  border-color: var(--border2);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.kc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1rem;
}

.kc-logo {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.kc-logo.red  { background: #fef2f2; border: 1px solid #fecaca; color: var(--red); }
.kc-logo.blue { background: var(--blue-light); border: 1px solid var(--blue-mid); color: var(--blue); }

.kc-title { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.kc-label { font-size: 12px; color: var(--text3); font-family: 'DM Mono', monospace; }

.kc-desc {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}

.kc-desc strong { color: var(--text); font-weight: 600; }

.kc-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  margin-top: auto;
}

.kc-arrow.red  { color: var(--red); }
.kc-arrow.blue { color: var(--blue); }

/* ══ CONTACTO ═══════════════════════════ */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-intro {
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.contact-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
}

.contact-link-item:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.cli-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cli-icon svg { width: 18px; height: 18px; }

.cli-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cli-value { font-size: 12px; color: var(--text3); font-family: 'DM Mono', monospace; }

.contact-availability {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.avail-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.avail-body { font-size: 13.5px; color: var(--text2); line-height: 1.7; }
.avail-body strong { color: var(--text); font-weight: 600; }

.avail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; }

.avail-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 6px;
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  color: var(--blue);
}

/* ══ FOOTER ═════════════════════════════ */

footer {
  padding: 2rem;
  text-align: center;
  font-size: 12.5px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

footer a { color: var(--blue); text-decoration: none; }

/* ══ RESPONSIVE ═════════════════════════ */

@media (max-width: 820px) {
  .about-layout,
  .kernex-wrap,
  .contact-layout  { grid-template-columns: 1fr; }

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

@media (max-width: 520px) {
  .skills-layout,
  .projects-grid,
  .edu-grid        { grid-template-columns: 1fr; }
}

/* ══ INSIGNIAS CREDLY ═══════════════════════ */

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.badge-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.badge-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.badge-card.red::before  { background: #ee0000; }
.badge-card.blue::before { background: #049fd9; }

.badge-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.1);
  border-color: var(--border2);
}

.badge-card:hover::before { transform: scaleX(1); }

.badge-logo {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.badge-card:hover .badge-logo { transform: scale(1.08); }

.badge-logo.red  { background: #fff0f0; border: 2px solid #fca5a5; color: #ee0000; }
.badge-logo.blue { background: #e8f7fc; border: 2px solid #7dd3ea; color: #049fd9; }

.badge-issuer {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 100px;
}

.badge-issuer.red  { background: #fff0f0; color: #ee0000; border: 1px solid #fca5a5; }
.badge-issuer.blue { background: #e8f7fc; color: #049fd9; border: 1px solid #7dd3ea; }

.badge-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.badge-code {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text3);
}

.badge-verify {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--blue);
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-top: auto;
}

.badge-card:hover .badge-verify { opacity: 1; }