:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #d4af37;
    /* Gold elegant accent */
    --secondary-text: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Playfair Display', serif;
    /* Or Montserrat if preferred modern/bold */
    --font-body: 'Montserrat', sans-serif;
    --transition-speed: 0.5s;
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 1s ease-in-out 2s forwards;
    pointer-events: none;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent-color);
    letter-spacing: 5px;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    transition: background 0.3s;
}

nav.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.nav-list a:hover::after {
    width: 100%;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-btn {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    opacity: 1;
}

.lang-btn.active {
    opacity: 1;
    color: var(--accent-color);
    font-weight: 800;
}

/* Theme Toggle Button */
#theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 20px;
    transition: transform 0.3s;
}

#theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    color: var(--accent-color);
}

.nav-extras {
    margin-left: auto;
    margin-right: 20px;
    display: flex;
    align-items: center;
}

/* Hero Section */
#hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Overlay darkness */
    background: radial-gradient(circle, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.hero-content {
    z-index: 10;
    max-width: 800px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 5px;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.hero-tagline {
    font-size: 1.2rem;
    font-style: italic;
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 50px;
    opacity: 0.9;
}

/* Glitch Effect Simple */
.glitch {
    position: relative;
    color: white;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(90px, 9999px, 80px, 0);
    }

    60% {
        clip: rect(20px, 9999px, 50px, 0);
    }

    80% {
        clip: rect(60px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 90px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(80px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(20px, 9999px, 40px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    60% {
        clip: rect(60px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(30px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(90px, 9999px, 10px, 0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-indicator .line {
    width: 1px;
    height: 50px;
    background-color: white;
    animation: scrollInfo 2s infinite;
}

@keyframes scrollInfo {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Sections General */
section {
    padding: 100px 50px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    text-align: center;
    /* Center align by default for better look */
    margin-bottom: 50px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 2px;
    bottom: -5px;
    left: 20%;
    background-color: var(--accent-color);
}

.section-subtitle {
    color: var(--secondary-text);
    font-size: 1.1rem;
    margin-top: 15px;
    font-weight: 300;
}

/* About Grid & Skills */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

@media(min-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-text p {
    margin-bottom: 20px;
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.about-text p.lead {
    font-size: 1.5rem;
    color: white;
    font-weight: 300;
    line-height: 1.4;
}

.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-category ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-category li {
    position: relative;
    padding-bottom: 5px;
}

.skill-name {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

.skill-bar {
    display: block;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    position: relative;
}

.skill-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Fixed horizontal scroll issue caused by 100vw */
    height: 100%;
    background: var(--glass-border);
    z-index: -1;
}

/* Actually, let's wrap bar in a container for correct background */
.skill-category li {
    display: flex;
    flex-direction: column;
}

.skill-bar {
    display: block;
    height: 4px;
    background: var(--accent-color);
    width: 0;
    /* JS or inline style sets width */
    transition: width 1s ease-out;
}

.skill-category li::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--glass-border);
    z-index: -1;
    border-radius: 2px;
}

/* Trusted Clients */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    justify-items: center;
    align-items: center;
    margin-top: 40px;
}

@media (max-width: 900px) {
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .clients-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        /* Ensure centering explicitly */
        text-align: center;
    }

    .client-logo {
        margin: 0 auto;
        /* Extra safety for block behavior */
    }
}

.client-logo {
    height: 80px;
    width: 100%;
    /* Ensure it takes full cell width to center properly if grid items align stretch */
    max-width: 200px;
    /* Prevent it from being too wide on mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
    opacity: 0.6;
    padding: 10px;
}

.client-logo img {
    height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* Force white color */
}

/* Specific adjustments for logo sizes */
.client-logo[title="Grupo Planeta"] img {
    transform: scale(1.7);
    /* Boosted to 1.7 */
}

.client-logo[title="EAE Business School"] img {
    transform: scale(0.9);
}

.client-logo[title="Aulaplaneta"] img {
    transform: scale(0.6);
}

.client-logo[title="Ostelea"] img {
    transform: scale(1.4);
    /* Boosted size */
}

.client-logo[title="Artika Books"] img {
    transform: scale(1.5);
    /* Boosted size */
}

.client-logo[title="Profesional Direct Sales"] img {
    transform: scale(2.2);
    /* Increased to 2.2 */
}

.client-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

.client-logo[title="Grupo Planeta"]:hover img {
    transform: scale(1.8);
    /* Boosted hover */
}

.client-logo[title="EAE Business School"]:hover img {
    transform: scale(1.0);
}

.client-logo[title="Aulaplaneta"]:hover img {
    transform: scale(0.7);
}

.client-logo[title="Ostelea"]:hover img {
    transform: scale(1.5);
}

.client-logo[title="Artika Books"]:hover img {
    transform: scale(1.6);
}

.client-logo[title="Profesional Direct Sales"]:hover img {
    transform: scale(2.4);
}

.client-logo.text-only {
    filter: none;
    opacity: 1;
    color: var(--secondary-text);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
}

.client-logo.text-only:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Button Main */
.hero-actions {
    margin-bottom: 40px;
}

.btn-main {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-main:hover {
    background: var(--accent-color);
    color: black;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 100%;
    background: var(--glass-border);
}

.timeline-item {
    margin-left: 30px;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-content h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1.2rem;
    color: var(--secondary-text);
    margin-bottom: 15px;
    font-weight: 400;
}

.timeline-content ul {
    list-style: disc;
    margin-left: 20px;
    color: var(--secondary-text);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

.portfolio-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0.6;
    transition: 0.3s;
}

.portfolio-item:hover .item-overlay {
    opacity: 0.8;
}

.item-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
    transform: translateY(10px);
    transition: 0.3s;
}

.portfolio-item:hover .item-info {
    transform: translateY(0);
}

.item-info h3 {
    font-family: var(--font-heading);
    color: white;
    font-size: 1.5rem;
}

.item-info p {
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact */
.contact-wrapper {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.contact-btn {
    padding: 15px 30px;
    background: var(--accent-color);
    color: black;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
}

.contact-btn.outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    padding: 50px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    nav {
        padding: 20px;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
    }

    .menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: white;
        margin: 5px auto;
        transition: 0.3s;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(5, 5, 5, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        backdrop-filter: blur(10px);
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list li {
        margin: 15px 0;
    }

    .section-title h2 {
        font-size: 2.5rem;
    }
}

/* Video Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 900px;
    background: #000;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent-color);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.play-icon {
    font-size: 3rem;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    transition: 0.3s;
    z-index: 10;
}

.portfolio-item:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
    color: var(--accent-color);
}

/* Experience Stat */
.experience-stat {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.stat-number::after {
    content: '+';
    font-size: 3rem;
    vertical-align: super;
    opacity: 0.8;
}

.stat-label {
    font-size: 1rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-text);
    border-left: 2px solid var(--accent-color);
    padding-left: 15px;
}

/* Stats Container & Cert Badge */
.stats-container {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.experience-stat {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 5rem;
    /* Match number size */
    color: var(--accent-color);
    line-height: 1;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    min-width: 80px;
    /* Ensure space for icon */
    text-align: center;
}

.stat-label strong {
    color: white;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 2px;
}

/* Specialties Grid */
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

@media (max-width: 900px) {
    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .specialties-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}

.specialty-item {
    /* flex: 1; removed */
    /* min-width: 120px; removed */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    transition: 0.3s;
    height: 100%;
    /* Ensure equal height */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.specialty-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.specialty-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
}

.specialty-item h4 {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 600;
    min-height: 2.2em;
    /* Ensure 2 lines of space to align all items */
    display: flex;
    align-items: center;
    justify-content: center;
}

.specialty-item p {
    font-size: 0.8rem;
    color: var(--secondary-text);
    margin: 0;
}

/* Education Section */
.education-section {
    margin-top: 80px;
    /* border-top: 1px solid var(--glass-border); removed */
    /* padding-top: 50px; removed */
}

.education-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
    font-family: var(--font-heading);
}

.education-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.edu-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--glass-bg);
    padding: 20px 30px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
    min-width: 350px;
}

.edu-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.edu-logo {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    padding: 10px;
    /* added padding */
}

.edu-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.edu-icon {
    font-size: 1.5rem;
    color: var(--secondary-text);
}

.edu-info h4 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 5px;
}

.edu-info p {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.edu-info .year {
    font-size: 0.8rem;
    color: var(--secondary-text);
    font-style: italic;
}