/* One semantic scale for the entire CV, adapted from the user-supplied tokens.
   Uses Apple's installed system font on Apple devices; no SF font embedding.
   Values are CV design choices, not claimed specifications of apple.com. */
:root{
 --ff-sans:-apple-system,BlinkMacSystemFont,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
 --font:var(--ff-sans);
 --fs-h1:2rem;
 --fs-h2:1.75rem;
 --fs-h3:1.125rem;
 --fs-subtitle:1.0625rem;
 --fs-body:1rem;
 --fs-small:.875rem;
 --lh-h1:1.15;
 --lh-h2:1.2;
 --lh-h3:1.3;
 --lh-body:1.5;
 --lh-small:1.4;
 --fw-bold:700;
 --fw-semibold:600;
 --fw-medium:500;
 --fw-regular:400;
 --ls-heading:-.02em;
 --ink:#1d1d1f;
 --muted:#6e6e73;
}
@media(min-width:64rem){
 :root{--fs-h1:2.5rem;--fs-h2:2.25rem;--fs-h3:1.375rem;--fs-subtitle:1.25rem;--fs-body:1.0625rem}
}
body{
 font-family:var(--ff-sans);font-size:var(--fs-body);line-height:var(--lh-body);
 font-weight:var(--fw-regular);letter-spacing:0;
 -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
button,input,select,textarea{font-family:inherit}
/* Primary identity and section headings. */
h1,.identity h1{font-size:var(--fs-h1);line-height:var(--lh-h1);font-weight:var(--fw-bold);letter-spacing:var(--ls-heading);overflow-wrap:anywhere}
h2{font-size:var(--fs-h2);line-height:var(--lh-h2);font-weight:var(--fw-semibold);letter-spacing:var(--ls-heading)}
/* Every card title has the same size, regardless of its section. */
.experience-company,.school,.tool-name,.skill-group-title,.skill summary{
 font-size:var(--fs-h3);line-height:var(--lh-h3);font-weight:var(--fw-medium);letter-spacing:-.01em;
}
.experience-company,.school,.tool-name{color:var(--ink);overflow-wrap:anywhere}
/* Subtitles remain larger than detail paragraphs. */
.role,.degree,.experience-role{
 font-size:var(--fs-subtitle);line-height:var(--lh-h3);font-weight:var(--fw-medium);letter-spacing:0;
}
.degree{color:var(--muted)}
.experience-role{color:var(--muted);margin-bottom:6px}
.role{color:var(--purple)}
/* Reading text and controls share a single body token. */
.intro,.detail-content,.education-card .detail-content,.skill .detail-content,.tool .detail-content,
.section-note,.contact-links a,.social-links a,.location,.language-info p,
.home-label,.download,.language-switch button,.section-nav a,.expand-all,.detail-link{
 font-size:var(--fs-body);line-height:var(--lh-body);letter-spacing:0;
}
.detail-content,.education-card .detail-content,.skill .detail-content,.tool .detail-content{font-weight:var(--fw-regular);color:var(--ink)}
.detail-context,.detail-content ul{max-width:40rem;line-height:var(--lh-body)}
.detail-context{font-size:inherit}
.detail-content ul{gap:12px}
.detail-content li{font-size:inherit;line-height:inherit}
.detail-link{font-weight:var(--fw-medium)}
/* Dates, captions and eyebrow labels always use the same supporting style. */
.sidebar-eyebrow,.language-info small,.date,.place,.education-date,.tool-caption,.tag,footer{
 font-size:var(--fs-small);line-height:var(--lh-small);letter-spacing:0;font-weight:var(--fw-regular);
}
.detail-content h3{font-size:var(--fs-subtitle);line-height:var(--lh-h3);font-weight:var(--fw-semibold);letter-spacing:0;margin:22px 0 12px;text-transform:none;color:var(--ink)}
.school{font-weight:var(--fw-medium)}
.section-note,.tool-caption,.date,.place,.education-date,.language-info small{color:var(--muted)}
/* Non-reading icon glyphs are sized independently of the text scale. */
.contact-icon{font-size:1.125rem}.social-mark{font:700 .8125rem Arial,sans-serif}.flag{font-size:1.3125rem}.mini-icon{font-size:.75rem}.tool-logo{font-size:1rem}.download>span:first-child{font-size:1.25rem}
/* Layout accommodates the semantic hierarchy instead of shrinking text. */
.app{max-width:1440px;grid-template-columns:320px minmax(0,1fr)}
.identity h1{margin-bottom:14px}
.contact-links a,.social-links a{min-height:44px}
.contact-icon{width:30px;height:30px;flex-shrink:0}
.contact-icon img{width:19px;height:19px}
.contact-links,.social-links{gap:12px}
.language-switch button{min-width:40px;min-height:40px}
.download{min-height:46px}
.section-nav{gap:22px;align-items:center}
.section-nav a{display:flex;align-items:center;min-height:36px}
.section-heading{gap:16px;flex-wrap:wrap;align-items:center}
.expand-all{min-height:44px}
.section-note{margin-bottom:20px;max-width:none}
.cv-section{padding-bottom:36px}
.experience-list{gap:9px}
.experience summary{grid-template-columns:46px minmax(0,1fr) auto 16px;gap:16px;padding:20px;min-height:112px}
.experience .logo{width:46px;height:46px;padding:3px;border-radius:7px}
#aper .logo{background:#0d1627}
#dosalcubo .logo{background:#202020}
.date{white-space:normal}
.date-place{max-width:220px;gap:6px}
.detail-content{padding:0 24px 25px 82px}
.tag{padding:5px 9px}
.detail-link{min-height:44px;align-items:center;margin-top:12px}
.education-grid{align-items:start}
.education-card summary{grid-template-columns:38px minmax(0,1fr) 10px;gap:14px;padding:22px}
.education-card .logo{width:38px;height:38px;align-self:start}
.education-caption{padding-top:12px}
.education-date{display:block;margin-top:8px}
.education-card .detail-content{padding:0 22px 22px;max-width:calc(40rem + 44px)}
.skills-columns{gap:16px;align-items:start}
.skill-group-title{margin-bottom:16px}
.skill summary{min-height:100px;padding:18px 14px;overflow-wrap:anywhere}
.skill .detail-content{padding:0 18px 20px}
.mini-icon{width:26px;height:26px;flex-shrink:0}
.tools-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;align-items:start}
.tool summary{min-height:168px;padding:20px 14px;gap:12px;overflow-wrap:anywhere}
.tool-logo{width:36px;height:36px;flex-shrink:0}
.tool .detail-content{padding:0 20px 22px}
.tool[open]{grid-column:span 3}
.tool[open] summary{min-height:135px}
footer{flex-wrap:wrap;align-items:center}
footer a{min-height:44px;display:flex;align-items:center}
@media(max-width:1200px) and (min-width:761px){
 .app{grid-template-columns:285px minmax(0,1fr)}
 .experience summary{grid-template-columns:42px minmax(0,1fr) 12px;gap:10px 14px}
 .experience .logo{grid-row:1/3;width:42px;height:42px}
 .experience summary .chevron{grid-column:3;grid-row:1/3}
 .date-place{grid-column:2;grid-row:2;text-align:left;display:flex;flex-wrap:wrap;gap:4px 12px;max-width:none}
 .detail-content{padding-left:24px}
 .skills-columns{grid-template-columns:1fr;gap:24px}
 .tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tool[open]{grid-column:1/-1}
 .section-nav{gap:20px;overflow-x:auto;scrollbar-width:thin}
 .section-nav a{flex-shrink:0}
 .home-label{display:none}
 .toolbar{justify-content:flex-end}
 .education-grid{grid-template-columns:1fr}
}
@media(max-width:900px) and (min-width:761px){
 .sidebar-scroll{padding-left:20px;padding-right:20px}
 main{padding-left:22px;padding-right:20px}
 .cv-section{padding-left:16px}
 .timeline-dot{left:-24px}
 .section-heading{gap:8px}
 .expand-all{margin-left:0}
}
@media(max-width:760px){
 .app{display:block}
 .identity{grid-template-columns:105px minmax(0,1fr);column-gap:18px}
 .language-info{flex-wrap:wrap;gap:18px 24px}
 .toolbar{padding:10px 16px;justify-content:flex-end;gap:8px}
 .toolbar-actions{gap:8px}
 .home-label{display:none}
 .download{padding:8px 11px}
 .section-nav{gap:22px;padding:9px 20px}
 .section-nav a{min-height:40px;flex-shrink:0}
 .section-heading{gap:8px}
 .expand-all{padding:4px 0}
 main{padding:25px 15px 0 22px}
 .cv-section{padding-left:16px}
 .timeline-dot{left:-24px}
 .experience summary{grid-template-columns:38px minmax(0,1fr) 10px;padding:17px 12px;gap:10px;min-height:120px}
 .experience .logo{width:38px;height:38px;grid-row:1/3}
 .experience summary .chevron{grid-column:3;grid-row:1/3}
 .date-place{grid-column:2;grid-row:2;max-width:none;text-align:left;display:flex;flex-wrap:wrap;gap:4px 8px;margin-top:0}
 .detail-content{padding:0 16px 20px}
 .education-grid{grid-template-columns:1fr}
 .education-card summary{padding:18px 16px;grid-template-columns:34px minmax(0,1fr) 10px;gap:12px}
 .education-card .logo{width:34px;height:34px}
 .education-card .detail-content{padding:0 16px 20px}
 .skills-columns{grid-template-columns:1fr;gap:26px}
 .skill-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .skill summary{min-height:100px;padding:17px 10px;gap:7px}
 .skill[open]{grid-column:1/-1}
 .tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tool summary{min-height:170px;padding:20px 10px}
 .tool[open]{grid-column:1/-1}
 footer{margin-left:16px}
}
@media(max-width:360px){
 .identity{grid-template-columns:80px minmax(0,1fr);gap:14px}
 .portrait{width:80px}
 .section-heading{flex-wrap:wrap}
 .expand-all{margin-left:0}
 .toolbar-actions{gap:7px}
 .language-switch button{min-width:34px;padding:5px 7px}
}
/* Keep direct-text accordion bodies within the same readable measure as paragraphs. */
.detail-content{max-width:calc(40rem + 106px)}
.tool .detail-content{max-width:calc(40rem + 40px)}
.skill .detail-content{max-width:calc(40rem + 36px)}
/* Every competency card reserves a fixed trailing column for its disclosure. */
.skill summary{
 display:grid;
 grid-template-columns:minmax(0,1fr) 12px;
 align-items:center;
 column-gap:12px;
 padding-inline:16px;
}
.skill summary>span:first-child{min-width:0;overflow-wrap:normal;word-break:normal}
.skill summary>.chevron{justify-self:center;align-self:center;margin:0;width:6px;height:6px}
.skill[open]>summary>.chevron{margin:0}
/* Long labels keep whole words and the same arrow inset on narrow screens. */
@media(max-width:420px){.skill-grid{grid-template-columns:1fr}}

