@import url("http://fonts.googleapis.com/css?family=Source+Sans+Pro:200");

.body {
  /* Global vars */
  --navbar-height: 3em;

  /* Default Background */
  background: linear-gradient(45deg, rgb(17, 17, 17), rgb(4, 5, 27), rgb(3, 6, 48));
  
  /* Setup Font */
  font-family: "Source Sans Pro", Helvetica, sans-serif;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
}

/* Navigation Bar properties */
.navbar {
  overflow: hidden;
  background-color: rgb(51, 51, 51);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  z-index: 1000;
}

.navbar a {
  float: left;
  display: block;
  color: rgb(242, 242, 242);
  text-align: center;
  padding: 0.5em 1em;
  text-decoration: none;
  cursor: pointer;
}

h1 {
  scroll-margin-top: 2em;  /* No idea why this needs to be 2 instead of 3 */
}

/* Main content */
.container {
  margin-inline: 20vw;
  margin-top: var(--navbar-height);
  text-align: center;
}

/* Header with my name and picture */
.header {
  background: linear-gradient(45deg, rgba(19,144,224,1) 0%, rgba(81,14,152,1) 100%);
}

.image-container {
  --transition-transform: transform 250ms ease;

  position: relative;
  max-width: 7em;
  margin-inline: auto;
  aspect-ratio: 1 / 1.3;
  display: grid;
  align-items: end;
  border-radius: 0 0 100vw 100vw; /* Get circle on bottom of container, but straight lines on top */
  overflow: hidden;

  transition: var(--transition-transform);
}

img {
  max-width: 100%;
  display: block;
}

.image-container:hover {
  transform: scale(1.1);
}

.circle {
  position: absolute;
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  inset: auto 0 0;
  margin-inline: auto 0 0;
  border-radius: 50%;
}

.profile-image {
  position: relative;
  transform: scale(1.1);
  left: 0.9em;
  bottom: 0.3em;

  transition: var(--transition-transform);
}

.profile-image:hover {
  transform: scale(1.25) translateY(-0.5rem);
}

.header-text * {
  margin: 0;
}

.title {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.75em;
}

.subtitle {
  color: rgba(255, 255, 255, 0.35);
}

/* About Me Section */
.aboutme-section {
  display: flex;
  gap: 3ch;
  align-items: center;
  justify-content: center;
  padding: 2vh 0;
}

.forward {
  flex-flow: row wrap;
}

.backward {
  flex-flow: row-reverse wrap;
}

.aboutme-img {
  aspect-ratio: 1 / 1;
}

.aboutme-img-wrapper{
  flex: 2 1 0;
}

.aboutme-content {
  flex: 3 0 25vw;
  text-align: justify;
}

a {
  color: rgb(242, 242, 242);
}

#portfolio-container :is(h2, h4) {
  margin-top: 0;
  margin-bottom: 0;
}

.portfolio-section {
  display: flex;
  gap: 3ch;
  align-items: center;
  justify-content: center;
  padding: 2vh 0;
}

.portfolio-img-wrapper{
  flex: 2 1 0;
  margin-bottom: auto;
  padding: 1ch;
  background: white;
}

.portfolio-content {
  flex: 3 0 25vw;
  text-align: justify;
}


/* Technology Logo animations */
.logo-container {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 3vw;
}

.logo {
  --order: 1;
  --direction: -1;

  flex: 0 0 0;
  height: 6em;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  opacity: 0;
  filter: blur(5px);
  transform: translateX(calc(var(--direction)*200%));
  transition: all 1s;
  transition-delay: calc(100ms * (var(--order) - 1));
}

.show {
  filter: blur(0);
  transform: translateX(0);
  opacity: 1;
}

/* Remove animations for accessibility */
@media(prefers-reduced-motion) {
  .logo {
    transition: none;
    filter: blur(0);
    transform: translateX(0);
    opacity: 1;
  }

  .body {
    scroll-behavior: none;
  }
}