/*** GENERAL ***/
html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: #ffffff;
  min-width: 280px;
  color: #3b3b3c;
}

h1 {
  margin: 1rem 0 0.4rem 0;
  font-size: 1.4em;
  font-weight: normal;
  letter-spacing: 1px;
}

h2 {
  margin: 1rem 0 0.4rem 0;
  font-size: 1.4em;
  font-weight: normal;
  letter-spacing: 1px;
}

h3 {
  margin: 1rem 0 0.4rem 0;
  font-size: 1.3em;
  font-weight: normal;
}

a {
  color: #1a5082;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/*** LAYOUT ***/
#wrapper {
  max-width: 780px;
  margin: 0 auto;
  font-size: 0.95rem;
}

@media (min-width: 520px) {
  #main {
    float: right;
    width: 80%;
    box-sizing: border-box;
  }
  #navigation {
    float: left;
    width: 20%;
    box-sizing: border-box;
  }
}

/*** FRONT PAGE ***/
body.front #main {
  float: none;
  width: auto;
  padding: 0;
}

body.front #wrapper {
  width: 100%;
  max-width: none;
  margin: 1rem auto 0 auto;
  padding: 0;
}

#entrance-wrapper div {
  width: 100%;
  padding-top: 78.6549708%;
  background: url("../pages/img/front.jpg");
  background-size: cover;
  position: relative;
}

#entrance-wrapper div a {
  position: absolute;
  display: block;
  top: 13%;
  left: 12%;
  width: 43%;
  height: 74%;
  transform: perspective(100vw) rotateY(44deg);
}

#entrance-wrapper div img {
  width: 100%;
  display: block;
}

/*** NAVIGATION ***/
#navigation {
  padding: 0;
}

#navigation ul {
  list-style: none;
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}
  
#navigation ul li {
  margin: 0;
}

#navigation a {
  display: block;
  padding: 0.4rem 0;
  width: 25%;
  float: left;
  background: #3a3a3a;
  text-align: center;
  color: #efefef;
}

#navigation li:nth-child(5) a,
#navigation li:nth-child(6) a,
#navigation li:nth-child(7) a {
  width: 33.33333333%;
}

#navigation li:last-child a {
  width: 100%;
}

#navigation a:hover {
  text-decoration: none;
  background: #2b2b2b;
  color: white;
}

#navigation a.active {
  color: #8c8c8c;
}

@media (min-width: 520px) {
  #navigation {
    padding: 0 1rem;
  }
  #navigation a {
    display: inline;
    float: none;
    padding: 0;
    background: transparent;
    color: #1f1f1f;
    text-align: left;
  }
  #navigation a:hover {
    color: #1f1f1f;
    background: transparent;
    text-decoration: underline;
  }
  #navigation ul {
    margin-top: 1rem;
  }
  #navigation ul li {
    margin: 0.6rem 0;
  }
}

/*** CONTENT ***/
#main {
  padding: 0 1rem;
}

#main div.content {
  margin-top: 0.5rem;
}

.title-wrapper {
  display: inline-block;
  margin: 0.95rem 0 0.5rem 0;
  letter-spacing: 1px;
  margin-left: 20%;
  padding-left: 1rem;
}

.title-wrapper .site-name {
  color: #adadad;
  font-size: 1.7rem;
}

.title-wrapper .page-title {
  margin-top: -10px;
  margin-right: 16px;
  text-align: right;
  font-size: 1rem;
  text-transform: lowercase;
}
@media (min-width: 520px) {
  #main .content {
    text-align: justify;
  }
}
  
/*** WORK ***/
body.work #main {
  text-align: justify;
}

body.work .thumbnails div:not(.justify) {
  margin-bottom: 1.3%;
  display: inline-block;
  background-size: cover; 
  background-repeat: no-repeat;
  background-position: center;
}

body.work .thumbnails div.c3 {
  width: 32.6%;
}

body.work .thumbnails div.c4 {
  width: 24%;
}

body.work .thumbnails div.c5 {
  width: 18.75%;
}

body.work .thumbnails div.c6 {
  width: 15.5%;
}

body.work .thumbnails div.c7 {
  width: 12.92%;
}

body.work .thumbnails .wrap div {
  display: block;
  margin-bottom: 0;
  transition: transform 0.5s;
}

