@charset "utf-8";

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

body {
    font-family: "trebuchet ms", arial, helvetica, sans-serif;
    background-color: orange;
    min-height: 100vh;
    
    display: grid;
    grid-template-rows: auto 1fr auto;
}

img {
    /* para que una imagen nunca sea mayor
        que la caja que las contiene */
    max-width: 100%;
    height: auto;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 0.5em;
}

header,
footer {
    background-color: darkcyan;
    padding: .25em;
    flex-grow: 0;
}

header {
    height: 3em;
}

header > div {
    
    /* caja flexible */
    display: flex;
    
    /* elementos colocados en los extremos del eje principal */
    justify-content: space-between;
    
    /* elementos centrados en el eje secundario */
    align-items: center;
}

#logo {
    display: block;
    width: 5em;
}

header ul {
    list-style: none;
    
    /* caja flexible */
    display: flex;
}

header ul li {
    width: 2em;
    height: 2em;
    margin-left: .25em;
    
    /* caja flexible */
    display: flex;

}

header ul li a {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.75);
    color: white;
    text-decoration: none;
    font-weight: bold;

    /* caja flexible */
    display: flex;
    
    /* centrado en la horizontal */
    justify-content: center;

    /* centrado en la vertical */
    align-items: center;
    

}

main {
    background-color: white;
    
    display: grid;
    grid-template-columns: 1fr 20em 1fr;
    grid-template-rows: 1fr auto 4em 2em 1fr;
}

.usuario {
    text-align: center;
    grid-area: 2 / 2 / 3 / 3;
}

.usuario img {
    border-radius: 50%;
    width: 50vw;
    height: 50vw;
    max-width: 15em;
    max-height: 15em;
    border: .25em solid grey;
    box-shadow: 0 .35em .5em rgba(0, 0, 0, .35) inset, 0 .35em .5em rgba(0, 0, 0, .35);
}

section {
    grid-area: 4/2/5/3;
    text-align: center;
}

section a {
    color: darkcyan;
    text-decoration: none;
}

section a:hover {
    color: #005050;
    text-decoration: underline;
}

footer {
    height: auto;
    padding: 1em
}

footer p {
    max-width: 30em;
    margin: 0 auto;
}

/* ****************
 *  mediaqueries  *
 **************** */

/* a partir de un ancho de 480px */

@media ( min-width: 30em ) {
    
    .usuario {

    }
    
    .usuario img {

    }
}

/* a partir de un ancho de 640px */

@media ( min-width: 40em ) {
    
    main {
        background-color: rgba(230, 197, 197, 0.51);
        grid-template-columns: 1fr 30em 1fr;

    }
    
    .usuario {
        text-align: left;
        display: grid;
        grid-template-columns: 5em 1fr;
        grid-template-rows: auto 1fr;
        grid-gap: 1em;
    }
    
    .usuario * { margin: 0; }
    
    .usuario img {
        grid-area: 1 / 1 / 3 / 2;
        height: 5em;
        width: 5em;
    }
    
    .usuario h3 {
        grid-area: 1 / 2 / 2 / 3;
    }
    
    .usuario p {
        grid-area: 2 / 2 / 3 / 3;
    }

}