/* Base Styles & Variables */
:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --text-light: #555555;
    --dark-bg: #111111;
    --dark-text: #ffffff;
    --dark-text-light: #cccccc;
    --border-color: #e5e5e5;
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    margin-top: 0;
    line-height: 1.2;
}

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

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.section {
    padding: 8rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
}

/* Typography Utilities */
p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: var(--text-light);
}

strong {
    font-weight: 600;
    color: var(--text-color);
}

.text-center {
    text-align: center;
}

/* Button */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--text-color);
    color: var(--bg-color);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--text-color);
    margin-top: 2rem;
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--text-color);
}

.dark-bg .btn {
    background-color: var(--dark-text);
    color: var(--dark-bg);
    border-color: var(--dark-text);
}

.dark-bg .btn:hover {
    background-color: transparent;
    color: var(--dark-text);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.menu-toggle {
    display: none;
}

.nav-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.logo img {
    height: 180px;
    width: auto;
    transition: var(--transition-smooth);
}

.navbar.scrolled .nav-container {
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
}

.navbar.scrolled .logo img {
    height: 45px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;
    display: inline-block;
    color: transparent; /* Hide original text */
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 6px 0;
    overflow: visible;
}

.nav-links a::before,
.nav-links a::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 6px; /* Match padding */
    color: var(--text-color);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-links a::before {
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.nav-links a::after {
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
}

.nav-links a .cut-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-color);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.nav-links a .scissor {
    position: absolute;
    top: 50%;
    left: -20px;
    transform: translateY(-50%) rotate(0deg);
    color: var(--text-color);
    font-size: 16px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 10;
}

/* Hover & Active States */
.nav-links a:hover::before,
.nav-links a.active::before {
    transform: translateY(-3px) skewX(-10deg);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: translateY(3px) skewX(-10deg);
}

.nav-links a:hover .cut-line,
.nav-links a.active .cut-line {
    width: 100%;
}

.nav-links a:hover .scissor,
.nav-links a.active .scissor {
    opacity: 1;
    left: calc(100% + 5px);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding-top: 280px; /* offset for larger navbar */
    box-sizing: border-box;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-color);
    margin-bottom: 0;
}

.hero-image {
    flex: 1;
    height: 70vh;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-position: center;
    filter: grayscale(100%);
    transition: transform 1.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 6rem;
}

.about-image {
    flex: 1;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    filter: grayscale(100%);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

/* Editorial Section (Capacitaciones) */
.editorial-section {
    background-color: var(--bg-color);
}

.editorial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 2rem;
}

.left-align {
    text-align: left;
    margin-bottom: 0;
}

.editorial-subtitle {
    max-width: 400px;
    text-align: right;
    margin-bottom: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-color);
    font-weight: 500;
}

.editorial-list {
    display: flex;
    flex-direction: column;
}

.editorial-item {
    display: flex;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 4rem;
    align-items: flex-start;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.editorial-item::after {
    content: '→';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    font-family: var(--font-serif);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-item:hover {
    padding-left: 3rem;
    background-color: #fcfcfc;
    border-bottom-color: #111;
}

.editorial-item:hover::after {
    opacity: 1;
    right: 1rem;
}

.editorial-number {
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--text-color);
    line-height: 1;
    opacity: 0.2;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-item:hover .editorial-number {
    opacity: 1;
    transform: scale(1.1) translateX(10px);
}

.editorial-content {
    flex: 1;
}

.editorial-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.editorial-content p {
    font-size: 1.125rem;
    max-width: 700px;
}

/* Split Contacto Section */
.split-contacto {
    display: flex;
    min-height: 100vh;
    background-color: #f5f5f5;
    padding: 0;
    align-items: stretch;
}

.split-image {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 100%;
}

.split-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.split-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem;
    color: var(--text-color);
}

.huge-title {
    font-size: 6rem;
    font-family: var(--font-serif);
    line-height: 1;
    margin-bottom: 3rem;
}

.contact-details p {
    font-size: 1.25rem;
    max-width: 400px;
    margin-bottom: 2rem;
}

.contact-link {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-color);
    transition: var(--transition-smooth);
}

.contact-link:hover::after {
    width: 100%;
}

.social-links {
    margin-top: 4rem;
    display: flex;
    gap: 2rem;
}

.social-links a {
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    border-bottom: 1px solid transparent;
    padding-bottom: 4px;
}

.social-links a:hover {
    color: var(--text-light);
    border-color: var(--text-light);
}

/* Resources Section */
.resources-text h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.coming-soon {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-light);
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-logo {
    height: 50px;
    margin: 0 auto 2rem;
}

.footer p {
    font-size: 0.875rem;
    margin: 0;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Scroll Triggered Animations */
.scroll-anim {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
/* Hand-drawn Logo Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050505;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    /* Start completely hidden off to the top-left using a slanted polygon */
    clip-path: polygon(0 0, 0 0, -50% 100%, -50% 100%);
}

.preloader.drawing .preloader-content {
    /* Reveal diagonally to the right and bottom */
    clip-path: polygon(0 0, 150% 0, 100% 100%, -50% 100%);
    transition: clip-path 2.5s ease-in-out;
}

.logo-draw {
    width: 100%;
    height: 100%;
}

.m-path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.preloader.drawing-j .m-j {
    transition: stroke-dashoffset 0.8s ease-in-out;
    stroke-dashoffset: 0;
}

.preloader.drawing-l .m-l {
    transition: stroke-dashoffset 0.8s ease-in-out;
    stroke-dashoffset: 0;
}

.preloader.drawing-m .m-m {
    transition: stroke-dashoffset 1.2s ease-in-out;
    stroke-dashoffset: 0;
}

/* Image Reveal Animation */
.img-reveal {
    position: relative;
    overflow: hidden;
    display: block;
}

.img-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111;
    transform-origin: right;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 2;
}