/* Competency labels share a left edge while disclosures keep their fixed column. */
.skill summary{text-align:left}
.skill summary>span:first-child{justify-self:stretch;text-align:left}
.skill-group-title .mini-icon img{display:block;width:18px;height:18px}
/* Supporting headings are visible labels, not anonymous separators. */
.sidebar-eyebrow{margin:0 0 14px;font-weight:var(--fw-medium);color:var(--muted)}
.mobile-support{display:none}
@media(max-width:760px){
 .app{display:flex;flex-direction:column}
 .app>.toolbar{position:sticky;top:0;z-index:20;flex-shrink:0;width:100%;padding:calc(10px + env(safe-area-inset-top,0px)) 16px 10px;background:#fcfcfffa;backdrop-filter:blur(14px)}
 .toolbar-actions{width:100%;justify-content:space-between;gap:12px}
 .language-switch button{min-width:44px;min-height:44px}
 .download{min-height:48px;white-space:nowrap}
 .sidebar{padding:22px 20px 0;order:0}
 .identity{grid-template-columns:88px minmax(0,1fr);column-gap:16px;padding-bottom:20px}
 .portrait{width:88px;margin-bottom:0;align-self:start}
 .identity h1{margin:0 0 8px}
 .role{margin:0}
 .intro{margin-top:20px;max-width:40rem}
 .sidebar-eyebrow{display:block}
 .sidebar-section{padding:16px 0 20px}
 .contact-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 8px}
 .contact-links a{min-height:68px;display:flex;flex-direction:column;justify-content:center;gap:7px;padding:8px 4px;background:#f4f3fa;border:1px solid #eae6f3;border-radius:8px;text-align:center;line-height:1.3}
 .contact-links .location{grid-column:1/-1;display:flex;gap:8px;margin-top:4px;font-size:var(--fs-small);line-height:var(--lh-small)}
 .location .contact-icon{width:22px;height:22px;background:none}
 .location .contact-icon img{width:18px;height:18px}
 .workspace{min-width:0}
 .section-nav{z-index:15;background:#fcfcfffa;padding-inline:20px}
 .mobile-support{display:block;margin:4px 0 8px 16px}
 .mobile-support .sidebar-section{padding:22px 0;border-top:1px solid var(--line)}
 .mobile-support .sidebar-eyebrow{font-size:var(--fs-subtitle);line-height:var(--lh-h3);font-weight:var(--fw-medium);color:var(--ink);margin-bottom:18px}
 .mobile-support .social-links{display:flex;flex-wrap:wrap;gap:12px 20px}
 .mobile-support .social-links a{min-height:44px}
 .mobile-support .language-info{display:grid;grid-template-columns:1fr 1fr;gap:16px}
 .mobile-support .language-info>.sidebar-eyebrow{grid-column:1/-1;margin-bottom:0}
 .mobile-support .language-info p{margin:0}
}
@media(max-width:360px){
 .identity{grid-template-columns:76px minmax(0,1fr);gap:14px}
 .portrait{width:76px}
 .mobile-support .language-info{grid-template-columns:1fr;gap:16px}
 .mobile-support .social-links{gap:12px 16px}
}
@media(max-width:760px){
 .sidebar .sidebar-eyebrow{font-size:var(--fs-subtitle);line-height:var(--lh-h3);font-weight:var(--fw-medium);color:var(--ink);margin-bottom:16px}
}
/* Mobile-only branded app bar; desktop keeps its existing download label. */
.mobile-brand,.mobile-download-icon{display:none}
@media(max-width:760px){
 .app>.toolbar{justify-content:space-between;gap:12px}
 .mobile-brand{display:flex;align-items:center;min-height:48px;flex:0 1 112px;min-width:0}
 .mobile-brand img{display:block;width:100%;height:44px;object-fit:contain;object-position:left center}
 .toolbar-actions{width:auto;flex-shrink:0;justify-content:flex-end;gap:10px}
 .download{display:grid;place-items:center;width:48px;height:52px;min-width:48px;min-height:52px;padding:0}
 .download>span{display:none}
 .mobile-download-icon{display:block;width:26px;height:26px}
}
@media(max-width:360px){.mobile-brand{flex-basis:100px}.toolbar-actions{gap:8px}}

/* Supporting profile blocks follow Contact on mobile as well as desktop. */
@media(max-width:760px){
 .sidebar-scroll>.sidebar-section:has(.social-links){padding-top:20px;padding-bottom:20px}
 .sidebar .social-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .sidebar .social-links a{min-width:0;min-height:44px;gap:7px}
 .sidebar .language-info{display:grid;grid-template-columns:1fr 1fr;gap:16px}
 .sidebar .language-info>.sidebar-eyebrow{grid-column:1/-1;margin-bottom:0}
 .sidebar .language-info p{margin:0}
}
@media(max-width:360px){
 .sidebar .social-links{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sidebar .language-info{grid-template-columns:1fr}
}

/* One document scroll; only the desktop signature stays in view. */
@media (min-width: 761px) {
  .sidebar { position: relative; top: auto; align-self: stretch; height: auto; display: block; overflow: visible; padding: 0; }
  .sidebar-scroll { height: auto; max-height: none; overflow: visible; overscroll-behavior: auto; padding-bottom: 140px; }
  .signature { position: fixed; left: var(--profile-left); width: var(--profile-width); bottom: 0; box-sizing: border-box; margin: 0; min-height: 0; padding: 14px 30px 18px; z-index: 5; background: #f8fbff; border-top: 1px solid var(--line); }
  .signature img { height: 75px; max-height: 75px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .signature { padding-left: 24px; padding-right: 24px; }
}

/* Pack desktop tools into available slots around expanded cards. */
@media (min-width:761px) {
 .tools-grid { grid-auto-flow:row dense; }
 .tool[open] summary { align-items:flex-start; text-align:left; padding:24px 20px 18px; }
 .tool[open] .detail-content { max-width:none; width:100%; box-sizing:border-box; text-align:left; padding:0 20px 24px; }
 .tool[open] .detail-content a { display:inline-block; margin-top:18px; }
}

@media (min-width:761px) {
 .skill-grid { grid-auto-flow:row dense; align-items:start; }
 .skill[open] .detail-content { max-width:none; width:100%; box-sizing:border-box; text-align:left; }
}

@media (max-width:760px) {
 .tools-grid { grid-auto-flow:row dense; }
}
