/* CSS Variables for consistent theming */
:root {
  --link-color: #b3b3b3;
  --link-hover-color: #2367ac;
  --header-color: #343434;
  --fade-duration: 0.6s;
  --mobile-breakpoint: 620px;
}

/* Base styles */
body {
  background: #f9f9f9;
  color: #202020;
  font-family: "Helvetica Neue", sans-serif;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

/* Typography */
h2 {
  opacity: 0;
  font-family: "PT Sans Narrow", "HelveticaNeue-Light", "Helvetica Neue Light",
    "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: var(--header-color);
  animation: appear var(--fade-duration) ease-in-out 0.8s forwards;
}

h2 > .title {
  margin-top: 20px;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px dotted var(--link-color);
  transition: all 0.2s ease;
}

a:hover {
  color: var(--link-hover-color);
  border-bottom: 1px dotted var(--link-hover-color);
  transform: scale(1.15) translateY(-1px);
}

/* Layout */
#main {
  display: flex;
  flex-direction: row;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.side-profile-image {
  display: inline-block;
  margin: 50px 10px;
  flex-shrink: 0;
}

#content-area {
  flex: 1;
}

/* Content sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.blurb-wrap {
  display: inline-block;
  margin: 40px 0 0 10px;
  vertical-align: top;
  width: 500px;
  max-width: 100%;
}

.blurb {
  font-family: "PT Serif", "HelveticaNeue-Light", "Helvetica Neue Light",
    "Helvetica Neue", Helvetica, Arial, "Lucida Grande", serif;
  color: var(--header-color);
  opacity: 0;
  line-height: 1.5;
  animation: appear var(--fade-duration) ease-in-out 0.8s forwards;
}

/* Cascading animation delays for each paragraph */
#blurb-section .blurb:nth-of-type(1) {
  animation-delay: 0.8s;
} /* "My name's Piper" */
#blurb-section .blurb:nth-of-type(2) {
  animation-delay: 1.8s;
} /* "A bit about me..." - longer pause after introduction */
#blurb-section .blurb:nth-of-type(3) {
  animation-delay: 2.1s;
} /* Main paragraph with interests */
#blurb-section .blurb:nth-of-type(4) {
  animation-delay: 2.4s;
} /* Climate/infrastructure paragraph */

/* Profile image */
.profile-photo {
  opacity: 0;
  width: 80px;
  height: 80px;
  border-radius: 150px;
  box-shadow: 1px 1px 1px 1px #abbbca;
  animation: appear var(--fade-duration) ease-in-out 0.1s forwards;
}

/* Icon styling */
.icon-wrap {
  display: flex;
  justify-content: center;
  margin-top: 25px;
  opacity: 0;
  animation: appear var(--fade-duration) ease-in-out 2.7s forwards;
}

.icon-link,
.icon-link:hover {
  margin: auto 3px !important;
  border-bottom: none !important;
  font-size: 20px;
  color: var(--link-color);
  transition: color 0.2s ease;
}

.icon-link:hover {
  color: var(--link-hover-color);
}

/* Community tiles */
.tile-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.tile {
  background: black;
  border: 10px white solid;
  border-radius: 2px;
  height: 120px;
  width: 100px;
  margin: 10px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  justify-content: center;
  flex-direction: column;
  color: white;
  cursor: pointer;
}

.tile:hover {
  box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 3px, rgba(0, 0, 0, 0.22) 0px 2px 1px;
  transform: rotate(1deg);
}

.tile:active {
  background-color: #c0ffee;
}

.tile a {
  color: white;
  border: none;
  font-size: 12px;
}

/* Articles */
.article {
  margin: 10px auto;
  text-align: left;
}

.article-link {
  color: var(--link-hover-color);
  border-bottom: 1px dotted var(--link-hover-color);
}

/* Quotes */
.first-quote {
  font-family: "HelveticaNeue-Light";
  margin-top: 0;
  font-size: 50px;
  line-height: 1.2;
}

/* Words/Vocabulary */
#words-container {
  list-style: none;
  padding: 0;
}

#words-container li {
  margin: 15px 0;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 5px;
}

.word-term {
  font-weight: 900;
  color: var(--header-color);
}

.word-definition {
  font-weight: 100;
  margin-left: 10px;
}

/* Engineers section */
#engineers-container .tile {
  background: #f0f0f0;
  color: var(--header-color);
  border: 1px solid #ddd;
}

#engineers-container .tile a {
  color: var(--header-color);
}

/* Animations */
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes disappear {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Mobile Responsiveness */
@media all and (max-width: 620px) {
  #main {
    flex-direction: column;
    padding: 10px;
  }

  h2 {
    margin: 5px 20px auto auto;
    text-align: center;
  }

  .side-profile-image {
    width: 100%;
    text-align: center;
    margin: 20px auto;
  }

  .blurb-wrap {
    user-select: none;
    width: 100% !important;
    margin: 0 15px !important;
  }

  .blurb-wrap .article {
    text-align: center;
  }

  .icon-wrap {
    display: flex;
    max-width: 200px;
    justify-content: space-evenly;
    align-items: normal;
    margin: 10px auto;
  }

  .article-link {
    color: var(--link-hover-color);
    border-bottom: 1px dotted var(--link-hover-color);
  }

  .first-quote {
    font-size: 30px;
  }

  .tile-group {
    justify-content: center;
  }

  .tile {
    width: 80px;
    height: 100px;
    margin: 5px;
  }
}

/* Hide elements by default for JavaScript control */
.content-section:not(.active) {
  display: none;
}
