:root {
  --link: #00a;
  --visited: #608;
  --width: 1000px;
  --mugspace: 8rem;
  --code: 43, 91, 132;
  --databases: 33, 33, 33;
  --network: 33, 68, 33;
  --devex: 68, 33, 68;
  --devops: 33, 33, 73;
  --security: 88, 23, 23;
  --page-size: A4 portrait; /* auto is the initial value */
  --page-margin: 1cm 0;
  --page-first-margin-bottom: 1cm;
}
:where(a) {
  text-decoration: none;
}
:where(a:link) {
  color: var(--link);
}
:where(a:visited) {
  color: var(--visited);
}
@media print {
  :where(a) {
    color: var(--link);
  }
}
body,
pre {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}
header {
  container-type: inline-size;
  overflow: visible;
  padding: 0.5em 1rem;
  color: white;
  background-color: black;
  font-family: "Ubuntu", sans-serif;
  font-weight: 300;
  font-style: normal;
  overflow: hidden;
  background: black url("img/tyson-clugg.jpg") bottom right no-repeat;
  background-size: auto 95%;
  padding-right: var(--mugspace);
  transition: ease all 0.5s;
}
@media (max-width: 28rem) {
  header {
    background-size: auto 90%;
  }
}
@media (max-width: 27rem) {
  header {
    background-size: auto 85%;
  }
}
@media (max-width: 26rem) {
  header {
    background-size: auto 80%;
  }
}
@media (max-width: 25rem) {
  header {
    background-size: auto 75%;
  }
}
@media (max-width: 24rem) {
  header {
    background-size: auto 70%;
  }
}
@media (max-width: 23rem) {
  header {
    background-size: auto 65%;
  }
}
@media (max-width: 22rem) {
  header {
    background-size: auto 60%;
  }
}
@media (max-width: 21rem) {
  header {
    background-size: auto 55%;
  }
}
@media (max-width: 20rem) {
  header {
    background-size: auto 50%;
  }
}
address {
  font-family: "Ubuntu", sans-serif;
  font-weight: 300;
  font-style: normal;
  width: 100%;
  background: #aaaaaa;
}
address div {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}
@media (max-width: 600px) {
  address div {
    display: block;
  }
  address a {
    display: block;
    padding: 0.2rem;
  }
}
:is(footer:has(#card:target) ~ address) div {
    display: block;
}
:is(footer:has(#card:target) ~ address) div a {
    display: block;
    padding: 0.2rem;
}
:is(footer:has(#card:target) ~ address) a[href*="github"] {
  /* display: none; */
  color: #aaaaaa;
}
:is(footer:has(#card:target) ~ address) a[href*="github"] img {
  display: none;
}
address a {
  /* flex: 1; */
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  text-align: center;
}
address img {
  display: inline-block;
  color: white;
  height: 0.8rem;
}

h1,
h2,
h3,
h4 {
  break-after: avoid-page;
}

header h1,
header h2 {
  text-shadow: black 0.1em 0.1em 0.2em;
}
h1 {
  margin: 0.7rem 0;
  font-weight: 300;
  font-size: 2rem;
  letter-spacing: 0.1ex;
}

h2 {
  margin-bottom: 0.7rem;
  font-size: 0.82rem;
  font-weight: 400;
}
h3 {
  margin-top: 0.7rem;
  margin-bottom: 0.2rem;
  font-size: 1.1rem;
}
h4 {
  margin-top: 0.6rem;
  margin-bottom: 0.4rem;
  font-size: 1.0rem;
  font-weight: 600;
}

.volunteer h4 + *::before {
  content: "Volunteer role.";
}

header nav {
  list-style: none;
  display: block;
  padding: 0;
  font-size: 0.9rem;
  transition: ease all 0.5s;
}
@container (min-width: 20rem) and (max-width: 38.85em) {
  header nav {
    max-width: 24em;
    transition: ease all 0.5s;
  }
}
header nav .chip {
  display: inline-block;
  background-color: currentColor;
  width: 7em;
  padding: 0 0.5rem;
  clip-path: polygon(5% 0, 100% 0, 95% 100%, 0% 100%);
  /* clip-path: polygon(95% 0%, 100% 50%, 95% 100%, 0% 100%, 5% 50%, 0% 0%); */
  margin-top: 0.5rem;
  text-align: center;
  line-height: 1.5rem;
}
header nav .chip * {
  display: inline-block;
  text-decoration: none;
}
header nav .chip *::first-line {
  color: rgba(255, 255, 255, 0.6);
}
@media screen {
  header nav .chip span {
    display: none;
  }
}
@media print {
  header nav .chip a {
    display: none;
  }
}

main {
  margin: 0.2rem 0.5rem;
}

ul {
  padding-left: 1.5em;
}

@media screen {
  address {
    text-align: center;
  }
  main,
  header > *,
  address div {
    max-width: var(--width);
    margin: auto;
  }
  main:not(#invalid) {
    margin: 0.2rem auto;
  }
  main > * {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  header > * {
    padding-left: calc(50% - ((max(100%, var(--width)) - var(--mugspace)) / 2));
  }
}
@media print {
  @page {
    size: var(--page-size); /* auto is the initial value */
    padding: 0mm;
    margin: var(--page-margin);
  }
  @page :first {
    margin: 0mm;
    margin-bottom: var(--page-first-margin-bottom);
  }
  body {
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
  }
  header {
    padding: 1cm;
    padding-bottom: 2mm;
    background-size: auto 81%;
  }
  header h1 {
    margin-top: 0%;
  }
  address div {
    padding: 0 1cm;
  }
  main {
    margin: 5mm 1cm;
    margin-bottom: 0mm;
  }
  .screen {
    display: none;
  }
  section {
    break-inside: avoid-page;
  }
}

nav .chip:has(#code) {
  color: rgb(var(--code));
}
:is(header:has(#code:hover) ~ main) .code,
:is(header:has(#code:target) ~ main) .code {
  background-color: rgba(var(--code), 0.2);
}

nav .chip:has(#databases) {
  color: rgb(var(--databases));
}
:is(header:has(#databases:hover) ~ main) .databases,
:is(header:has(#databases:target) ~ main) .databases {
  background-color: rgba(var(--databases), 0.2);
}

nav .chip:has(#network) {
  color: rgb(var(--network));
}
:is(header:has(#network:hover) ~ main) .network,
:is(header:has(#network:target) ~ main) .network {
  background-color: rgba(var(--network), 0.2);
}

nav .chip:has(#devex) {
  color: rgb(var(--devex));
}
:is(header:has(#devex:hover) ~ main) .devex,
:is(header:has(#devex:target) ~ main) .devex {
  background-color: rgba(var(--devex), 0.2);
}

nav .chip:has(#devops) {
  color: rgb(var(--devops));
}
:is(header:has(#devops:hover) ~ main) .devops,
:is(header:has(#devops:target) ~ main) .devops {
  background-color: rgba(var(--devops), 0.2);
}

nav .chip:has(#security) {
  color: rgb(var(--security));
}
:is(header:has(#security:hover) ~ main) .security,
:is(header:has(#security:target) ~ main) .security {
  background-color: rgba(var(--security), 0.2);
}

.references > div {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  flex-wrap: wrap;
  break-inside: avoid-page;
}
.references > div > * {
  zoom: 70%;
  display: block;
  break-inside: avoid-page;
  /* width: clamp(10em, 10em, 100em); */
  flex-basis: 35ex;
  /* flex: 1; */
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  /* border: solid 1px rgba(0, 0, 0, 0.1); */
  border-radius: 0.2rem;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.25);
  /* background: rgba(0, 0, 0, 0.01); */
  background-image: radial-gradient(
    ellipse farthest-corner at 10px 10px,
    #eee,
    #ddd 5%,
    #fff 2%
  );
  background-size: 5px 5px;
}
.references > div > *::first-line {
  font-weight: bold;
}
/*
background-color: #e5e5f7;
opacity: 0.8;
*/
