/* VARIABLES */
:root {
    --bg: #fafafa;
    --text-color: #222;
    --card-bg: #fff;
    --primary-color: #0066ff;
    --border-color: #eee;
    --glass-shadow: rgba(0, 0, 0, 0.05);
    --accent-blue: #1e90ff;
    --primary-color-faded: rgba(0, 102, 255, 0.3);
    --primary-color-dark: #0047b3;
    --hover-bg: rgba(0, 0, 0, 0.05);
    --skill-icon-bg: rgba(255, 255, 255, 0.9);
    --footer-bg: #ffffff;
    --footer-text: #1a1a1a;
    --accent: #1f6dff;
    --accent-glow: rgba(31, 109, 255, 0.65);
    --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

body.dark {
    --bg: #0d1117;
    --text-color: #c9d1d9;
    --primary-color: #7b9cff;
    --border-color: #30363d;
    --glass-shadow: rgba(255, 255, 255, 0.05);
    --primary-color-faded: rgba(123, 156, 255, 0.3);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --skill-icon-bg: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(30, 30, 30, 0.9);
    --footer-bg: #0d1117;
    --footer-text: #c9d1d9;
    --accent: #64b4ff;
    --accent-glow: rgba(100, 180, 255, 0.75);
    --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

/* GLOBAL */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text-color);
    transition: background 0.3s, color 0.3s;
    scroll-behavior: smooth;
}

/* SKIP NAVIGATION */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    text-decoration: none;
    z-index: 2000;
    transition: top 0.3s ease;
}

.skip-nav:focus {
    top: 0;
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(8px);
    z-index: 1000;
}

body.dark header {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    color: var(--text-color);
    font-size: 22px;
    font-weight: 700;
    margin-left: 5px;
    flex: 1;
    text-align: center;
}

/* HAMBURGER */
.hamburger {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 15px;
    color: var(--text-color);
}

.hamburger svg {
    width: 30px;
    height: 30px;
    stroke: var(--text-color);
    transition: 0.3s;
}

.hamburger:hover svg {
    stroke: var(--primary-color);
}

/* SIDE MENU */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(6px);
    transform: translateX(-100%);
    transition: transform .35s ease;
    padding: 80px 25px 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1100;
}

.side-menu.open {
    transform: translateX(0);
}

.side-menu a {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 0;
    display: block;
    transition: color 0.25s ease, transform 0.25s ease;
}

.side-menu a:hover {
    color: #4da3ff;
    transform: translateX(4px);
}

body.light-mode .side-menu {
    background: rgba(255, 255, 255, 0.95) !important;
}

body.light-mode .side-menu a {
    color: #111 !important;
}

body.light-mode .side-menu a:hover {
    color: #007bff !important;
}

/* OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 1050;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* CONTROLS */
.controls {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

.controls button {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.controls button:hover {
    background: rgba(255,255,255,0.1);
}

#mode-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: background 0.3s, color 0.3s, border 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 0;
}

#mode-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

#lang-toggle {
    border: 1px solid var(--primary-color);
    background: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: var(--primary-color);
}

#lang-toggle:hover {
    background: var(--primary-color);
    color: var(--card-bg);
}

/* HERO & GENERAL SECTIONS */
.hero {
    text-align: center;
    padding: 120px 20px;
}

.section {
    max-width: 1100px;
    margin: auto;
    padding: 60px 20px;
}

.btn {
    background: var(--primary-color);
    padding: 12px 20px;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
}

.btn:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}

/* TYPING EFFECT */
.typing-text::after {
    content: '|';
    display: inline-block;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* PROFILE PICTURE */
.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 30px auto 0;
    display: block;
    border: 4px solid var(--primary-color);
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.bottom-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    margin-bottom: 0;
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.skill-category h3 {
    text-align: left;
    margin: 0 0 15px 0;
    padding-bottom: 5px;
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color-faded);
    display: block;
}

.icon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    padding: 10px 0 0 0;
}

.icon-list figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    animation: floatIcon 3s ease-in-out infinite;
    padding: 8px;
    border-radius: 14px;
    border: 2px solid transparent;
}

