/* ══════════════════════════════════
   STYLES — Javier Reyes | Portfolio
   Requiere: variables.css cargado antes
══════════════════════════════════ */

/* ── BASE ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
}

/* ── GRADIENT TEXT ── */
.grad-text {
  background: linear-gradient(90deg, var(--grad-start), var(--grad-mid), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════
   NAVBAR
══════════════════════════════════ */
#mainNav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: .9rem 0;
}

#mainNav .navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#mainNav .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  font-size: .92rem;
  padding: .4rem 1rem !important;
  transition: color .2s;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active-link {
  color: var(--blue) !important;
}

.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }

/* ══════════════════════════════════
   SECTION BASE
══════════════════════════════════ */
section { padding: 80px 0; }

.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: .3rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 3rem;
}

/* ══════════════════════════════════
   HOME / HERO
══════════════════════════════════ */
#home {
  background: var(--bg-white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-badge {
  display: inline-block;
  background: var(--text-dark);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: .45rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.2rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: .5rem;
}

.hero-heading {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 2rem;
}

.btn-primary-grad {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: .75rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  display: inline-block;
  transition: opacity .2s, transform .2s;
}

.btn-primary-grad:hover { opacity: .88; transform: translateY(-2px); color: #fff; }

.btn-outline-grad {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--border);
  padding: .75rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  display: inline-block;
  margin-left: .75rem;
  transition: border-color .2s, color .2s;
}

.btn-outline-grad:hover { border-color: var(--blue); color: var(--blue); }

/* ── Hero photo — pop-out style ── */
.hero-photo-wrap {
  position: relative;
  width: 460px;
  height: 530px;   /* total height: rect + popup space */
}

/* Rounded rectangle gradient background */
.hero-rect {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 430px;
  border-radius: 40px;
  background: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-mid) 50%, var(--grad-end) 100%);
  z-index: 1;
}

/* Photo: anchored to the bottom, taller than the rect → pops out above */
.hero-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 520px;    /* ~90px taller than rect → that's the popup */
  width: auto;
  z-index: 2;       /* in front of the rect */
  object-fit: contain;
  object-position: bottom center;
}

/* Dot grids */
.dot-grid {
  position: absolute;
  display: grid;
  gap: 10px;
  z-index: 0;
}

.dot-grid span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

/* Right: 5 cols × 6 rows — alternating blue / white */
.dot-grid.right {
  grid-template-columns: repeat(5, 8px);
  right: -8px;
  top: 10px;
}

.dot-grid.right span:nth-child(odd)  { background: var(--blue); }
.dot-grid.right span:nth-child(even) { background: #bfcfff; }

/* Left: 3 cols × 5 rows — blue outer, white inner */
.dot-grid.left {
  grid-template-columns: repeat(3, 8px);
  left: 0px;
  bottom: 120px;
}

.dot-grid.left span:nth-child(3n+1) { background: var(--blue); }
.dot-grid.left span:nth-child(3n+2) { background: #bfcfff; }
.dot-grid.left span:nth-child(3n)   { background: #fff; border: 1.5px solid #bfcfff; }

/* ══════════════════════════════════
   ABOUT STRIP
══════════════════════════════════ */
#about {
  background: var(--bg-light);
  padding: 70px 0;
}

.about-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--text-dark);
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  margin: 0 .3rem;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}

.social-icon-link:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.13); color: var(--blue); }

/* ══════════════════════════════════
   RESUME
══════════════════════════════════ */
#resumen { background: var(--bg-light); }

.resume-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.resume-section-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.btn-download {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: .6rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: opacity .2s;
}

