/****  Boilerplate CSS: ****/

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

html,
body {
  font-family:
    "Open Sans",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;

  height: 100%; /* Avoid weird collapsing issues */
}

ul,
ol {
  list-style: none; /* Optional, but keeps things predictable */
}

button {
  all: unset; /* Resets default button styles */
  cursor: pointer;
}

/**** BORRELIOS>ONLINE ****/

html {
  scroll-behavior: smooth;
}


body {
  max-width: 600px;
  font-size: 1rem;
  color: #191818;
  line-height: 1.6;
  margin-left: calc((100% - 600px) * 0.6);
  margin-right: calc((100% - 600px) * 0.4);
}

nav {
  font-size: 0.9rem;
  position: fixed;
  line-height: 1.4;
  left: calc((100% - 750px) * 0.7 - 15em);
  margin-top: 40vh;
}

.hamburger {
  display: none;
}

p {
  margin-bottom: 0.75em;
}

a {
  color: #777;
  text-decoration: none;
}

h1,  /* override under h1*/
h2,
h3,
h4,  /* override under h4 */
h5,
h6,
.hamburger {
  color: hsl(0, 0%, 47%);
  font-weight: 350;
}

h1 {
  color: #e4e0e0;
  font-size: 10rem;
  margin-top: 0;
  display: inline-block;
  white-space: nowrap;
}

h2 {
  font-size: 2rem;
  margin: 3rem 0 0 0;
  display: inline-block;
  white-space: nowrap;
  margin-bottom: 0.25em;
}

h3 {
  font-size: 2rem;
  margin: 0;
  display: inline-block;
  white-space: nowrap;
  margin-bottom: 0.25em;
  line-height: 0.75;
}

h4 {
  color: #777;
  left: -100px;
  font-size: 1.6em;
  margin-bottom: 0.75em;
  margin-top: 1.5em;
}

footer {
  margin-top: 3em;
  font-size: 0.75em;
  font-style: italic;
  color: darkgrey;
}

.underline-animate {   
  position: relative;
  display: inline-block;
  width: max-content;
  margin: 0.5em 0;
  text-decoration: none;
  color: #757474;                 /* left sidebar non-hover color */
  transition: color 0.2s;
}

.underline-animate::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 100%;
  height: 1px;
  background-color: #aaa;
  transition: transform 0.3s ease;
}

.underline-animate:hover {
  color: #444;
}

.underline-animate:hover::after {
  transform: translateX(-50%) scaleX(1);
}

#email-placeholder {
  padding-top: 1em;
  text-align: right;
  margin-right: 1em;
  font-size: 1rem;
}

.more-btn {
  display: flex;
  background: none;
  font-size: 1rem;
  cursor: pointer;
  margin-left: auto;
  vertical-align: baseline;
  border: solid gray 1px;
  color: gray;
  padding: 0 20px;
  border-radius: 10px;
}

.more-btn:hover {
  color: black;
  background-color: white;
}

.more-inline {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.25);
  color: #444;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.25em 0.6em;
  margin-left: 0.5em;

  cursor: pointer;
  border-radius: 4px;

  transition: 
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.more-inline:hover {
  color: #000;
  border-color: rgba(0,0,0,0.6);
  background-color: rgba(0,0,0,0.04);
}

.more-inline:focus {
  outline: none;
  border-color: #000;
}



/************************************************************************************************/

@media (max-width: 1100px) {
  nav {
    left: 1em;
  }

  body {
    padding-right: 1em;
    margin-right: 1em;
    margin-left: 12em;
  }

  h1,
  h2,
  h3 {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 800px) {
  body {
    width: 90vw;
    max-width: 90vw;
    margin: auto;
    font-size: 1em;
    line-height: 1.5;
  }

  header {
    position: fixed;
    width: 100%;
    background-color: white;
    padding-right: 2em
  }

  h1,
  h2,
  h3 {
    font-weight: 300;
  }

  .hamburger {
    display: flex;
    position: fixed;

    font-size: 2rem;
    margin-top: -1.25em;
    color: #5d5c5c;
  }

  nav {
    display: none;
  }

  .underline-animate {
    color: #747474;
  }

  nav.show {
    display: flex;
    position: fixed;
    margin-top: 4em;
    left: 1em;
    width: auto;
    background-color: #fafafa;
    padding: 1em;
    border: 1px solid #ccc;
    border-radius: 0.5em;
    z-index: 999;
  }
}
