
/* https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/ */
a,span {
  /* These are technically the same, but use both */
  overflow-wrap: break-word;
  word-wrap: break-word;

  -ms-word-break: break-all;
  /* This is the dangerous one in WebKit, as it breaks things wherever */
  word-break: break-all;
  /* Instead use this non-standard one: */
  word-break: break-word;

  /* Adds a hyphen where the word breaks, if supported (No Blink) */
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* 0-600px */
.article-content {
  padding-top: 0.25em;
  font-size: 1.4em;
  line-height: 1.6em;
  margin: 1vw;
}
.article-header {
  font-size: 1.5em;
  text-align: center;
}

.article-content .floating-image-right,
.article-content .floating-image-left {
  width: 95vw;
  height: 100vw;
  padding-left: 0;
  padding-right: 0;
  float: none;
}
.article-content .small-image {
  width: 30vw;
  height: 30vw;
  display: inline-block;
}
.article-content .small-image.floating-image-left {
  float: left;
}
.article-content .small-image.floating-image-right {
  float: right;
}

@media(min-width: 550px) {
  .article-content .floating-image-right {
    float: right;
    padding-left: 8vw;
    width: 300px;
    height: 300px;
  }
  .article-content .floating-image-left {
    float: left;
    padding-right: 8vw;
    width: 300px;
    height: 300px;
  }
}

.rpi-home-link {
  background-image: url(/images/rpi-home-link.svg);
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: contain;
  display: block;
  flex-basis: 40px;
  flex-grow: 0;
  flex-shrink: 0;
  height: 50vw;
  transition-duration: .15s;
  transition-property: transform;
  transition-timing-function: cubic-bezier(.68,-.55,.265,1.55);
  will-change: transform;
}

.rpi-home-link:hover {
  transform: rotate(-10deg) scale(1.2);
  opacity: 0.80;
  cursor: pointer;
}
  
.image-panel img {
  padding-top: 1em;
  padding-bottom: 1em;
  width: 50%;
  margin: 0 auto;
}

.image-panel.w100 img {
  width: 100%;
}

.image-panel button {
  position: absolute;
  width: 10%;
  height: 10%;
	background: beige;
	border: outset;
	border-radius: 2em;
	opacity: 0.7;
	font-size: 3vw;
}

.image-panel .left {
  top: 45%;
  left: 20%;
}

.image-panel .right {
  top: 45%;
  right: 20%;
}

.image-panel.w100 .left { left: 0%; }
.image-panel.w100 .right { right: 0%; }

.image-panel {
  position: relative;
}

.image-panel .caption {
  background: black;
  color: white;
  position: absolute;
  bottom: 1.3em;
  left: 50%;
  padding-left: 1em;
  padding-right: 1em;
  border-radius: 0.3em;
  transform: translate(-50%, 0%);
  font-size: 3vw;
  line-height: 2em;
}

.article-content video {
  width: 90vw;
  max-width: 95vw;
  max-height: 95vh;
}

@media(min-width: 600px) {
  .article-content video { width: 90vw; }
/*  .article-content {
    padding-top: 1.5em;
    font-size: 1.5em;
    line-height: 1.6em;
    margin: 1.6vw;
  }*/
  .rpi-home-link { height: 150px; }
  .article-header { font-size: 1.7em; }
	.image-panel button { font-size: 3.5vw; width: 12%; height: 12%; }
  .image-panel .caption { font-size: 2.5vw; line-height: 1.5em; }
}

@media(min-width: 700px) {
  .article-content video { width: 90vw; }
  .article-content {
    padding-top: 1.55em;
    font-size: 1.55em;
    line-height: 1.65em;
    margin: 1.8vw;
  }
  .rpi-home-link { height: 150px; }
  .article-header { font-size: 1.9em; }
	.image-panel button { font-size: 3.6vw; width: 14%; height: 14%; }
}

@media(min-width: 800px) {
  .article-content video { width: 90vw; }
  .article-content {
    padding-top: 4vw;
    font-size: 1.6em;
    line-height: 1.7em;
    margin: 2vw;
  }
  .rpi-home-link { height: 150px; }
  .article-header { font-size: 2.0em; }
	.image-panel button { font-size: 1.5em; width: 15%; height: 15%; }
}

@media(min-width: 900px) {
  .article-content video { width: 90vw; }
  .article-content {
    padding-top: 1.5em;
    font-size: 1.5em;
    line-height: 1.6em;
    margin: 0.5em;
  }
  .rpi-home-link { height: 150px; }
  .article-header { font-size: 1.8em; }
	.image-panel button { font-size: 1.5em; width: 13%; height: 13%; }
}

@media(min-width: 1000px) {
  .article-content video { width: 1000px; }
  .article-content {
    padding-top: 1.4em;
    font-size: 1.4em;
    line-height: 1.5em;
    margin: 0.8em;
  }
  .rpi-home-link { height: 150px; }
  .article-header { font-size: 1.3em; }
	.image-panel button { font-size: 1.3em; width: 13%; height: 13%; }
  .image-panel .caption { font-size: 25px; line-height: 1.5em; }
}
	
.image-panel button { width: 8%; height: 8%; }

.blog-blurb h3 {
  margin-top: 0em;
}

.terminal-block {
  color: white;
  background-color: black;
  padding: 0.5em;
  overflow: scroll;
  font-size: 0.7em;
  line-height: 1.6em;
}

.terminal-block.no-scroll {
  overflow: auto;
}

.blog-blurb {
  min-width: 15em;
  max-height: 20em;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.blog-blurb .read-more a {
  color: red;
  font-weight: bold;
}

.blog-blurb .read-more a:hover {
  cursor: pointer;
  opacity: 0.5;
}

.blog-blurb .read-more {
  z-index: 99;
  position: absolute;
  bottom: 0em;
  text-align: center;
  margin: 0em;
  padding: 0em;
  height: 10%;
  width: 100%;
  cursor: pointer;
}

.blog-blurb:after {
  position: absolute;
  bottom: 0;  
  height: 100%;
  width: 100%;
  content: "";
  background: linear-gradient(to top,
     rgba(255,255,255, 0.9) 20%, 
     rgba(255,255,255, 0.0) 70%
  );
  pointer-events: none; /* so the text is still selectable */
}

#garmin-map {
  text-align: center;
  width: 100vw;
}

#garmin-map iframe {
  width: 500px;
  height: 500px;
}

