@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400..700;1,400..700&display=swap');

:root {
    --primary: rgb(142, 52, 96);
    --primary-dark: rgb(110, 38, 74);
    --accent: rgb(155, 81, 224);
    --accent-soft: rgb(203, 73, 225);
    --bg: rgb(142, 52, 96);
    --bg-card: #f1f1f1;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.78);
    --text-dark: #1a1a1a;
    --black: #000;
    --white: #fff;
    --purple: rgb(155, 81, 224);
    --shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    --shadow-strong: 0 12px 32px rgba(0, 0, 0, 0.35);
    --radius: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    margin: 0;
    min-height: 100vh;
}

body {
    background: var(--bg);
    font-family: "Libre Baskerville", serif;
    color: var(--text-light);
    overflow-x: hidden;
}

header a {
    text-decoration: none;
}

/* ============ LEGACY TECH COLORS ============ */
.html { color: rgb(245, 157, 7); }
.css  { color: rgb(32, 32, 203); }
.js   { color: rgb(208, 214, 22); }
.ang  { color: rgb(215, 54, 62); }
.sb   { color: rgb(56, 201, 37); }

.tec {
    font-weight: bold;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.tec .badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.tec .badge.html { background: rgba(245, 157, 7, 0.12);  border-color: rgba(245, 157, 7, 0.4);  color: rgb(180, 110, 4); }
.tec .badge.css  { background: rgba(32, 32, 203, 0.10);  border-color: rgba(32, 32, 203, 0.35); color: rgb(32, 32, 180); }
.tec .badge.js   { background: rgba(208, 214, 22, 0.18); border-color: rgba(208, 214, 22, 0.5); color: rgb(120, 124, 12); }
.tec .badge.ang  { background: rgba(215, 54, 62, 0.10);  border-color: rgba(215, 54, 62, 0.4);  color: rgb(180, 40, 50); }
.tec .badge.sb   { background: rgba(56, 201, 37, 0.12);  border-color: rgba(56, 201, 37, 0.45); color: rgb(38, 138, 24); }

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ LEGACY HEADINGS (mantidas para futureProjects/) ============ */
h1 {
    font-size: 2.5rem;
    text-align: center;
    color: white;
    margin-top: 6.6rem;
}

h2 {
    font-size: 1.7rem;
    text-align: center;
    color: white;
    margin-top: 1rem;
}

.second-title {
    margin-top: 1.8rem;
}

/* ============ HERO ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.hero::before {
    width: 420px;
    height: 420px;
    background: var(--accent);
    top: -120px;
    left: -120px;
    animation: float 12s ease-in-out infinite;
}

.hero::after {
    width: 360px;
    height: 360px;
    background: rgb(220, 100, 160);
    bottom: -100px;
    right: -100px;
    animation: float 14s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -40px) scale(1.08); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    animation: fadeUp 1s ease both;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: white;
    margin: 0 0 0.7rem;
    font-weight: 700;
    line-height: 1.05;
}

.hero-role {
    font-size: clamp(1.15rem, 2.5vw, 1.6rem);
    color: white;
    margin: 0 0 1.4rem;
    font-style: italic;
    opacity: 0.95;
}

.hero-tagline {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 auto 2.4rem;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.btn {
    display: inline-block;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    font-weight: bold;
    font-family: inherit;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    background: black;
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.btn-outline {
    background: transparent;
    border-color: white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ SECTION HEADS ============ */
.section-head {
    text-align: center;
    margin: 5rem auto 2rem;
    padding: 0 1rem;
}

.section-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: white;
    margin: 0 0 0.7rem;
}

.section-head h2 span {
    color: rgb(255, 200, 220);
    font-style: italic;
}

.section-rule {
    display: block;
    width: 60px;
    height: 3px;
    margin: 0 auto;
    background: white;
    border-radius: 2px;
}

