:root {
  --background-color: #F9F5EC;
  --foreground-color: #FFFFFF;

  --gray-700: #333333;
  --gray-500: #808080;
  --beige-500: #EAD8C1;
  --beige-300: #F1EBDC;
  --rose-500: #EA7E7D;
  --green-500: #9BB7A5;

  --font-weight-normal: 400;
  --font-weight-semi-bold: 600;
  --font-weight-bold: 700;

  --border-radius-o: 50%;
  --border-radius-md: .5rem;
  --border-radius-lg: 1rem;
}

html, body {
  background-color: var(--background-color);
  color: var(--gray-700);
  font-family: 'Poppins', sans-serif;
  font-smooth: antialiased;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  border: 1.5rem solid var(--foreground-color);
}

* {
  box-sizing: border-box;
}

h1 {
  font-size: 3rem;
  font-weight: var(--font-weight-bold);
  line-height: 4rem;
  margin: 0 1.5rem 0 1rem;
}

h2 {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  line-height: 3rem;
  margin: 0;
}

p {
  font-size: 1rem;
  font-weight: var(--font-weight-normal);
  line-height: 1.5rem;
  margin: 0 0 1.5rem 0;
}

a {
  color: var(--rose-500);
  font-weight: var(--font-weight-semi-bold);
  text-decoration: underline;
}

a:hover {
  opacity: .8;
}

b {
  font-weight: var(--font-weight-semi-bold);
}

.wrapper {
  margin: 0 auto;
  max-width: 47.5rem;
  padding: 2rem 0;
}

section {
  border-bottom: 0.125rem solid var(--beige-500);
  padding: 4rem 0;
}

section:last-of-type {
  border-bottom: none;
}

.heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 0 3rem 0;
}

.heading button {
  appearance: none;
  background: none;
  border: none;
  color: var(--rose-500);
  cursor: pointer;
  font: inherit;
  font-weight: var(--font-weight-semi-bold);
  text-decoration: underline;
}

.heading button:hover {
  opacity: .8;
}

.heading button.active {
  color: var(--gray-700);
  text-decoration: none;
}

/* header section */

.tagline {
  color: var(--gray-500);
  font-weight: var(--font-weight-semi-bold);
  text-transform: uppercase;
}

.name {
  align-items: center;
  display: flex;
  margin: 0 0 1.5rem 0;
}

.social-link {
  align-items: center;
  background-color: var(--green-500);
  border-radius: var(--border-radius-o);
  display: flex;
  height: 3rem;
  justify-content: center;
  margin: 0 1rem 0 0;
  text-decoration: none;
  width: 3rem;
}

.social-link:hover {
  opacity: .8;
}

.status {
  margin: 0 0 2rem 0;
}

.status b {
  font-weight: var(--font-weight-bold);
}

.status i {
  color: var(--gray-500);
}

.status .status-icon {
  background-color: var(--green-500);
  border-radius: var(--border-radius-o);
  display: inline-block;
  height: .75rem;
  width: .75rem;
}

.overview {
  margin: 0 0 2rem 0;
}

.overview p:last-of-type {
  margin: 0;
}

.overview a {
  color: var(--gray-700);
}

.quick-links {
  margin: 0;
}

.quick-links a {
  margin: 0 .25rem; 
}

/** experience and education sections */

.timeline {
  position: relative;
}

.timeline::before {
  border-right: 2px dashed var(--rose-500);
  content: ' ';
  display: block;
  height: calc(100% - 2rem);
  left: .475rem;
  position: absolute;
  top: 2rem;
  width: 1px;
  z-index: 1;
}

.timeline .item {
  background: var(--beige-300);
  border-left: 2.5rem solid var(--background-color);
  margin: 0 0 1.5rem 0;
  position: relative;
}

.timeline .item:last-of-type {
  margin: 0;
}

.timeline .item:last-of-type::before {
  background: var(--background-color);
  content: ' ';
  display: block;
  height: calc(100% - 2.75rem);
  left: -2rem;
  position: absolute;
  top: 2.75rem;
  width: .25rem;
  z-index: 2;
}

.timeline .toggle {
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  z-index: 1;
}

.timeline .toggle.open img {
  transform: rotate(90deg);
}

.timeline .toggle img {
  display: block;
  transform: rotate(270deg);
}

.timeline .title {
  padding: 1.5rem;
}

