@charset "utf-8";

/*
   Assignment 6 - Personal Website
   Author: Evan Barth
   Date:   06/10/2026
   Filename: personal.css
*/


html {
   background-color: hsl(140, 30%, 75%);
}

body {
   font-family: Verdana, Geneva, sans-serif;
   color: rgb(91, 91, 91);
   background-color: ivory;
}

header {
   text-align: center;
   padding: 0;
}

header img {
   width: 100%;
}

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

h2 {
   font-size: 1.3em;
}

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

nav li {
   display: block;
}

nav a {
   display: block;
   background-color: rgb(45, 90, 45);
   line-height: 2.8em;
   text-decoration: none;
   text-align: center;
   color: rgb(255, 255, 255);
}

nav a:hover {
   background-color: rgb(204, 85, 0);
   color: rgb(255, 255, 255);
   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;
}

.clear {
   clear: both;
}

hr {
   border: none;
   border-top: 2px solid rgb(45, 90, 45);
   margin: 20px 0;
}

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

body > footer a {
   color: rgba(255, 255, 255, 0.6);
}

ol {
   list-style-type: upper-roman;
}

.gallery {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   padding: 10px 0;
}

.gallery-item {
   overflow: hidden;
}

.gallery-item img {
   width: 100%;
   height: 200px;
   object-fit: cover;
   display: block;
}


table {
   width: 100%;
   border-collapse: collapse;
   margin-top: 20px;
}

th, td {
   border: 1px solid rgb(45, 90, 45);
   padding: 12px 15px;
   text-align: left;
}

thead {
   background-color: rgb(45, 90, 45);
   color: rgb(255, 255, 255);
}

thead th {
   border-color: rgb(30, 65, 30);
}

tbody tr:nth-child(odd) {
   background-color: ivory;
}

tbody tr:nth-child(even) {
   background-color: rgb(220, 235, 215);
}

tbody tr:hover {
   background-color: rgb(255, 235, 200);
}

tfoot {
   background-color: rgb(204, 85, 0);
   color: rgb(255, 255, 255);
   font-style: italic;
   font-size: 0.9em;
   text-align: center;
}

tfoot td {
   border-color: rgb(160, 65, 0);
   text-align: center;
}



fieldset {
   border: 2px solid rgb(45, 90, 45);
}

legend {
   font-weight: bold;
   color: rgb(45, 90, 45);
   padding: 0 5px;
}

input:focus,
select:focus,
textarea:focus {
   outline: 3px solid rgb(204, 85, 0);
   background-color: rgb(255, 248, 235);
}

input:required:valid,
select:required:valid {
   border: 2px solid rgb(45, 90, 45);
}

input:required:invalid,
select:required:invalid {
   border: 2px solid rgb(180, 0, 0);
   background-color: rgb(255, 240, 240);
}



@media only screen and (min-width: 769px) {

   html {
      background-image: url("bg.jpg");
      background-repeat: no-repeat;
      background-position: center center;
      background-size: cover;
   }

   body {
      width: 90%;
      margin-left: auto;
      margin-right: auto;
   }

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

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

   .gallery-item {
      width: calc(25% - 8px);
   }

   form {
      width: 90%;
   }

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

   input, select, textarea {
      display: block;
      position: relative;
      left: 30%;
      padding: 5px;
      height: auto;
      width: 60%;
   }

   label {
      display: block;
      position: absolute;
      padding: 5px;
      width: 30%;
   }

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

   label.radio {
      display: inline;
      position: inherit;
   }

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

}



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

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

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

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

   main > img {
      width: 90%;
      float: none;
   }

   .gallery-item {
      width: calc(50% - 5px);
   }

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

   thead tr {
      position: absolute;
      top: -9999px;
      left: -9999px;
   }

   tbody tr {
      border: 2px solid rgb(45, 90, 45);
      margin-bottom: 15px;
      background-color: ivory;
   }

   tbody tr:nth-child(even) {
      background-color: rgb(220, 235, 215);
   }

   td {
      border: none;
      border-bottom: 1px solid rgb(200, 225, 200);
      position: relative;
      padding: 10px 10px 10px 50%;
      min-height: 40px;
   }

   td::before {
      content: attr(data-label);
      position: absolute;
      left: 10px;
      width: 44%;
      font-weight: bold;
      color: rgb(45, 90, 45);
   }

   tfoot tr {
      position: static;
      border: 2px solid rgb(160, 65, 0);
      background-color: rgb(204, 85, 0);
   }

   tfoot td {
      padding: 10px;
      color: rgb(255, 255, 255);
      text-align: center;
   }

   tfoot td::before {
      content: none;
   }

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

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

   input, select, textarea {
      position: inherit;
      display: block;
      height: 50px;
      padding: 5px;
      width: 90%;
   }

   label {
      position: inherit;
      display: block;
      height: 50px;
      width: 90%;
   }

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

}


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

   .gallery-item {
      width: 100%;
   }

}
