*,
:after,
:before {
	box-sizing: border-box;
	background-color: inherit;
	color: inherit;
	margin: 0;
	padding: 0;
}

html {
	font-size: 15px;
}

#theme-toggle {
	opacity: 0.65;
	position: relative;
	border-radius: 5px;
	height: 25px;
	display: flex;
	-webkit-box-align: center;
	align-items: center;
	-webkit-box-pack: center;
	justify-content: center;
	transition: opacity 0.3s ease 0s;
	border: none;
	outline: none;
	background: none;
	cursor: pointer;
	padding: 0px;
	appearance: none;
	transform: scale(0.8);
}

html,
html[data-theme="light"] {
	--text-font: Play;
	--source-code-font: Source Code Pro;
	--very-light-text-color: rgb(222, 222, 222);
	--light-text-color: rgb(89, 183, 255);
	--medium-text-color: #555;
	--main-text-color: #333;
	--highlight-text-color: #6cb4a0;
	--dark-text-color: #393e46;
	--link-color: rgb(50, 87, 209);
	--code-bg-color: rgb(245, 245, 245);

	background-color: rgb(255, 255, 255);

	

	#theme-toggle div {
		position: relative;
		width: 24px;
		height: 24px;
		border-radius: 50%;
		border: none;
		background-color: var(--theme-ui-colors-transparent, transparent);
		transform: scale(1);
		transition: all 0.45s ease 0s;
		overflow: hidden;
		box-shadow: inset 8px -8px 0px 0px var(--theme-ui-colors-toggleIcon, #2d3748);

		&::before {
			content: "";
			position: absolute;
			right: -9px;
			top: -9px;
			height: 24px;
			width: 24px;
			border: none;
			border-radius: 50%;
			transform: translate(0px, 0px);
			opacity: 1;
			transition: transform 0.45s ease 0s;
		}

		&::after {
			content: "";
			width: 8px;
			height: 8px;
			border-radius: 50%;
			margin: -4px 0px 0px -4px;
			position: absolute;
			top: 50%;
			left: 50%;
			box-shadow: 0 -23px 0 var(--theme-ui-colors-toggleIcon, #2d3748),
				0 23px 0 var(--theme-ui-colors-toggleIcon, #2d3748), 23px 0 0 var(--theme-ui-colors-toggleIcon, #2d3748),
				-23px 0 0 var(--theme-ui-colors-toggleIcon, #2d3748),
				15px 15px 0 var(--theme-ui-colors-toggleIcon, #2d3748),
				-15px 15px 0 var(--theme-ui-colors-toggleIcon, #2d3748),
				15px -15px 0 var(--theme-ui-colors-toggleIcon, #2d3748),
				-15px -15px 0 var(--theme-ui-colors-toggleIcon, #2d3748);
			transform: scale(0);
			transition: all 0.35s ease 0s;
		}
	}
}

html[data-theme="dark"] {
	--text-font: Play;
	--source-code-font: Source Code Pro;
	--very-light-text-color: #EEE;
	--light-text-color: #c4bbf0;
	--medium-text-color: #52057b;
	--main-text-color: #EAEAEA;
	--highlight-text-color: #6cb4a0;
	--dark-text-color: rgb(36, 38, 42);
	--link-color: rgb(255, 89, 125);
	--code-bg-color: rgb(36, 38, 42);
	background-color: rgb(19, 20, 24);

	#theme-toggle div {
		position: relative;
		width: 24px;
		height: 24px;
		border-radius: 50%;
		border: 4px solid var(--theme-ui-colors-toggleIcon, #cbd5e0);
		background-color: var(--theme-ui-colors-toggleIcon, #cbd5e0);
		transform: scale(0.55);
		transition: all 0.45s ease 0s;
		overflow: visible;
		box-shadow: none;

		&::before {
			content: "";
			position: absolute;
			right: -9px;
			top: -9px;
			height: 24px;
			width: 24px;
			border: 2px solid var(--theme-ui-colors-toggleIcon, #cbd5e0);
			border-radius: 50%;
			transform: translate(14px, -14px);
			opacity: 0;
			transition: transform 0.45s ease 0s;
		}

		&::after {
			content: "";
			width: 8px;
			height: 8px;
			border-radius: 50%;
			margin: -4px 0px 0px -4px;
			position: absolute;
			top: 50%;
			left: 50%;
			box-shadow: 0 -23px 0 var(--theme-ui-colors-toggleIcon, #cbd5e0),
				0 23px 0 var(--theme-ui-colors-toggleIcon, #cbd5e0), 23px 0 0 var(--theme-ui-colors-toggleIcon, #cbd5e0),
				-23px 0 0 var(--theme-ui-colors-toggleIcon, #cbd5e0),
				15px 15px 0 var(--theme-ui-colors-toggleIcon, #cbd5e0),
				-15px 15px 0 var(--theme-ui-colors-toggleIcon, #cbd5e0),
				15px -15px 0 var(--theme-ui-colors-toggleIcon, #cbd5e0),
				-15px -15px 0 var(--theme-ui-colors-toggleIcon, #cbd5e0);
			transform: scale(1);
			transition: all 0.35s ease 0s;
		}
	}
}

body {
	font-family: var(--text-font), monospace;
	text-rendering: optimizeLegibility;
	line-height: 1.75;
	color: var(--main-text-color);
}

a {
	color: var(--link-color);
	text-decoration: none;
}

.post p {
	margin: 1rem 0;
}

.meta {
	margin: 1.4rem 0;

}

code,
pre {
	background: var(--code-bg-color);
	margin: 0 -27px;
	border-width: 1px;
}

code {
	font-family: var(--source-code-font), monospace;
	margin: unset;
	padding: 0.1rem;
	color: var(--highlight-text-color);
}

pre code {
	background-color: unset;
	color: unset;
}

pre {
	border-width: 3px;
	padding: 0.8rem;
	white-space: pre-wrap;
	border-style: none none none solid;
	border-color: var(--light-text-color);
}

img {
	max-width: 100%;
}

hr {
	background: var(--light-text-color);
	height: 1px;
	border: 0;
}

header {
	flex-basis: 10rem;
	flex-grow: 1;
	position: relative;
}

header a {
	text-decoration: none;
}

header li {
	margin-bottom: 0.2rem;
	text-align: right;
	margin-right: 2rem;
}

header a.active {
	font-weight: bold;
}

header,
section {
	padding: 1rem 0;
}

section {
	margin-top: 5.5rem;
}

blockquote {
	font-style: italic;
	border-left: 5px solid var(--dark-text-color);
	padding-left: 1rem;
}

h1 {
	color: var(--main-text-color);
	text-transform: uppercase;
	font-size: 2rem;
	font-weight: bold;
	margin-bottom: 1.5rem;
}

h2,
h3,
h4,
h5 {
	font-weight: bold;
	margin-bottom: 1.5rem;
	font-size: 2rem;
}

h2 {
	font-size: 1.8rem;
}

h3 {
	font-size: 1.6rem;
}

h4 {
	font-size: 1.4rem;
}

h5 {
	font-size: 1.2rem;
}

h6 {
	font-size: 1rem;
}

section h1:first-child {
	margin-top: 0;
}

strong,
b {
	font-weight: bold;
}

.photos ul {
	list-style: none;
}

.photos li {
	margin-bottom: 1.5rem;
}

.photo picture,
.project picture {
	margin-bottom: 0.5rem;
}

.posts > h3 {
	font-weight: 500;
}

.post ul {
	margin: 0px;
	margin: 0px 0px 10px 10px;
}

.post ol {
	margin: 0px;
	margin: 0px 0px 10px 15px;
}

.posts li {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.5rem;
}

.posts li a,
.posts li div,
.projects li a {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: bold;
}

.posts li time,
.projects li time {
	padding-left: 1rem;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

time {
	color: var(--main-text-color);
}

.post > h1.title {
	font-size: x-large;
	margin-top: 0;
	margin-bottom: 0;
}

.post > time {
	margin-bottom: 0;
	margin-top: 3rem;
}

.highlight {
	margin: 0px;
}

main {
	display: flex;
	max-width: 55rem;
	margin: -5rem auto 0;
	padding: 2.4rem 2rem;
	flex-direction: column;
}


.flex-row-between {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

.social-footer {
  padding: 1rem;
  display: flex;
  justify-content: center;
  position: initial;

  .social-footer-icons {
     
    .fa {
      font-size: 1.3rem;
      color: #a9a9a9;

      &:hover {
        color: darken(#a9a9a9, 25%);
        transition: color 0.3s ease-in;
      }
    }
  }
}

@media screen and (max-width: 45rem) {
	header li {
		display: inline;
		margin-right: 1rem;
	}
	.logo {
		padding-bottom: 1rem;
	}
	header ul {
		border-bottom: 1px solid #edf2f7;
		padding-bottom: 2rem;
	}
	nav ul {
		border-right: 0px;
	}

	.photos ul {
		margin-top: 0.5rem;
	}

	main {
		padding: 0 2rem;
	}

}

section {
	flex-grow: 999;
	display: flex;
	flex-direction: column;
}

figcaption {
	font-size: smaller;
}

.bio {
	margin-bottom: 5rem;
}

::selection {
background-color: #fffba0;
color: #333;
}


.search-article {
  position: relative;
 

  label[for="search-input"] {
    position: relative;
    top: -10px;
    left: 11px;
  }

  input[type="search"] {
    top: -1rem;
    left: 0;
    border: 0;
    width: 100%;
    height: 30px;
    outline: none;
    position: absolute;
    border-radius: 5px;
    padding: 10px 10px 10px 35px;
    color: var(--main-text-color);
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.1);
    &::-webkit-input-placeholder {
      color: #808080;
    }
    &::-webkit-search-decoration,
    &::-webkit-search-results-decoration {
      display: none;
    }
  }
}

#search-results {
  list-style: none;
  text-align: center;
  li {
    text-align: center;
  }
}

#search-results li::before {
	content: "›";
	display: inline-block;
	margin-left: -1.3em;
	width: 1.3em;
	color: var(--main-text-color);
}

.post-nav {
  display: flex;
  position: relative;
  margin-top: 0;
  border-top: 2px solid var(--light-text-color);
  line-height: 1.4;

  .post-nav-item {
    border-bottom: 0;
    padding-bottom: 10px;

    .post-title {
      color: var(--main-text-color);
    }

    &:hover,
    &:focus {
      .post-title {
        color: var(--link-color);
        opacity: 0.9;
      }
    }

    .nav-arrow {
      font-size: 17px;
      color: var(--main-text-color);
      margin-bottom: 3px;
	  font-weight: bold;
    }

    width: 50%;
    padding-top: 10px;
    text-decoration: none;
    box-sizing: border-box;

    &:nth-child(odd) {
      padding-left: 0;
      padding-right: 20px;
    }

    &:nth-child(even) {
      text-align: right;
      padding-right: 0;
      padding-left: 20px;
    }
  }
} 	


.tags ul {
	list-style: none;
    display: grid;
    grid-template-columns: auto auto auto auto auto auto;
	grid-template-rows:auto auto auto auto;

}


.tags li {
	white-space: normal;
	text-overflow: ellipsis;
	}


  // ------------------------------------
$link-color: var(--link-color);
.timeline {
  position: relative;
  width: 650px;
  margin: -6em auto;
  padding: 1px;
  list-style-type: none;
  height: 100%;

  @media (max-width: 860px) {
    width: 100%;
    margin: 0 auto;
    /* Add margin to center the timeline on mobile */
  }

  &:before {
    position: absolute;
    left: 50%;
    /* Center the vertical line */
    top: 0;
    content: ' ';
    display: block;
    width: 6px;
    height: 100%;
    margin-left: -6px;
    background: var(--light-text-color);
    z-index: 5;

    @media (max-width: 860px) {
      width: 3px;
      margin-left: -3px;
    }
  }

  li {
    padding: 2em 0;

    @media (max-width: 860px) {
      padding: 2em 0;
    }

    &::after {
      content: "";
      display: block;
      height: 150%;
      clear: both;
      visibility: hidden;
    }
  }
}

.direction-l {
  position: relative;
  width: 287px;
  float: left;
  text-align: right;
  @media(max-width: 860px) {
    float: none;
    width: 100%;
    text-align: center;
  }
  .flag {
    color: #333;
    box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.52); // $color shadow
    &:after {
      content: "";
      position: absolute;
      left: 100%;
      top: 50%;
      height: 0;
      width: 0;
      margin-top: -8px;
      border: solid transparent;
      border-left-color: rgb(248,248,248);
      border-width: 8px;
      pointer-events: none;
      @media(max-width: 860px) {
        content: "";
        position: absolute;
        left: 50%;
        top: -8px;
        height: 0;
        width: 0;
        margin-left: -8px;
        border: solid transparent;
        border-bottom-color: rgb(255,255,255);
        border-width: 8px;
        pointer-events: none;
      }
    }
  }
  .time-wrapper {
    float: left;
    @media(max-width: 860px) {
      float: none;
    }
  }
}


.direction-r {
  position: relative;
  width: 293px;
  float: right;
  text-align: left;
  @media(max-width: 860px) {
    float: none;
    width: 100%;
    text-align: center;
  }
  .flag {
    color: #333;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.52); // $color shadow
    &:after {
      content: "";
      position: absolute;
      right: 100%;
      top: 50%;
      height: 0;
      width: 0;
      margin-top: -8px;
      border: solid transparent;
      border-right-color: rgb(248,248,248);
      border-width: 8px;
      pointer-events: none;
      @media(max-width: 860px) {
        content: "";
        position: absolute;
        left: 50%;
        top: -8px;
        height: 0;
        width: 0;
        margin-left: -8px;
        border: solid transparent;
        border-bottom-color: rgb(255,255,255);
        border-width: 8px;
        pointer-events: none;
      }
    }
    &:before {
      left: -40px;
    }
  }
  .time-wrapper {
    float: right;
    @media(max-width: 860px) {
      float: none;
    }
  }
}

.flag-wrapper {
  position: relative;
  display: inline-block;
  text-align: center;
  @media(max-width: 860px) {
    text-align: center;
  }
  .flag {
    position: relative;
    display: inline;
    background: rgb(248,248,248);
    padding: 6px 10px;
    border-radius: 5px;
    font-weight: 600;
    text-align: left;
    @media(max-width: 860px) {
      background: rgb(255,255,255);
      z-index: 15;
    }
  }
}

.direction-l .flag:before,
.direction-r .flag:before {
  position: absolute;
  top: 60%;
  right: -40px;
  content: ' ';
  display: block;
  width: 12px;
  height: 12px;
  margin-top: -10px;
  background: #fff;
  border-radius: 10px;
  border: 4px solid $link-color;
  z-index: 10;
  @media(max-width: 860px) {
    position: absolute;
    top: -30px;
    left: 53%;
    content: ' ';
    display: block;
    margin-left: -10px;
  }
}



.time-wrapper {
  display: inline;
  line-height: 1em;
  font-size: 0.66666em;
  color: $link-color;
  vertical-align: middle;
  @media(max-width: 860px) {
    display: block;
    position: relative;
    margin: 4px 0 0 0;
    z-index: 14;
  }
  .time {
    display: inline-block;
    padding: 4px 6px;
    background: rgb(248,248,248);
  }
}

.desc {
  margin: 1em 0.2em -3.5em 0;
  font-size: 0.9em;
  line-height: 1.5em;
  a {
    color: $link-color;
    text-decoration: none;
    &:hover {
      text-decoration: underline;
    }
  }
  @media(max-width: 860px) {
    position: relative;
    margin: 1em 1em 0 1em;
    padding: 1em;
    background: var(--code-bg-color);
    box-shadow: 0 0 1px rgba(0,0,0,0.20);
    z-index: 15;
    
  }
}
