html {
    font-size: 16px;
}

body {
    font-family: 'Arial', sans-serif;
    color: #FFFFFF;
    background-color: #000000;
    line-height: 1.6;
    font-size-adjust: auto;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000000;    
    max-height: 48px;
	min-height:  32px;
}

header #logo {
    background-image: url("img/title.png");
    background-size: 500px 180%;
    background-position: center;
    background-repeat: no-repeat;
    height: 100%;
    width: auto;
}
header h1 {
	width: 500px;
	font-size: 20px;
	color: yellow;
    visibility: hidden;
}

h2 {
    font-size: 4em;
}

.logo img {
    margin-left: 4px;
    height: 32px;
    width: auto;
}

#music {
    width: 22%;
    min-width: 200px;
    color: white;
    margin-left: 2%;
}

nav {
    margin-right: 20px;
}

nav ul {
    display: flex;
    list-style: none;
    white-space: nowrap; /* Evita el ajuste de texto */
}

nav ul li {
    display: inline-block;
    margin-left: 20px;
	overflow: hidden;
}

nav ul li a {
    color: #FFFF00;
    text-decoration: none;
    font-weight: bold;
}

/* Hero Section */
.hero {
    animation: revealBackground 5s ease-in-out forwards; /* Animación de fondo */
    z-index: 1;
    overflow: visible;    
    text-align: center;    
    background-image: url(img/tigreninja.webp);    
}

/* Filtro granuloso que se aplica antes de mostrar la imagen */
.hero::before {
    content: '';
    position: absolute;
    top: 48px;
    left: 0;
    z-index: 2;
    animation: grainEffect 5s steps(20) forwards;
}

.hero, .hero::before {
	background-color: black;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
	height: 100vh;
    width: 100%;
    padding: 10px 0px;
    margin-bottom: 60px;
    margin-top: 16px;
}

/* Animación para revelar la imagen de fondo */
@keyframes revealBackground {
    0% {
        background-color: #000000;
        background-blend-mode: normal;
    }
    100% {
        background-color: transparent;
        background-blend-mode: overlay;
    }
}

/* Animación de efecto granular */
@keyframes grainEffect {
    0% {
        opacity: 1;
        filter: brightness(0.5);
    }
    100% {
        opacity: 0;
        filter: brightness(1);
    }
}

.hero .slogan {
    font-size: clamp(2rem, 5vw, 3rem); /* Mínimo 1.5rem, óptimo 3vw, máximo 4rem */
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 50px;
    margin-top: 85vh;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
    color: magenta;
    background-color: black;
    opacity: 0.8;
    visibility: hidden;
}

.cta-button {
    position: static;
    background-color: #FFFF00;
    color: #000000;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #000000;
    z-index: 10;
    visibility: hidden;
}

.cta-button:hover {
    background-color: #FF0000;
    color: #FFFFFF;    
}

/* About Section */
.about {
    padding: 3em 10%;
    background-color: #1D1241;
    text-align: justify;
    color: #ffd340;
}

.about h2, .about .imagen {
    margin: 2%;
    text-align: center;
    color: mediumpurple;
    text-decoration: underline #D2042D 3px; /* Cherry color */
}

.about h3 {
    color: #D2042D;
    font-size: 1.8em;
    margin-top: 5%;
    text-align: center;
}

.about p, .about ul {
    font-size: 1.6em;
    margin-bottom: 20px;    
}

.about strong {
    color: orangered;
}

.about a {
    color: #da70d6;
}

.about ul {
    margin: 2% 6%;
    border-bottom: 4px dotted orangered;
    border-top: 4px dotted orangered;
}

.about li {
    margin-left: 7%;
}

.about img {
    min-width: 300px;
    width: 80%;
    max-width: 600px;
}

ul.compact {
    display: flex;
}

ul.compact>li{
    flex-basis: 40%;
    padding: 20px;
}

ul.compact>li p{
    margin-right: 30px;
}

/* Projects Section */
.projects {
    padding: 60px 20px;
    background-color: #000000;
    text-align: center; 
    background-image: url(img/dojo_background.png);
    background-position: top 22px center;
    background-repeat: repeat-y; 
    background-size: 100% auto;
    margin: auto;
}

.projects h2 {
    color: orangered;
    margin: 0px auto 40px auto;
    background-image: linear-gradient(transparent, rgba(215,220,90,0.35));
    border-bottom-left-radius: 223px;
    border-bottom-right-radius: 223px;
    width: 15em;    
}

.project-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.project-card {
    background-color: ivory;
    opacity: 0.88;
    margin: 20px;
    padding: 20px;
	max-width: 300px;
    border-radius: 10px;
	width: 60%;
	min-width: 200px;
}

.project-card.wide {
	width: 80%;
	max-width: 600px;
	min-width: 300px;
}

.project-card:hover {
    color: white;
    background-color: red;
}

.project-card h3 {
    margin: 10px 0;
    font-size: 1.5em;
    color: goldenrod;
}

.project-card:hover h3 {
    color: white;
}

.project-card a {
    text-decoration: none;
    color: navy;
}

.project-card:hover a, .project-card:hover p {
    color: yellow;
}

.project-card img, .extra-post img {
	 max-width: 100%;
    height: auto;
}

.project-card img {
    width: 250px;
}

.project-card.wide img {
	width: 400px;
}

/* extra Section */
.extra {
    padding: 60px 20px;
    background-color: #4B0082;
    text-align: center;
}

.extra h2 {
    color: #FFFF00;
    margin-bottom: 40px;
}

.extra-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.extra-post {
    background-color: #000000;
    margin: 20px;
    padding: 20px;
    min-width: 300px;
	 max-width: 600px;
	 width: 40%;
    border-radius: 10px;
    border: 2px solid #FF0000;
}

.extra-post img {
    width: auto;
	 height: 40%;
	 max-height: 300px;
}

.extra-post h3 {
    margin: 10px 0;
    font-size: 1.5;
    color: #FFFF00;
}

/* Contact Section */
.contact {
    padding: 60px 20px;
    background-color: darkred;
    text-align: center;
}

.contact h2 {
    margin-bottom: 20px;
}

.contact form {
    max-width: 600px;
    margin: 0 auto;
}

.contact form input,
.contact form textarea {
    width: 100%;
    padding: 15px;
    margin: 10px 0
}

/* CÓDIGO PARA MÓVILES Y TABLETS */
@media (max-width: 768px) {
    
    html {
         font-size: 9px;
     }   

     body {
        min-width: 340px;
     }

     nav { display: none; }

    .hero h1 {
        margin-top: 20vh;
    }

    .about {
        padding: 30px 5%;
    }
    ul.compact {
        display: block;    
    }
    .hero h1 {
        margin-top: 2vh;
        width: 90%;
    }

    .cta-button {
        display: none;   
    }
}

/* Sección del Código Ninja */
#codigo_ninja {
    background-color: #1E103F;
    padding: 60px 10%;
    text-align: justify;
    color: #FFFFFF;
}

#codigo_ninja h2, #estilo_vida h2 {
    color: orangered;
    text-align: center;
}

.virtues-list {
    margin: 20px auto;
    padding: 0;
    list-style-type: none;
}

.virtues-list li {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.virtues-list li strong {
    color: #FFFF00;
}

/* Sección Estilo de Vida */
#estilo_vida {
    background-color: #4B0082;
    padding: 60px 10%;
    text-align: justify;
    color: #FFFFFF;
}

#estilo_vida ul {
    margin-top: 20px;
    list-style-type: disc;
    padding-left: 20px;
}

#estilo_vida ul li {
    margin-bottom: 15px;
    font-size: 1.2em;
}
