/* davidmunera.com. Bento layout and palette from the original Divi site;
   titles in Young Serif, body in Figtree (both self-hosted). */
@font-face{font-family:"Young Serif"; src:url(/assets/fonts/young-serif-latin.woff2) format("woff2"); font-weight:400; font-style:normal; font-display:swap}
@font-face{font-family:"Figtree"; src:url(/assets/fonts/figtree-latin.woff2) format("woff2"); font-weight:300 900; font-style:normal; font-display:swap}

:root{
  --page:#ffffff; --card:#e6e6e8; --slate:#4a4a5e; --career:#7b7b8c; --steel:#aeaeb6; --black:#000000;
  --ink:#111111; --body:#555560; --soft:#d2d2da; --white:#ffffff; --field:#f4f4f5; --muted:#9a9aa6;
  --head:"Young Serif", Georgia, serif;
  --text:"Figtree", "Helvetica Neue", Arial, sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth; -webkit-text-size-adjust:100%}
body{margin:0; background:var(--page); color:var(--ink); font-family:var(--text); font-size:15px; line-height:1.6}
img{max-width:100%; height:auto}
a{color:inherit}
:focus-visible{outline:2px solid var(--slate); outline-offset:2px}
[hidden]{display:none!important}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto} *{transition:none!important}}