.group-title {
    font-size: 1.5rem;
    text-align: center;
    color: white;
    margin: 2.8rem 0 0.4rem;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ============ ABOUT ============ */
.about {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.92);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 1.2rem 1rem;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat strong {
    display: block;
    font-size: 2.4rem;
    color: white;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat span {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============ SKILLS ============ */
.skills {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 1.5rem 0.8rem;
    text-align: center;
    color: white;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex: 0 1 160px;
}

.skill i {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    display: block;
    transition: var(--transition);
}

.skill span {
    font-size: 0.85rem;
    display: block;
    color: var(--text-muted);
}

.skill:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
}

.skill:hover i {
    transform: scale(1.18);
    color: rgb(255, 200, 220);
}

.skill:hover span {
    color: white;
}

/* ============ PROJECTS ============ */
.projects {
    padding-bottom: 2rem;
}

.box-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    padding: 16px 6% 30px;
    max-width: 1200px;
    margin: auto;
}

.box-container .box {
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    padding: 18px;
    cursor: pointer;
    text-align: center;
    flex: 0 1 calc((100% - 56px) / 3);
    min-width: 320px;
    color: var(--text-dark);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.box-container .box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.box-system {
    max-width: 300px;
    margin: auto;
}

.box-container .box a {
    text-decoration: none;
}

.box-container .box .img {
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

.box-container .box .img a {
    display: block;
    position: relative;
}

.box-container .box .img a img {
    width: 100%;
    height: 220px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: block;
}

.box-container .box:hover .img a img {
    transform: scale(1.08);
}

.box-container .box .img .img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(142, 52, 96, 0.85));
    border-radius: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 1rem;
    color: white;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.box-container .box:hover .img .img-overlay {
    opacity: 1;
}

.box-container .box .title {
    display: block;
    margin: 0.95rem 0 0.7rem;
    font-weight: bold;
    color: black;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.box-container .box:hover .title {
    color: var(--primary);
}

.box-container .box .tec {
    margin-top: auto;
    padding-top: 0.3rem;
}

/* ============ DETAIL PAGES (.main) — usado em futureProjects/ ============ */
.main {
    max-width: 60%;
    border-radius: 10px;
    background: rgb(228, 228, 228);
    box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
    padding: 1.563rem;
    margin: auto;
    margin-bottom: 30px;
    text-align: left;
    padding-bottom: 30px;
    align-items: center;
    color: var(--text-dark);
}

.main .link:hover {
    color: rgb(203, 73, 225);
    transition: all .2s linear;
}

.main h2 {
    margin-top: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.title-description {
    color: black;
}

.main .p {
    margin-top: 10px;
}

.main p {
    margin: 20px 0;
}

.main ul {
    margin-left: 20px;
}

.main a {
    text-decoration: none;
    color: rgb(142, 52, 96) !important;
    font-weight: bold;
}

.main a:hover {
    text-decoration: underline;
}

.main .container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main .container .img img {
    padding: 20px;
    max-width: 40rem;
    object-fit: cover;
}

/* ============ INICIO + LINE (legacy) ============ */
.inicio {
    display: flex;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.inicio a {
    margin: auto;
    text-decoration: none;
    color: rgb(142, 52, 96);
    background-color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
}

.inicio a:visited {
    color: rgb(142, 52, 96);
}

.inicio a:hover {
    color: #fff;
    background-color: rgb(0, 0, 0);
    transition: all .2s linear;
}

.line {
    width: 89%;
    height: 1px;
    background: rgb(145, 145, 145);
    margin: 0 auto;
}

/* ============ CONTACT ============ */
.contact {
    margin-top: 1rem;
    padding-bottom: 2rem;
}

.contact a {
    text-decoration: none;
}

.contact h3 {
    margin-bottom: 1.4rem;
    font-size: 1.6rem;
    color: white;
}

.contact .contact-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    margin: 0 auto 3rem;
    color: white;
    max-width: 1050px;
    padding: 0 1.5rem;
}

.contact .contact-box .image img {
    width: 22rem;
    height: 22rem;
    border-radius: 1.2rem;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-strong);
    transition: transform 0.4s ease, border-color 0.3s ease;
}

.contact .contact-box .image img:hover {
    transform: translateY(-4px) rotate(-1deg);
    border-color: rgba(255, 255, 255, 0.4);
}

.contact .info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    margin-bottom: 0.7rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    transition: var(--transition);
}

.contact .info-item:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
}

.contact .info-item .icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    color: white;
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    margin: 0;
}

