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

:root {
    --side-padding: 100px; 
    --vertical-padding: 38px; 
    --nav-height: 72px; /* altura fija de la barra superior */
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background: radial-gradient(circle at center, #0f1511 0%, #070b08 100%);
    color: #b6ff9f;
    line-height: 1.6;
    padding-top: calc(var(--nav-height) + 8px); /* espacio para que el contenido no quede debajo del nav */
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px var(--side-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(11, 15, 12, 0.95);
    min-height: var(--nav-height);
    z-index: 999; /* asegurar que quede por encima del contenido */
}

nav a {
    text-decoration: none;
    color: #b6ff9f;
    margin-left: 20px;
    transition: 0.3s;
    font-size: 1.05rem; 
}

nav a:hover {
    color: #4cff88;
}

.hero {
    min-height: 55vh; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--vertical-padding) var(--side-padding);
}

.hero h1 {
    font-size: 3rem;
}

.hero-avatar img {
    width: 180px;
    border-radius: 50%;
    border: 2px solid #4cff88;
}

.subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #7effb2;
}

.status {
    margin-top: 20px;
    color: #4cff88;
}

.section {
    padding: var(--vertical-padding) var(--side-padding);
    max-width: 10000px;
    margin: 0 auto;
}

body {
    letter-spacing: 0.5px;
}

h1, h2, h3 {
    letter-spacing: 1px;
}

.section h2 {
    margin-bottom: 30px;
    font-size: 1.5rem;
    border-bottom: 1px solid #4cff88;
    display: inline-block;
    padding-bottom: 5px;
}

.project {
    display: flex;
    flex-direction: row-reverse; /* image on the right, content on the left */
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 24px; 
}

.project-image img {
    width: 260px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(76, 255, 136, 0.15);
}

.project-content {
    flex: 1;
}

.project-content h3 {
    margin-top: 0;
}

.project-links a {
    color: #ffffff; /* GitHub link in white */
    text-decoration: none;
    background: transparent;
    padding: 6px 10px;
    border-radius: 4px;
    transition: color 0.2s ease, transform 0.15s ease;
}

.project-links a:hover {
    color: #4cff88;
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .project {
        flex-direction: column; /* stack on smaller screens */
        gap: 16px;
    }

    .project-image img {
        width: 100%;
        height: auto;
    }
}

.stack {
    font-size: 0.9rem;
    color: #7effb2;
}

.nav-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #4cff88;
}

.nav-name {
    font-size: 1rem;
}

.nav-role {
    font-size: 0.8rem;
    color: #7effb2;
}

.nav-links a {
    text-decoration: none;
    color: #b6ff9f;
    margin-left: 20px;
    transition: 0.3s;
    font-size: 1.05rem; /* tamaño de letra del navbar */
}

.nav-links a:hover {
    color: #4cff88;
}

a {
    color: inherit;
}

.tech-icons {
    display: flex;
    gap: 30px;
    font-size: 40px;
    margin-top: 20px;
}

.tech-icons i {
    transition: 0.3s;
}

.tech-icons i:hover {
    color: #4cff88;
    transform: scale(1.1);
}

.tech-item i, .tech-item img {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
    filter: grayscale(1) brightness(0) invert(68%) sepia(40%) saturate(700%) hue-rotate(80deg) contrast(1);
}

.tech-item span {
    color: #b6ff9f;
}

.contact-icons {
    display: flex;
    gap: 25px;
    font-size: 35px;
    margin-top: 20px;
}

.contact-icons a {
    transition: 0.3s;
}

.contact-icons a:hover {
    color: #4cff88;
    transform: scale(1.1);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        rgba(0, 255, 0, 0.02) 0px,
        rgba(0, 255, 0, 0.02) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.15;
}

.project {
    margin-bottom: 80px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(76,255,136,0.2);
}

.typing::after {
    content: "_";
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

/* Responsive adjustments */
.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 88px;
}

@media (max-width: 900px) {
    :root {
        --side-padding: 28px;
        --nav-height: 64px;
    }

    nav {
        padding: 12px var(--side-padding);
    }

    nav a, .nav-links a {
        font-size: 0.98rem;
    }

    .hero {
        min-height: 45vh;
        padding: 28px var(--side-padding);
        flex-direction: column;
        gap: 18px;
        align-items: flex-start;
    }

    .hero-avatar img {
        width: 120px;
    }

    .project {
        gap: 18px;
    }

    .project-image img {
        width: 220px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    :root {
        --side-padding: 16px;
        --nav-height: 56px;
    }

    nav {
        padding: 10px var(--side-padding);
    }

    .nav-profile .nav-name,
    .nav-profile .nav-role {
        display: none; /* show only avatar to save space */
    }

    .nav-profile img {
        width: 36px;
        height: 36px;
    }

    nav a {
        font-size: 0.95rem;
        margin-left: 12px;
    }

    .hero {
        min-height: 42vh;
        padding: 18px var(--side-padding);
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .tech-item {
        width: 72px;
    }

    .tech-item i, .tech-item img {
        width: 26px;
        height: 26px;
    }

    .project {
        flex-direction: column;
        gap: 12px;
    }

    .project-image img {
        width: 100%;
        height: auto;
    }

    .project-links a {
        display: inline-block;
        margin-top: 8px;
    }
}