@font-face {
  font-family: "Quicksand";
  src: url("fonts/Quicksand-VariableFont_wght.ttf") format("truetype");
}

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

html {
  scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Typography */

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  width: 100vw;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Quicksand", sans-serif;
  font-weight: 400;
}

h1 {
  font-size: 4rem;
}

h2 {
  font-size: 3rem;
  line-height: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: 20px;
}

h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

p {
  font-size: 1.5rem;
  font-weight: 300;
}

.center-text {
  text-align: center;
}

.outline {
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px;
}

/* Colors */

body {
  background-color: #ffe9cf;
}

/* Layout */

.header-text-wrapper {
  position: relative;
  padding-left: 20%;
}

.header-text-wrapper.centered {
  padding: 0;
}

.centered .header-trinity-spinner {
  margin-left: 0;
}

.name-wrapper {
  height: calc(2 * 80px);
}

.header-trinity-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin-left: 20%;
  z-index: -1;
}

.header-trinity-spinner .circle-axis {
  animation-duration: 18s;
}

.circle-axis {
  width: 30px;
  height: 30px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-300%, -50%);
  animation-name: rotate;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.circle {
  position: absolute;
  width: 150px;
  height: 150px;
  border: solid 1px #aa6e1e;
  border-radius: 50%;
  opacity: 0.3;
}

.trinity-spinner .circle-axis:nth-child(1) {
  transform-origin: -100% 50%;
}

.trinity-spinner .circle-axis:nth-child(2) {
  transform-origin: -100% 50%;
  animation-direction: reverse;
}

.trinity-spinner .circle-axis:nth-child(3) {
  transform-origin: 0% 50%;
}

.trinity-spinner .circle-axis:nth-child(1) .circle {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
}

.trinity-spinner .circle-axis:nth-child(2) .circle {
  left: 50%;
  top: 50%;
  transform: translate(-75%, -50%);
}

.trinity-spinner .circle-axis:nth-child(3) .circle {
  left: 50%;
  top: 50%;
  transform: translate(-25%, -50%);
}

h1 {
  line-height: 80px;
  height: 50px;
  display: flex;
  flex-direction: column;
}

.filled {
  padding-right: 30%;
  animation: filled-slide 1s ease-out;
}

.outline {
  padding-left: 30%;
  animation: outline-slide 1s ease-out;
}

header {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: center;
  max-width: 1200px;
  margin: 50px auto 25px auto;
  animation: header-expand 1s ease-out;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  margin-bottom: 150px;
}

main.centered {
  flex-direction: column;
  align-items: center;
}

footer {
  margin: 0 auto;
  text-align: center;
  padding: 20px 0;
  max-width: 1200px;
}

footer p {
  margin-left: 20%;
  font-size: 0.75rem;
}

/* Sidebar */

.menu-button,
.close-button {
  display: none;
}

.sidebar {
  padding: 50px 25px 0 10px;
  top: 0px;
  position: sticky;
  align-self: flex-start;
  width: 20%;
  display: flex;
  flex-direction: column;
}

.sidebar a {
  font-size: 1.5rem;
  text-decoration: none;
  color: #aa6e1e;
  display: flex;
}

.sidebar > a {
  min-width: 150px;
  overflow-x: hidden;
}

.link-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 3px 0 0 4px;
  background-color: #aa6e1e;
  -webkit-mask: url(images/icons/external.svg) no-repeat center;
  mask: url(images/icons/external.svg) no-repeat center;
  align-self: center;
}

.sidebar .subheading {
  font-size: 1.25rem;
  margin-left: 15px;
}

.subheading {
  padding-left: 15px;
}

.subheading:first-letter {
  margin-left: -15px;
}

.sidebar .subheading::before {
  content: "- ";
}

.socials {
  display: flex;
  flex-direction: row;
  margin-top: 25px;
}

.socials a {
  width: 25px;
  height: 25px;
}

/* Portfolio Content */

.main-content {
  width: 80%;
  padding: 50px 20px 0 20px;
  animation: main-content-fade 1s ease-out;
}

.main-content a {
  color: #aa6e1e;
  text-decoration: none;
}

h2::before,
h2::after {
  display: inline-block;
  content: "";
  width: 4rem;
  width: 0;
  height: 0;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  margin: 0 1rem;
  transform: translateY(0.2rem);
  transform-origin: 0% 50%;
  opacity: 0.5;
}