body.work .thumbnails .wrap div:hover {
  transform: scale(1.1);
  transition: transform 0.5s;
  border: none !important;
  cursor: auto !important;
}

body.work .thumbnails .wrap {
  border: 1px solid white !important;
  box-sizing: border-box;
  overflow: hidden;
  vertical-align: top;
}

body.work .thumbnails .wrap div {
  width: 100%;
  padding-top: 100%;
}

/*** ARCHIVE ***/
body.archive #main {
  text-align: justify;
}

body.archive.all .thumbnails a {
  display: block;
  overflow: hidden;
  text-align: left;
  font-size: 0.9rem;
}

body.archive.all .thumbnails div.wrap a div {
  margin-bottom: 0;
  display: block;
}

body.archive .about p:first-child {
  margin-top: 0;
}

body.archive .thumbnails div:not(.justify) {
  margin-bottom: 1.2%;
  display: inline-block;
  background-size: cover; 
  background-repeat: no-repeat;
  background-position: center;
}

body.archive.all .thumbnails div.wrap:not(.justify) {
  width: 48%;
}
@media (min-width: 520px) {
  body.archive.all .thumbnails div.wrap:not(.justify) {
    width: 32.6%;
  }
}
@media (min-width: 768px) {
  body.archive.all .thumbnails div.wrap:not(.justify) {
    width: 24%;
  }
}

body.archive .thumbnails div.c3 {
  width: 32.2%;
}

body.archive .thumbnails div.c4 {
  width: 23.8%;
}

body.archive .thumbnails div.c5 {
  width: 18.7%;
}

body.archive .thumbnails div.c6 {
  width: 15.4%;
}

body.archive .thumbnails div.wrap.sphere:not(.justify) {
  width: 49.2% !important;
}

body.archive .thumbnails .wrap div {
  display: block;
  margin-bottom: 0;
  transition: transform 0.5s;
}

body.archive .thumbnails .wrap div:hover {
  transform: scale(1.1);
  transition: transform 0.5s;
  border: none !important;
  cursor: auto !important;
}

/*** Extra scaling for a Varanasi thumbnail. ***/
body.archive.all div.wrap:nth-child(10) div:hover {
  transform: scale(1.4);
}

body.archive .thumbnails .wrap {
  border: 1px solid white !important;
  box-sizing: border-box;
  overflow: hidden;
  vertical-align: top;
}

body.archive .thumbnails .wrap div {
  width: 100%;
  padding-top: 100%;
}

body.archive .thumbnails div.sphere:nth-child(-n+2) {
  display: none;
}

/*** CONTACT PAGE ***/
body.contact .contacts-list {
  float: left;
}

body.contact .contacts-itself {
  float: right;
}

body.contact div.content {
  padding: 1.5rem 0 1.7rem 0;
  font-size: 0.8rem;
  color: #939493;
  line-height: 220%;
}

body.contact .content a[href^="http://"]:after {
  content:" \f08e";
  font-family: fontawesome;
}

@media (min-width: 520px) {
  body.contact div.content {
    font-size: 1.1rem;
  }
}
@media (min-width: 768px) {
  body.contact div.content {
    font-size: 1.4rem;
  }
}

/*** FOOTER ***/
#footer {
  margin: 1.5rem 1rem 1rem 1rem;
  text-align: right;
}

#footer a {
  color: #3a3a3a;
}

/*** MISC ***/  
img {
  max-width: 100%;
  height: auto;
}

.clearfix:after {
   content: " ";
   visibility: hidden;
   display: block;
   height: 0;
   clear: both;
}

.justify {
  display: inline-block;
  width: 100%;
}

.right {
  text-align: right;
}

.date {
  margin-right: 1rem;
}

/* Magnific popup. */
.mfp-bg {
  background: #fbfbfb !important;
  opacity: 1 !important;
}

.mfp-figure:after {
  box-shadow: none !important;
}

.mfp-counter {
  left: 0 !important;
  right: auto !important;
}

.mfp-zoom-out-cur {
  cursor: auto !important;
}

button.mfp-close {
  color: #424242 !important;
  font-size: 3rem !important;
  cursor: pointer !important;
}

.mfp-title {
  padding-right: 0 !important;
  padding-left: 45px !important;
  font-size: 0.8rem !important;
  text-align: right !important;
  color: #424242 !important;
}

@media (min-width: 901px) {
  .mfp-container {
    padding: 0 90px !important;
  }
}
