/* general rules */

:root{
  --signature-color: #529CF8;
  --font-color: #eee;
  --font-color-faded: #ddd;
  
  --link-color: var(--signature-color);
  --link-color-hover: rgb(50,50,50);
  
  --page-background-color-even: #444;
  --page-background-color-odd: #555;
}

@media (prefers-color-scheme: dark) {
  :root{
    --signature-color: #3A83AD;
    --font-color: #ddd;
    --font-color-faded: #aaa;
    
    --page-background-color-even: #444;
    --page-background-color-odd: #333;
  }
}

/* global settings */

html {
  background-color: var(--page-background-color-odd);
  color: var(--font-color);
}

div, h1, h2 {
  /* debugging */
/*  border: 1px dashed orange;*/
}

body {
  margin: 0px;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-color-hover);
}

div.viewport-height {
  min-height: 100vh;
}

div.readable {
  max-width: 864px;
  margin: auto;
  padding-left: 32px;
  padding-right: 32px;
}

div.content {
  padding: 0px 0px 0px 0px;
}

div.content div.page:nth-child(even) {
  background-color: var(--page-background-color-even);
}

div.content div.page:nth-child(odd) {
  background-color: var(--page-background-color-odd);
}

div.mask {
/*  -webkit-filter: blur(4px);*/
/*  -moz-filter: blur(4px);*/
/*  -ms-filter: blur(4px);*/
/*  -o-filter: blur(4px);*/
/*  filter: blur(4px);*/
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

/* shrinking top bar */

div.floating-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: -1px;

  padding: 6px 0px;
  color: white;

  font-size: 10px;
  font-family: Menlo;
  
  transition: 0.2s;
}

div.floating-header.tall {
  background-color: none;
}

div.floating-header.short {
  background-color: hsla(0, 100%, 20%, 0.5);
}

div.floating-header.tall .menu-header {
  /*  transition: 2s; */
  opacity: 0;
}

div.floating-header.short .menu-header {
/*  visibility: hidden;*/
}

div.floating-header span.menu-button {
  position: absolute;
  right: 0px;
  background-color: blue;
  
  /* disable the menu for now */
  display: none;
}

div.menu {
  /* full screen */
  position: fixed;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  background-color: hsla(0.5, 100%, 100%, 0.2);
  
  transition: 0.3s;
}