.icon-list figure:nth-child(1) { animation-delay: 0s; }
.icon-list figure:nth-child(2) { animation-delay: 0.3s; }
.icon-list figure:nth-child(3) { animation-delay: 0.6s; }
.icon-list figure:nth-child(4) { animation-delay: 0.9s; }
.icon-list figure:nth-child(5) { animation-delay: 1.2s; }
.icon-list figure:nth-child(6) { animation-delay: 1.5s; }
.icon-list figure:nth-child(7) { animation-delay: 1.8s; }
.icon-list figure:nth-child(8) { animation-delay: 2.1s; }
.icon-list figure:nth-child(9) { animation-delay: 2.4s; }
.icon-list figure:nth-child(10) { animation-delay: 2.7s; }
.icon-list figure:nth-child(11) { animation-delay: 3.0s; }
.icon-list figure:nth-child(12) { animation-delay: 3.3s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.icon-list figure:hover {
    transform: translateY(-12px) scale(1.18) !important;
    background: var(--hover-bg);
    border-color: var(--accent);
    box-shadow:
        0 8px 25px var(--accent-glow),
        0 0 40px var(--primary-color-faded),
        inset 0 0 15px rgba(255,255,255,0.05);
    animation: none;
}

.icon-list figure::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: conic-gradient(from var(--angle, 0deg), var(--accent), var(--primary-color), var(--accent-blue), var(--accent));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    animation: rotateBorder 3s linear infinite paused;
}

.icon-list figure:hover::before {
    opacity: 1;
    animation-play-state: running;
}

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotateBorder {
    to { --angle: 360deg; }
}

.icon-list figure::after {
    content: attr(data-skill);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    z-index: 10;
    letter-spacing: 0.5px;
}

.icon-list figure:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.icon-list img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.3));
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: var(--skill-icon-bg);
    padding: 6px;
    border-radius: 12px;
}

.icon-list figure:hover img {
    filter:
        drop-shadow(0 0 12px var(--accent-glow))
        drop-shadow(0 0 25px var(--primary-color-faded));
    transform: rotateY(360deg);
    background: rgba(255, 255, 255, 0.15);
}

.icon-list figcaption {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.icon-list figure:hover figcaption {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
    transform: scale(1.05);
}

.tech-icon.color-fallback {
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.4));
}

.icon-list img[src$=".png"] {
    background: transparent;
    padding: 2px;
    border-radius: 6px;
}

/* PROJECTS */
.projects-dynamic-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: transform .25s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-preview {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.project-preview.phone {
    height: 350px;
}

/* SLIDESHOWS */
.slideshow.horizontal {
    display: flex;
    width: 100%;
    height: 100%;
    --count: 1;
    animation: slideHorizontal calc(var(--count) * 3.5s) infinite linear;
}

.slideshow.horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes slideHorizontal {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% * (var(--count) - 1))); }
}

.slideshow.vertical {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow.vertical img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    animation: fadeVertical calc(var(--count) * 3.5s) infinite;
}

.slideshow.vertical img:nth-child(1) { animation-delay: calc(0s); }
.slideshow.vertical img:nth-child(2) { animation-delay: calc(3.5s); }
.slideshow.vertical img:nth-child(3) { animation-delay: calc(7s); }
.slideshow.vertical img:nth-child(4) { animation-delay: calc(10.5s); }

@keyframes fadeVertical {
    0% { opacity: 1; }
    25% { opacity: 1; }
    33% { opacity: 0; }
    100% { opacity: 0; }
}

.project-info {
    padding: 1.2rem;
}

.project-info h3 {
    margin: 0;
    font-size: 1.4rem;
}

.project-info p {
    margin: .5rem 0;
    opacity: .8;
}

.stack {
    display: inline-block;
    margin-bottom: .8rem;
    background: rgba(255,255,255,0.06);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: .85rem;
}

.links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 6px 4px 0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, var(--accent-blue), var(--primary-color));
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.links a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.links a:hover::before {
    left: 100%;
}

.links a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px var(--accent-glow), 0 0 30px var(--primary-color-faded);
}

.links a i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.links a:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* CONTACT */
#contact {
    padding-top: 2rem;
}

.contact-title {
    text-align: center;
    font-size: 2.2rem;
    color: #0077ff;
    margin-bottom: 2rem;
}

.contact-container {
    max-width: 550px;
    margin: auto;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid #e5e9f0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    text-align: center;
}

.contact-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: .3rem;
}

.contact-phone {
    color: #555;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin: .6rem 0;
    padding: .8rem 1rem;
    background: #f5f7fa;
    border-radius: 12px;
    border: 1px solid #dce3ea;
    font-size: 1rem;
    color: #1a1a1a;
    transition: .25s ease;
    text-decoration: none;
}

.contact-item i {
    font-size: 1.2rem;
}

.contact-item:hover {
    background: #0077ff;
    color: white;
    border-color: #0077ff;
}

body.dark .contact-title {
    color: #3ea6ff;
}

body.dark .contact-container {
    background: #111826;
    border: 1px solid #1f2937;
    box-shadow: 0 4px 18px rgba(0,0,0,0.55);
}

