﻿@charset "utf-8";

@media only screen and (min-width: 769px) {
    html 
    {
        background-image: url("background.jpg");
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
    }
}

body 
{
    font-family: Verdana, Geneva, sans-serif;
    color: rgb(91, 91, 91);
    background-color: ivory;
    width: 90%;
    margin: 0 auto;
}

header 
{
    text-align: center;
    padding: 20px;
}

header img 
{
    width: 100%;
}

h1, h2 
{
    text-shadow: 4px 6px 5px gray;
}

h2 
{
    font-size: 1.3em;
}
*/* nav
{background-color: rgb(120, 99, 71);
padding: 15px;
text-align: center;}
nav > a 
{padding-left: 10px;
padding-right: 10px;
text-decoration: none;
color: rgb(0, 0, 0);}
nav > a:hover
{text-decoration: underline;
color: rgb(0, 0, 255);} */*

nav ul 
{
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li 
{
    display: block;
    width: 20%;
    float: left;
}

nav a 
{
    display: block;
    background-color: rgb(120, 99, 71);
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color: black;
}

nav a:hover 
{
    background-color: black;
    color: white;
    font-size: 1.2em;

    transition:
        background-color 0.5s ease-in 0.2s,
        color 0.5s ease-in 0.2s,
        font-size 1s ease;
}

main 
{
    padding: 20px;
    margin-top: 70px;
}

main > img 
{
    float: right;
    width: 25%;
    padding: 25px;
}

ul 
{
    list-style-type: square;
}

table 
{
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: rgb(255, 255, 240);
}

th, td 
{
    border: 1px solid black;
    padding: 8px;
    text-align: left;
}

thead 
{
    background-color: rgb(120, 99, 71);
    color: white;
}

tfoot 
{
    background-color: rgb(255, 255, 240);
    text-align: center;
    font-style: italic;
}

body > footer 
{
    background-color: black;
    color: rgba(102, 102, 102, 0.6);
    font-weight: bold;
    font-size: 0.9em;
    line-height: 3em;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    clear: both;
}

.grid 
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.grid img 
{
    width: 100%;
}

form 
{
    width: 90%;
    margin: 20px auto;
}

fieldset 
{
    width: 90%;
    padding: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
}

label 
{
    display: block;
    width: 30%;
    padding: 5px;
    font-weight: bold;
    position: relative;
}

input, select, textarea 
{
    display: block;
    width: 60%;
    padding: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
    position: relative;
}

input[type="radio"] 
{
    display: inline;
    width: auto;
    position: inherit;
}

label.radio 
{
    display: inline;
    position: inherit;
    margin-right: 15px;
}

input[type="submit"],
input[type="reset"] 
{
    display: block;
    float: left;
    width: 40%;
    padding: 10px;
    margin-left: 5%;
    margin-right: 5%;
    margin-bottom: 10px;
    text-align: center;
}

input:focus, select:focus, textarea:focus 
{
    border: 2px solid blue;
    outline: none;
}

input:valid, select:valid, textarea:valid 
{
    border: 2px solid green;
}

input:invalid, select:invalid, textarea:invalid 
{
    border: 2px solid red;
}

@media only screen and (max-width: 768px) {

    body 
    {
        width: 100%;
        margin: 0;
    }

    nav li 
    {
        float: none;
        width: 100%;
        font-size: x-large;
    }

    nav a 
    {
        border-bottom: 1px solid black;
    }

    main > img 
    {
        float: none;
        width: 90%;
        padding: 10px;
        display: block;
        margin: 0 auto;
    }

    table, thead, tbody, th, td, tr 
    {
        display: block;
    }

    thead 
    {
        display: none;
    }

    tr 
    {
        margin-bottom: 20px;
        border: 1px solid rgb(102, 102, 102);
        padding: 10px;
        background-color: rgb(255, 255, 240);
    }

    td 
    {
        border: none;
        position: relative;
        padding: 8px;
        text-align: left;
        white-space: normal;
    }

    td:nth-of-type(1)::before { content: "Name: "; font-weight: bold; }
    td:nth-of-type(2)::before { content: "Relationship: "; font-weight: bold; }
    td:nth-of-type(3)::before { content: "Birthday: "; font-weight: bold; }
    td:nth-of-type(4)::before { content: "Fun Fact: "; font-weight: bold; }

    td::before 
    {
        display: inline-block;
        width: 120px;
        vertical-align: top;
    }

    form 
    {
        width: 100%;
        font-size: large;
    }

    fieldset 
    {
        width: 100%;
        padding: 5px;
        margin: 0;
    }

    label 
    {
        width: 90%;
        height: 50px;
        margin-bottom: 5px;
        position: inherit;
    }

    input, select, textarea 
    {
        width: 95%;
        height: 50px;
        padding: 5px;
        margin-bottom: 15px;
        position: inherit;
    }

    input[type="submit"],
    input[type="reset"] 
    {
        float: none;
        width: 90%;
        margin: 10px auto;
        font-size: 1.2em;
    }
}