/* Portafolio Isabel Lira Liberona
   Tipografía: Newsreader.
   Paleta: liquen (fondo), bosque (texto), musgo, lago y aromo (acentos por perfil).
   Radios: imágenes 18px, botones y chips pill, foto del hero con forma de piedra de río. */

:root {
  --bg: #EEF1E8;
  --surface: #E1E8D8;
  --ink: #1C2B22;
  --muted: #47584C;
  --line: #C6D1BD;
  --musgo: #3D5C33;
  --lago: #2A5B69;
  --aromo: #E8C21A;
  --aromo-ink: #6E5600;
  --on-aromo: #1C2B22;
  --accent: var(--musgo);
  --font: "Newsreader", Georgia, serif;
  --radius: 18px;
  --max: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121A15;
    --surface: #1B261F;
    --ink: #E5EADD;
    --muted: #A8B5A4;
    --line: #2E3C33;
    --musgo: #A3C590;
    --lago: #8CC2CF;
    --aromo: #E8C21A;
    --aromo-ink: #E8C21A;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

:focus-visible { outline: 3px solid var(--lago); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  background: var(--ink); color: var(--bg); padding: .5rem 1rem; border-radius: 999px;
}
.skip:focus { top: 12px; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 68px; padding: 0 clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__name { font-weight: 700; font-size: 1.15rem; text-decoration: none; white-space: nowrap; }
.nav ul { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.nav ul a { text-decoration: none; font-size: 1rem; color: var(--muted); }
.nav ul a.nav__lang {
  display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 .55rem;
  border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .9rem; letter-spacing: .04em;
}
.nav ul a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* BOTONES */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  min-height: 48px; padding: .7rem 1.4rem; border-radius: 999px;
  font: inherit; font-size: 1rem; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--ink); cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--musgo); border-color: var(--musgo); color: var(--bg); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--max); margin: 0 auto;
  min-height: calc(100dvh - 68px);
  padding: clamp(2rem, 5vw, 4rem) clamp(16px, 4vw, 48px);
}
.hero__contours {
  position: absolute; inset: auto -10% -6% -10%; width: 120%; height: 70%;
  fill: none; stroke: var(--musgo); stroke-width: 1; opacity: .18; pointer-events: none; z-index: 0;
}
.hero__text, .hero__photo { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 4rem); font-weight: 650; letter-spacing: -0.02em; max-width: 15ch; }
.hero__lead { margin-top: 1.5rem; font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--muted); max-width: 42ch; }
.hero__cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__photo {
  aspect-ratio: 4 / 5; max-height: 78dvh; justify-self: end; width: 100%;
  border-radius: 46% 54% 42% 58% / 38% 40% 60% 62%;
  overflow: hidden; background: var(--aromo);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--aromo) 60%, transparent);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

/* SELECTOR DE PERFILES */
.profiles { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) clamp(16px, 4vw, 48px); }
.profiles > h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 2rem; }

.chooser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.choice {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto auto; align-items: end; gap: .35rem;
  min-height: 300px; padding: 1.5rem; text-align: left;
  font: inherit; color: #F3F5EE; cursor: pointer;
  border: 0; border-radius: var(--radius);
  background: #1C2B22;
  transition: transform .4s var(--ease);
}
.choice::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--img) center / cover no-repeat;
  transition: transform .8s var(--ease);
}
.choice::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(18,26,21,.15) 0%, rgba(18,26,21,.55) 45%, rgba(18,26,21,.92) 100%);
}
.choice:hover::before { transform: scale(1.05); }
.choice:active { transform: scale(.99); }
.choice__icon { font-size: 1.6rem; align-self: start; grid-row: 1; }
.choice__title { grid-row: 3; font-size: clamp(1.5rem, 2.3vw, 2rem); font-weight: 650; line-height: 1.1; }
.choice__desc { grid-row: 4; font-size: 1rem; opacity: .9; }
.choice__open {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 999px; border: 1.5px solid rgba(243,245,238,.6);
  transition: transform .4s var(--ease), background-color .3s;
}
.choice[aria-selected="true"] { outline: 3px solid var(--aromo); outline-offset: 4px; }
.choice[aria-selected="true"] .choice__open { transform: rotate(180deg); background: var(--aromo); color: var(--on-aromo); border-color: var(--aromo); }
.chooser.has-active .choice[aria-selected="false"] { opacity: .72; }
.chooser.has-active .choice[aria-selected="false"]:hover { opacity: 1; }

