
/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }

:root{
  /* Color */
  --bg: #f6f7f8;            /* background */
  --fg: #E06B80;            /* text */
  --muted: #5a6b74;         /* subdued text */
  --brand: #CD2C58;         /* primary brand */
  --brand-contrast: #ffffff; /* readable text on brand backgrounds */
  --alt-bg: #eef3f5;        /* section bg alterats */
  --card: #ffffff;          /* cards */

  /* Efectos */
  --shadow: 0 10px 24px rgba(16,34,43,0.08);
  --shadow-lg: 0 16px 32px rgba(16,34,43,0.14);
  --radius: 16px;
  --ring: rgba(14,82,97,0.35);


  --container: 1920px;
}

body{
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

/* Containers */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container--wide { max-width: 1920px; }

/* Header/menú */
.site-header { background-color: #EEEEEE; box-shadow: 0 2px 6px rgba(0,0,0,0.05); position: relative; top: 0; z-index: 10; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 45px; }
.logo { font-weight: 400; color: var(--brand); text-decoration: none; font-size: clamp(16px, 2vw, 22px); }
.nav-list { list-style: none; display: flex; gap: 25px; }
.nav-list a { text-decoration: none; color: var(--fg); font-weight: 500; transition: color .3s ease; font-size: clamp(12px, 2vw, 16px);}
.nav-list a:hover { color: #758A93; }

/* Botón menú */
.menu-toggle{
  display:none;
  background:none;
  border:0;
  font-size:24px;
  line-height:1;
  cursor:pointer;
  padding:6px 8px;
  color: var(--fg);
}

/* padding horizontal */
.header-inner { padding: 0 20px; }

/* Responsive móvil */
@media (max-width: 768px){
  .menu-toggle{ display:block; }

  /* Menú desplegable*/
  .nav-list{
    position: absolute;
    top: 45px; /* altura del header */
    right: 0;
    left: 0;
    background: #EEEEEE;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #e5e7eb;
    display: none;
  }
  .nav-list a { font-size: 16px; }
  /* Visible cuando se activa */
  .nav-list.is-open{ display:flex; }
}

/* Hero Porfoli */
.hero {
  background-image: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), url("photo_hero.jpg");
  background-size: cover; background-position: center; background-repeat: no-repeat;
  color: #ffffff; text-align: center; display: grid; place-items: center; min-height: 90vh; padding: 50px 0;
}
.hero-inner { max-width: 800px; position: relative; z-index: 1; }
.hero-title { font-size: clamp(36px, 6vw, 80px); margin-bottom: 6px; font-weight: 500; }
.hero-sub { max-width: 800px; margin: 0 auto; font-weight: 200; color: #eaeaea; font-size: clamp(10px,3vw,30px); }

/* Sections Porfoli */
.section { padding: 10px 0; }
.section-alt { background-color: var(--alt-bg); }
.section h2 { font-size: 30px; margin-bottom: 10px; text-align: left; font-weight: 400; color: var(--fg); }

.filters { display: flex; gap: 10px; list-style: none; justify-content: center; flex-wrap: wrap; margin-top: 0px; }
.chip { display: inline-block; padding: 8px 12px; border-radius: 999px; background: #e6eef0; color: var(--fg); text-decoration: none; font-size: 14px; transition: background .3s; }
.chip:hover { background: #dbe6e9; }

/* Grid & cards Porfoli */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 20px; margin-top: 15px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transform: translateY(0); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card img { width: 100%; display: block; filter: grayscale(1); transition: filter .5s ease, transform .5s ease; }
.card:hover img { filter: grayscale(0); transform: scale(1.03); }
.card figcaption { padding: 10px 16px 20px; }
.card h3 { font-size:18px; margin-bottom: 5px; color: var(--brand); }
.meta { margin: 0; color: var(--muted); font-size: 12px; }

/* About me/Sobre mi Porfoli */
.about {display: grid; grid-template-columns: 1fr; gap: 20px; align-items: flex-start; }
.about-media img {width: 100%; border-radius: var(--radius); box-shadow: 0 10px 24px rgba(16,34,43,0.1); justify-self: center; }
.about-copy { text-align: justify; }
.about-copy h2 { text-align: left; color: var(--brand); margin-bottom: 10px;}
.about-copy p { margin-bottom: 10px; font-size: 16px; }
@media (min-width: 800px) {
  .about { grid-template-columns: 0.6fr 1.4fr; }
}
@media (min-width: 800px) {
  .about-copy { column-width: 320px; column-gap: 20px;}
  .about-copy h2 { column-span: all; }
  .about-copy p { break-inside: avoid; hyphens: auto; }
}


/* Contacto Porfoli*/
#contacto { text-align: center; margin-top: 100px;}
#contacto a { color: var(--brand); text-decoration: none; font-weight: 500; }
#contacto a:hover { text-decoration: underline; }

/* Footer */
.site-footer { background: #CD2C58; color: #cfe3ea; text-align: center; padding: 30px 0; font-size: 14px; }
.site-footer.is-slim { max-width: 1000px; margin: 40px auto 48px; padding: 0 20px; background: transparent; color: var(--muted); }

/* Animacions Porfoli */
.fade-up { animation: up .6s ease both; }
@keyframes up { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: translateY(0);} }

/* CV - Bloques */
.cabecera-sitio{ background: linear-gradient(135deg, #EEEEEE, #f4f7f9 100%); border-bottom: 1px solid #e5e7eb; border-radius: 10px; }
.cabecera-contenido{ max-width: 1920px; margin: auto; padding: 20px 20px; display: grid; gap: 40px; grid-template-columns: 120px 1fr; align-items: center; }
.avatar-foto{ width: 140px; aspect-ratio: 1/1; }
.avatar{ width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }
.nombre h1{ margin: 0 0 6px; font-size: clamp(24px, 4vw, 36px); line-height: 1.15; font-weight: 500;}
.subtitulo{ margin: 0 0 10px; color: var(--muted); font-weight: 200; }
.contact{ display: flex; flex-wrap: wrap; gap: 1px 30px; padding: 0; margin: 0; list-style: none; }
.contact a{ color: var(--brand); text-decoration: none; border-bottom: 1px solid transparent; }
.contact a:hover{ border-bottom-color: var(--brand); }

/* Containers */
.container.b-expanded { max-width: 1920px; margin: 20px auto; }

.cv-block{ background: var(--card); border: 1px solid #e5e7eb; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 10px; margin-top: 10px;}
.grid-3 { display: grid; gap: 10px 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #e5e7eb; border-top: 4px solid var(--brand); }
.grid-3 ul { list-style: disc; padding-left: 40px; padding-bottom: 20px; }
@media (max-width: 800px){ .grid-3 { grid-template-columns: 1fr; } }

.cv-block > summary{ cursor: pointer; padding: 20px 20px; display: flex; align-items: center; justify-content: space-between; position: relative; user-select: none; }
.cv-block > summary h2{ font-size: 18px; margin: 0; line-height: 1.2; }
.cv-block > summary::after{ content: "▸"; font-size: 16px; color: var(--muted); transition: transform .2s ease; }
.cv-block[open] > summary::after{ transform: rotate(90deg); color: var(--brand); }
.cv-block > summary:hover{ background: var(--brand); color: var(--brand-contrast); }

.contenido{ padding: 16px 20px 22px; }
.item{ margin: 10px 0 18px; }
.item-head{ display:flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.item h3{ margin: 0; font-size: 18px;}
.item-meta{ color: var(--muted); font-size: 14px; }

ul.listas{ list-style: disc; padding-left: 40px; margin: 8px 0; }
.grid-2{ display: grid; gap: 20px 24px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-2 ul{ margin: 0; padding-left: 18px; }

summary:focus{ outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }

/* Responsive cv */
@media (max-width: 680px){
  .header-inner{ grid-template-columns: 80px 1fr; }
  .avatar-wrap{ width: 80px; }
  .grid-2{ grid-template-columns: 1fr; }
}
@media (max-width: 680px){
  .cabecera-contenido{ text-align: center; }
  .avatar-foto{ justify-self: center; }
  .contact{ justify-content: center; }
}
/* Galeria de fotos */
#fotografia .photo-head {
  text-align: center;
  margin-bottom: 20px;
}
#fotografia .photo-head p {
  color: var(--muted);
  max-width: 700px;
  margin: 6px auto 0;
}
/* Responsive */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
/* Cards foto */
.photo-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform .25s ease, box-shadow .25s ease;
}
.photo-card:hover {
  transform: translateY(6px);
  box-shadow: var(--shadow-lg);
}
.photo-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  transition: filter .35s ease, transform .35s ease;
}
.photo-card:hover img { filter: none; transform: scale(1.03); }

/* Overlay */
.photo-card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}
.lightbox:target { display: flex; }
.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox .close,
.lightbox .back {
  position: absolute;
  top: 10px;
  padding: 8px 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand);
  box-shadow: var(--shadow);
}
.lightbox .close { right: 20px; }
.lightbox .back { left: 20px; }
.lightbox .caption {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .photo-card, .photo-card img { transition: none; }
}
@media (max-width: 520px) {
  .photo-card figcaption { font-size: 12px; padding: 8px 10px; }
}

/* Volver arriba */
#volver-arriba {
  text-align: center;
  padding: 40px 0 60px;
  background: var(--alt-bg);
}

.btn-volver {
  display: inline-block;
  padding: 5px 10px;
  font-weight: 200;
  text-decoration: none;
  color: var(--brand-contrast);
  background-color: var(--brand);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.btn-volver:hover {
  background-color: #083f4e;
}

