/* ----------------------------- SECCIÓN EXPERIENCIA ----------------------------- */

.experience-section {
max-width: 900px;
margin: 0 auto;
padding: 0 20px 80px;
}

.timeline-container {
position: relative;
padding-left: 60px;
}

.timeline-line {
position: absolute;
left: 20px;
top: 0;
bottom: 0;
width: 2px;
background: linear-gradient(to bottom, #48484a 0%, #48484a 100%);
}

.timeline-line::before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 12px;
height: 12px;
background: #0a84ff;
border-radius: 50%;
box-shadow: 0 0 0 4px #0a1628, 0 0 12px rgba(10, 132, 255, 0.4);
}

.timeline-item {
position: relative;
margin-bottom: 60px;
opacity: 0;
transform: translateX(-30px);
transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

}

.timeline-item.visible {
opacity: 1;
transform: translateX(0);
}

.timeline-dot {
position: absolute;
left: 20px;
transform: translateX(-420%);
top: 30px;
width: 16px;
height: 16px;
background: #1c1c1e;
border: 3px solid #48484a;
border-radius: 50%;
box-shadow: 0 0 0 4px #0a1628;
z-index: 2;
transition: all 0.4s ease;
}

.timeline-item:hover .timeline-dot {
transform: scale(1.3);
transform: translateX(-420%);
background: #0a84ff;
border-color: #0a84ff;
box-shadow: 0 0 0 4px #0a1628, 0 0 16px rgba(10, 132, 255, 0.6);
}

.experience-card {
border-radius: 18px;
padding: 36px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
0 8px 32px rgba(0, 0, 0, 0.2);
border: 1px solid rgba(72, 72, 74, 0.3);
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
cursor: pointer;
    background: rgba(20, 20, 25, 0.6); 
    backdrop-filter: blur(10px) saturate(280%);
    -webkit-backdrop-filter: blur(10px);
   
}

.experience-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: linear-gradient(to bottom, #0a84ff, #0066cc);
transform: scaleY(0);
transform-origin: top;
transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .experience-card {
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
0 12px 48px rgba(10, 132, 255, 0.15);
transform: translateX(8px);
border-color: rgba(10, 132, 255, 0.3);
}

.timeline-item:hover .experience-card::before {
transform: scaleY(1);
}

.card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
flex-wrap: wrap;
gap: 12px;
}

.company-info {
display: flex;
align-items: center;
gap: 16px;
}

.company-logo {
width: 56px;
height: 56px;
border-radius: 12px;
background: rgba(58, 58, 60, 0.6);
backdrop-filter: blur(10px);
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
font-weight: 700;
color: #f5f5f7;
border: 1px solid rgba(72, 72, 74, 0.5);
}

.period {
font-size: 13px;
color: #98989d;
font-weight: 500;
background: rgba(58, 58, 60, 0.5);
backdrop-filter: blur(10px);
padding: 6px 14px;
border-radius: 12px;
letter-spacing: 0.01em;
border: 1px solid rgba(72, 72, 74, 0.3);
}

.position {
font-size: 22px;
font-weight: 600;
color: #f5f5f7;
margin-bottom: 6px;
letter-spacing: -0.02em;
}

.company {
font-size: 17px;
color: #aeaeb2;
margin-bottom: 18px;
font-weight: 500;
}

.description {
font-size: 15px;
line-height: 1.6;
color: #98989d;
margin-bottom: 24px;
}

.skills-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
}

.skill-tag {
background: rgba(58, 58, 60, 0.5);
backdrop-filter: blur(10px);
color: #e5e5e7;
padding: 7px 14px;
border-radius: 10px;
font-size: 13px;
font-weight: 500;
border: 1px solid rgba(72, 72, 74, 0.4);
transition: all 0.3s ease;
}

.skill-tag:hover {
background: rgba(10, 132, 255, 0.2);
border-color: rgba(10, 132, 255, 0.5);
color: #0a84ff;
transform: translateY(-2px);
}

/* ----------------------------- BACKDROP & DIALOG OPTIMIZADO PARA 1080p ----------------------------- */

.backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0);
backdrop-filter: blur(0px);
-webkit-backdrop-filter: blur(0px);
opacity: 0;
pointer-events: none;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 9998;
}

.backdrop.active {
opacity: 1;
background: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
pointer-events: all;
}

/* Dialog optimizado para monitores 1080p */
dialog {
max-width: 1400px;
width: calc(100% - 80px);
max-height: 85vh;
padding: 0;
border: none;
border-radius: 24px;
background: rgba(28, 28, 30, 0.95);
backdrop-filter: blur(40px) saturate(180%);
-webkit-backdrop-filter: blur(40px) saturate(180%);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
0 0 0 1px rgba(72, 72, 74, 0.4);
overflow: hidden;
z-index: 9999;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
}