/* PANELES */
.panel {
  margin-top: 2.5rem; padding: clamp(1.5rem, 4vw, 3.5rem);
  border-radius: var(--radius); background: var(--surface);
}
.panel[data-accent="lago"] { --accent: var(--lago); }
.panel[data-accent="musgo"] { --accent: var(--musgo); }
.panel[data-accent="aromo"] { --accent: var(--aromo); }
.panel.is-entering { animation: panelIn .7s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.panel__head { max-width: 62ch; margin-bottom: 2.5rem; }
.panel__head h3 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-bottom: 1rem; }
.panel__head h3::after {
  content: ""; display: block; width: 64px; height: 5px; margin-top: .9rem; border-radius: 999px; background: var(--accent);
}
.panel__head p { font-size: 1.2rem; color: var(--muted); }
.panel__sub {
  font-size: 1.35rem; font-style: italic; font-weight: 500;
  margin: 3rem 0 1.25rem; padding-bottom: .1em;
}
.panel__head + .panel__sub, .stats + .panel__sub { margin-top: 0; }
.panel__cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.panel__cols .btn { margin-top: 2rem; }

figcaption { margin-top: .6rem; font-size: .95rem; color: var(--muted); line-height: 1.4; }

.zoom {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden;
}
.zoom img { width: 100%; transition: transform .7s var(--ease); }
.zoom:hover img { transform: scale(1.03); }