.page{max-width:1360px; margin:0 auto; padding:28px 20px 40px}
.top{display:flex; justify-content:flex-end; align-items:center; gap:10px; font-size:14px; color:var(--muted); margin-bottom:28px}
.top a{text-decoration:none; color:var(--muted)}
.top a[aria-current]{color:var(--slate); font-weight:600}
.top .sep{color:#c4c4cc}

.grid{display:grid; gap:30px}
.card{border-radius:14px; padding:40px}
.h-xl{font-family:var(--head); font-weight:400; letter-spacing:-.02em; line-height:1.05; margin:0}
[id]{scroll-margin-top:20px}

.r1{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:30px}
.hero{background:var(--card); display:flex; flex-direction:column; justify-content:center; gap:14px}
.hero h1{font-size:clamp(2.1rem,3vw,2.75rem)}
.hero .sub{font-family:var(--head); font-size:1.2rem; line-height:1.2; margin:0}
.hero p{margin:0; color:var(--body); max-width:34ch}
.photo{border-radius:14px; overflow:hidden; background:#f8e6d6; aspect-ratio:1/1}
.photo img{width:100%; height:100%; object-fit:cover; display:block}
.stack{display:grid; grid-template-rows:1fr auto; gap:20px}
.menu{background:var(--slate); color:var(--white)}
.menu h2{font-size:3.4rem; margin-bottom:14px}
.menu a{display:block; color:var(--white); text-decoration:none; font-family:var(--head); font-size:1.25rem; line-height:1.5}
.menu a:hover{text-decoration:underline}
.social-card{background:var(--black); padding:30px 40px; display:flex; justify-content:flex-end}
.social{display:flex; gap:8px}
.social a{width:32px; height:32px; border-radius:4px; background:var(--career); display:grid; place-items:center}
.social a:hover{background:var(--slate)}
.social svg{width:16px; height:16px; fill:var(--white)}

.r2{display:grid; grid-template-columns:minmax(0,310px) minmax(0,1fr); gap:40px; align-items:start}
.est{background:var(--steel)}
.est h3{font-family:var(--head); font-weight:400; font-size:1.8rem; margin:0 0 12px}
.est dl{margin:0}
.est dt{font-weight:600; color:var(--slate)}
.est dd{margin:0 0 4px; color:var(--slate)}
.about{background:var(--card)}
.about h2{font-size:2.6rem; margin-bottom:16px}
.about p{margin:0 0 14px; color:var(--body)}
.about p:last-child{margin:0}
.about strong{color:#333}
.about a{text-decoration:none}
.about a:hover strong{text-decoration:underline}

.career{background:var(--career); color:var(--white)}
.career h2{font-size:clamp(2.4rem,4.5vw,3.9rem); margin-bottom:40px}
.jobs{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:40px}
.job img{height:34px; width:auto; opacity:.35; filter:brightness(0) invert(1); margin-bottom:22px}
.job .when{color:#3e3e50; font-size:1.05rem}
.job h3{font-family:var(--head); font-weight:400; font-size:1.2rem; line-height:1.15; margin:6px 0 10px; color:var(--black)}
.job .co{font-weight:600; font-size:.95rem; color:var(--white); margin:0 0 10px}
.job p{color:var(--soft); margin:0; line-height:1.6; font-size:.95rem}
.career .more{font-size:.95rem; text-align:right; margin:40px 0 0}
.career .more a{color:#2e2e3e; font-weight:600}

.r3{display:grid; grid-template-columns:minmax(0,520px) minmax(0,1fr); gap:40px; align-items:start}
.cred-title{background:var(--black); color:var(--white)}
.cred-title h2{font-size:clamp(2.2rem,3.6vw,3.3rem); margin-bottom:30px}
.cred-title img{max-width:300px; width:100%}
.cred{background:var(--black); color:var(--white)}
.cred ul{list-style:none; margin:0 0 22px; padding:0; display:grid; gap:4px}
.cred ul:last-child{margin:0}
.cred b{font-weight:600}
.cred .lab{color:#8a8aa0; font-weight:600; margin-bottom:4px}
.cred .see{color:#8a8aa0; font-weight:600; text-decoration:none}
.cred .see:hover{color:var(--white)}

.skills{background:var(--steel); color:var(--white); display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.8fr); gap:30px 70px}
.skills h2{font-size:3.4rem; margin-bottom:26px}
.skills ul{list-style:none; margin:0; padding:0}
.skills li{font-size:.98rem; line-height:1.3; padding-block:14px; border-bottom:1px solid var(--white)}
.skills small{font-size:.85em}
.tools h3{font-family:var(--head); font-weight:400; font-size:1.9rem; color:var(--career); margin:0 0 22px; letter-spacing:-.02em}
.logos{display:flex; flex-wrap:wrap; gap:22px 30px; align-items:center}
.logos img{height:34px; width:auto}

.contact{background:var(--card); display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:40px 80px}
.contact h2{font-size:3.6rem; margin-bottom:24px}
.contact p{margin:0 0 14px; font-size:1rem; max-width:52ch}
.btn{display:inline-flex; gap:8px; align-items:center; background:var(--black); color:var(--white); font-family:var(--text); font-size:1rem; padding:12px 26px; border-radius:4px; text-decoration:none; border:0; cursor:pointer}
.btn:hover{background:var(--slate)}
.contact .social{margin-top:30px}
form{display:grid; grid-template-columns:1fr 1fr; gap:10px 16px; align-content:start}
form input,form textarea{font:inherit; font-size:.9rem; border:0; border-radius:4px; background:var(--field); padding:12px; color:var(--ink); min-width:0; width:100%}
form textarea{grid-column:1/-1; min-height:100px; resize:vertical}
form .btn{grid-column:2; justify-self:end; padding:12px 56px}
form .btn[disabled]{opacity:.6; cursor:wait}
form .note{grid-column:1/-1; font-size:.95rem; color:var(--slate); margin:0}
form .note.err{color:#a3243b}
.hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}
footer{text-align:center; color:#b0b0ba; font-size:.9rem; margin-top:30px}

/* Floating menu: appears after scrolling, bottom left, desktop only (as before) */
.floating{position:fixed; left:20px; bottom:20px; z-index:500; display:flex; gap:26px; background:var(--black); border-radius:20px; padding:16px 30px; max-width:calc(100% - 40px);
  opacity:0; visibility:hidden; transition:opacity .5s ease-in-out, visibility .5s ease-in-out}
.floating.visible{opacity:1; visibility:visible}
.floating a{color:var(--white); text-decoration:none; font-weight:600; font-size:17px; white-space:nowrap}
.floating a:hover{text-decoration:underline}

.nf{min-height:50vh}
.nf p{max-width:none}
.nf a{color:var(--slate); font-weight:600}

@media (max-width:1000px){
  .r1{grid-template-columns:1fr 1fr} .stack{grid-column:1/-1}
  .r2,.r3,.contact{grid-template-columns:1fr}
  .jobs{grid-template-columns:1fr 1fr}
  .skills{grid-template-columns:1fr 1fr} .tools{grid-column:1/-1}
  .floating{display:none}
}
@media (max-width:640px){
  .page{padding:20px 16px 32px}
  .card{padding:28px 22px}
  .r1,.jobs,.skills,form{grid-template-columns:1fr}
  form .btn{grid-column:1; justify-self:stretch; justify-content:center}
  .menu h2,.skills h2,.contact h2{font-size:2.6rem}
  .career .more{text-align:left}
}