body.dark .contact-name {
    color: #e6eef8;
}

body.dark .contact-phone {
    color: #9db0c9;
}

body.dark .contact-item {
    background: #1a2433;
    border: 1px solid #2a3547;
    color: #dbe7f6;
}

body.dark .contact-item:hover {
    background: #3ea6ff;
    color: #0b0e14;
    border-color: #3ea6ff;
}

body.dark .whatsapp:hover {
    background: #25D366 !important;
    color: #0b0e14 !important;
}

body.dark .linkedin:hover {
    background: #3ea6ff !important;
}

body.dark .github:hover {
    background: white !important;
    color: #0b0e14 !important;
}

body.dark .email:hover {
    background: #61b3ff !important;
}

/* FOOTER */
footer.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    width: 100%;
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

footer.footer p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--footer-text);
    letter-spacing: 0.3px;
}

/* ELECTRO CASCADE BACKGROUND */
.electro-cascade {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -9999;
    overflow: hidden;
    background: transparent;
}

.electro-column {
    position: absolute;
    top: -150%;
    width: 2px;
    height: 250%;
    opacity: 0.6;
    animation: fall 12s linear infinite;
}

.electro-column::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: 3px 60px;
    background-repeat: repeat-y;
    opacity: 0.65;
}

.electro-column::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    left: -2px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 
        0 25px currentColor,
        0 55px currentColor,
        0 90px currentColor,
        0 130px currentColor,
        0 180px currentColor;
    opacity: 0.9;
}

html:not(.dark) .electro-column,
body:not(.dark) .electro-column {
    color: rgba(35, 120, 255, 0.65);
}

html:not(.dark) .electro-column::before {
    background-image: linear-gradient(
        to bottom,
        rgba(35, 120, 255, 0.25) 0%,
        rgba(35, 120, 255, 0.15) 50%,
        rgba(35, 120, 255, 0.05) 100%
    );
}

html.dark .electro-column,
body.dark .electro-column {
    color: rgba(100, 180, 255, 0.85);
}

html.dark .electro-column::before {
    background-image: linear-gradient(
        to bottom,
        rgba(100, 180, 255, 0.35) 0%,
        rgba(100, 180, 255, 0.22) 50%,
        rgba(100, 180, 255, 0.10) 100%
    );
}

@keyframes fall {
    0% { transform: translateY(-150%); }
    100% { transform: translateY(150%); }
}

/* EXPERIENCE TIMELINE */
#experience {
    position: relative;
    padding-left: 30px;
}

#experience ul {
    list-style: none;
    padding-left: 0;
    position: relative;
}

#experience ul::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 0;
    width: 3px;
    height: 100%;
    border-radius: 2px;
    transition: background 0.3s ease;
}

:root #experience ul::before {
    background: rgba(30, 100, 255, 0.35);
}

:root.dark #experience ul::before {
    background: rgba(100, 180, 255, 0.55);
}

#experience li {
    margin-bottom: 35px;
    padding: 18px 22px;
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-left: 4px solid transparent;
}

#experience li:hover {
    transform: translateX(8px);
    box-shadow: 0 0 18px var(--accent-glow);
    border-left-color: var(--accent-glow);
}

#experience li::before {
    content: "";
    position: absolute;
    left: -23px;
    top: 22px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

#experience li strong {
    font-size: 1.2rem;
    color: var(--accent);
}

.company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.6;
    margin-left: 4px;
}

.job-desc {
    margin-top: 8px;
    font-size: 0.95rem;
}

#experience li .job-details a {
    margin-top: 10px; /* Ajusta este valor según sea necesario */
    display: inline-block; /* Para que margin-top funcione correctamente en un enlace */
}

/* ABOUT SECTION */
#about {
    position: relative;
    padding: 3rem 2rem;
    margin: 3rem auto;
    border-radius: 20px;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 15px rgba(0, 180, 255, 0.2),
        inset 0 0 10px rgba(0, 180, 255, 0.15);
    animation: borderGlow 4s ease-in-out infinite alternate;
}

.light-mode #about {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow:
        0 0 15px rgba(0, 120, 255, 0.15),
        inset 0 0 10px rgba(0, 120, 255, 0.1);
}

#about h2 {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #38bdf8, #3b82f6);
    -webkit-background-clip: text;
    color: transparent;
}

#about p {
    font-size: 1.25rem;
    line-height: 1.7;
    text-align: justify;
    color: var(--text-color);
    padding: 0 0.5rem;
    opacity: 0;
    animation: fadeUp 1s ease forwards;
}

