:root {
  --light: hsla(0, 0%, 100%, 1);
  --dark: hsla(330, 2.3%, 16.9%, 1);

  --blue: hsla(200, 100%, 40%, 1);
  --blue-dark: hsla(200, 100%, 38%, 1);
  --blue-transparent: hsla(200, 100%, 40%, 0.2);
  --blue-very-transparent: hsla(200, 100%, 40%, 0.1);

  --orange: hsla(24.1, 100%, 45.5%, 1);
  --orange-dark: hsla(24.1, 100%, 43.5%, 1);
  --orange-transparent: hsla(200, 100%, 40%, 0.2);
  --orange-very-transparent: hsla(200, 100%, 40%, 0.1);

  --background: var(--light);
  --foreground: var(--dark);
  --a: var(--blue);
  --hover: var(--orange);
  --hover-bg: var(--orange-very-transparent);
  --select-bg: var(--orange-transparent);
  --visited: var(--blue-dark);
  --animationDetails: background 0.2s ease-out;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: var(--dark);
    --foreground: var(--light);
    --a: var(--orange);
    --hover: var(--blue);
    --hover-bg: var(--blue-very-transparent);
    --select-bg: var(--blue-transparent);
    --visited: var(--orange-dark);
  }
}

* {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
    "Helvetica Neue", Helvetica, sans-serif;
  -webkit-transition: var(--animationDetails); /* Safari */
  transition: var(--animationDetails);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

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

html {
  max-width: 100%;
  margin: 0;
  font-weight: 400;
  background-color: var(--background);
  color: var(--foreground);
}

::-moz-selection {
  background: var(--select-bg);
  text-shadow: none;
}

::selection {
  background: var(--select-bg);
  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;
}

/* ==========================================================================
Browser Upgrade Prompt
========================================================================== */

.browserupgrade {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

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

body {
  max-width: 50rem;
  margin: auto;
  padding: 5px;
}

p {
  padding: 0.5em 0;
  margin: 0;
  line-height: 1.4;
}

h1,
h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
    Arial, sans-serif;
}

h1 {
  font-weight: 300;
  font-size: 2.2rem;
  padding: 1rem 0 0 0;
  margin: 0;
}

h2 {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 1.5rem 0 0.1rem 0;
  /* padding: 5px 0 0 0; */
}

strong,
b {
  font-weight: 700;
}

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

a:hover,
a:visited:hover {
  text-decoration: underline;
  color: var(--hover);
}

a:visited {
  color: var(--visited);
}

/*
.hiphen {
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.justified {
  text-align: justify;
}
*/

.grow {
  flex-grow: 1;
}

#wrapper {
  margin: 0 0.7em;
}

header {
  float: left;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1rem;
  font-size: 1.2rem;
}

nav a {
  margin: 0 1rem;
}

.spaced {
  margin: 0.2rem 0.05rem 0.05rem 1rem;
}

.current a,
.current a:hover {
  color: var(--hover);
}

.experience:hover,
.publication:hover {
  /* 	-webkit-backdrop-filter: saturate(1.8) blur(100px); */
  /* 	background-color: rgba(178, 215, 255, 0.2); */
  /* 	background-color: rgba(255, 187, 184, 0.2); */
  background-color: var(--hover-bg);

  /*   a really nice hover shadow from Apple.com */
  /* box-shadow: rgba(0, 0, 0, 0.298039) 0px 39px 70px -14px;  */
}

.cvHeadNote {
  margin-left: 1rem;
}

.cvHeadNote a {
  text-decoration: none;
}

.cvTable {
  width: 100%;
  font-size: 11pt;
}

/* .cvTable #updated {
  padding-left: 1rem;
} */

.cvTable a {
  text-decoration: none;
  color: var(--foreground);
}

.cvTable a:hover {
  text-decoration: underline;
  color: var(--hover);
}

.cvTable table {
  border-collapse: collapse;
}

.cvTable td {
  vertical-align: top;
  page-break-inside: avoid;
  padding: 0.3rem 0;
}

.cvTable tr {
  page-break-inside: avoid;
}

.cvTable .detail {
  font-weight: 100;
  white-space: nowrap;
  text-align: right;
  padding-right: 0.5rem;
}

img {
  width: 7rem;
  height: 7rem;
  margin: 0;
  padding: 0;
  margin: 5px 5px 5px 0;
  border-radius: 0.3rem;
  box-shadow: rgba(0, 0, 0, 0.298039) 0px 25px 70px -14px;
}

.contact {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}

.contact div {
  padding: 5px 10px;
}

.highlightRows {
  display: flex;
  flex-direction: column;
}

.experience {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-content: center;
  margin: 0 -1rem;
  padding: 0.5rem 1rem;
  border-radius: 7px;
}

.contentBox {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-content: center;
  margin: 0 -1rem;
  padding: 0 1rem;
}

.logo {
  flex-basis: 43px;
  flex-shrink: 0;
  align-content: stretch;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  margin: 0 0.5em 0 0;
}

.stanford {
  background-image: url("stanford.png");
}
.cmu {
  background-image: url("cmu.png");
}
.pitt {
  background-image: url("pitt.svg");
}
.kaist {
  background-image: url("kaist.gif");
}
.rmit {
  background-image: url("rmit.png");
}
.zju {
  background-image: url("zju.png");
}
.adaptive {
  background-image: url("adaptive.png");
}
.ideo {
  background-image: url("ideo.jpg");
}
.constitution {
  background-image: url("daemo.png");
}
.moocs {
  background-image: url("uom.png");
}
.guilds {
  background-image: url("guilds.png");
}
.grammar {
  background-image: url("grammar.png");
}

.wide {
  flex-basis: 100px;
  flex-shrink: 0;
  margin-right: 20px;
}

.right {
  margin: 0 0 0 1em;
  order: 1;
}

.button {
  font-size: 0.8rem;
  height: 1rem;
  border: none;
  font-weight: 600;
  padding: 0.1rem 0.2rem 0.08rem 0.2rem;
  border-radius: 0.2rem;
  margin: 0.19rem 0.05rem 0.06rem 0.05rem;
  color: var(--background);
  text-decoration: none;
  background-color: var(--a);
  font-family: "menlo", Monaco, monospace;
}

.button:hover,
.button:visited:hover {
  text-decoration: none;
  background-color: var(--hover);
  color: var(--background);
}

.button:visited {
  text-decoration: none;
  background-color: var(--visited);
  color: var(--background);
}

footer {
  position: relative;
  bottom: 5px;
  left: 0;
  right: 0;
  margin: 1em auto 0 auto;
  width: inherit;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-end;
  font-size: small;
}

footer div {
  margin: 0px 5px;
  padding: 0;
}

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

/*
* Hide visually and from screen readers
*/

.hidden {
  display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*/

.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

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

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  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: " "; /* 1 */
  display: table; /* 2 */
}

.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:
http://www.phpied.com/delay-loading-your-print-css/
========================================================================== */

@page {
  margin: 1.6cm;
}

@page {
  counter-increment: page;
  counter-reset: page 1;
  @bottom-right {
    content: "Page " counter(page) " of " counter(pages);
  }
}

@media print {
  *,
  *:before,
  *:after,
  *:first-letter,
  *:first-line {
    background: transparent !important;
    color: #000 !important;
    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,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
* Printing Tables:
* http://css-discuss.incutio.com/wiki/Printing_Tables
*/

  thead {
    display: table-header-group;
  }

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

  img {
    max-width: 100% !important;
  }

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

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

@media print {
  .no-print,
  .no-print * {
    display: none !important;
  }
}