.btn-download:hover { opacity: .85; color: #fff; }

/* Resume card */
.resume-item {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 0;
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.resume-item-left {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg-light);
  padding: 1.6rem 1.2rem;
  border-right: 1px solid var(--border);
}

.resume-item-date {
  font-size: .82rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .5rem;
}

.resume-item-role {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: .25rem;
}

.resume-item-company {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .2rem;
}

.resume-item-location {
  font-size: .78rem;
  color: #9ca3af;
  font-style: italic;
}

.resume-item-right {
  padding: 1.6rem;
  flex: 1;
  display: flex;
  align-items: center;
}

.resume-item-right p {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
  margin: 0;
}

.resume-item-right ul {
  padding-left: 1.2rem;
  margin: 0;
}

.resume-item-right ul li {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: .35rem;
}

/* ══════════════════════════════════
   SKILLS
══════════════════════════════════ */
#skills { background: var(--bg-white); padding: 70px 0; }

.skills-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.skills-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.skills-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.skills-icon-box.grad-1 { background: linear-gradient(135deg, #0d2a5e, #1a5fad); }
.skills-icon-box.grad-2 { background: linear-gradient(135deg, #1a5fad, #5ba3d9); }
.skills-icon-box.grad-3 { background: linear-gradient(135deg, #163f80, #2e7cc4); }
.skills-icon-box.grad-4 { background: linear-gradient(135deg, #0d2a5e, #5ba3d9); }

.skills-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.skill-pill {
  display: inline-block;
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: .82rem;
  font-weight: 500;
  padding: .4rem .9rem;
  border-radius: 8px;
  margin: .25rem .2rem;
  border: 1px solid var(--border);
}

/* ══════════════════════════════════
   CERTIFICATIONS
══════════════════════════════════ */
#certs { background: var(--bg-light); padding: 70px 0; }

.cert-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .8rem;
  transition: transform .2s;
}

.cert-card:hover { transform: translateY(-2px); }

.cert-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cert-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* ══════════════════════════════════
   PROJECTS — horizontal cards
══════════════════════════════════ */
#projects { background: var(--bg-white); }

.project-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  display: flex;
  overflow: hidden;
  margin-bottom: 1.8rem;
  transition: transform .25s, box-shadow .25s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.1);
}

.project-card-body {
  flex: 1;
  padding: 2.5rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card-number {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.project-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: .7rem;
}

.project-card-desc {
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.project-tags { display: flex; flex-wrap: wrap; gap: .4rem; }

.project-tag {
  font-size: .76rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 6px;
  background: var(--bg-light);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.project-card-image {
  width: 340px;
  flex-shrink: 0;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Gradient bg per project */
.project-card-image.c1 { background: linear-gradient(135deg, #0d2a5e 0%, #1a5fad 100%); }
.project-card-image.c2 { background: linear-gradient(135deg, #1a5fad 0%, #5ba3d9 100%); }
.project-card-image.c3 { background: linear-gradient(135deg, #0d2a5e 0%, #2e7cc4 100%); }
.project-card-image.c4 { background: linear-gradient(135deg, #163f80 0%, #5ba3d9 100%); }
.project-card-image.c5 { background: linear-gradient(135deg, #0d2a5e 0%, #1e6b3e 100%); }

.project-card-image .proj-icon {
  font-size: 4.5rem;
  color: rgba(255,255,255,.35);
}

.project-card-image .proj-label {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: .35rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* ══════════════════════════════════
   CONTACT
══════════════════════════════════ */
#contact { background: var(--bg-light); }

.contact-info-item {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform .2s;
  height: 100%;
}

.contact-info-item:hover { transform: translateY(-3px); }

.contact-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 auto 1rem;
}

.contact-info-item h6 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .35rem;
  color: var(--text-dark);
}

.contact-info-item a,
.contact-info-item p {
  color: var(--text-muted);
  font-size: .88rem;
  text-decoration: none;
}

.contact-info-item a:hover { color: var(--blue); }

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2rem 0;
  font-size: .83rem;
}

footer strong { color: #fff; }
footer a { color: #93c5fd; text-decoration: none; }
footer a:hover { color: #fff; }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 991px) {
  .hero-photo-wrap { width: 340px; height: 400px; }
  .hero-rect  { width: 310px; height: 320px; }
  .hero-photo { height: 390px; }
  .hero-heading { font-size: 2.4rem; }
}

@media (max-width: 575px) {
  .hero-photo-wrap { width: 280px; height: 330px; }
  .hero-rect  { width: 260px; height: 270px; }
  .hero-photo { height: 320px; }
  .dot-grid.right { display: none; }
  .dot-grid.left  { display: none; }
}

@media (max-width: 767px) {
  .project-card { flex-direction: column; }
  .project-card-image { width: 100%; min-height: 180px; }
  .resume-item { flex-direction: column; }
  .resume-item-left { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  section { padding: 60px 0; }
}
