html {
  background-color: #f7f7f7;
  height: 100%;
  display: flex;
}

body {
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: center;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  font-weight: 300;
  flex-grow: 1;
}

p {
  margin-block-start: 0.33em;
  margin-block-end: 0.33em;
}

summary {
  list-style: none;
  cursor: pointer;
  /* optional: keep pointer interaction */
}

summary::-webkit-details-marker {
  display: none;
  /* for Chrome, Safari */
}

.header,
.main,
.footer {
  width: 100%;
  max-width: 900px;
  flex-shrink: 0;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 1em;
}

.header,
.footer {
  flex-grow: 0;
}

.main {
  flex-grow: 1;
  align-items: flex-start;
}

.main__section {
  border-top: dotted red;
  margin-top: 0.33em;
}

.main__section:last-child:not(.summary) {
  padding-bottom: 0.66em;
  border-bottom: dotted red;
}

.header__picture {
  flex: 0 0 calc(33% - 0.5em);
  order: 1;
}

.main__aside {
  flex: 0 0 calc(33% - 0.5em);
  order: 2;
}

.header__picture {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.picture__image {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 50%;
}

.header__caption,
.main__center {
  flex: 1 1 calc(66% - 0.5em);
  order: 3;
}

.caption__title {
  font-size: 2.5em;
  font-weight: 500;
  margin-block-end: 0;
}

.caption__subtitle,
.details__title {
  text-transform: uppercase;
  font-size: 1.5em;
  font-weight: 500;
  color: red;
  margin-block-start: 0;
  margin-block-end: 0;

  .subtitle__note {
    font-size: 1rem;
    text-transform: lowercase;
  }
}

.details__summary {
  margin: 0.33em 0 0 0.33em;
  transition: all 0.3s ease;
}

.details__summary::-webkit-details-marker {
  list-style: none;
  display: none;
}

.details__summary:focus {
  outline: none;
  box-shadow: 0.33em 0.33em 4px 1px rgba(117, 117, 117, 0.2);
  transform: translate(-0.33em, -0.33em);
}

.details__article:not(:last-child) {
  margin-bottom: 0.66em;
}

.article__time,
.project__time {
  font-style: italic;

  .time__duration {
    font-size: 0.8rem;
  }
}

h3.article__role {
  margin-block-start: 0;
  margin-block-end: .5em;
}

.article__title,
.project__title {
  font-weight: 500;
}

.article__title--red {
  color: red;
}

.article__description {
  text-align: justify;
}

.description__subtitle {
  color: red;
}

h4.project__name {
  margin-block-start: 0;
  margin-block-end: .5em;
}

ul.project__description {
  list-style-type: circle;
  padding-inline-start: 1em;
  margin-block-start: 0.33em;
  margin-block-end: 0.33em;
}

.description__technologies {
  text-decoration: underline;
  font-weight: 300;
}

.footer__copyrights {
  margin: 0.66em 0;
}

.details__more {
  -webkit-animation: expand 300ms ease-out alternate;
  -moz-animation: expand 300ms ease-out alternate;
  -o-animation: expand 300ms ease-out alternate;
  animation: expand 300ms ease-out alternate;
}

@-webkit-keyframes expand {
  from {
    opacity: 0;
    margin-top: -100px;
  }

  to {
    opacity: 1;
    margin-top: 0px;
  }
}

@-moz-keyframes expand {
  from {
    opacity: 0;
    margin-top: -100px;
  }

  to {
    opacity: 1;
    margin-top: 0px;
  }
}

@-o-keyframes expand {
  from {
    opacity: 0;
    margin-top: -100px;
  }

  to {
    opacity: 1;
    margin-top: 0px;
  }
}

@keyframes expand {
  from {
    opacity: 0;
    margin-top: -100px;
  }

  to {
    opacity: 1;
    margin-top: 0px;
  }
}

.button-more {
  display: block;
  margin: auto;
  cursor: pointer;
  border: 0px;
  background-color: transparent;
  font-size: 1em;
  color: #0099ff;
}

.button-more:hover,
.button-more:focus {
  outline: none;
  text-decoration: underline;
}

.flex-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 8px;
}

.flex-item {
  flex: 0 0 auto;
}

.social-links {
  justify-content: flex-end;
}

.social-link {
  display: inline-flex;
  color: inherit;
  transition: color 0.2s;
}

.social-link:hover {
  color: red;
}

.social-icon {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
}

.hide-online {
  display: none;
}

@media print {

  body {
    font-size: 12px;
  }

  .no-print {
    display: none;
  }

  .print {
    display: block;
  }

  /* Override inline style="display: none;" set by JS toggle */
  .details__more {
    display: block !important;
    animation: none !important;
  }

  .button-more {
    display: none;
  }

  /* Prevent sections from splitting across pages */
  .details__article,
  .article__project {
    break-inside: avoid;
  }

  /* Keep section headers with their content */
  /* Keep article headers with their body */
  .details__summary,
  .details__article>header {
    break-after: avoid;
  }

  /* Avoid widows/orphans in text */
  p,
  li {
    orphans: 3;
    widows: 3;
  }

  /* Page 2: force sidebar and main content to start on new page */
  .main__section.languages,
  .main__section.freelance {
    break-before: page;
  }
}