:root {
  --yellow: #F4C430;
  --yellow-deep: #E0AC00;
  --ink: #1A1A18;
  --gray: #6B6B68;
  --gray-light: #A8A8A4;
  --off-white: #FAF9F6;
  --white: #FFFFFF;
  --line: #ECEAE4;
  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-logo span {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--gray);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

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

.nav-cta {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--yellow);
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  transition: all var(--transition);
}

.nav-cta:hover { background: var(--yellow-deep); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: all var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--off-white);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition);
}

.mobile-menu a:hover { color: var(--yellow-deep); }

.mobile-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 2rem;
  cursor: pointer;
}

/* HERO */
#inicio {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  padding: 8rem 4rem 4rem;
  gap: 4rem;
  position: relative;
}

.hero-text { position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--gray);
  margin-bottom: 2rem;
}

.hero-tag::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--yellow-deep);
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 5.8rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.hero-text h1 em {
  font-style: italic;
  font-weight: 300;
  position: relative;
}

.hero-highlight {
  position: relative;
  display: inline-block;
}

.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: 0.08em; left: -0.05em; right: -0.05em;
  height: 0.35em;
  background: var(--yellow);
  z-index: -1;
}

.hero-text p {
  font-size: 1.05rem;
  color: var(--gray);
  margin-bottom: 2.5rem;
  line-height: 1.85;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.pill {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  padding: 0.4rem 1rem;
  background: var(--off-white);
  border: 1px solid var(--line);
  color: var(--gray);
  border-radius: 100px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.9rem 2.2rem;
  background: var(--yellow);
  color: var(--ink);
  text-decoration: none;
  transition: all var(--transition);
  border-radius: 100px;
}

.btn-primary:hover { background: var(--yellow-deep); transform: translateY(-2px); }

.btn-secondary {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  transition: all var(--transition);
  border-radius: 100px;
}

.btn-secondary:hover { background: var(--ink); color: var(--white); }

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

.hero-image-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.hero-image img {
  width: 100%;
  height: 540px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  position: relative;
  z-index: 2;
}

.hero-image-frame::before {
  content: '';
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  right: -1.5rem; bottom: -1.5rem;
  background: var(--yellow);
  border-radius: 4px;
  z-index: 1;
}

.hero-stats {
  position: absolute;
  bottom: -1.5rem; left: -2rem;
  background: var(--ink);
  padding: 1.25rem 1.75rem;
  z-index: 3;
  border-radius: 4px;
}

.hero-stats-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--yellow);
  line-height: 1;
}

.hero-stats-label {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #ccc;
  margin-top: 0.3rem;
}

/* SECTIONS */
section { padding: 6rem 4rem; }

.section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--yellow-deep);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-title em {
  font-style: italic;
  font-weight: 300;
  position: relative;
}

/* SOBRE MÍ */
#sobre-mi {
  background: var(--off-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: end;
}

.sobre-text p {
  color: var(--gray);
  margin-bottom: 1.25rem;
  line-height: 1.9;
}

.quote {
  border-left: 3px solid var(--yellow);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.skill-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.75rem;
  border-radius: 6px;
  transition: all var(--transition);
}

.skill-card:hover { border-color: var(--yellow); box-shadow: 0 8px 24px rgba(0,0,0,0.04); }

.skill-card-icon {
  width: 36px; height: 36px;
  background: var(--off-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.skill-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.7;
}

/* PORTFOLIO */
#portafolio { background: var(--white); }

.portfolio-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.7rem 1.5rem;
  background: var(--off-white);
  border: 1px solid var(--line);
  color: var(--gray);
  cursor: pointer;
  border-radius: 100px;
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: all var(--transition);
  border-radius: 8px;
}

.project-card:hover {
  border-color: var(--yellow);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
  transform: translateY(-4px);
}

.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.project-img-placeholder {
  width: 100%;
  height: 200px;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-style: italic;
  font-weight: 300;
  color: var(--yellow-deep);
  border-bottom: 1px solid var(--line);
}

.project-body { padding: 1.5rem; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.project-tag {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.7rem;
  background: var(--off-white);
  color: var(--gray);
  border-radius: 100px;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.project-card p {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--yellow);
  padding-bottom: 2px;
  transition: gap var(--transition);
}

.project-link:hover { gap: 0.7rem; }

/* WORDPRESS SECTION */
#wordpress { background: var(--off-white); }

.wp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.wp-main {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2.25rem;
  border-radius: 8px;
}

.wp-main h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.wp-main .wp-url {
  font-size: 1.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--yellow-deep);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  display: block;
  text-decoration: none;
}

.wp-main .wp-url:hover {
  text-decoration: underline;
}