/* Reel */
.reel { display: grid; grid-template-columns: 2.4fr 1fr; gap: 1rem; align-items: start; }
.reel video, .motion video { width: 100%; border-radius: var(--radius); background: #0E1410; }
.reel--pair { grid-template-columns: 1fr 1fr; margin-top: 1.5rem; }
.motion { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.yt { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; border-radius: var(--radius); overflow: hidden; background: #0E1410; aspect-ratio: 16 / 9; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.yt:hover img { transform: scale(1.03); }
.yt__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 72px; height: 72px; display: grid; place-items: center; border-radius: 999px;
  background: var(--aromo); color: #1C2B22; font-size: 1.9rem;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Galerías */
.gallery--masonry { columns: 3 260px; column-gap: 1rem; }
.gallery--masonry figure { break-inside: avoid; margin-bottom: 1.25rem; }

.gallery--bento { display: grid; grid-template-columns: 2.2fr 1fr; gap: 1rem; }
.gallery--bento .b-big { grid-row: span 3; display: flex; flex-direction: column; }
.gallery--bento .b-big .zoom { flex: 1; }
.gallery--bento .b-big .zoom img { height: 100%; }
.gallery--bento .zoom img { aspect-ratio: 1400 / 1095; object-fit: cover; }

.gallery--strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 28%); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .75rem;
  scrollbar-color: var(--line) transparent;
}
.gallery--strip figure { scroll-snap-align: start; }
.gallery--strip .zoom { background: #F6F7F2; }
.gallery--strip .zoom img { aspect-ratio: 1; object-fit: contain; }

.webwork { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.25rem; align-items: start; }
.webwork__retiro .zoom img { aspect-ratio: 1280 / 1000; object-fit: cover; object-position: top; }
.webwork__header .zoom { background: #E9EEF5; }
.expo { margin-bottom: 1.5rem; }
.expo .zoom img { aspect-ratio: 4 / 3; object-fit: cover; }
.expo .btn-row { margin-top: 1.25rem; }
.slides { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.slides .zoom img { aspect-ratio: 1400 / 400; object-fit: cover; }
.mails {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 17%); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .75rem; scrollbar-color: var(--line) transparent;
}
.mails figure { scroll-snap-align: start; }
.mails .zoom img { aspect-ratio: 3 / 5; object-fit: cover; object-position: top; }
.ads { display: grid; grid-template-columns: repeat(6, 1fr); gap: .9rem; }
.ads figcaption { font-size: .88rem; }

/* Proyectos */
.projects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.project h5 { font-size: 1.1rem; margin: .8rem 0 .3rem; line-height: 1.3; }
.project p { font-size: .98rem; color: var(--muted); line-height: 1.5; }
.project .zoom img { aspect-ratio: 3 / 2; object-fit: cover; }
.project--feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: center; }
.project--feature h5 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.project--feature p { font-size: 1.1rem; }

.case__lead { max-width: 62ch; color: var(--muted); margin: -.25rem 0 1.75rem; }
.case__note { margin: -1.5rem 0 0; font-size: .92rem; font-style: italic; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 3rem; }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .25rem; padding-top: 1rem; border-top: 2px solid var(--accent); }
.stats dt { font-size: .98rem; color: var(--muted); line-height: 1.4; }
.stats dd { margin: 0; font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 700; line-height: 1; }
.stats--4 { grid-template-columns: repeat(4, 1fr); }

/* Listas */
.timeline { display: grid; gap: 1.5rem; }
.timeline li { display: grid; grid-template-columns: 8.5rem 1fr; column-gap: 1.25rem; font-size: 1.02rem; color: var(--muted); }
.timeline strong { display: block; color: var(--ink); font-weight: 600; }
.timeline li > :not(.timeline__when) { grid-column: 2; }
.timeline li { grid-auto-flow: row; }
.timeline__when { grid-row: 1 / span 2; font-size: .92rem; font-style: italic; padding-top: .15rem; color: var(--muted); }
.facts { display: grid; gap: .6rem; font-size: 1.02rem; }
.facts li { padding-left: 1.1rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .7em; width: .45rem; height: .45rem; border-radius: 50% 50% 50% 0; background: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { font-size: .92rem; padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }

/* AFUERA */
.outside {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "intro photo" "hobbies photo" "cert photo";
  column-gap: clamp(2rem, 5vw, 5rem); row-gap: 2.5rem;
}
.outside__intro { grid-area: intro; }
.outside__intro h2 { font-size: clamp(2rem, 3.6vw, 3rem); max-width: 16ch; }
.outside__intro p { margin-top: 1.25rem; font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.outside__photos { grid-area: photo; position: relative; align-self: start; padding-bottom: 18%; }
.outside__sup .zoom { border-radius: 40% 60% 18px 18px / 30% 30% 18px 18px; }
.outside__sup img { aspect-ratio: 4 / 3; object-fit: cover; }
.outside__swim { position: absolute; right: -4%; bottom: 0; width: 42%; }
.outside__swim .zoom { border-radius: 999px 999px 18px 18px; border: 6px solid var(--bg); }
.outside__swim img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 60% 40%; }
.cert {
  grid-area: cert; display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; align-items: start;
  padding: 1.25rem 1.5rem; border-radius: var(--radius); border: 2px solid var(--lago);
}
.cert .ph { font-size: 2rem; color: var(--lago); }
.cert h3 { font-size: 1.15rem; line-height: 1.3; }
.cert p { margin-top: .3rem; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.hobbies { grid-area: hobbies; display: grid; gap: 1.5rem; }
.hobbies li { display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; }
.hobbies .ph { grid-row: span 2; font-size: 2rem; color: var(--lago); }
.hobbies h3 { font-size: 1.3rem; }
.hobbies p { color: var(--muted); font-size: 1.02rem; }
.seeking {
  margin-bottom: clamp(3rem, 6vw, 4.5rem); padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius);
  background: var(--aromo); color: var(--on-aromo);
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: baseline;
}
.seeking h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-style: italic; font-weight: 600; }
.seeking p { font-size: 1.2rem; max-width: 60ch; }

/* CONTACTO */
.contact { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); }
.contact h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.contact__mail {
  display: inline-block; margin-top: 1rem; font-size: clamp(1.5rem, 4.5vw, 3.4rem); font-weight: 500; font-style: italic;
  text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--aromo); word-break: break-all;
}
.contact__mail:hover { color: var(--musgo); }
.contact__links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.contact__links a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; font-size: 1.1rem; }
.contact__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact__links .ph { font-size: 1.4rem; }
.contact__where { margin-top: 1.5rem; color: var(--muted); }

