:root{
    --green:#dcefcf;
    --green-dark:#214232;
    --green-soft:#bfd7b1;
    --cream:#f5eedf;
    --glass:rgba(255,255,255,0.18);
    --border:rgba(255,255,255,0.3);
    --shadow: 0 20px 50px rgba(0,0,0,0.08);
}
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}
html{
    scroll-behavior:smooth;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--green-dark) !important; 
    opacity: 1;
    background:
    radial-gradient(circle at 50% 25%, rgba(112, 162, 89, 0.232) 0%, transparent 45%),  
    radial-gradient(circle at 80% 15%, rgba(242, 161, 126, 0.4) 0%, transparent 50%),   
    radial-gradient(circle at 75% 80%, rgba(230, 144, 149, 0.35) 0%, transparent 45%),  
    linear-gradient(135deg, rgba(252, 225, 227, 0.2) 0%, rgba(254, 235, 215, 0.2) 40%, #faf5eb 100%); 
    overflow-x: hidden;
}

/* NAV */
nav{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    padding:1.5rem 4rem;
    display:flex;
    justify-content:space-between;
    align-items:center;
    z-index:999;
    backdrop-filter:blur(18px);
    background: rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.18);
}
.nav-brand{
    text-decoration:none;
    color:var(--green-dark);
    font-size:1rem;
    letter-spacing:1px;
}
.nav-right{
    display:flex;
    align-items:center;
    gap:2rem;
}
.nav-links{
    display:flex;
    gap:1.4rem;
    list-style:none;
}
.nav-links a{
    text-decoration:none;
    color:var(--green-dark);
    font-size:0.95rem;
    opacity:0.75;
    transition:0.3s ease;
}
.nav-links a:hover{
    opacity:1;
    transform:translateY(-2px);
}

/* HERO */
.hero{
    min-height:100vh;
    position:relative;
    padding: 10rem 6vw 6rem;
    display: flex;
    align-items: center;
}
.hero-inner{
    display:grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items:center;
    width: 100%;
}
.hero-badge{
    display:inline-block;
    margin-bottom:1.8rem;
    letter-spacing:2px;
    font-size:0.8rem;
    opacity:0.6;
}
.hero-name{
    font-size:9rem;
    line-height:0.85;
    letter-spacing:-8px;
    font-weight:900;
    margin-bottom:2rem;
}
.grad{ opacity:0.6; }

/* TAGS HERO */
.tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.8rem; 
    margin-top: 5.5rem; 
}
.tag {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    box-shadow: 0 12px 28px rgba(33, 66, 50, 0.12), 
                0 4px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.tag:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 24px rgba(33, 66, 50, 0.1);
}

/* AVATAR CARD */
.avatar-card{
    background: rgba(203, 247, 225, 0.242);
    backdrop-filter: blur(4px);        
    border: 1px rgba(0, 81, 40, 0.122); 
    border-radius: 28px;
    padding: 1rem;
    box-shadow: 0 25px 60px rgba(0, 70, 16, 0.493);
    transform: rotate(-3deg);
    transition: 0.2s ease;            
    position: relative;
    width: 100%;
    max-width: 360px;        
    justify-self: start;     
    margin-left: 1rem;       
}
.avatar-card:hover{
    transform: rotate(0deg) scale(1.02);
}
.avatar-inner{
    position:relative;
    overflow:hidden;
    border-radius:28px;
}
.avatar-inner img{
    width:100%;
    display:block;
}
.avatar-meta {
    display: flex;
    justify-content: space-between; 
    align-items: center;            
    padding: 1rem 0.5rem 0;
    width: 100%;
}
.avatar-meta-role { 
    font-size: 0.85rem; 
    color: var(--green-dark); 
    opacity: 0.95;            
    font-weight: 700;
    text-align: left;      
}
.avatar-dot { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
    background: #88c56d; 
    box-shadow: 0 0 8px #88c56d, 0 0 15px rgba(136, 197, 109, 0.5);
    animation: parpadeoLinea 1.8s infinite ease-in-out; 
}

