@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&display=swap');

:root {
    --bg-light: #ffffff;
    --bg-dark: #111111;
    --text-light: #f5f5f5;
    --text-dark: #111111;
    --accent: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

p {
    font-size: 0.95rem;
    line-height: 1.6;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 4rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.large-text {
    font-size: 1.15rem;
    line-height: 1.6;
    font-weight: 300;
}

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}

.custom-cursor.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 71, 87, 0.1);
    border-color: transparent;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
    color: white;
    transition: all 0.3s ease;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
}

.menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.menu a {
    text-decoration: none;
    color: white;
    font-weight: 300;
    transition: color 0.3s;
}

.menu a:hover {
    color: var(--accent);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 200;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

.split-container {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.split {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: flex 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    z-index: 1;
}

.split.left {
    background-color: #f8f8f8;
}

.split.right {
    background-color: #ececec;
}

.split:hover {
    flex: 1.2;
}

.hero-text {
    text-align: center;
    max-width: 450px;
    padding: 0 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
    z-index: 15;
}

.hero-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-center-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(250px, 40vw, 450px);
    height: 500px;
    min-height: 300px;
    background-image: url('img/face.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0;
    animation: fadeInImage 1.5s ease 0.8s forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.section {
    padding: 8rem 5%;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.dark-section {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.light-section {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 4rem;
}

.skill-list {
    list-style: none;
    margin-top: 1rem;
}

.skill-list li {
    margin-bottom: 0.8rem;
    font-weight: 300;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.work-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2.5rem;
    width: 100%;
}

.project-card {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    cursor: pointer;
}

.featured-project {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background-color: var(--bg-light);
    border: 1px solid #eaeaea;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.featured-project:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}

.project-image {
    width: 100%;
    height: 100%;
    min-height: 500px;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
}

.img-mundomagico {
    background-image: url('img/logo.png');
}

.featured-project .project-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    font-family: monospace;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: inline-block;
}

.featured-project h3 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.featured-project p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.fake-link {
    margin-top: auto;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
    align-self: flex-start;
    transition: color 0.3s;
}

.featured-project:hover .fake-link {
    color: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.service-card {
    padding: 2rem;
    border-left: 2px solid #333;
    transition: border-color 0.3s;
}

.service-card:hover {
    border-color: var(--accent);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: #aaa;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: #ddd;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    left: -2.35rem;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 4px solid var(--bg-light);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.timeline-date {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 700;
}

.timeline-content p {
    color: #666;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid var(--text-light);
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--text-light);
    color: var(--bg-dark);
}

.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide-up {
    transform: translateY(50px);
}

.fade-in {
    transform: scale(0.95);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.site-footer {
    background-color: #0a0a0a;
    color: var(--text-light);
    padding: 6rem 5% 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.footer-text h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 2rem;
    letter-spacing: -2px;
    line-height: 1.1;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid #222;
    padding-top: 2rem;
}

.socials {
    display: flex;
    gap: 2rem;
}

.socials a {
    color: var(--text-light);
    text-decoration: none;
    position: relative;
}

.socials a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}

.socials a:hover::after {
    width: 100%;
}

.copyright {
    color: #666;
    font-size: 0.9rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-light);
    color: var(--text-dark);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 8px;
    padding: 3rem;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    z-index: 10;
}

.modal-tags {
    color: var(--accent);
    font-family: monospace;
    margin-bottom: 2rem;
}

.modal-image {
    width: 100%;
    height: 350px;
    background-color: #eee;
    margin-bottom: 2rem;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.modal-actions {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.primary-btn {
    background-color: var(--accent);
    color: var(--bg-light);
    border: 2px solid var(--accent);
}

.primary-btn:hover {
    background-color: transparent;
    color: var(--accent);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid #ccc;
}

.secondary-btn:hover {
    border-color: var(--text-dark);
}

.modal-body h3 {
    margin: 2rem 0 1rem;
}

.modal-body p {
    color: #444;
}

@media (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
    * {
        cursor: auto !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .navbar {
        padding: 1.5rem 2rem;
    }

    .split-container {
        flex-direction: column;
        height: 100vh;
    }

    .split {
        width: 100%;
        height: 50vh;
        display: flex;
        flex-direction: column;
        padding: 0 2rem;
    }

    .split.left {
        justify-content: flex-start;
        padding-top: 10rem;
    }

    .split.right {
        justify-content: flex-end;
        padding-bottom: 8rem;
    }

    .hero-text {
        width: 100%;
        max-width: 550px;
    }

    .hero-text p {
        font-size: 1.2rem;
    }

    .hero-center-image {
        width: 350px;
        height: auto;
        z-index: 20;
        opacity: 0.8;
    }

    .about-grid {
        font-size: 1.5rem;
        grid-template-columns: 1fr;
        gap: 5rem;
    }

    .large-text {
        font-size: 1.6rem;
    }

    .skills {
        margin-top: 1.5rem;
    }

    .section {
        padding: 6rem 2rem;
    }

    .featured-project {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "project-image"
            "project-info";
        align-items: stretch;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    }

    .featured-project .project-image {
        min-height: 350px;
        width: 100%;
        margin: 0;
        border-radius: 12px 12px 0 0;
        grid-area: project-image;
        background-position: center;
    }

    .featured-project .project-info {
        padding: 2.5rem 2rem;
        grid-area: project-info;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1.2rem 1.5rem;
        background: rgba(17, 17, 17, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        mix-blend-mode: normal;
    }

    .hamburger {
        display: flex;
    }

    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(17, 17, 17, 0.98);
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem 0;
        gap: 2rem;
        clip-path: circle(0px at top right);
        transition: clip-path 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .menu.active {
        clip-path: circle(150% at top right);
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .split-container {
        flex-direction: column;
        height: 100vh;
    }

    .split {
        width: 100%;
        height: 50vh;
        display: flex;
        flex-direction: column;
        padding: 0 2rem;
    }

    .split.left {
        justify-content: flex-start;
        padding-top: 6rem;
    }

    .split.right {
        justify-content: flex-end;
        padding-bottom: 6rem;
    }

    .hero-center-image {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 0.7;
        width: 240px;
        height: 420px;
        z-index: 20;
    }

    .hero p {
        font-size: 1rem;
    }

    .large-text {
        font-size: 1.2rem;
    }

    .skills {
        font-size: 1.2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .skills {
        margin-top: 1.5rem;
    }

    .section {
        padding: 5rem 1.5rem;
    }

        .featured-project {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "project-image"
            "project-info";
        align-items: stretch;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    }

    .featured-project .project-image {
        min-height: 350px;
        width: 100%;
        margin-top: 10px;
        border-radius: 12px 12px 0 0;
        grid-area: project-image;
        background-position: center;
    }

    .featured-project .project-info {
        padding: 2.5rem 2rem;
        grid-area: project-info;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .modal-content {
        padding: 2.5rem 1.5rem 1.5rem;
        width: 95%;
    }

    .modal-image {
        height: 200px;
        width: 100%;
    }

    .close-modal {
        top: 1rem;
        right: 1rem;
        background: rgba(255,255,255,0.8);
        padding: 0.3rem 0.6rem;
        border-radius: 4px;
    }
}

@media (max-width: 420px) and (orientation: portrait) {
    .split {
        padding: 2rem 1.5rem;
    }

    .split.left {
        padding-top: 6rem;
        padding-bottom: 0;
    }

    .split.right {
        padding-top: 0;
        padding-bottom: 6rem;
    }

    .hero-center-image {
        width: 150px;
        height: 250px;
        opacity: 0.65;
        z-index: 10;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 220px;
        height: 300px;
        opacity: 0.65;
        z-index: 20;
        pointer-events: none;
    }

    .hero-text h1 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .hero-text p {
        font-size: 0.80rem;
        margin-bottom: 0.8rem;
    }

    .large-text {
        font-size: 1rem;
    }

    .skills {
        font-size: 1rem;
    }

    .featured-project .project-image {
        min-height: 250px;
        width: 70%;
        margin-left: 50px;
        border-radius: 12px 12px 0 0;
    }

    .featured-project {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "project-image"
            "project-info";
        align-items: stretch;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    }

    .featured-project .project-image {
        grid-area: project-image;
        background-position: center;
    }

    .featured-project .project-info {
        grid-area: project-info;
        padding: 1.25rem 1rem;
    }
}