.wp-main p {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.wp-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.wp-sites {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.wp-site-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.wp-site-card:hover { border-color: var(--yellow); box-shadow: 0 8px 24px rgba(0,0,0,0.04); }

.wp-site-img,
.wp-site-img-placeholder {
  width: 140px;
  height: auto;
  flex-shrink: 0;
  object-fit: cover;
  border-right: 1px solid var(--line);
}

.wp-site-img-placeholder {
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  color: var(--yellow-deep);
  text-align: center;
}

.wp-site-body {
  padding: 1.5rem;
  flex: 1;
  min-width: 0;
}

.wp-site-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.wp-site-card p {
  font-size: 0.83rem;
  color: var(--gray);
  line-height: 1.6;
}

/* EXPERIENCIA */
#experiencia { background: var(--white); }

.exp-list { margin-top: 3rem; }

.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.exp-item:last-child { border-bottom: 1px solid var(--line); }

.exp-meta { padding-top: 0.2rem; }

.exp-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--yellow-deep);
  margin-bottom: 0.4rem;
}

.exp-company {
  font-size: 0.88rem;
  color: var(--gray);
}

.exp-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.exp-body p {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.85;
  margin-bottom: 1rem;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.exp-tags .pill.metric {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
  font-weight: 600;
}

/* FORMACIÓN */
#formacion { background: var(--off-white); }

.formation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.formation-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.85rem;
  border-radius: 8px;
  transition: all var(--transition);
}

.formation-card:hover { border-color: var(--yellow); box-shadow: 0 8px 24px rgba(0,0,0,0.04); }

.formation-year {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--yellow-deep);
  margin-bottom: 0.75rem;
}

.formation-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.formation-card p {
  font-size: 0.83rem;
  color: var(--gray);
  line-height: 1.7;
}

/* HABILIDADES TÉCNICAS */
#habilidades { background: var(--off-white); }

.skills-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}

.skills-detail-group h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1rem;
}

.skills-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 100px;
}

/* CONTACTO */
#contacto {
  background: var(--white);
  max-width: 720px;
  margin: 0 auto;
}

.contact-info p {
  color: var(--gray);
  margin-bottom: 2rem;
  line-height: 1.8;
}

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

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  padding: 1.1rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-link:hover { border-color: var(--yellow); background: var(--off-white); }

.contact-link-icon {
  width: 32px; height: 32px;
  background: var(--off-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--yellow-deep);
  font-weight: 700;
  flex-shrink: 0;
}

.contact-link-icon svg {
  width: 16px;
  height: 16px;
}

/* FOOTER */
footer {
  background: var(--ink);
  padding: 2.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  display: flex;
  align-items: center;
}

.footer-logo span {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  margin-left: 4px;
}

.footer-copy {
  font-size: 0.8rem;
  color: #999;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  color: #ccc;
  text-decoration: none;
  transition: color var(--transition);
}

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

/* RESPONSIVE */
@media (max-width: 1024px) {
  nav { padding: 1.25rem 2rem; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  #inicio { grid-template-columns: 1fr; padding: 7rem 2rem 4rem; text-align: center; }
  .hero-tag { justify-content: center; }
  .hero-text p { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-pills { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-image { margin-top: 2rem; }
  .hero-image-frame { max-width: 320px; }
  .hero-stats { left: 0.5rem; }
  #sobre-mi { grid-template-columns: 1fr; gap: 3rem; padding: 4rem 2rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  #habilidades { padding: 4rem 2rem; }
  .skills-detail-grid { grid-template-columns: 1fr 1fr; }
  #portafolio { padding: 4rem 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  #wordpress { padding: 4rem 2rem; overflow-x: hidden; }
  #wordpress > div[style*="justify-content:space-between"] {
    flex-direction: column;
    align-items: flex-start;
  }
  #wordpress > div[style*="justify-content:space-between"] > .section-label:last-child {
    display: none;
  }
  .wp-sites::before {
    content: "Subsites activos";
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.25rem;
  }
  .wp-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
  }
  .wp-grid > div,
  .wp-main,
  .wp-sites,
  .wp-site-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .wp-main .wp-url {
    font-size: 1.2rem;
    word-break: break-all;
  }
  .wp-site-card { flex-direction: column; }
  .wp-site-img,
  .wp-site-img-placeholder {
    width: 100%;
    max-width: 100%;
    height: 160px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  #experiencia { padding: 4rem 2rem; }
  .exp-item { grid-template-columns: 1fr; gap: 0.75rem; }
  #formacion { padding: 4rem 2rem; }
  .formation-grid { grid-template-columns: 1fr 1fr; }
  #contacto { grid-template-columns: 1fr; gap: 3rem; padding: 4rem 2rem; }
  footer { padding: 2rem; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .skills-detail-grid { grid-template-columns: 1fr; }
  .formation-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  #inicio { padding: 6rem 1.25rem 3rem; }
  #sobre-mi, #portafolio, #wordpress, #experiencia, #formacion, #contacto { padding: 3rem 1.25rem; }
  .hero-stats { position: static; margin-top: 1rem; display: inline-block; }
  .hero-image-frame::before { display: none; }
  footer { padding: 1.5rem 1.25rem; }
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-tag { animation: fadeUp 0.6s ease both; }
.hero-text h1 { animation: fadeUp 0.6s 0.1s ease both; }
.hero-text p { animation: fadeUp 0.6s 0.2s ease both; }
.hero-pills { animation: fadeUp 0.6s 0.3s ease both; }
.hero-actions { animation: fadeUp 0.6s 0.4s ease both; }