@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('/assets/fonts/jetbrains-mono.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --color-bg: #0a192f;
    --color-bg-alt: #112240;
    --color-bg-card: #1a2d4e;
    --color-text-primary: #e6f1ff;
    --color-text-secondary: #ccd6f6;
    --color-text-muted: #8892b0;
    --color-accent: #64ffda;
    --color-accent-hover: #45e0be;
    --color-border: #233554;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 1200px;
    --nav-height: 80px;
}

*,
*:before,
*:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--color-accent-hover);
}

h1,
h2,
h3,
h4 {
    color: var(--color-text-primary);
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

@media (max-width:768px) {
    .section {
        padding: 3rem 0
    }
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 25, 47, .85);
    backdrop-filter: blur(10px);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    transition: background .3s;
    border-bottom: 1px solid var(--color-border);
}

.header.scrolled {
    background: rgba(10, 25, 47, .95);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo svg {
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--color-text-secondary);
    transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-accent);
    transition: transform .3s, opacity .3s;
    border-radius: 2px;
}

.nav-toggle.active .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width:768px) {
    .nav-toggle {
        display: flex
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 25, 47, .98);
        backdrop-filter: blur(10px);
        padding: 1rem 0;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform .3s, opacity .3s, visibility .3s;
        border-bottom: 1px solid var(--color-border)
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible
    }

    .nav-links li {
        width: 100%
    }

    .nav-links a {
        display: block;
        padding: .75rem 1.5rem;
        font-size: .95rem
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(100, 255, 218, .05)
    }
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
}

.hero-content {
    max-width: 700px;
}

.hero-greeting {
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: .95rem;
    margin-bottom: 1.5rem;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--color-text-primary);
}

.hero-subtitle {
    font-size: clamp(1.3rem, 3vw, 2.5rem);
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-description {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    /* max-width: 580px; */
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width:768px) {
    .hero-description {
        font-size: 1rem
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s;
    border: none;
}

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

.btn-primary:hover {
    background: #64ffda1a;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    white-space: nowrap;
}

.section-title::after {
    content: '';
    display: block;
    height: 1px;
    width: 100%;
    max-width: 300px;
    background: var(--color-border);
}

.section-number {
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 400;
}

.tag {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 4px;
    background: #64ffda14;
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: .8rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform .2s, border-color .2s;
}

.skill-category:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
}

.skill-category-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.skill-list {
    list-style: none;
    padding: 0;
}

.skill-list li {
    padding: .35rem 0;
    color: var(--color-text-secondary);
    font-size: .85rem;
}

.skill-list li::before {
    content: '▹';
    color: var(--color-accent);
    margin-right: .5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    transition: transform .2s, border-color .2s;
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
}

.service-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.15rem;
    margin-bottom: .75rem;
    color: var(--color-text-primary);
}

.service-description {
    color: var(--color-text-muted);
    font-size: .9rem;
    line-height: 1.7;
    margin: 0;
}

.cta-box {
    margin-top: 4rem;
    text-align: center;
    padding: 3rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.cta-box h3 {
    margin-bottom: 1rem;
}

.cta-box p {
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto 2rem;
}

@media (max-width:768px) {
    .services-grid {
        grid-template-columns: 1fr
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform .2s, border-color .2s;
    container-type: inline-size;
    container-name: card;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-folder svg {
    display: block;
}

.project-link {
    color: var(--color-text-muted);
    transition: color .2s;
}

.project-link:hover {
    color: var(--color-accent);
}

.project-title {
    font-size: 1.2rem;
    margin-bottom: .75rem;
    color: var(--color-text-primary);
}

.project-description {
    color: var(--color-text-muted);
    font-size: .85rem;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1.5rem;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
}

.project-tags {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.project-status {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--color-accent);
}

@media (max-width:768px) {
    .projects-grid {
        grid-template-columns: 1fr
    }
}

.page-header {
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 0;
}

.page-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
    /* max-width: 600px; */
    margin-bottom: 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: flex-start;
}

.contact-heading {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact-text {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--color-text-secondary);
    font-size: .95rem;
    transition: color .2s;
}

.contact-method:hover {
    color: var(--color-accent);
}

.contact-form {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    font-size: .8rem;
    margin-bottom: .5rem;
}

.form-input {
    width: 100%;
    padding: .75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    font-size: .95rem;
    transition: border-color .2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--color-accent);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-note {
    margin-top: 1rem;
    font-size: .8rem;
    color: var(--color-text-muted);
}

@media (max-width:768px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem
    }
}

.thanks {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
}

.thanks-content {
    max-width: 500px;
}

.thanks-icon {
    margin-bottom: 1.5rem;
}

.thanks-icon svg {
    display: inline-block;
}

.thanks-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.thanks-text {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.thanks-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.not-found {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
}

.not-found-content {
    max-width: 500px;
}

.not-found-code {
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 700;
    color: var(--color-accent);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 1rem;
}

.not-found-title {
    margin-bottom: 1rem;
}

.not-found-text {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.footer {
    border-top: 1px solid var(--color-border);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-info {
    text-align: left;
}

.footer-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.footer-title {
    font-size: .85rem;
    color: var(--color-text-muted);
    margin: .25rem 0 0;
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-links a {
    color: var(--color-text-muted);
    transition: color .2s;
    display: flex;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    font-size: .8rem;
    color: var(--color-text-muted);
    margin: 0;
}

@media (max-width:768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem
    }

    .footer-info {
        text-align: center
    }
}

.trust-box {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg,
            rgba(100, 255, 218, 0.08),
            rgba(100, 255, 218, 0.02));
    border: 1px solid rgba(100, 255, 218, 0.15);
    border-radius: 12px;
    text-align: center;
}

.trust-box p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.8;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.project-content-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
}

.project-text {
    flex: 1;
}

.project-thumb {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-thumb-img:hover {
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 85%;
    max-height: 85%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

@container card (max-width: 480px) {
    .project-content-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .project-thumb {
        width: 100%;
        height: 140px;
    }
}


@keyframes subirSuave {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.animar-entrada {
  opacity: 0;
  animation: subirSuave 0.8s ease-out forwards;
}

@keyframes aparecer {
  from { opacity: 0; }
  to { opacity: 1; }
}

.elemento-uno {
  opacity: 0;
  animation: aparecer 2s ease-out forwards;
}

.elemento-dos {
  opacity: 0;
  animation: aparecer 2s ease-out 0.4s forwards;
}

.elemento-tres {
  opacity: 0;
  animation: aparecer 2.5s ease-out 0.8s forwards;
}


@media (max-width: 992px) {
    .project-content-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .project-thumb {
        width: 100%;
        height: 140px;
    }

    .project-thumb img {
        object-position: center;
    }
}