h2::before {
  border-right: 4.5rem solid #aa6e1e;
}

h2::after {
  border-left: 4.5rem solid #aa6e1e;
}

.main-content section {
  margin-bottom: 50px;
}

.reel-wrapper {
  max-width: 100%;
  padding: 0 10px;
  text-align: center;
}

iframe {
  border-radius: 10px;
  max-width: 100%;
  background-color: #7c7c7c33;
  animation: background-pulse 1s infinite;
}

#portfolio section {
  margin-bottom: 50px;
}

.portfolio-grid {
  min-height: 400px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-evenly;
}

.portfolio-grid img {
  max-height: 400px;
  max-width: 100%;
  cursor: pointer;
  border-radius: 10px;
  transition: opacity 0.3s ease;
  background-color: #7c7c7c33;
  animation: background-pulse 1s infinite;
}

.portfolio-grid img:hover {
  opacity: 0.85;
}

/* Portrait */

.portrait-wrapper {
  position: relative;
  margin: 45px 0;
}

.portrait {
  margin: 0 auto;
  border-radius: 50%;
  width: 200px;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.portrait img {
  flex-shrink: 0;
  min-width: 100%;
  min-height: 100%;
  max-height: 200px;
}

.outer-frame {
  width: 200px;
  height: 200px;
  position: absolute;
  left: 50%;
  top: 0%;
  translate: calc(-50%);
  animation: 18s infinite frame-rotate ease-in-out;
}

.inner-frame {
  width: 200px;
  height: 200px;
  position: absolute;
  left: 50%;
  top: 0%;
  translate: calc(-50%);
  animation: 18s infinite frame-rotate reverse ease-in-out;
}

.dot {
  width: 10px;
  height: 10px;
  border: 1px solid #aa6e1e;
  border-radius: 50%;
  position: absolute;
  opacity: 0.5;
}

.outer-frame .dot:nth-child(2) {
  right: 0;
}

.outer-frame .dot:nth-child(3) {
  right: 0;
  bottom: 0;
}

.outer-frame .dot:nth-child(4) {
  left: 0;
  bottom: 0;
}

.inner-frame .dot:nth-child(1) {
  left: 50%;
  top: 0;
  transform: translate(-50%, -150%);
}

.inner-frame .dot:nth-child(2) {
  right: 0;
  top: 50%;
  transform: translate(150%, -50%);
}

.inner-frame .dot:nth-child(3) {
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 150%);
}

.inner-frame .dot:nth-child(4) {
  left: 0;
  top: 50%;
  transform: translate(-150%, -50%);
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 30px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.lightbox-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
}

.lightbox-overlay.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: calc(90% - 100px);
  max-height: 90vh;
  border-radius: 12px;
  z-index: 1;
  background-color: #81818134;
}

.lightbox-arrow {
  min-width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgb(255, 233, 207, 0.6);
  border: none;
  color: #aa6e1e;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
}

.lightbox-arrow.left {
  background-color: #aa6e1e;
  -webkit-mask: url(images/icons/left-arrow.svg) no-repeat center;
  mask: url(images/icons/left-arrow.svg) no-repeat center;
  align-self: center;
}

.lightbox-arrow.right {
  background-color: #aa6e1e;
  -webkit-mask: url(images/icons/right-arrow.svg) no-repeat center;
  mask: url(images/icons/right-arrow.svg) no-repeat center;
  align-self: center;
}

.image-placeholder-spinner {
  left: 50%;
  position: absolute;
  width: 30px;
  height: 30px;
}

.image-placeholder-spinner .circle-axis {
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 1s;
}

.image-placeholder-spinner .circle {
  opacity: 0.7;
}

/* Animation */

@keyframes header-expand {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    height: 100%;
    opacity: 1;
  }
}

@keyframes main-content-fade {
  from {
    opacity: 0;
    margin-top: 50vh;
  }
  to {
    opacity: 1;
    margin-top: 0;
  }
}

@keyframes frame-rotate {
  from {
    transform: rotate(45deg);
  }
  to {
    transform: rotate(405deg);
  }
}

@keyframes filled-slide {
  from {
    padding-right: 0;
  }
  to {
    padding-right: 30%;
  }
}

