/* ellen li july 2017 */

@font-face {
  font-family: 'Circular Std';
  src: url('../fonts/CircularStd-Bold.eot');
  src: url('../fonts/CircularStd-Bold.woff2') format('woff2'),
       url('../fonts/CircularStd-Bold.woff') format('woff'),
       url('../fonts/CircularStd-Bold.ttf') format('truetype'),
       url('../fonts/CircularStd-Bold.svg#CircularStd-Bold') format('svg'),
       url('../fonts/CircularStd-Bold.eot?#iefix') format('embedded-opentype');
  font-weight: 900;
  font-style: normal;
}

*,
*::after,
*::before {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/* colour and type */

html,body {
  --text-color: #05054F;
  --background-color: #fff;
  --background-color-2: #FFFEF6;
  --link-color: #05054F;
  --link-hover-color: #05054F;
  font-family: 'Inconsolata', monospace;
  letter-spacing: -0.2px;
  font-size: 1em;
  line-height: 1.5em;
  color: #05054F;
  color: var(--text-color);
  background-color: transparent;
  background-image: linear-gradient(to bottom, var(--background-color) 0%, var(--background-color-2) 90%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-transition: all .25s;
  -moz-transition: all .25s;
  transition: all .25s;
}
::selection { /* WebKit/Blink Browsers */
  background: #2F4787;
  color: #fff;
  opacity: 1;
}
::-moz-selection {
  background: #2F4787; /* Gecko Browsers */
  color: #fff;
  opacity: 1;
}
.fa {
  color: #2F4787;
}
h1,h2,h3,h4 {
  display: block;
  font-family: 'Circular Std', 'Roboto', 'Helvetica', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0;
  color: #2F4787;
  line-height: 1.5em;
  text-align: left;
  z-index: 10;
}
h1 {
  font-size: 7em;
}
h2 {
  font-size: 4em;
  margin-bottom: 0.5em;
  text-align: center;
}
h3 {
  font-size: 1.5em;
}
h4 {
  font-size: 1em;
  font-weight: bold;
}
p {
  opacity: 0.8;
}
a,a:active {
  text-decoration: underline;
  -webkit-text-decoration-skip: ink;
  text-decoration-skip: ink;
  opacity: 1;
  color: var(--link-color);
  outline: none;
}
a:hover,a:focus {
  text-decoration: none;
  color: var(--link-hover-color);
  outline: none;
  cursor: pointer;
}

/* page layout */

main {
  position: relative;
  display: block;
  margin: auto;
  width: 50%;
  max-width: 940px
}
section {
  /*background-color: #fff;*/
  margin: 5em 0 0em 0;
}
section:last-of-type {
  margin-bottom: 0em;
}

/* intro section */

#intro {
  /* grid container */
  position: relative;
  display: block;
  display: grid;
  z-index: 10;
  pointer-events: auto;
  justify-content: center;
  align-content: center;
  grid-template-columns: 20% 20% 10% 45% 5%;
  grid-template-rows: 36px 145px;
  grid-template-areas:
              "... ... ... tagline tagline"
              "... ... name name name"
              "... ... ... bio bio";
}
#intro .name {
  grid-area: name;
}

#intro .portrait {
  display: block;
  background-image: url(../img/ellenli-headshot.png);
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 1;
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  width: 380px;
  height: 380px;
}

#intro .tagline {
  grid-area: tagline;
  margin: 0;
}

#intro .bio {
  grid-area: bio;
  margin: 0;
  justify-self: start;
}
#equalizer {
  display: inline-block;
  width: 1rem;
  height: 1em;
  background-image: url(../img/equalizer.gif);
  background-repeat: no-repeat;
  background-position: left;
  border: 0px solid #000;
  background-blend-mode: multiply;
  mix-blend-mode: multiply;
  filter: grayscale(100%);
}

/* projects section */

#projects {
  position: relative;
  display: block;
  z-index: 15;
}

.projects {
  /* grid container */
  position: relative;
  display: block;
  pointer-events: auto;
  justify-content: center;
  align-content: center;
  width: 100%;
}
.project-list {
  margin: 0;
  padding: 0;
  display: block;
  list-style-type: none;
  -webkit-column-count: 2;
  -moz-column-count: 2;
  column-count: 2;
  column-gap: 2em;
  z-index: 10;
}
.project-list li {
  list-style: none;
  border: 1px solid var(--text-color);
  position: relative;
  padding: 10px 14px;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  margin: 0em 0 2em 0;
}


/* posts */

.post {
  position: relative;
  display: block;
  margin: auto;
  width: 50%;
  max-width: 650px
}
#header h1, h2 {
  text-align: center;
}
#header h1{
  font-size: 4.5em;
}
article {
  font-family: 'Circular Std', 'Roboto', 'Helvetica', sans-serif;
  font-weight: 400;
}
article h2 {
  font-size: 3em;
  text-align: left;
}

/* elsewhere section */

