/*
 * Index page
 */

:root {
  --font-stack-sans: "Open Sans", "Tahoma", "Verdana", "Helvetica", "Open Sans",
    sans-serif;
  --font-stack-serif: "Georgia", "Big Caslon", "Hoefler Text", "Garamond",
    "Baskerville", "Palatino Linotype", "Times New Roman", "Times", serif;
  --font-stack-mono: "Inconsolata", "Consolas", "PT Mono", "Lucida Console",
    "Lucida Sans Typewriter", "Courier New", "Courier", monospace;

  --font-size-root: 16px;
  --font-size-xs: 0.7rem;
  --font-size-sm: 0.87rem;
  --font-size-lg: 1.2rem;
  --font-size-xl: 1.4rem;

  --font-size-h1: 2rem;
  --font-size-h2: 1.5rem;
  --font-size-h3: 1.3rem;
  --font-size-h4: 1rem;
  --font-size-h5: 0.8rem;
  --font-size-h6: 0.7rem;

  --line-height-xs: 1.1;
  --line-height-sm: 1.3;
  --line-height-md: 1.5;
  --line-height-lg: 1.7;
  --line-height-xl: 1.9;
  --line-height-xxl: 2.1;

  --color-white: white;
  --color-gray-lightest: #f2f2f2;
  --color-gray-lighten: #cccccc;
  --color-gray-light: #a6a6a6;
  --color-gray: #808080;
  --color-gray-dark: #595959;
  --color-gray-darken: #333333;
  --color-gray-darkest: #1a1a1a;
  --color-black: black;
  --color-black-light: #5e5e5e;

  --color-link: black;
  --color-code-text: #333;
  --color-code-bg: #ecdcc6;

  --color-skin: #f7f2ed;
  --color-dark-skin: #f2f0ed;
  --color-sand: #997300;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  font-family: var(--font-stack-sans);
  line-height: 1.7;
  min-height: 100%;
  height: 100%;
  margin: 1rem auto 0 auto;
  background-color: white;
  color: var(--color-black);
  max-width: 1950px;
}

.logo {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  column-gap: 1rem;
}
.logo img {
  max-width: 70px;
}

main {
  display: grid;
  grid-template-areas:
    "nav"
    "about"
    "projects";
  row-gap: 2rem;
}

section h1,
section h2,
section h3,
section h4 {
  font-family: var(--font-stack-sans);
  font-weight: 400;
  padding: 0 0 1rem 0;
  margin: 0;
  border-radius: 0.5rem;
}

/*
 * Top nav menu
 */

.menu_top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;

  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3% 1rem 3%;

  background-color: var(--color-white);

  text-transform: uppercase;
  word-wrap: break-word;
  font-size: 0.85rem;
}
.menu__list {
  display: flex;
  column-gap: 1rem;
  font-family: var(--font-stack-sans);
  color: var(--color-gray-darkest);
}
.menu_top a:link {
  color: var(--color-gray-darkest);
  text-decoration: none;
}
.menu_top a:visited {
  color: var(--color-gray-darkest);
  text-decoration: none;
}
.menu_top a:hover {
  color: var(--color-gray-darkest);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}
.menu_top a:active {
  color: var(--color-gray-darkest);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

/*
 * CV
 */

.cv {
  display: grid;
  grid-template-areas:
    "bio"
    "stack"
    "job-history";
  row-gap: 2rem;
  align-items: flex-start;
  column-gap: 4rem;

  margin: 0 3% 1rem 3%;
}
.cv section:last-child {
  margin: 0;
}

/* Stack */
/* Job History */

.stack {
  grid-area: stack;
}
.job-history {
  grid-area: job-history;
}
.stack div,
.job-history div {
  display: grid;
  grid-template-rows: auto 0 auto;
  column-gap: 1rem;

  padding: 0.5rem 0;
}

/*
 * Projects
 */

.projects {
  margin: 0 0 1rem 0;
}
.projects__wrapper {
  padding: 4rem 3%;
}
.projects__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 400px));
  row-gap: 2rem;
  column-gap: 3rem;
  align-items: flex-start;
  padding: 0;
  align-items: start;
}
.projects h2 {
  grid-area: header;
  margin-top: 3rem;
  border-radius: 0;
  border-bottom: 1px solid #ccc;
}
.projects h2:nth-child(2) {
  margin-top: 0;
}
.project {
  display: grid;
  grid-template-areas:
    "projectheader"
    "dates"
    "projectimage"
    "projectstack"
    "about"
    "links";
  column-gap: 4rem;
  line-height: 1.5;
  padding: 2rem 0;
}
.project__header {
  grid-area: projectheader;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0;
  font-weight: bold;
  margin-bottom: 1rem;
}
.project__dates {
  display: none;
  grid-area: "dates";
  margin-bottom: 1.5rem;
}
.project__image {
  grid-area: projectimage;
  border-radius: .4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 1rem #999;
}
.project__links {
  grid-area: links;
  display: flex;
  flex-flow: row nowrap;
  column-gap: 1rem;
  align-self: flex-start;
  padding: 0;
}