@media(max-width: 500px) {
  #garmin-map iframe {
    width: 90vw;
    height: 90vw;
  }
  #garmin-map {
    width: 90vw;
  }
}
@media(min-width: 1001px) {
  #garmin-map {
    width: 1000px;
  }
}
#widead { display: block; }

#contact-links .entry {  
  line-height: 35px;
}

#interests {
  font-size: 28px;
}

@media(max-width: 1000px) {
  #footer {  
    line-height: 1.5em;
    font-size: 1.2em;
  }
  #interests {
    font-size: 1.5em;
    line-height: 1.75em;
    margin: 1.0em;
  }
  #contact-links .entry {
    line-height: 4.5vw;
  }
}

@media(min-width: 1001px) {
  #footer {
    width: 1000px;
    margin: 0 auto;
  }
}

.hover-attribution {
  position: relative;
  top: 0;
  left: 1em;
  font-style: italic;
  width: fit-content;
  max-width: 50vw;
}
@media(max-width: 900px) {
  .hover-attribution {
    font-size: 2vw;
  }
}

#contact-links .txt {
  display: inline-block;
  clear: both;
  font-size: 17px;
}

@media(max-width: 588px) {
  .hover-attribution { font-size: 2.5vw; }
  #contact-links .txt {
    font-size: 4vw;
    line-height: auto;
  }
  #contact-links .entry {
    line-height: 7vw;
  }
}

#xkcd0:hover {
  cursor: pointer;
  opacity: 0.75;
}
#xkcd0 {
  background: url(/images/xkcd/normal_distribution_2x.png);
  background-repeat: no-repeat;
  background-size: contain;
  width: 100%;
  height: 30vw;
}
@media(min-width: 1001px) {
  #xkcd0 {
    height: 300px;
  }
}
@media(max-width: 1000px) {
  #xkcd0 {
    max-width: 61vw;
  }
}
@media(max-width: 588px) {
  #xkcd0 {
    width: 100%;
    max-width: 100vw;
    height: 40vw;
  }
}

#code-header {
  width: 100%;
  height: 15em;
  border-bottom-left-radius: 2em;
  border-bottom-right-radius: 2em;
  overflow: hidden;
  opacity: 0.7;
  margin: 0 auto;
}

#code-header img {
  min-width: 100%;
  max-height: 100%;
  opacity: 
}

