/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.1.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Antic&family=News+Cycle&display=swap');

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* Flickity */

/*! Flickity v2.3.0
https://flickity.metafizzy.co
---------------------------------------------- */

.flickity-enabled {
  position: relative;
}

.flickity-enabled:focus { outline: none; }

.flickity-viewport {
  overflow: hidden;
  position: relative;
  height: 100%;
}

.flickity-slider {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* draggable */

.flickity-enabled.is-draggable {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.flickity-enabled.is-draggable .flickity-viewport {
  cursor: move;
  cursor: -webkit-grab;
  cursor: grab;
}

.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

/* ---- flickity-button ---- */

.flickity-button {
  position: absolute;
  background: hsla(0, 0%, 100%, 0.75);
  border: none;
  color: #333;
}

.flickity-button:hover {
  background: white;
  cursor: pointer;
}

.flickity-button:focus {
  outline: none;
  box-shadow: 0 0 0 5px #19F;
}

.flickity-button:active {
  opacity: 0.6;
}

.flickity-button:disabled {
  opacity: 0.3;
  cursor: auto;
  /* prevent disabled button from capturing pointer up event. #716 */
  pointer-events: none;
}

.flickity-button-icon {
  fill: currentColor;
}

/* ---- previous/next buttons ---- */

.flickity-prev-next-button {
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* vertically center */
  transform: translateY(-50%);
}

.flickity-prev-next-button.previous { left: 10px; }
.flickity-prev-next-button.next { right: 10px; }
/* right to left */
.flickity-rtl .flickity-prev-next-button.previous {
  left: auto;
  right: 10px;
}
.flickity-rtl .flickity-prev-next-button.next {
  right: auto;
  left: 10px;
}

.flickity-prev-next-button .flickity-button-icon {
  position: absolute;
  left: 20%;
  top: 20%;
  width: 60%;
  height: 60%;
}

/* ---- page dots ---- */

.flickity-page-dots {
  position: absolute;
  width: 100%;
  bottom: -25px;
  padding: 0;
  margin: 0;
  list-style: none;
  text-align: center;
  line-height: 1;
}

.flickity-rtl .flickity-page-dots { direction: rtl; }

.flickity-page-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 8px;
  background: #333;
  border-radius: 50%;
  opacity: 0.25;
  cursor: pointer;
}

.flickity-page-dots .dot.is-selected {
  opacity: 1;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* INTRO */

body.intro-active {
  overflow: hidden;
}

.intro {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: white;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: .5s opacity ease-in-out;
}

.intro.visible {
  opacity: 1;
  pointer-events: all;
}

.intro.hidden {
  display: none;
}

.intro .center {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.intro .center .tiger {
  width: 450px;
  height: 450px;
  position: relative;
  z-index: 4;
  bottom: 80px;
  left: 80px;
  pointer-events: none;
}

.intro .center .tiger svg {
  width: 100%;
  height: 100%;
}

.intro .center .tiger svg path {
  transition: all .2s ease;
}

.intro .center .circle {
  height: 200px;
  width: 200px;
  cursor: pointer;
}

.intro .center .circle svg {
  transition: all .2s ease-in-out;
}

.intro .center .circle svg:hover {
  transform: rotate(90deg) scale(1.1);
}

.intro .center .info {
  display: flex;
  flex-direction: column;
  font-size: 48px;
  margin-left: 50px;
  font-family: 'Antic', sans-serif;
}

.intro .center .info .intro-name {
  font-size: 32px;
}

/* HEADER */
header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid black;
  height: 150px;
  background: white;
  z-index: 5;
}

.project-page header {
  height: 108px;
}

header .top {
  display: flex;
  flex-direction: row;
  width: 100%;
  align-items: center;
  height: 60px;
}

header .logo {
  display: flex;
  flex-direction: center;
  justify-content: center;
  align-items: center;
}

header .logo svg {
  height: 100px;
  width: 100px;
}

header h1 {
  margin-left: 30px;
  font-family: 'Antic', sans-serif;
}

.project-page header h1 {
  font-size: 1.5rem;
}

.project-page header h2 {
  font-family: 'Antic', sans-serif;
  color: grey;
  margin-left: 16px;
}

header nav {
  height: auto;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-family: 'News Cycle', sans-serif;
  text-align: center;
  font-size: 20px;
}

header nav .dropdown {
  display: none;
}

header ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

header ul li {
  position: relative;
  cursor: pointer;
  width: 24%;
  padding: 10px 0;
  transition: all .3s ease-in-out;
}

header ul li.active {
  /* letter-spacing: 3px; */
  color: red;
}

header .contact {
  border-left: 1px solid black;
  padding: 10px 0;
  width: 24%;
  cursor: pointer;
  transition: all .3s ease-in-out;
  position: relative;
}

header .contact.active {
  color: red;
}

header .contact .email {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  width: 100%;
  background: white;
  padding: 10px 16px;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
  text-align: center;
  font-size: .8rem;
}

header .contact .email.shown {
  opacity: 1;
  pointer-events: all;
}



/* MAIN ART GRID */

main .grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  margin-top: 150px;
  padding: 24px;
}

main .art-item-wrapper {
  width: calc(100%/3 - 64px);
  margin: 24px;
}

main .art-item {
  display: block;
  height: 0;
  overflow: hidden;
  padding-bottom: 100%;
  position: relative;
}

main .grid img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  object-fit: cover;
}