div.menu.mask {
  background-color: hsla(0, 100%, 0%, 0.2);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

div.menu.mask.hidden {
  background-color: hsla(0, 100%, 0%, 0.0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
}

div.menu.hidden {
  visibility: hidden;
}

div.menu .drawer {
  background-color: hsla(0, 100%, 0%, 0.5);
  
  transition: transform 0.3s;

  position: fixed;
  top: 0px;
  right: 0px;
  bottom: 0px;
  
  transform: translateX(0%);
}

div.menu.hidden .drawer {
  transform: translateX(100%);
}

/* sections */

div.splash {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

div.splash div.border {
  border-left: 16px solid var(--signature-color);
  border-right: 16px solid var(--signature-color);
}

div.splash h1 {
/*  display: inline-block;*/
/*  transform: translate(10%, -25%);*/
  text-align: center;
  
  font-family: "Futura";
  font-variant: small-caps;
  text-transform: lowercase;
  font-weight: 100;
  font-size: 60px;
  letter-spacing: 0.1em;
}

div.splash h2 {
/*  display: inline-block;*/
/*  transform: translate(0%, 100%);*/
  text-align: center;
  
  font-family: "Futura";
  font-variant: small-caps;
  text-transform: lowercase;
  font-weight: bold;
  letter-spacing: 0.3em;
  
  padding-left: 32px;
  padding-right: 32px;
  
  color: var(--font-color-faded);
}

div.about-me table {
  padding-top: 64px;
  padding-bottom: 64px;

  font-family: Futura;
  font-size: 14px;
  letter-spacing: 1px;
}

div.about-me table .square {
  background-color: var(--signature-color);
  display: inline-block;
  width: 32px;
  height: 32px;
}

div.about-me table { }

div.about-me table tr {
  padding-bottom: 16px;
}

div.about-me table tr:last-child {
  padding-bottom: 0px;
}

div.about-me table td:nth-child(1) {
  vertical-align: top;
  height: 4em;
}

div.about-me table td:nth-child(2) {
  padding: 0px;
  padding-left: 8px;
  padding-top: 0.6em;
  vertical-align: baseline;
}

div.portfolio div.grid {
  display: grid;
  grid-gap: 20px 2px;
  grid-template-columns: 38.8% 30.6% 30.6%;
  grid-template-rows: 128px 128px 128px 128px 128px 128px;

  padding-left: 80px;
  padding-right: 80px;
  padding-top: 64px;
  padding-bottom: 64px;

  border-left: 2px dashed var(--signature-color);
  border-right: 16px dashed var(--signature-color);
  margin-right: -16px;
}

div.portfolio div.grid img {
/*  background: #555;*/
  object-fit: contain;
  width: 100%;
  height: 100%;
}

div.portfolio div.grid .item1,
div.portfolio div.grid .item2 {
  grid-column: 1 / span 1;
}

div.portfolio div.grid .item1 {
  grid-row: 1 / span 3;
}

div.portfolio div.grid .item2 {
  grid-row: 4 / span 3;
}

div.portfolio div.grid .item3,
div.portfolio div.grid .item4,
div.portfolio div.grid .item5 {
  grid-column: 2 / span 2;
}

div.portfolio div.grid .item3 {
  grid-row: 1 / span 2;
}

div.portfolio div.grid .item4 {
  grid-row: 3 / span 2;
}

div.portfolio div.grid .item5 {
  grid-row: 5 / span 2;
}

/* SKILLS */

div.skills {
  padding-top: 64px;
  padding-bottom: 64px;
}

div.skills div.readable div {
  position: relative;
  width: 100%;

  text-align: justify;
  text-justify: inter-word;
  line-height: 48px;
}

div.skills span {
  padding-left: 8px;
  padding-right: 8px;
  
  font-family: "Futura";
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.1em;

  margin: auto;
  height: 32px;
  white-space: nowrap;
  text-justify: none;
}

div.skills span.xs {
  font-size: 12px;
}

div.skills span.s {
  font-size: 14px;
}

div.skills span.m {
  font-size: 24px;
}

div.skills span.l {
  font-size: 36px;
  font-weight: bold;
  border-bottom: 2px ridge var(--signature-color);
}

div.reviews div.grid {
  background: #333;
  
  display: grid;
  grid-template-columns: auto auto auto;
}

div.reviews div.grid div.cell {
  background: #555;
  margin: 5px;
}

div.reviews div.grid div.cell span.quote-marks {
  font-size: 40px;
}

div.reviews div.grid div.cell .quote {
  text-align: center;
}

div.reviews div.grid div.cell .author {
  text-align: left;
}

div.reviews div.grid div.cell .position {
  text-align: right;
}

div.contact .flex {
  position: relative;
  height: 256px;
  width: 100%;
  
  display: flex;
  align-items: stretch;
}

div.contact .item {
  text-align: center;
  flex-grow: 1;
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  font-size: 48px;
  font-family: "Futura";
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.1em;
}

div.footer {
  font-family: Futura;
  font-size: 10px;
  font-variant: all-small-caps;
  letter-spacing: 2px;
  padding: 16px;
}

/* SUPPORT FOR MOBILE */
@media only screen and (max-width: 800px) {
  :root {
/*    --page-background-color-even: #330;*/
/*    --page-background-color-odd: #440;*/
  }
  
  div.about-me table {
    letter-spacing: 0px;
  }
  
  div.splash h1, div.splash h2 {
    display: block;
    transform: initial;
  }
  
  div.skills span {
/*    background-color: red;*/
/*    letter-spacing: 0em;*/
  }
  
  div.portfolio div.grid {
    grid-template-columns: 50% 50%;
    grid-template-rows: 0px;

    padding-top: 16px;
    padding-bottom: 16px;
    border-left-width: 0px;
    border-right: 8px solid var(--signature-color);
  }
  
  div.portfolio div.grid img {
    /* I guess no support ¯\_(ツ)_/¯ */
    height: 16px;
    display: none;
  }
  
  div.porfolio {
    height: 32px;
  }
  
  div.contact .flex {
    flex-wrap: wrap;
  }
}