.blog-entry blockquote {
  background: #f9f9f9;
  border-left: 10px solid #ccc;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  quotes: "\201C""\201D""\2018""\2019";
}
.blog-entry blockquote:before {
  color: #ccc;
  content: open-quote;
  font-size: 3em;
  line-height: 0.1em;
  margin-right: 0.25em;
  vertical-align: -0.4em;
}
.blog-entry blockquote p {
  display: inline;
}

body {
  margin: 0;
  padding-top: 0;
  font-size: 1em;
  font-family: 'Droid Sans', sans-serif;
  color: #333;
  background-color: #fff;
}

/* pre / code blocks formatting: */
pre {
  font-family: Consolas, monaco, monospace;
}

pre.code-block {
  overfow: auto;
  border-radius: 10px;
  /* background: #ccc; */
  font-size: 0.85em;
  line-height: 1.45em;
}

code {
  border-radius: 10px;
  background: #ffffff;
  /* opacity: 1.0; */
  /* border: 1px solid #bbb; */
}

.g4Code {
  padding: 15px;
  background: rgba(240, 240, 240, 1.0);
  overflow: auto;
}

.logo {
  float: left;
  background-color: #F3F7F6;
}

.container {
  max-width: 1036px;
  
  /* Center the div with margins on both
     sides filling up the remaining max-width */
  margin: 0 auto;
}

.nav {
  line-height: 50px;
  text-align: center;
/*  padding-top: 10px;
  padding-bottom: 30px; */
  background-color: #F3F7F6;
  
  /* https://stackoverflow.com/a/20180165/1542000 */
  overflow: hidden;
}

.exists {
  vertical-align: middle;
  height: 32px;
  width: 32px;
  padding-top: 8px;
  padding-bottom: 8px;
  background-color: #F3F7F6;
}

.home-link {
  text-decoration: none;
  background-color: #F3F7F6;
}

.profile-image {
  float: right;
  width: 50px;
  height: 50px;
  background-color: #F3F7F6;
}

a.home-link {
  color: #3F4346;
}

#spotlight-pictures {
  display: inline-block;
}

.inline {
  display: inline;
}

.image-button {
  background: none;
  cursor: pointer;
  border: none;
}

.image-button-div img {
  width: 253px;
  height: 253px;
}

.pic {
  border: 2vw solid rgba(150, 150, 150, 0.5);
  overflow: hidden;
  border-radius: 5vw;
  display: block;
  margin-bottom: 20px;
  margin-top: 20px;
}

/* For debugging ghost elements: */
/*
* {
  background: #000 !important;
  color: #0f0 !important;
  outline: solid #f00 1px !important;
}
*/
/* Weighted-Percentiles, histograms, files */
.divad-square {
  min-width: 250px;
  min-height: 200px;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.left-bar {
  /* float: left; */
  width: 38vw;
  max-width: 18.5em;
}

.contact-info {
  margin-right: 1.5em;
  color: black;
  padding: 0.5em;
  border-radius: 1.2em;
  background-color: #f0e4f7;
  margin-left: 0.5em;
  overflow: hidden;
  width: 250px;
}

#karl-profile {
  padding: 5%;
  max-width: 90%;
  max-height: 90%;
}