.img-reveal.visible::after {
    transform: scaleX(0);
}

.img-reveal img {
    transform: scale(1.2);
    transition: transform 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-reveal.visible img {
    transform: scale(1);
}

/* Magnetic Items */
.magnetic {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .about-container, .experience-container {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    /* Navbar Mobile Fixes */
    .logo {
        display: block;
        margin: 0 auto;
        transition: var(--transition-smooth);
    }
    
    .logo img {
        height: 120px; /* Much larger logo before scroll */
        width: auto;
        margin: 0 auto;
        transition: var(--transition-smooth);
    }
    
    .navbar.scrolled .logo {
        display: none; /* Hide logo completely when scrolled */
    }
    
    .navbar {
        padding: 1.5rem 0;
        transition: var(--transition-smooth);
    }
    
    .navbar.scrolled {
        height: 60px;
        padding: 0;
        box-sizing: border-box;
    }
    
    .nav-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        padding: 0 1rem;
        height: 100%;
    }
    
    .navbar.scrolled .nav-container {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        height: 100%;
        gap: 0;
    }
    
    /* Hamburger Menu Button */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001; /* Above the navigation overlay */
        position: absolute;
        right: 2rem;
        top: 2.2rem;
        transition: var(--transition-smooth);
        padding: 0;
    }
    
    .navbar.scrolled .menu-toggle {
        top: 50%;
        transform: translateY(-50%);
        right: 2rem;
    }
    
    .hamburger-bar {
        width: 100%;
        height: 2px;
        background-color: var(--text-color);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        transform-origin: left center;
    }
    
    /* Transition to Close (X) icon */
    .navbar.open .menu-toggle .hamburger-bar:nth-child(1) {
        transform: rotate(45deg) translate(2px, -2px);
    }
    .navbar.open .menu-toggle .hamburger-bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .navbar.open .menu-toggle .hamburger-bar:nth-child(3) {
        transform: rotate(-45deg) translate(2px, 2px);
    }
    
    /* Mobile Overlay Menu */
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        z-index: 1000;
        gap: 2.5rem;
        margin: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .navbar.open .nav-links {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        margin: 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .navbar.open .nav-links li {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Animation Delays for List Items */
    .navbar.open .nav-links li:nth-child(1) { transition-delay: 0.1s; }
    .navbar.open .nav-links li:nth-child(2) { transition-delay: 0.2s; }
    .navbar.open .nav-links li:nth-child(3) { transition-delay: 0.3s; }
    .navbar.open .nav-links li:nth-child(4) { transition-delay: 0.4s; }
    
    .nav-links a {
        font-size: 1.5rem;
        color: transparent; /* Hide standard text to allow split text effect */
        padding: 10px 0;
        display: inline-block;
        position: relative;
        overflow: visible;
    }
    
    /* Re-enable Scissor Hover Animations on Mobile */
    .nav-links a::before,
    .nav-links a::after {
        display: block;
        content: attr(data-text);
        position: absolute;
        left: 0;
        top: 10px;
        color: var(--text-color);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        white-space: nowrap;
    }
    
    .nav-links a::before {
        clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    }
    
    .nav-links a::after {
        clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
    }
    
    .nav-links a .cut-line {
        display: block;
        position: absolute;
        top: 50%;
        left: 0;
        width: 0;
        height: 1px;
        background-color: var(--text-color);
        transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 5;
    }
    
    .nav-links a .scissor {
        display: inline-block;
        position: absolute;
        top: 50%;
        left: -20px;
        transform: translateY(-50%) rotate(0deg);
        color: var(--text-color);
        font-size: 18px;
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        pointer-events: none;
        z-index: 10;
    }
    
    .hero-container, .about-container, .experience-container {
        flex-direction: column;
        text-align: center;
    }
    
    .section {
        padding: 4rem 0; /* Compact general section padding on mobile */
    }
    
    .about {
        padding-top: 2rem; /* Reduce top padding specifically to bring the Bio image closer to the Hero image */
        padding-bottom: 4rem;
    }
    
    .hero {
        height: auto;
        padding-top: 220px; /* Balanced padding-top for mobile now that logo is much larger */
        padding-bottom: 2rem; /* Reduced bottom padding on mobile */
    }
    
    .hero-content h1 {
        font-size: 2.5rem; /* Smaller hero text for mobile */
    }
    
    .hero-image {
        width: 100%;
        height: 50vh;
        margin-top: 2rem;
    }
    
    .about-text h2, .experience-text h2 {
        font-size: 2rem;
    }
    
    .split-contacto {
        flex-direction: column;
    }
    .split-image {
        min-height: 50vh;
        width: 100%;
    }
    .split-image img {
        position: relative;
        height: 50vh;
    }
    .split-content {
        padding: 4rem 2rem;
        text-align: center;
    }
    .huge-title {
        font-size: 3rem; /* Scaled down for mobile */
    }
    .contact-details p {
        margin-left: auto;
        margin-right: auto;
    }
    .social-links {
        justify-content: center;
    }
    
    .editorial-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }
    .left-align {
        text-align: center;
    }
    .editorial-subtitle {
        text-align: center;
    }
    .editorial-item {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem 0;
        text-align: center;
        align-items: center;
    }
    .editorial-item:hover {
        padding-left: 0;
    }
    .editorial-number {
        font-size: 3rem;
    }
}

/* Footer Credits */
.credits {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.credits span {
    opacity: 0.5;
}

.cafesoft-link {
    font-family: var(--font-sans), system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    padding: 0 0.2rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.cafesoft-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cafesoft-link:hover {
    color: #000;
}

.cafesoft-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