.project__links a:link,
.project__links a:visited,
.project__links a:hover,
.project__links a:active {
  background-color: black;
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 0.3rem 1rem 0.45rem 1rem;
  text-decoration: none;
  border-radius: 3rem;
}
.project__links a:hover {
  background-color: var(--color-gray-dark);
}
.project__stack {
  grid-area: projectstack;
  font-size: var(--font-size-xs);
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.3rem;
  column-gap: 0.2rem;
  margin-bottom: 1.5rem;
}
.stack-item {
  display: inline-flex;
  padding: 0.1rem 0.5rem 0.2rem 0.5rem;
  row-gap: 1rem;
  border-radius: 0.4rem;
  align-items: center;
  background-color: #eee;
}
.project__about {
  grid-area: about;
  margin-bottom: 1.5rem;
}

/*
 * Footer
 */

.footer {
  padding: 1rem 3% 1rem 3%;
  background-color: black;
  color: var(--color-gray-light);
}

/*
 * Typography
 */

.bold {
  font-weight: bold;
}

a:link,
a:visited {
  color: black;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}
a:hover {
  color: black;
  text-decoration: none;
}
a:active {
  color: black;
  text-decoration: none;
}

p:not(:last-child) {
  margin-bottom: 0.5rem;
}

p:last-child {
  margin-bottom: 0;
}
p {
  margin-bottom: 1rem;
}
ul,
ol {
  display: block;
  margin-inline-start: 0;
  margin-inline-end: 0;
  padding-inline-start: 2rem;
}

ul ul,
ol ul {
  margin-block-start: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-stack-serif);
  margin-block-start: 1rem;
  margin-block-end: 1rem;
  margin-inline-start: 0;
  margin-inline-end: 0;
  font-weight: 800;
  padding: 0 1rem;
}

h1 {
  font-size: var(--font-size-h1);
  line-height: 1.2;
}

h2 {
  font-size: var(--font-size-h2);
  line-height: 1.2;
}

h3 {
  font-size: var(--font-size-h3);
  line-height: 1.3;
}

h4 {
  font-size: var(--font-size-h4);
  line-height: 1.3;
}

h5 {
  font-size: var(--font-size-h5);
  line-height: 1.4;
}

h6 {
  font-size: var(--font-size-h6);
  line-height: 1.5;
}

/*
 * Media Queries 
 */

@media (min-width: 1300px) {
  .cv {
    grid-template-areas:
      "bio ..."
      "job-history stack";
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 600px) {
  body {
    margin-top: 2rem;
  }
  .menu__list {
    display: flex;
    column-gap: 1.5rem;
  }
  .menu_top {
    font-size: 1rem;
  }

  .stack div,
  .job-history div {
    grid-template-columns: 190px 1rem auto;
  }
}

@media (min-width: 550px) {
  /*.logo {
    display: block;
  }*/
}

/*
 * Effects
 */

@keyframes fadeInAnimation {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: fadeInAnimation ease 1s;
  -webkit-animation: fadeInAnimation ease 1s;
  -moz-animation: fadeInAnimation ease 1s;
  -ms-animation: fadeInAnimation ease 1s;
  -o-animation: fadeInAnimation ease 1s;

  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}