dialog::backdrop {
background: transparent;
}

/* Scrollbar estilo Apple en dialogs */
.dialog-content {
padding: 48px 64px;
overflow-y: auto;
max-height: 85vh;
}

/* Scrollbar personalizada para dialog - Estilo Apple Dark Mode */
dialog::-webkit-scrollbar,
.dialog-content::-webkit-scrollbar {
width: 8px;
}

dialog::-webkit-scrollbar-track,
.dialog-content::-webkit-scrollbar-track {
background: transparent;
}

dialog::-webkit-scrollbar-thumb,
.dialog-content::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.12);
border-radius: 4px;
border: 1px solid transparent;
background-clip: content-box;
transition: background 0.2s ease;
}

dialog::-webkit-scrollbar-thumb:hover,
.dialog-content::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.22);
}

dialog::-webkit-scrollbar-thumb:active,
.dialog-content::-webkit-scrollbar-thumb:active {
background: rgba(255, 255, 255, 0.32);
}

.dialog-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin-bottom: 32px;
gap: 20px;
}

.dialog-company-info {
display: flex;
align-items: center;
gap: 20px;
flex: 1;
}

.dialog-logo {
width: 72px;
height: 72px;
border-radius: 18px;
background: rgba(58, 58, 60, 0.8);
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
font-weight: 700;
color: #f5f5f7;
border: 1px solid rgba(72, 72, 74, 0.5);
flex-shrink: 0;
}

.dialog-title-group h2 {
font-size: 28px;
font-weight: 700;
color: #f5f5f7;
margin-bottom: 8px;
letter-spacing: -0.02em;
}

.dialog-title-group h3 {
font-size: 20px;
font-weight: 500;
color: #aeaeb2;
margin-bottom: 8px;
}

.dialog-period {
font-size: 14px;
color: #0a84ff;
font-weight: 500;
}

.close-button {
width: 36px;
height: 36px;
border-radius: 12px;
background: rgba(58, 58, 60, 0.6);
border: 1px solid rgba(72, 72, 74, 0.4);
color: #f5f5f7;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
transition: all 0.3s ease;
flex-shrink: 0;
}

.close-button:hover {
background: rgba(10, 132, 255, 0.2);
border-color: #0a84ff;
transform: scale(1.05);
}

.dialog-section {
margin-bottom: 32px;
}

.dialog-section h4 {
font-size: 18px;
font-weight: 600;
color: #f5f5f7;
margin-bottom: 16px;
letter-spacing: -0.01em;
}

.dialog-section p {
font-size: 16px;
line-height: 1.7;
color: #98989d;
margin-bottom: 12px;
}

.dialog-section ul {
list-style: none;
padding: 0;
}

.dialog-section li {
font-size: 15px;
line-height: 1.6;
color: #98989d;
margin-bottom: 12px;
padding-left: 24px;
position: relative;
}

.dialog-section li::before {
content: '•';
position: absolute;
left: 8px;
color: #0a84ff;
font-size: 20px;
line-height: 1;
}

.dialog-skills {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.dialog-skill-tag {
background: rgba(10, 132, 255, 0.15);
color: #0a84ff;
padding: 10px 18px;
border-radius: 12px;
font-size: 14px;
font-weight: 500;
border: 1px solid rgba(10, 132, 255, 0.3);
}

/* ----------------------------- VIEW TRANSITIONS ----------------------------- */

::view-transition-old(vt-shared),
::view-transition-new(vt-shared) {
animation-duration: 0.5s;
}

/* ----------------------------- RESPONSIVE EXPERIENCE ----------------------------- */

@media (max-width: 768px) {
.experience-section {
padding: 0 16px 60px;
}

.timeline-container {
padding-left: 40px;
}

.timeline-line {
left: 10px;
}

.timeline-dot {
left: -38px;
width: 14px;
height: 14px;
}

.experience-card {
padding: 28px;
}

.company-info {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}

dialog {
max-width: calc(100% - 32px);
width: calc(100% - 32px);
max-height: 90vh;
}

.dialog-content {
padding: 32px 24px;
max-height: 90vh;
}

.dialog-header {
flex-direction: column;
}

.dialog-company-info {
width: 100%;
}
}

@media (min-width: 769px) {
.card-header {
flex-wrap: nowrap;
}
}

.company-logo img,
.dialog-logo img {
width: 56px;
height: 56px;
object-fit: cover;
border-radius: inherit;
}

.dialog-logo {
width: 72px;
height: 72px;
border-radius: 18px;
overflow: hidden;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}

.dialog-logo img {
width: 100%;
height: 100%;
object-fit: contain;
}