.footer { padding: 2rem clamp(16px, 4vw, 48px); text-align: center; color: var(--muted); font-size: .95rem; }

/* LIGHTBOX */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1400px); max-height: 92dvh; }
.lightbox::backdrop { background: rgba(14, 20, 16, .88); }
.lightbox img { max-width: 100%; max-height: 92dvh; border-radius: 12px; }
.lightbox.is-tall { overflow-y: auto; max-height: 92dvh; }
.lightbox.is-tall img { max-height: none; width: min(1000px, 92vw); }
.lightbox.is-tall.is-narrow img { width: min(420px, 92vw); }
.lightbox__close {
  position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 999px;
  border: 0; background: #F3F5EE; color: #1C2B22; font-size: 1.4rem; cursor: pointer; display: grid; place-items: center;
}

/* REVEAL */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
  .hero__text > * { animation: rise .9s var(--ease) both; }
  .hero__text > :nth-child(2) { animation-delay: .12s; }
  .hero__text > :nth-child(3) { animation-delay: .24s; }
  .hero__photo { animation: rise 1.1s var(--ease) .1s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .panel.is-entering { animation: none; }
  .choice::before, .zoom img { transition: none; }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .ads { grid-template-columns: repeat(3, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .panel__cols { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .nav { gap: .6rem; }
  .nav ul { gap: .7rem; }
  .nav__name { font-size: 1.02rem; }
  .nav ul a.nav__lang { min-width: 34px; height: 30px; padding: 0 .4rem; }
}
@media (max-width: 767px) {
  body { font-size: 1.0625rem; }
  .nav ul a { font-size: .95rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 2rem; padding-top: 1.5rem; }
  .hero__photo { order: -1; justify-self: center; max-width: 340px; max-height: 52dvh; }
  .chooser { grid-template-columns: 1fr; }
  .choice { min-height: 170px; }
  .reel, .panel__cols, .stats, .project--feature, .projects, .gallery--bento { grid-template-columns: 1fr; }
  .gallery--bento .b-big { grid-column: auto; grid-row: auto; }
  .webwork { grid-template-columns: 1fr; }
  .ads { grid-template-columns: repeat(2, 1fr); }
  .slides { grid-template-columns: 1fr; }
  .stats--4 { grid-template-columns: 1fr 1fr; }
  .mails { grid-auto-columns: 62%; }
  .gallery--strip { grid-auto-columns: 78%; }
  .reel__tall { max-width: 320px; }
  .timeline li { grid-template-columns: 1fr; }
  .timeline__when { grid-row: auto; }
  .timeline li > :not(.timeline__when) { grid-column: 1; }
  .outside { grid-template-columns: 1fr; grid-template-areas: "intro" "photo" "hobbies" "cert"; }
  .outside__swim { right: 0; width: 46%; }
  .motion, .reel--pair { grid-template-columns: 1fr; }
  .seeking { grid-template-columns: 1fr; gap: .75rem; }
}

/* FONDO AL ELEGIR PERFIL: la página toma un tinte suave del color del perfil */
body { transition: background-color .7s var(--ease), color .7s var(--ease); }
html[data-profile="audiovisual"] { --bg: #E3EDEF; --surface: #D2E1E5; --line: #B6CBD1; }
html[data-profile="proyectos"], html[data-profile="projects"] { --bg: #E6EEDD; --surface: #D5E3C8; --line: #BCCEAC; }
html[data-profile="diseno"], html[data-profile="design"] { --bg: #F6F0D4; --surface: #EEE3B4; --line: #D9CA8A; }
@media (prefers-color-scheme: dark) {
  html[data-profile="audiovisual"] { --bg: #0F1C21; --surface: #17282E; --line: #263A41; }
  html[data-profile="proyectos"], html[data-profile="projects"] { --bg: #111B11; --surface: #1A291A; --line: #2A3C29; }
  html[data-profile="diseno"], html[data-profile="design"] { --bg: #1B190E; --surface: #29261A; --line: #3C3820; }
}