.timeline .title + .title {
  padding-top: 0;
}

.timeline .title p:not(.meta)::before {
  background: var(--rose-500);
  border-radius: var(--border-radius-o);
  content: ' ';
  display: block;
  height: .75rem;
  left: -3.75rem;
  position: absolute;
  top: .5rem;
  width: .75rem;
}

.timeline .title p {
  margin: 0 0 .5rem 0;
  position: relative;
}

.timeline .title i {
  color: var(--green-500);
}

.timeline .title .meta {
  color: var(--gray-500);
  font-size: .875rem;
  margin: 0;
}

.timeline .body {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.timeline .body p:last-of-type {
  margin-bottom: 0;
}

.timeline .body ul {
  margin: 1rem 0 0 0;
  padding: 0 0 0 1.5rem;
}

.timeline .body.open {
  display: block;
}

/** recommendation section */

.carousel .item {
  display: none;
}

.carousel .item.selected {
  display: block;
}

.carousel .item.hidden {
  display: none;
}

.carousel .info {
  display: grid;
  grid-gap: 0 .75rem;
  grid-template-areas: 'image title'
                       'image connection';
  grid-template-columns: 2.5rem 1fr;
  grid-template-rows: 1.5rem 1.5rem;
  margin: 0 0 1.5rem 0;
  width: 100%;
}

.carousel .info .image {
  border-radius: var(--border-radius-o);
  grid-area: image;
  overflow: hidden;
}

.carousel .info .title {
  grid-area: title;
}

.carousel .info .connection {
  color: var(--gray-500);
  font-size: .875rem;
  grid-area: connection;
}

.carousel .comment {
  background: var(--foreground-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  position: relative;
}

.carousel .comment::before {
  background: var(--foreground-color);
  content: ' ';
  display: block;
  height: 1rem;
  left: 4rem;
  position: absolute;
  top: -.5rem;
  transform: rotate(45deg);
  width: 1rem;
}

.carousel .comment p:last-of-type {
  margin: 0;
}

.carousel .indicators {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 0 0;
}

.carousel .indicators .arrow {
  background: none;
  border: none;
  cursor: pointer;
  margin: 0 .5rem;
  padding: 0;
}

.carousel .indicators .arrow.disabled {
  opacity: .5;
  pointer-events: none;
}

.carousel .indicators .arrow img {
  display: block;
}

.carousel .indicators .arrow.right img {
  transform: rotate(180deg);
}

.carousel .indicators .indicator {
  appearance: none;
  background: var(--gray-500);
  border: none;
  border-radius: var(--border-radius-o);
  cursor: pointer;
  height: .5rem;
  margin: 0 .25rem;
  padding: 0;
  width: .5rem;
}

.carousel .indicators .indicator.hidden {
  display: none;
}

.carousel .indicators .indicator:hover,
.carousel .indicators .indicator.active {
  background: var(--rose-500);
}

/** skills section */

.skills p {
  margin: 0;
}

.skills p + p {
  margin: .75rem 0 0 0;
}

.skills-list {
  margin: 1.5rem 0 3rem 0; 
}

.skills .actions {
  display: flex;
}

.skills .checkbox {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: var(--font-weight-normal);
  margin: 0 1rem 0 0;
  user-select: none;
}

.skills .checkbox input {
  display: none;
}

.skills .checkbox input:checked + .check.skilled {
  background: var(--green-500);
}

.skills .checkbox input:checked + .check.familiar {
  background: var(--gray-500);
}

.skills .checkbox .check {
  background: var(--foreground-color);
  display: inline-block;
  height: 1rem;
  margin: 0 .5rem 0 0;
  width: 1rem;
}

.skills .checkbox .check.skilled {
  border: 2px solid var(--green-500);
}

.skills .checkbox .check.familiar {
  border: 2px solid var(--gray-500);
}

.skill-item {
  background: var(--foreground-color);
  display: inline-block;
  margin: 0 .5rem .5rem 0;
  padding: .1rem .5rem;
}

.skill-item.hidden {
  display: none;
}

.skill-item.skilled {
  border: 2px solid var(--green-500);
}

.skill-item.familiar {
  border: 2px solid var(--gray-500);
}

/** portfolio section */

.portfolio-item {
  background: var(--foreground-color);
  border: 1px solid var(--foreground-color);
  border-radius: var(--border-radius-md);
  display: grid;
  grid-gap: .5rem 1.5rem;
  grid-template-areas: 'preview title'
                       'preview date';
  grid-template-columns: 6rem 1fr;
  grid-template-rows: 1.5rem;
  margin: 0 0 .75rem 0;
  padding: 1rem;
  text-decoration: none;
}

.portfolio-item:hover {
  border-color: var(--rose-500);
  box-shadow: 1px 1px 4px 2px rgba(128, 128, 128, 0.15);
}

.portfolio-item p {
  color: var(--gray-700);
  margin: 0;
  padding: .25rem 0;
}

.portfolio-item .preview {
  border: 1px solid var(--gray-500);
  border-radius: var(--border-radius-md);
  display: block;
  grid-area: preview;
  overflow: hidden;
}

.portfolio-item .title {
  grid-area: title;
}

.portfolio-item .date {
  color: var(--gray-500);
  grid-area: date;
  font-size: .875rem;
  line-height: 1.5rem;
}

/** contact section */

label {
  display: block;
  font-weight: var(--font-weight-semi-bold);
  margin: 0 0 .5rem 0;
}
 
input, textarea {
  background: var(--foreground-color);
  border: 1px solid var(--beige-500);
  border-radius: var(--border-radius-md);
  display: block;
  font: inherit;
  margin: 0 0 1.5rem 0;
  padding: .65rem;
  width: 100%;
}

input:focus, textarea:focus {
  border-color: var(--green-500);
  outline: none;
}

button[type="submit"] {
  appearance: none;
  background: var(--green-500);
  border: none;
  border-radius: var(--border-radius-md);
  color: var(--foreground-color);
  cursor: pointer;
  font: inherit;
  padding: .75rem 1rem;
}

button[type="submit"]:hover {
  opacity: .8;
}

@media only screen and (max-width: 872px) {
  body {
    border-width: 1rem;
  }

  section {
    padding: 3rem 0;
  }

  h1 {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  h2 {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .wrapper {
    padding: 0 1.5rem;
  }

  .heading .actions {
    display: none;
  }

  .name {
    flex-wrap: wrap;
  }

  .name .headshot {
    height: 3rem;
    margin: 0 1.5rem 0 0;
    order: 2;
    width: 3rem;
  }

  .name h1 {
    flex: 1 0 auto;
    margin: 0 0 1.5rem 0;
    order: 1;
    width: 100%;
  }

  .name .linkedin {
    margin: 0 1.5rem 0 0;
    order: 3;
  }

  .name .twitter {
    margin: 0;
    order: 4;
  }

  .status b {
    display: block;
    margin: 0 0 .5rem 0;
  }

  .quick-links a {
    display: block;
    margin: 0 0 .25rem 0;
  }

  .quick-links span {
    display: none;
  }

  .carousel .item {
    background: white;
    border-radius: var(--border-radius-lg);
  }

  .carousel .info {
    grid-template-areas: 'image title';
    grid-template-rows: 3.25rem;
    margin: 0 1rem;
    padding: 1.5rem 0 0 0;
    width: auto;
  }

  .carousel .info .title {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .carousel .info .title b {
    display: block;
  }

  .carousel .connection,
  .carousel .info .title span {
    display: none;
  }

  .carousel .comment {
    padding-top: .75rem;
  }

  .carousel .arrow {
    flex: 1;
  }

  .carousel .arrow img {
    height: 2.5rem;
    width: 2.5rem;
  }

  .carousel .indicators .indicator {
    height: .75rem;
    width: .75rem;
  }

  .carousel .arrow.left {
    margin-left: 0;
  }

  .carousel .arrow.right {
    display: flex;
    justify-content: flex-end;
    margin-right: 0;
  }

  .portfolio-item {
    align-items: center;
    grid-gap: 0 1.5rem;
    grid-template-rows: auto;
  }

  .portfolio-item p {
    padding: 0;
  }

  .portfolio-item .preview {
    height: 6rem;
    object-fit: cover;
  }

  .timeline::before {
    left: -.25rem;
  }

  .timeline .item {
    border-left-width: 1.5rem;
  }

  .timeline .title p:not(.meta)::before {
    left: -3.5rem;
  }

  .timeline .title p {
    padding: 0 2rem 0 0;
  }

  .timeline .title span {
    display: none;
  }
}