@keyframes filled-slide-mobile {
  from {
    padding-right: 0;
  }
  to {
    padding-right: 25%;
  }
}

@keyframes outline-slide {
  from {
    padding-left: 0;
  }
  to {
    padding-left: 30%;
  }
}

@keyframes outline-slide-mobile {
  from {
    padding-left: 0;
  }
  to {
    padding-left: 25%;
  }
}

@keyframes rotate {
  from {
    rotate: 0;
  }
  to {
    rotate: 360deg;
  }
}

@keyframes background-pulse {
  0% {
    background-color: #a1a1a100;
  }
  50% {
    background-color: #81818134;
  }
  100% {
    background-color: #a1a1a100;
  }
}

/* Responsiveness */

/* Medium Device */

@media screen and (max-width: 1000px) {
  h1 {
    font-size: 3rem;
    line-height: 50px;
  }

  h2 {
    font-size: 2.25rem;
    line-height: 2.25rem;
  }

  h2::before,
  h2::after {
    margin: 0 0.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  p {
    font-size: 1.25rem;
  }

  .name-wrapper {
    height: calc(2 * 50px);
  }

  .circle {
    width: 125px;
    height: 125px;
  }

  .header-text-wrapper {
    padding: 0;
  }

  .filled {
    padding-right: 25%;
    animation: filled-slide-mobile 1s ease-out;
  }

  .outline {
    padding-left: 25%;
    animation: outline-slide-mobile 1s ease-out;
  }

  .subtitle {
    font-size: 1.25rem;
    margin-top: 40px;
  }

  main {
    margin-bottom: 0;
  }

  .sidebar {
    position: fixed;
    background-color: #fadcba;
    height: 100vh;
    width: 50%;
    top: 0;
    left: -60%;
    padding: 50px 10px 0 10px;
    overflow: hidden;
    z-index: 2;
    -webkit-transition: left 0.2s ease-in-out;
    -moz-transition: left 0.2s ease-in-out;
    -o-transition: left 0.2s ease-in-out;
    transition: left 0.2s ease-in-out;
    border-radius: 0 20px 20px 0;
  }

  .sidebar.open {
    left: 0%;
  }

  .icon {
    width: 30px;
    height: 30px;
  }

  .menu-button {
    display: block;
    position: fixed;
    top: 0;
    left: 10px;
    cursor: pointer;
    font-size: 3em;
    font-family: "Quicksand", sans-serif;
    z-index: 1;
  }

  .menu-button .icon {
    height: 40px;
    width: 40px;
  }

  .close-button {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 2em;
    font-family: "Quicksand", sans-serif;
  }

  .main-content {
    width: 100%;
    padding: 20px 10px 0 10px;
  }

  .main-content section {
    margin-bottom: 25px;
  }

  .portfolio-grid img {
    max-width: 100%;
  }

  .lightbox-wrapper {
    justify-content: center;
  }

  .lightbox-arrow {
    position: absolute;
    min-width: 35px;
    height: 35px;
  }

  .lightbox-overlay img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
  }

  .lightbox-overlay {
    padding: 5px 5px 35px 5px;
  }

  .lightbox-arrow {
    bottom: 20px;
  }

  .lightbox-arrow.left {
    left: 20%;
  }

  .lightbox-arrow.right {
    right: 20%;
  }

  footer p {
    margin-left: 0;
  }
}

/* Mobile */

@media screen and (max-width: 500px) {
  h1 {
    font-size: 2.5rem;
  }

  .outline {
    -webkit-text-stroke: 0.75px;
  }

  .subtitle {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.75rem;
    line-height: 1.75rem;
  }

  h2::before,
  h2::after {
    margin: 0 0.5rem;
  }

  h2::before {
    border-right-width: 2.5rem;
  }

  h2::after {
    border-left-width: 2.5rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  p {
    font-size: 1rem;
  }

  .circle-axis {
    width: 15px;
    height: 15px;
  }

  .circle {
    width: 100px;
    height: 100px;
  }

  .menu-button {
    font-size: 2em;
  }

  .menu-button .icon {
    height: 30px;
    width: 30px;
  }

  .sidebar {
    width: 60%;
  }

  .reel-wrapper {
    padding: 0;
  }

  iframe {
    height: 400px;
  }
}

/* Tiny Phones */
@media screen and (max-width: 400px) {
  h1 {
    font-size: 2rem;
  }
}