/* SECTIONS BASE */
section{ padding: 6rem 6vw 4rem; scroll-margin-top: 80px; }

.profile-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    align-items: start;
}
.profile-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}
.section-header-inside {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.section-num{ font-size:0.8rem; opacity:0.5; }
.section-title{ font-size:3rem; letter-spacing:-2px; }

.profile-about p {
    line-height: 1.6;
    opacity: 0.85;
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    text-align: left;
}
.profile-social {
    width: 100%;
    text-align: left;
}
.profile-social h4 {
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.social-links-wrapper {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.social-divider {
    color: var(--green-dark);
    font-size: 0.8rem;
    opacity: 0.4;
    user-select: none;
}
.btn-social {
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.4);
    border: 1px solid var(--border);
    color: var(--green-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-social:hover {
    background: var(--green-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* TARJETA DE INTERESES */
.profile-interests-card {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(33, 66, 50, 0.05), 
                0 4px 12px rgba(0, 0, 0, 0.01);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile-interests-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(33, 66, 50, 0.08);
}
.profile-interests-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.8rem;
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.2;
}
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}
.pill {
    padding: 0.55rem 1.1rem;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.pill:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.03);
}

/* TIMELINE */
.tl-grid-years{ display:grid; grid-template-columns: repeat(5,1fr); gap:1.5rem; margin-bottom: 1.5rem;}
.tl-year-card {
    min-height: 220px;
    perspective: 1200px;
    cursor: pointer;
    background: transparent !important; /* Eliminamos el fondo que causaba el rastro */
    border: none !important;
    box-shadow: none !important;
    overflow: visible;
}
/* CONTENEDOR 3D */
.tl-card-inner {
    position: relative;
    width: 100%;
    height: 220px;
    transition: transform 0.9s cubic-bezier(.2,.8,.2,1);
    transform-style: preserve-3d;
    background: transparent;
}
.tl-year-card:hover .tl-card-inner,
.tl-year-card.flipped .tl-card-inner {
    transform: rotateY(180deg);
}

/* FRENTE Y REVERSO */
.tl-year-front,
.tl-year-back{
    position:absolute;
    inset:0;
    border-radius:32px;
    padding:2rem;
    backdrop-filter:blur(16px);
    box-shadow:var(--shadow);
    backface-visibility:hidden;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    overflow:hidden;
}
/* FRENTE */
.tl-year-front{

    background:var(--glass);

    border:1px solid var(--border);

    transform:rotateY(0deg);
}
/* REVERSO */
.tl-year-back{

    transform:rotateY(180deg);

    background:#214232;

    border:1px solid rgba(255,255,255,0.08);
}
/* TÍTULO REVERSO */
.tl-year-back h4{
    font-size:1.0rem;
    margin-bottom:1rem;
    color:#dcefcf;
}

.tl-year-back ul{
    list-style:none;
    display:flex;
    flex-direction:column;
    gap:0.7rem;
}

.tl-year-back li{
    font-size:0.8rem;
    color:#dcefcf;
    font-weight:600;
    opacity:0.9;
}
.tl-year-card:hover, .tl-year-card.open{
    transform: translateY(-8px) rotate(-1deg);
    background: rgba(255, 255, 255, 0.3);
}
.tl-trigger-year{ font-size:2.5rem; font-weight:800; }
.tl-card-bottom{ margin-top:1.5rem; display:flex; flex-direction:column; gap:0.4rem; }
.tl-drawer {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--glass);
    border-radius: 24px;
    border: 1px solid var(--border);
    backdrop-filter:blur(16px);
}
.tl-drawer.open {
    max-height: 500px;
    padding: 2rem;
    margin-top: 1rem;
}
.tl-sublabel {
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.tl-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.tl-item {
    background: rgba(255,255,255,0.2);
    padding: 1rem;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tl-status.done { color: #214232; font-weight: bold; font-size: 0.85rem;}
.tl-status.progress { color: #bca010; font-weight: bold; font-size: 0.85rem;}

/* PORTFOLIO */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.portfolio-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: transform 0.4s ease;
}
.portfolio-card:hover {
    transform: translateY(-6px);
}
.portfolio-img-box {
    width: 100%;
    height: 200px;
    background-color: rgba(255,255,255,0.15);
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}
.portfolio-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(33, 66, 50, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.portfolio-overlay span {
    color: #fff;
    font-weight: 700;
    border: 1px solid #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
}
.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}
.portfolio-info {
    padding: 1rem 0.2rem 0.2rem;
}
.portfolio-tag {
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.portfolio-info h4 {
    font-size: 1.1rem;
    margin-top: 0.2rem;
    font-weight: 700;
}
.portfolio-action {
    text-align: center;
    display: flex;
    justify-content: center; 
    margin-top: 2rem;     
}
/* Estilo base (Modo claro) */
.btn-portfolio {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--green-dark); /* Tu verde oscuro actual */
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(21, 44, 33, 0.57);
    transition: all 0.3s ease;
}

/* Estilo para MODO OSCURO */
body.dark-mode .btn-portfolio {
    background: #4a6658; /* Un verde más suave para que resalte en el fondo negro */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Efecto hover en modo oscuro */
body.dark-mode .btn-portfolio:hover {
    background: #6c8a7b; /* Un tono más claro al pasar el mouse */
    transform: translateY(-3px);
}
.btn-portfolio:hover {
    background: #2d5a45;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(33, 66, 50, 0.25);
}

/* TEAM GRIDS */
.team-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:1.5rem; }
.team-card{
    text-decoration:none;
    color:var(--green-dark);
    background:var(--glass);
    border:1px solid var(--border);
    backdrop-filter:blur(16px);
    border-radius:24px;
    padding: 2rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    box-shadow:var(--shadow);
    position: relative;
}

/* El círculo base */
.team-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05); 
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: var(--green-dark);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.team-name{ font-weight:700; font-size: 1.1rem; margin-bottom: 0.3rem;}
.team-role{ opacity:0.6; font-size: 0.85rem;}

/* Efecto hover: relleno pleno */
.team-card:hover .team-circle {
    background: var(--member-color); 
    color: #fff;                     
    border-color: var(--member-color);
    transform: scale(1.1);
}

.team-card:hover { 
    transform: translateY(-10px) scale(1.03); 
    background: rgba(255, 255, 255, 0.5);
    border-color: var(--member-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Ajuste para modo oscuro en el círculo base */
body.dark-mode .team-circle {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #edf7ee;
}

/* INSTITUCIÓN Y CÁTEDRA SUTIL */
.minimal-inst-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.minimal-inst-block {
    background: rgba(246, 246, 246, 0.289);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow); 
}
.minimal-inst-block h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    opacity: 0.9;
}
.minimal-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.6rem;
    gap: 1rem;
}
.minimal-row strong {
    font-weight: 600;
    opacity: 0.5;
    flex-shrink: 0;
}
.minimal-row span {
    text-align: right;
    font-weight: 500;
    opacity: 0.85;
}

/* FOOTER CON COLOR PLENO E INVERSO */
footer {
    padding: 1.4rem 6vw;
    text-align: center;
    background-color: rgb(102, 139, 118); /* Fondo oscuro en modo claro */
    color: #ffffff; /* Tipografía clara para que resalte */
    margin-top: 5rem;
    width: 100%;
    transition: background-color 0.35s ease, color 0.35s ease;
}

footer img {
    width: 100px;
    margin-bottom: 2rem;
    transition: filter 0.35s ease; /* Transición para el filtro del logo */
}
footer p {
    max-width: 850px;
    margin: auto;
    line-height: 1.8;
    opacity: 0.85; /* Más legible sobre el fondo pleno */
    font-size: 0.85rem;
}

/* RESPONSIVE */
@media(max-width:1100px){
    .hero-inner{ grid-template-columns:1fr; justify-items: center; text-align: center; gap: 3rem; }
    .hero-name{ font-size:5rem; }
    .avatar-card{ transform: rotate(0deg); margin-top: 2rem; justify-self: center; margin-left: 0; }
    .profile-container { grid-template-columns: 1fr; gap: 2rem; }
    .tl-grid-years{ grid-template-columns: 1fr 1fr; }
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .team-grid{ grid-template-columns: 1fr 1fr; }
    .minimal-inst-container { grid-template-columns: 1fr; gap: 1rem; }
}
@media(max-width:700px){
    nav{ padding:1rem; flex-direction:column; gap:1rem; }
    .nav-right{ flex-direction:column; }
    .hero{ padding-top:12rem; }
    .hero-name{ font-size:3.5rem; letter-spacing:-3px; }
    .section-title{ font-size:2rem; }
    .tl-grid-years, .portfolio-grid, .team-grid { grid-template-columns:1fr; }
}

/* INTERRUPTOR MODO */
.lamp-toggle{
    position:absolute; top:-18px; right:20px; width:55px; height:55px; border-radius:50%;
    background: rgba(255,255,255,0.35); backdrop-filter:blur(12px); border: 1px solid rgba(255,255,255,0.4);
    display:flex; justify-content:center; align-items:center; font-size:1.5rem; cursor:pointer;
    transition:0.35s ease; z-index:20; box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}
.lamp-toggle:hover{ transform: translateY(-4px) scale(1.05); background: rgba(255,255,255,0.55); }

/* MODO OSCURO GLOBAL */
body.dark-mode {
    color: #edf7ee !important; 
    background: 
        radial-gradient(circle at 20% 25%, rgba(45, 96, 66, 0.6) 0%, transparent 50%),   
        radial-gradient(circle at 80% 15%, rgba(144, 72, 89, 0.7) 0%, transparent 45%),   
        radial-gradient(circle at 75% 80%, rgba(158, 97, 74, 0.6) 0%, transparent 45%),   
        linear-gradient(135deg, #0d1310 0%, #141b16 50%, #1a221d 100%);                 
}
body.dark-mode nav{ background: rgba(10,10,10,0.25); }
body.dark-mode .tl-year-card,
body.dark-mode .team-card,
body.dark-mode .portfolio-card,
body.dark-mode .minimal-inst-block,
body.dark-mode .tl-drawer{ background: rgba(20, 30, 24, 0.4); border: 1px solid rgba(255,255,255,0.08); }
body.dark-mode .tl-item { background: rgba(255,255,255,0.05); }
body.dark-mode .tl-status.done { color: #88c56d; }
body.dark-mode .btn-social { background: rgba(255,255,255,0.05); color: #edf7ee; }
body.dark-mode .btn-social:hover { background: #edf7ee; color: #0f1712; }
body.dark-mode .pill { background: rgba(255,255,255,0.05); }
body.dark-mode .pill:hover { background: rgba(255,255,255,0.15); }
body.dark-mode a, body.dark-mode .nav-brand, body.dark-mode .team-card { color:#edf7ee; }
body.dark-mode .lamp-toggle{ background: rgba(255,255,255,0.08); color: #edf7ee; }
body.dark-mode .team-card:hover { background: rgba(255, 255, 255, 0.08); }

/* REVERSO MODO OSCURO */

body.dark-mode .tl-year-back {
    background: #4a6658; 
    color: #f5eedf;
}

.tl-year-back h4,
.tl-year-back li{

    color:#dcefcf;
}
/* Color título de herramientas en modo oscuro */
body.dark-mode .profile-interests-box h3,
body.dark-mode .profile-container h3 {
    color: #edf7ee;
    opacity: 1;     
}

/* Soportes de modo oscuro*/
body.dark-mode .profile-interests-card {
    background: rgba(20, 30, 24, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}
body.dark-mode .social-divider {
    color: #edf7ee;
    opacity: 0.3;
}

/* FOOTER EN MODO OSCURO */
body.dark-mode footer {
    background-color: #313f39; /* Fondo verde claro */
    color: #eaf2ee !important; /* Fuerza tipografía oscura a la inversa */
}
body.dark-mode footer p {
    color: #eaf2ee !important; /* Fuerza tipografía oscura en el párrafo */
    opacity: 0.9;
}

/* AVATAR EN MODO OSCURO */
body.dark-mode .avatar-card {
    background: rgba(210, 225, 214, 0.474); 
    border: 1px rgba(255, 255, 255, 0.344); 
    box-shadow: 0 25px 60px rgba(244, 243, 243, 0.34), 
                inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
body.dark-mode .avatar-meta-role {
    color: #edf7ee;
    opacity: 0.9;
}

/* CURSOR MOUSE */
body{ cursor:none; }
.cursor{
    position:fixed; top:0; left:0; transform: translate(-50%, -50%); pointer-events:none; z-index:99999;
    font-size:30px; color:#7ebd67; user-select:none; transition: transform 0.08s linear;
    text-shadow: 0 0 6px rgba(126,189,103,0.7), 0 0 24px rgba(126,189,103,0.4);
}

/* SPARKS AVATAR */
.avatar-inner span{ position:absolute; top:50%; left:50%; transform: translate(-50%, -50%); color:#ffffff; font-size:18px; opacity:0; pointer-events:none; z-index:30; text-shadow: 0 0 8px rgba(126,189,103,0.9); }
.avatar-card:hover .spark1{ animation: burstTop 1.6s ease-out; }
.avatar-card:hover .spark2{ animation: burstRight 1.6s ease-out; }
.avatar-card:hover .spark3{ animation: burstBottom 1.6s ease-out; }
.avatar-card:hover .spark4{ animation: burstLeft 1.6s ease-out; }
.avatar-card:hover .spark5{ animation: burstTopRight 1.7s ease-out; }
.avatar-card:hover .spark6{ animation: burstTopLeft 1.7s ease-out; }
.avatar-card:hover .spark7{ animation: burstBottomRight 1.7s ease-out; }
.avatar-card:hover .spark8{ animation: burstBottomLeft 1.7s ease-out; }

@keyframes burstTop{ 0%{ opacity:0; transform: translate(-50%, -50%) scale(0.2); } 25%{ opacity:1; } 100%{ opacity:0; transform: translate(-50%, -220px) scale(1.8); } }
@keyframes burstRight{ 0%{ opacity:0; transform: translate(-50%, -50%) scale(0.2); } 25%{ opacity:1; } 100%{ opacity:0; transform: translate(220px, -50%) scale(1.8); } }
@keyframes burstBottom{ 0%{ opacity:0; transform: translate(-50%, -50%) scale(0.2); } 25%{ opacity:1; } 100%{ opacity:0; transform: translate(-50%, 220px) scale(1.8); } }
@keyframes burstLeft{ 0%{ opacity:0; transform: translate(-50%, -50%) scale(0.2); } 25%{ opacity:1; } 100%{ opacity:0; transform: translate(-220px, -50%) scale(1.8); } }
@keyframes burstTopRight{ 0%{ opacity:0; transform: translate(-50%, -50%) scale(0.2); } 25%{ opacity:1; } 100%{ opacity:0; transform: translate(160px,-160px) scale(1.8); } }
@keyframes burstTopLeft{ 0%{ opacity:0; transform: translate(-50%, -50%) scale(0.2); } 25%{ opacity:1; } 100%{ opacity:0; transform: translate(-160px,-160px) scale(1.8); } }
@keyframes burstBottomRight{ 0%{ opacity:0; transform: translate(-50%, -50%) scale(0.2); } 25%{ opacity:1; } 100%{ opacity:0; transform: translate(160px,160px) scale(1.8); } }
@keyframes burstBottomLeft{ 0%{ opacity:0; transform: translate(-50%, -50%) scale(0.2); } 25%{ opacity:1; } 100%{ opacity:0; transform: translate(-160px,160px) scale(1.8); } }

/* ANIMACIONES NATIVAS SCROLL */
.scroll-anim {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
.scroll-anim.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ANIMACIÓN PARPADEO "EN LÍNEA" */
@keyframes parpadeoLinea {
    0% {
        opacity: 0.4;
        transform: scale(0.9);
        box-shadow: 0 0 4px #88c56d;
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        box-shadow: 0 0 12px #88c56d, 0 0 20px rgba(136, 197, 109, 0.6);
    }
    100% {
        opacity: 0.4;
        transform: scale(0.9);
        box-shadow: 0 0 4px #88c56d;
    }
}
/* --- FRANJA ESTADÍSTICAS --- */
.stats-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.5rem 0; 
    margin-top: -2rem; 
}

.stats-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--green-dark);
    color: #f5eedf;
    padding: 0.8rem 2.5rem; 
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
}

/* --- MODO OSCURO PARA FRANJA Y BOTÓN --- */
body.dark-mode .stats-wrapper {
    background: #313f39;
    color: #eaf2ee;
}

body.dark-mode .btn-portfolio {
    background: #4a6658;
}

/* --- MODAL DE DETALLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}
.modal-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 20px;
}

/* --- ESTRUCTURA INTERNA ESTADÍSTICAS --- */
.stat-item { text-align: center; flex: 1; }
.stat-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.8; }
.stat-value { font-size: 2rem; font-weight: 800; margin-top: 8px; display: block; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.2); margin: 0 2rem; }
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
}

.project-card {
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 1rem;
    border-radius: 20px;
    text-align: center;
}

.img-wrapper {
    cursor: pointer;
    overflow: hidden;
    border-radius: 15px;
    position: relative;
}

.overlay {
    position: absolute; top:0; left:0; width: 100%; height:100%;
    background: rgba(0,0,0,0.5);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: 0.3s;
}
.img-wrapper:hover .overlay {opacity: 1;}
/* --- PORTFOLIO DISTRIBUIDO EN FILAS ENFOCADO EN TIPOGRAFÍA --- */
.portfolio-rows-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Filas un poco más juntas y elegantes */
    padding: 0 2rem 5rem;
    max-width: 850px; /* Contenedor más compacto para estilizar el centro */
    margin: 0 auto;
}

/* Fila interactiva tipo lista del catálogo */
.project-row {
    display: flex;
    align-items: center;
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    border-radius: 16px;
    padding: 1rem 1.5rem; /* Padding reducido */
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.project-row:hover {
    transform: translateX(4px); /* Desplazamiento lateral sutil en vez de subir */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.25);
}

/* MINIATURA MÁS CHICA (Antes era de 240px, ahora es compacta) */
.row-img-box {
    position: relative;
    width: 110px;  /* Imagen más chica y discreta */
    height: 75px;  /* Proporción elegante */
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0; 
}

.row-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Overlay traslúcido minimalista */
.row-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(33, 66, 50, 0.8); /* Tu color --green-dark */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.row-overlay span {
    color: #f5eedf;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* INFORMACIÓN DEL PROYECTO (Ahora con más jerarquía) */
.row-info {
    margin-left: 2rem;
    text-align: left;
}

.row-info h3 {
    font-size: 1.75rem; /* Título grande y destacado */
    color: var(--green-dark);
    margin: 0;
    letter-spacing: -0.5px;
    font-weight: 700;
}

.row-info p {
    margin-top: 0.2rem;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Efectos de Hover coordinados */
.project-row:hover .row-img-box img {
    transform: scale(1.05);
}

.project-row:hover .row-overlay {
    opacity: 1;
}

/* COMPORTAMIENTO MODO OSCURO */
body.dark-mode .project-row h3 {
    color: #edf7ee;
}
body.dark-mode .project-row {
    background: rgba(20, 30, 24, 0.25);
}
body.dark-mode .project-row:hover {
    background: rgba(20, 30, 24, 0.45);
}

/* RESPONSIVE: Adaptación móvil manteniendo la línea limpia */
@media (max-width: 550px) {
    .project-row {
        padding: 1rem;
    }
    .row-info {
    margin-left: 2rem;
    flex: 1; /* Esto le dice al texto: "usá todo el espacio que sobre a la derecha" */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* ESTO ES LA CLAVE: evita que el texto se esconda o se tape */
}

.row-info h3 {
    font-size: 1.5rem !important; /* Un tamaño que cabe bien */
    color: var(--green-dark) !important;
    white-space: nowrap; /* Evita saltos de línea raros */
    overflow: hidden;    /* Corta si es demasiado largo */
    text-overflow: ellipsis; /* Pone tres puntos si no cabe */
    margin: 0 !important;
}
}
/* --- ESTILOS DE LISTA NUMERADA PORTFOLIO --- */
/* --- AJUSTE DEFINITIVO DEL TÍTULO --- */
/* AJUSTE FINO DEL TÍTULO PORTFOLIO */
#titulo-ajustable {
    display: block !important;
    text-align: center !important;
    margin-bottom: 1.5rem !important;
    
    /* MODIFICA ESTE VALOR PARA EL ESPACIADO */
    /* Ejemplos: -2px (juntas), 0px (normal), 5px (muy separadas) */
    letter-spacing: -2px !important; 
    
    /* Aseguramos que tome el estilo de tu nombre */
    font-size: 3.5rem !important;
    color: var(--green-dark) !important;
}

.portfolio-rows-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding-bottom: 5rem !important;
}

.project-row {
    display: flex !important;
    align-items: center !important;
    background: var(--glass) !important;
    border: 1px solid var(--border) !important;
    padding: 1rem !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    color: var(--green-dark) !important;
    transition: transform 0.2s;
}

.project-row:hover { transform: translateX(5px); }
.number { font-family: monospace; font-size: 1.2rem; margin-right: 2rem; opacity: 0.5; }
.row-img-box { width: 80px; height: 60px; border-radius: 6px; overflow: hidden; margin-right: 2rem; }
.row-img-box img { width: 100%; height: 100%; object-fit: cover; }
.row-info h3 { font-size: 1.4rem !important; margin: 0 !important; }
.row-info p { font-size: 0.9rem !important; opacity: 0.7 !important; margin: 0 !important; }
/* Estilo específico para el título del portfolio */
.portfolio-page .hero-name {
    font-size: 3.5rem !important; /* Ajusta este tamaño si lo querés más grande/chico */
    line-height: 1.1 !important;
    text-align: center !important;
    color: var(--green-dark) !important;
    margin-bottom: 1.5rem !important;
}

/* Aseguramos que la subheader no se tape */
.portfolio-page header p {
    font-size: 1rem !important;
    letter-spacing: 1px !important;
}
/* Asegurar que la estrella cambie de color en modo oscuro */
body.dark-mode #dark-mode-toggle {
    color: #edf7ee !important;
}

/* Efecto al pasar el mouse por la estrella */
#dark-mode-toggle:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}
/* Estilos para la página de detalle */
.project-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

.gallery img {
    width: 100%;
    border-radius: 12px;
    transition: transform 0.3s;
}

.gallery img:hover {
    transform: scale(1.02);
}

.text-info {
    line-height: 1.6;
    color: var(--green-dark);
}