main .grid .contain img {
  object-fit: contain;
}

main .art-item .description {
  font-family: 'News Cycle', sans-serif;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  color: white;
  opacity: 0;
  transition: all .3s ease-in-out;
}

main .art-item:hover .description {
  opacity: 1;
}

main .art-item .description .title {
  font-size: 18px;
  padding: 0 10px 20px 10px;
  margin-bottom: 5px;
  border-bottom: 3px solid white;
  text-align: center;
  max-width: 70%;
}

/* PROJECT SHOWCASE */

.project-showcase {
  height: 100vh;
  width: 100%;
  padding-top: 108px;
  display: flex;
  flex-direction: row;
}

.project-description {
  width: 50%;
  padding: 42px 24px;
  overflow: auto;
  font-family: 'News Cycle', sans-serif;
  font-size: 18px;
  display: flex;
  flex-direction: column;
}

.project-description p {
  margin-top: 0;
}

.project-images {
  width: 50%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 50px 0;
}

.project-carousel {
  width: 100%;
  height: 100%;
}

.project-carousel .carousel-cell {
  width: 80%;
  height: 100%;
  margin: 0 24px;
}

.carousel-cell img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}


/* RESPONSIVE */

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

  .intro .tiger {
    margin-left: 40px;
  }

  .intro .info {
    margin-left: 10px;
    margin-right: 20px;
  }

  header {
    padding-bottom: 0;
    height: 140px;
  }

  header h1 {
    font-size: 1.2em;
  }

  header nav {
    position: relative;
    width: 100%;
    justify-content: flex-end;
  }

  header nav .dropdown {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding-right: 25px;
    cursor: pointer;
  }

  header nav .dropdown:after {
    content: 'v';
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    margin-left: 5px;
    margin-top: 5px;
    transition: all .3s ease;
    transform: rotate(-90deg);
  }

  header nav .dropdown.active:after {
    transform: rotate(0deg);
  }

  header nav ul {
    position: absolute;
    flex-direction: column;
    top: calc(100% + 1px);
    width: auto;
    padding-right: 25px;
    left: 0;
    background: white;
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
  }

  header nav ul.shown {
    opacity: 1;
    pointer-events: all;
  }

  header nav ul li {
    border-top: 1px solid black;
    width: 100%;
  }

  header nav ul li:first-of-type {
    border: none;
  }

  header .contact {
    padding-left: 18px;
    width: 100%;
  }

  main .grid {
    margin-top: 140px;
    overflow: hidden;
  }

  main .art-item-wrapper {
    width: calc(100% - 48px);
    margin: 0 0 24px 0;
  }

  main .art-item .description {
    background: rgba(0,0,0,0.5);
    opacity: 1;
  }

  .project-showcase {
    flex-direction: column-reverse;
    height: auto;
  }

  .project-description {
    width: 100%;
  }

  .project-images {
    width: 100%;
    height: 500px;
  }

  .project-images .flickity-page-dots {
    bottom: -35px;
  }

  .project-page header h1 {
    font-size: 1.1rem;
  }
  
  .project-page header h2 {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .sr-only class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: " ";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
   * Printing Tables:
   * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
   */
  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

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

