@charset "utf-8";

/* global styles */
html {
  background-color: #ddd;
}

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

/* header section */
header img {
  max-width: 100%;
  max-height: 100vh;
  width: auto;
  height: auto;
  display: block;
}

/* header image */
header img {
  width: 100%;
  display: block;
}

/* heading styles */
h2 {
  font-size: 1.3em;
}

/* text shadow for headings */
h1, h2 {
  text-shadow: 4px 6px 5px gray;
}

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

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

nav a {
  display: block;
  background-color: rgb(200, 212, 230);
  line-height: 2.8em;
  text-decoration: none;
  text-align: center;
  color: rgb(40, 60, 90);
}

nav a:hover {
  background-color: rgb(120, 50, 50);
  color: white;
}

/* clear nav floats */
nav::after {
  content: "";
  display: block;
  clear: both;
}

/* main content */
main {
  padding: 20px;
  margin-top: 35px;
}

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

/* prevent image overflow */
main img {
  max-width: 100%;
  height: auto;
}

/* clear floated images inside sections */
section::after {
  content: "";
  display: block;
  clear: both;
}

/* education list style */
main ul {
  list-style-type: square;
}

/* footer */
body > footer {
  clear: both;
  background-color: rgb(200, 212, 230);
  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;
}

/* mobile and tablet styles */
@media only screen and (max-width: 900px) {

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

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

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

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

/* desktop styles */
@media only screen and (min-width: 769px) {

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


/* Family Table Styles */

.table-wrap {
  overflow-x: auto;
}

.family-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.family-table caption {
  font-weight: bold;
  padding: 10px;
}

.family-table th,
.family-table td {
  border: 2px solid #777;
  padding: 10px;
  text-align: left;
}

.family-table thead th {
  background-color: #c8d4e6;
}

/* Zebra striping */
.family-table tbody tr:nth-child(even) {
  background-color: rgba(200, 212, 230, 0.4);
}

.family-table tfoot td {
  background-color: #c8d4e6;
  font-weight: bold;
  text-align: center;
}


/* Mobile Family Table – Card Style */

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

  .family-table thead,
  .family-table tfoot {
    display: none;
  }

  .family-table {
    border: none;
  }

  .family-table tr {
    display: block;
    margin-bottom: 1.5rem;
    border: 3px solid #777;
    background-color: #fff;
  }

  .family-table tbody tr:nth-child(even) {
    background-color: #eef2ef;
  }

  .family-table td {
    display: block;
    padding: 10px;
    border-bottom: 2px solid #777;
    text-align: left;
  }

  .family-table td:last-child {
    border-bottom: none;
  }

  .family-table td::before {
    content: attr(data-label) ":";
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
  }
}