#appearances h2 {
  position: relative;
  z-index: 10;
}
.appearances-list {
  /* grid container */
  position: relative;
  display: grid;
  pointer-events: auto;
  justify-content: center;
  align-content: center;
  grid-template-columns: 50% 10% 40%;
  grid-template-areas:
              "list list ..."
}
.headshot {
  position: relative;
  display: block;
  background-image: url(../img/ellenli-appearances.jpg);
  background-repeat: no-repeat;
  background-size: contain;
  background-blend-mode: multiply;
  mix-blend-mode: multiply;
  filter: grayscale(100%);
  opacity: 0.4;
  grid-column: 2 / span 2;
  grid-row: 1 / span 2;
  z-index: 0;
  margin: 2em 0;
}

.appearances-list ul {
  grid-area: list;
  margin: 0;
  padding: 0;
  display: block;
  list-style-type: disc;
  z-index: 10;
}
.appearances-list ul > a > li, .appearances-list ul > li {
  list-style: none;
  border: 1px solid var(--text-color);
  position: relative;
  padding: 10px 14px;
  margin: 0em 0 2em 0;
}
.appearances-list a {
  text-decoration: none;
}

/* footer */

#footer {
  position: relative;
  display: flex;                  /* establish flex container */
  flex-direction: row;            /* default value; can be omitted */
  flex-wrap: nowrap;              /* default value; can be omitted */
  justify-content: space-between; /* switched from default (flex-start, see below) */
  z-index: 100;
  margin: 3em 0 4em 0;
}
#footer p {
  display: block;
  -webkit-margin-before: 0em;
  -webkit-margin-after: 0em;
}

/* shapes */

.morph-wrap {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.morph {
  position: relative;
  height: 100%;
  flex: none;
}
.morph-fill {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  fill: #F3E8E5;
  opacity: 0.7;
  top: -29% !important;
  width: 95%;
  left: 0;
  z-index: 5;
}
.morph-outline {
  z-index: 50;
  top: -10% !important;
  height:100%;
}
.morph-outline-lower {
  position: fixed;
  bottom: -50%;
  z-index: 5;
}

/* responsive-ish */

@media screen and (min-width: 2040px) {
  /* widest */
  .morph-outline-lower {
    display: none;
  }
  #intro .portrait {
    width: 410px;
    height: 410px;
  }
  #intro {
    grid-template-rows: 40px 145px;
  }
  section {
    margin: 8em 0 0em 0;
  }
}

@media screen and (min-width: 1500px) {
  /* widest */
  main {
    width: 50%;
  }
}

@media screen and (max-width: 1500px) {
  main {
    width: 60%;
  }
  section {
    margin: 4em 0 0em 0;
  }
  #intro .portrait {
    width: 385px;
    height: 385px;
  }
  #intro {
    grid-template-rows: 50px 145px;
  }
}

@media screen  and (max-width: 1300px) {
  main {
    width: 70%;
  }
  #intro .portrait {
    width: 320px;
    height: 320px;
  }
}
@media screen  and (max-width: 1000px) {
  section {
    margin: 3em 0 0 0;
  }
  main {
    width: 80%;
  }
  #footer {
    margin: 2em 0 2em 0;
  }
  section:last-of-type {
    margin-bottom: 3em;
  }
}

@media screen  and (max-width: 979px) /* tablet */ {
  main {
    width: 90%;
  }
}

@media screen and (max-width: 780px) /* phablet? */ {
  h1 {
    font-size: 5em;
  }
  h2 {
    font-size: 3em;
    margin-bottom: 0.5em;
    text-align: center;
  }
  #intro {
    grid-template-columns: 20% 20% 10% 45% 5%;
    grid-template-rows: 70px 110px;
    grid-template-areas:
                "... ... ... tagline tagline"
                "... ... name name name"
                "... ... ... bio bio";
  }
  #intro .portrait {
    width: 305px;
    height: 305px;
  }
  /*.projects div:last-child {
      display:none;
  }*/
}
@media screen and (max-width: 580px) /* mobile */ {
  section{
    margin: 1em 0 0 0;
  }
  #footer {
    margin: 1em 0 2em 0;
  }
  #footer p {
    -webkit-margin-after: 1em;
  }
  h1,h2,h3,h4 {
    font-weight: 900;
  }

  h1,h2,h3 {
    text-align: left!important;
  }
  h1 {
    font-size: 4em;
    margin-left: -4px;
  }
  h2 {
    font-size: 2em;
    margin-left: -2px;
  }
  #intro {
    grid-template-columns: 100%;
    grid-template-rows: auto;
    grid-template-areas:
                "..."
                "name"
                "tagline"
                "bio";
  }
  #intro .name {
    text-align: center;
  }
  #intro .portrait {
    display: none;
  }
  .projects ul {
    -webkit-column-count: 1;
    -moz-column-count: 1;
    column-count: 1;
  }
  .projects ul > a > li, .projects ul > li {
    margin: 0em 0 2em 0;
  }
  .appearances-list {
    /* grid container */
    grid-template-areas:
                "list list list"
  }
  .appearances-list .headshot {
    display: none;
  }
  .appearances-list ul {
    grid-area: list;
    margin: 0;
    padding: 0;
    display: block;
    list-style-type: disc;
  }
  .appearances-list ul > a > li, .appearances-list ul > li {
    list-style: none;
    border: 1px solid $;
    position: relative;
    padding: 10px 14px;
    margin: 0em 0 1em 0;
  }
  .morph-fill {
    margin-top: -90px;
    margin-left: -30px;
    width: 120%;
  }
  .morph-outline {
    display: none;
  }
}