/* DOWNLOAD BUTTONS */
.download-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download {
    padding: 0.9rem 1.8rem;
    border-radius: 9px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #008cff, #00e1ff);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
    border: 2px solid rgba(0, 255, 255, 0.3);
    transition: 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.btn-download.alt {
    background: linear-gradient(135deg, #00ffa3, #0affc9);
    box-shadow: 0 0 15px rgba(0, 255, 150, 0.5);
    border: 0.5px solid rgba(0, 255, 150, 0.3);
}

.btn-download:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 35px rgba(0, 255, 255, 0.4);
}

.btn-download::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: 0.5s;
}

.btn-download:hover::before {
    left: 100%;
}

.btn-download i {
    margin-right: 8px;
}

.light-mode .btn-download {
    color: #000;
    border: 2px solid rgba(0, 0, 0, 0.15);
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes borderGlow {
    from {
        box-shadow:
            0 0 20px rgba(0, 180, 255, 0.25),
            inset 0 0 15px rgba(0, 180, 255, 0.1);
    }
    to {
        box-shadow:
            0 0 30px rgba(0, 255, 200, 0.4),
            inset 0 0 20px rgba(0, 255, 200, 0.2);
    }
}
/* BACK TO TOP BUTTON */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
}

#back-to-top:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* EDUCATION & CERTIFICATIONS SPECIFIC STYLES */

/* Reutilizamos la estructura de la línea de tiempo de experiencia */
#education {
    position: relative;
    padding-left: 10px;
}

#education ul {
    list-style: none;
    padding-left: 30px;
    position: relative;
}

/* Línea vertical lateral */
#education ul::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 5px;
    width: 3px;
    height: 100%;
    background: var(--primary-color-faded);
    border-radius: 2px;
}

#education li {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* El punto de la línea de tiempo */
#education li::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 24px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
    z-index: 1;
}

/* Efecto al pasar el mouse por cada item */
#education li:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px var(--glass-shadow);
}

#education h2 {
    margin-top: 40px;
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* Ajuste para los botones de certificados */
.experience-links {
    margin-top: 15px;
    display: flex;
    justify-content: flex-start;
}

/* Estilo compacto para el botón de ver certificado */
.btn-download.alt {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 6px;
    /* Usamos el gradiente que ya definiste pero más sutil */
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    box-shadow: 0 4px 10px var(--primary-color-faded);
}

/* Estilo para las fechas al lado del título */
.edu-date {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--text-color);
    opacity: 0.7;
    margin-left: 10px;
}

/* Responsive: Ajustes para móviles */
@media (max-width: 768px) {
    /* Header */
    .logo {
        font-size: 16px;
    }

    .hamburger {
        left: 8px;
    }

    /* Hero */
    .hero {
        padding: 100px 16px 60px;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }

    .hero h2 {
        font-size: 1.4rem;
    }

    .hero p {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-download {
        font-size: 0.95rem;
        padding: 0.7rem 1.4rem;
        width: 100%;
        max-width: 260px;
        text-align: center;
    }

    /* Sections */
    .section {
        padding: 40px 16px;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    /* About */
    #about {
        padding: 2rem 1.2rem;
        margin: 2rem 10px;
    }

    #about h2 {
        font-size: 1.6rem;
    }

    #about p {
        font-size: 1rem;
        text-align: left;
    }

    /* Experience */
    #experience {
        padding-left: 10px;
    }

    #experience li {
        padding: 14px;
        margin-bottom: 25px;
    }

    #experience li strong {
        font-size: 1rem;
    }

    /* Projects */
    .projects-dynamic-gallery {
        grid-template-columns: 1fr;
    }

    .project-preview {
        height: 180px;
    }

    .project-preview.phone {
        height: 280px;
    }

    .project-info h3 {
        font-size: 1.2rem;
    }

    .links a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bottom-row {
        grid-template-columns: 1fr;
    }

    .skill-category {
        padding: 14px;
    }

    .skill-category h3 {
        font-size: 1.2rem;
    }

    .icon-list {
        gap: 10px;
    }

    .icon-list figure {
        width: 65px;
    }

    .icon-list img {
        width: 48px !important;
        height: 48px !important;
    }

    .icon-list figcaption {
        font-size: 0.7rem;
    }

    /* Education */
    #education ul {
        padding-left: 20px;
    }

    #education li {
        padding: 14px;
    }

    #education h2 {
        font-size: 1.4rem;
    }

    /* Contact */
    .contact-title {
        font-size: 1.6rem;
    }

    .contact-container {
        padding: 1.5rem;
        margin: 0 10px;
    }

    .contact-name {
        font-size: 1.1rem;
    }

    .contact-item {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }

    /* Footer */
    footer.footer {
        padding: 18px 10px;
    }
}