.contact .info-item .info-text h4 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
    font-weight: 700;
}

.contact .info-item .info-text span {
    font-size: 0.82rem;
    opacity: 0.85;
    word-break: break-all;
}

.email {
    color: white;
}

/* ============ FOOTER ============ */
footer {
    background: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: .6rem;
    color: white;
}

footer .social {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1em 0;
}

footer .social .fab {
    background-color: var(--black);
    border-radius: 50%;
    color: var(--white);
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 2.5rem;
    list-style: none;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

footer .social .fab:hover {
    color: rgb(142, 52, 96);
    transform: translateY(-3px);
}

.fas,
.fab {
    border-radius: 50%;
    color: var(--purple);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

footer .social-media {
    display: flex;
    justify-content: space-between;
    margin-bottom: .6rem;
}

footer .line {
    width: 90%;
    height: 1px;
    background: rgb(145, 145, 145);
}

footer .social-media i {
    font-size: 2rem;
    transition: all .2s linear;
}

footer .social-media i:hover {
    color: rgb(142, 52, 96);
}

footer .social-media a:link,
footer .social-media a:visited {
    color: #fff;
}

footer .name {
    margin-bottom: .85rem;
    font-size: .85rem;
}

footer .name strong {
    color: rgb(155, 81, 224);
}

/* ============ BACK TO TOP ============ */
.back-top {
    position: fixed;
    bottom: 1.6rem;
    right: 1.6rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: black;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-strong);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: var(--transition);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.back-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-top:hover {
    background: var(--accent);
    transform: translateY(-4px);
}

.back-top i {
    font-size: 1rem;
    color: white;
    background: transparent;
}

/* ============ REVEAL ON SCROLL ============ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.box.reveal {
    transition-delay: var(--reveal-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.visible { opacity: 1; transform: none; transition: none; }
    .hero::before,
    .hero::after { animation: none; }
    html { scroll-behavior: auto; }
}

/* ============ ZOOM / LIGHTBOX (futureProjects) ============ */
.img-zoom {
    position: relative;
    cursor: pointer;
}

.zoom-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.img-zoom:hover .zoom-icon {
    opacity: 1;
}

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
}

.lightbox-close:hover {
    color: rgb(203, 73, 225);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    padding: 10px 20px;
    user-select: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.lightbox-nav:hover {
    color: rgb(203, 73, 225);
    background: rgba(0, 0, 0, 0.6);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 14px;
    border-radius: 6px;
}

/* ============ MEDIA QUERIES ============ */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .about-stats .stat {
        flex: 1 1 30%;
    }
    .contact .contact-box .image img {
        width: 18rem;
        height: 18rem;
    }
}

@media (max-width: 842px) {
    .main { max-width: 90%; }
}

@media (max-width: 770px) {
    .contact .contact-box {
        gap: 2.5rem;
    }
}

@media (max-width: 672px) {
    html { font-size: 92%; }
    .header { height: 60px; }
    .header .logo-container { margin-left: 1rem; }
    .section-head { margin-top: 4rem; }
    .hero { padding-top: 6.5rem; }
}

@media (max-width: 600px) {
    .about-stats { flex-direction: column; }
    .about-stats .stat { flex: 1 1 auto; }
    .contact .contact-box .image img {
        width: 14rem;
        height: 14rem;
    }
}

@media (max-width: 550px) {
    .main .container .img img { max-width: 30rem; }
}

@media (max-width: 475px) {
    .main .container .img img { max-width: 22rem; }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}