#pic0 .image-button-div {
  background: url(/photos/murakami-tsuji.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

#pic1 .image-button-div {
  background: url(/photos/boston-garden.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

#pic2 .image-button-div {
  background: url(/photos/boston.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

#pic3 .image-button-div {
  background: url(/photos/ivy.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

.image-button-div:hover {
  opacity: 0.7;
  cursor: pointer;
}

#contact-links img {
  width: 1em;
  height: 1em;
}

.heartbleed {
  display: none;
}

@media (max-width: 588px) {
  #footer h1 {
    text-align: center;
  }
  #interests {
    line-height: 1.75em;
    font-size: 4.5vw;
  }
  .blog-blurb {
    margin: 1em;
    font-size: 4vw;
    line-height: 1.3em;
  }
  .home-blog-blurbs {
    float: none;
  }
  .left-bar {
    width: 95vw;
  }
  .contact-info {
    width: 90vw;
    font-size: 3vw;
  }
  .contact-info img {
    
  }
  #contact-links {
    display: inline-block;
    vertical-align: top;
  }
  #karl-profile {
    display: inline-block;
    width: 30%;
    padding: 1%;
    padding-top: 5%;
  }
  .image-button-div img {
    width: 40vw;
    height: 40vw;
  }
  .image-button-div {
    width: 40vw;
    height: 40vw;
  }
  #spotlight-pictures .pic {  
    display: inline-block;
    margin-top: 0;
    margin-bottom: 0;
  }
  #spotlight-pictures {
    text-align: center;
    width: 95vw;
  }
  #contact-links img {
    width: 3vw;
    height: 3vw;
  }
  .heartbleed {
    display: inline-block;
    background: url(/images/heartbleed.png);
    background-repeat: no-repeat;
    background-size: cover;
    width: calc(95vw - 270px);
    height: calc(95vw - 270px);
    vertical-align: top;
    margin-top: 5vw;
  }
}
@media (min-width: 589px) {
  .blog-blurb {
    margin: 1em;
    font-size: 2.7vw;
    line-height: 4vw
  }
  #home-blog-blurbs {
/*    max-width: 57vw;*/
    float: right;
  }
  .image-button-div img {
    width: 28vw;
    height: 28vw;
  }
  .image-button-div {
    width: 28vw;
    height: 28vw;
  }
  .pic {
    border: 0.4em solid rgba(150, 150, 150, 0.5);
    border-radius: 2em;
    width: 28vw;
    height: 28vw;
  }
  #spotlight-pictures {
    margin-right: 1.5em;
    margin-left: 1em;
    max-width: 15vw;
  }
}

@media (min-width: 1001px) {
  .blog-blurb {
    margin: 1em;
    font-size: 18px;
    line-height: 25px;
  }
  .image-button-div img {
    width: 290px;
    height: 290px;
  }
  .image-button-div {
    width: 250px; /* 270px; */
    height: 250px;
    max-width: 260px;
    max-height: 260px;
  }
  #home-blog-blurbs {
    max-width: 675px;
    float: right;
  }
  #spotlight-pictures {
    min-width: 200px;
  }
}

@media(min-width: 980px) {
  .pic {
    width: 240px;
    height: 240px;
  }
}


#contact-links img {
  display: inline-block;
}

#nav-bar {
  float: right;
  background-color: #cee0ad;
  padding: 25px;
  max-width: 250px;
  min-width: 240px;
  border-radius: 20px;
}

#footer {
  color: #999999;
  font-size: 1.2em
}

@media (max-width: 600px) {
  #footer {
    line-height: 1.5em;
  }
  #interests {
    font-size: 4vw;
    line-height: 1.75em;
  }
}

#footer h1 {
  border-bottom: 0.1em solid #999999;
  margin: 0.9em 0 0.15em 0;
  color:#666666;
  font-size: 1.2em;
  margin: 0.5em;
}

#footer .text {
  margin: 0.5em;
  margin-bottom: 1.5em;
  text-indent: 0;
}
@media(min-width: 600px) {
  pre.code-block {
    font-size: 0.9em;
  }
}
@media(min-width: 800px) {
  pre.code-block {
    font-size: 2.5vw;
    line-height: 1.6em;
  }
}
@media(min-width: 1001px) {
  pre.code-block {
    font-size: 20px;
    line-height: 1.5em;
  }
}

pre.code-block-wrap {
  white-space: pre-wrap;
  line-height: 1.5em;
  word-wrap: break-word;
}

.article-content img {
	max-width: 100vw;
}

#cloud-latency-article {
  margin: 0 auto;
}

#cloud-latency-article img {
  max-width: 90vw;
}

@media(min-width: 901px) {
  #cloud-latency-article img {
    max-width: 1000px;
  }
  #cloud-latency-article #images-grid img {
    max-width: 425px;
  }
}

.articlead {
  padding-top: 20px;
  padding-bottom: 20px;
  min-height: 100px;
  min-width: 300px;
}

.long-image-bkg {
  background-repeat: no-repeat;
  background-size: 100%;
  width: 1000px;
  height: 300px;
}

@media(max-width: 1000px) {
  .long-image-bkg {
    width: 95vw;
  }
}

@media(max-width: 930px) {
  #images-grid { width: 85vw; }
  #cloud-latency-article #images-grid img {
    max-width: 45vw;
    max-height: 30vw;
  }
}

#cloud-latency-article #table-of-contents .toc-entry {
  padding: 0.75em;
  text-align: center;
}

/*
#antlr-haskell {
  padding: 0.75em;
}
*/

.emphasis {
  font-style: italic;
}

