/* Lucero site overrides: hero background, text contrast, mobile avatar. */

/* Il template imposta .section-home { height:100vh; background-size:cover; background-position:center }
 * con slider3.jpg. Qui lo sostituiamo con la foto del Perú (vedi assets/images/CREDITS-hero.txt). */
.section-home {
	background-color: #1a1714;
	background-image: url("../images/hero-peru-1920.jpg");
	background-image: image-set(
		url("../images/hero-peru-1920.webp") type("image/webp"),
		url("../images/hero-peru-1920.jpg") type("image/jpeg")
	);
	background-size: cover;
	background-position: center;
}

@media (max-width: 768px) {
	.section-home {
		background-image: url("../images/hero-peru-1080.jpg");
		background-image: image-set(
			url("../images/hero-peru-1080.webp") type("image/webp"),
			url("../images/hero-peru-1080.jpg") type("image/jpeg")
		);
		background-position: center top;
	}
}

/* Overlay più deciso del default del template (opacity 0.2): i testi restano
 * bianchi e leggibili sul cielo/nuvole, sia nel tema chiaro sia in quello scuro. */
.section-home .overlay:after {
	opacity: 1;
	background-color: transparent;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.52) 55%, rgba(0, 0, 0, 0.58) 100%);
}

.section-home .overlay h1,
.section-home .overlay span,
.section-home .overlay p {
	color: #fff !important;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

/* Avatar bio visibile anche sotto il breakpoint md (il markup non usa più d-none).
 * Su desktop resta 300px (regola del tema); su mobile è più piccolo e centrato. */
@media (max-width: 767.98px) {
	.about-photo {
		max-width: 220px;
		margin-left: auto;
		margin-right: auto;
	}
	.section-about .about-photo img {
		height: 200px;
		width: 200px;
	}
}

/* Il template usa 10–12vh sul nome: su uno schermo stretto “Lucero Huamani Hayta”
 * esce dai bordi (page-wrapper ha overflow:hidden). Riduciamo il corpo solo su mobile. */
@media (max-width: 767.98px) {
	.section-home .overlay-wrap {
		max-width: 100%;
		box-sizing: border-box;
		padding-left: 16px;
		padding-right: 16px;
	}
	.section-home .overlay h1 {
		font-size: clamp(2.4rem, 12vw, 3.15rem);
		line-height: 1.15;
		word-wrap: break-word;
		overflow-wrap: break-word;
	}
}

/* ---- Contact form, map, overflow scroll (2026-11-10) ---- */
.contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.contact-privacy {
    text-align: left;
    font-size: 0.95rem;
}
.contact-privacy label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}
.contact-privacy input[type="checkbox"] {
    margin-top: 0.3rem;
    flex-shrink: 0;
}
.contact-form-status {
    margin: 0.75rem 0 0;
    min-height: 1.2em;
}
.contact-form-status.is-success { color: #1b7a4a; }
.contact-form-status.is-error { color: #c0392b; }
[data-theme="dark"] .contact-form-status.is-success,
body.theme-dark .contact-form-status.is-success { color: #7dcea0; }
[data-theme="dark"] .contact-form-status.is-error,
body.theme-dark .contact-form-status.is-error { color: #f1948a; }
#lh-turnstile { margin: 1rem 0 0; min-height: 65px; }

.contact-map--container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 280px;
    overflow: hidden;
}
.contact-map--container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.contact-map-credit {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* --- resume date/company badges: stay inside the card; JS scrolls only if text overflows --- */
#resume .resume-list,
.resume-list {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}
#resume .resume-list h6.badge,
.resume-list h6.badge,
[data-overflow-scroll] {
    display: block;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
    vertical-align: top;
}
#resume .text-overflow__inner,
.text-overflow__inner {
    display: inline-block;
    white-space: nowrap;
    backface-visibility: hidden;
    max-width: none;
}
#resume .text-overflow.is-overflow .text-overflow__inner,
.text-overflow.is-overflow .text-overflow__inner {
    animation: resume-dates-scroll var(--resume-duration, 8s) ease-in-out infinite;
    will-change: transform;
}
#resume .text-overflow.is-overflow:hover .text-overflow__inner,
#resume .text-overflow.is-overflow:focus-within .text-overflow__inner,
.text-overflow.is-overflow:hover .text-overflow__inner,
.text-overflow.is-overflow:focus-within .text-overflow__inner {
    animation-play-state: paused;
}
@keyframes resume-dates-scroll {
    0%, 12% { transform: translate3d(0, 0, 0); }
    50%, 62% { transform: translate3d(var(--resume-shift, 0px), 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    #resume .resume-list h6.badge.is-overflow,
    #resume .resume-list h6.badge.is-wrapped,
    .resume-list h6.badge.is-overflow,
    .resume-list h6.badge.is-wrapped,
    .text-overflow--wrap,
    [data-overflow-scroll].text-overflow--wrap {
        white-space: normal;
        overflow: visible;
        height: auto;
        width: 100%;
        max-width: 100%;
        line-height: 1.45;
    }
    #resume .text-overflow.is-overflow .text-overflow__inner,
    #resume .text-overflow.is-wrapped .text-overflow__inner,
    .text-overflow.is-overflow .text-overflow__inner,
    .text-overflow.is-wrapped .text-overflow__inner,
    .text-overflow--wrap .text-overflow__inner {
        animation: none !important;
        transform: none !important;
        will-change: auto;
        display: inline;
        white-space: normal;
        overflow: visible;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* Service card photos (must beat theme CSS .services-list-N) */
.services-list-front.services-list-1 {
    background-image: url("/assets/images/services1.jpg?v=2");
    background-image: -webkit-image-set(url("/assets/images/services1.webp?v=2") type("image/webp"), url("/assets/images/services1.jpg?v=2") type("image/jpeg"));
    background-image: image-set(url("/assets/images/services1.webp?v=2") type("image/webp"), url("/assets/images/services1.jpg?v=2") type("image/jpeg"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.services-list-front.services-list-2 {
    background-image: url("/assets/images/services2.jpg?v=2");
    background-image: -webkit-image-set(url("/assets/images/services2.webp?v=2") type("image/webp"), url("/assets/images/services2.jpg?v=2") type("image/jpeg"));
    background-image: image-set(url("/assets/images/services2.webp?v=2") type("image/webp"), url("/assets/images/services2.jpg?v=2") type("image/jpeg"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.services-list-front.services-list-3 {
    background-image: url("/assets/images/services3.jpg?v=2");
    background-image: -webkit-image-set(url("/assets/images/services3.webp?v=2") type("image/webp"), url("/assets/images/services3.jpg?v=2") type("image/jpeg"));
    background-image: image-set(url("/assets/images/services3.webp?v=2") type("image/webp"), url("/assets/images/services3.jpg?v=2") type("image/jpeg"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.services-list-front.services-list-4 {
    background-image: url("/assets/images/services4.jpg?v=2");
    background-image: -webkit-image-set(url("/assets/images/services4.webp?v=2") type("image/webp"), url("/assets/images/services4.jpg?v=2") type("image/jpeg"));
    background-image: image-set(url("/assets/images/services4.webp?v=2") type("image/webp"), url("/assets/images/services4.jpg?v=2") type("image/jpeg"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.services-list-front.services-list-5 {
    background-image: url("/assets/images/services5.jpg?v=2");
    background-image: -webkit-image-set(url("/assets/images/services5.webp?v=2") type("image/webp"), url("/assets/images/services5.jpg?v=2") type("image/jpeg"));
    background-image: image-set(url("/assets/images/services5.webp?v=2") type("image/webp"), url("/assets/images/services5.jpg?v=2") type("image/jpeg"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.services-list-front.services-list-6 {
    background-image: url("/assets/images/services6.jpg?v=2");
    background-image: -webkit-image-set(url("/assets/images/services6.webp?v=2") type("image/webp"), url("/assets/images/services6.jpg?v=2") type("image/jpeg"));
    background-image: image-set(url("/assets/images/services6.webp?v=2") type("image/webp"), url("/assets/images/services6.jpg?v=2") type("image/jpeg"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.navbar-brand {
    display: inline-flex;
    align-items: center;
}
.navbar-brand .navbar-logo {
    height: 36px;
    width: 36px;
    border-radius: 6px;
    margin-right: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}
[data-theme="dark"] .navbar-brand .navbar-logo {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.22);
}

/* Read more toggle.
 * Default .flashtext has a 0.3em left gap; the about
 * button must start flush with the paragraph text. */
#more {
    display: none;
}
#dots {
    display: inline;
}
.flashtext {
    cursor: pointer;
    display: inline-block;
    margin-left: 0.3em;
    animation: readmore-blinker 3s linear infinite;
}
@keyframes readmore-blinker {
    50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .flashtext { animation: none; }
}
#about .about-desc-content > p.mb-0 {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
}
#about #myBtn.flashtext {
    margin-left: 0;
    padding-left: 0;
}

/* About width = full-width resume boxes (Matteo / index-5 refined layout).
 * Photo stays top-aligned with the opening text when the bio expands. */
@media (min-width: 992px) {
    section.section-about {
        max-width: calc(960px - 30px) !important;
        width: 100%;
    }
}
@media (min-width: 1200px) {
    section.section-about {
        max-width: calc(1140px - 30px) !important;
        width: 100%;
    }
}
#about .section-about-wrap > .row {
    align-items: flex-start !important;
}
#about .section-about-wrap > .row > [class*="col-"] {
    align-self: flex-start;
}

/* Dark theme body/text colours — same values as matteozenari.com dark theme
 * (color-dark.css: body #c1c1c1, p/h1–h6 #fff). The dark accent stylesheet
 * leaves paragraphs at #6e7373 (light-theme grey). */
[data-theme="dark"] body,
body.theme-dark {
    color: #c1c1c1;
}
[data-theme="dark"] p,
body.theme-dark p {
    color: #fff;
}
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6 {
    color: #fff;
}

/* ---- Mobile bio justify, hero + resume overflow (2026-11-10) ---- */
@media (max-width: 767.98px) {
    /* Bio paragraphs only; desktop typography stays untouched. */
    #about .about-bio,
    #about .about-bio p,
    #about .about-bio span {
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphenate-limit-chars: 6 3 3;
        overflow-wrap: break-word;
        word-break: normal;
    }
    /* Read-more stays flush left with the paragraph, never justified. */
    #about .about-desc-content > p.mb-0,
    #about #myBtn.flashtext {
        text-align: left;
        hyphens: none;
        -webkit-hyphens: none;
        margin-left: 0;
        padding-left: 0;
    }

    /* Hero: no typed.js here; long name + role must not overflow or jump. */
    .section-home .overlay-wrap {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        padding-left: 16px;
        padding-right: 16px;
        text-align: center;
        overflow-x: hidden;
        min-height: 9.5rem;
    }
    .section-home .overlay h1 {
        font-size: clamp(2.2rem, 11vw, 3.15rem);
        line-height: 1.15;
        letter-spacing: 0.04em;
        overflow-wrap: anywhere;
        word-break: break-word;
        max-width: 100%;
    }
    .section-home .overlay p,
    .section-home .overlay span {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
        font-size: 1.05rem;
        line-height: 1.4;
        letter-spacing: 0.04em;
        margin-left: auto;
        margin-right: auto;
    }

    /* Resume date badges: cap at the card; do not force width:100% (that can collapse scrollWidth). */
    #resume .resume-list,
    .resume-list {
        overflow: hidden;
        max-width: 100%;
        min-width: 0;
    }
    #resume .resume-list h6.badge,
    .resume-list h6.badge,
    [data-overflow-scroll] {
        width: fit-content;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
}


/* Theme stylesheets live in /assets/css/light/ and /dark/, so ../images/
   would resolve to /assets/css/images/ (missing). Use the real assets. */
.section-about:after {
    background-image: url("/assets/images/pattern1.png");
}
.section-freelance {
    background-image: url("/assets/images/lucero-cta.jpg?v=1");
    background-image: image-set(
        url("/assets/images/lucero-cta.webp?v=1") type("image/webp"),
        url("/assets/images/lucero-cta.jpg?v=1") type("image/jpeg")
    );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
