/* ==========================================================================
   Typography & Font Definitions
   ========================================================================== */
@font-face {
  font-family: 'Oswald';
  src: url("../fonts/Oswald-ExtraLight.ttf");
  font-weight: 100;
}
@font-face {
  font-family: 'Oswald';
  src: url("../fonts/Oswald-Regular.ttf");
  font-weight: 300;
}
@font-face {
  font-family: 'Oswald';
  src: url("../fonts/Oswald-Medium.ttf");
  font-weight: 600;
}
@font-face {
  font-family: 'Oswald';
  src: url("../fonts/Oswald-Bold.ttf");
  font-weight: 700;
}

@font-face {
  font-family: 'Roboto';
  src: url("../fonts/Roboto-Light.ttf");
  font-weight: 100;
}
@font-face {
  font-family: 'Roboto';
  src: url("../fonts/Roboto-Regular.ttf");
  font-weight: 300;
}
@font-face {
  font-family: 'Roboto';
  src: url("../fonts/Roboto-Bold.ttf");
  font-weight: 700;
}

/* Backwards compatibility aliases */
.thin {
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
}
.bold {
  font-weight: 700;
}

/* ==========================================================================
   Global Variables & Base Styles
   ========================================================================== */
:root {
  --primary-color: #1191B9;
  --primary-alt: #2790ba;
  --bg-dark: #000000;
  --text-main: #ffffff;
  --text-muted: #7B7B7B;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: calc(100vh - 10px);
  width: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  background-image: url("../images/backgrounds/dark_mosaic.png");
  color: var(--text-main);
  font-family: var(--font-body);
}

body {
  overflow-y: auto;
}

/* ==========================================================================
   Layout Containers & Wrappers
   ========================================================================== */
.scrolling-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
}

.pages {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.container {
  width: calc(100% - 60px);
  max-width: 1400px;
  margin-left: 60px;
  padding: 10px 0;
}

/* Flexible Grid Replacement for Floats (.half) */
.half {
  width: 80%;
  margin: auto;
}

.phoneShow {
  display: block;
  margin: 10px 0;
}

@media (min-width: 805px) {
  .container {
    width: calc(100% - 240px);
    margin: auto;
  }
  
  /* Modern Flex container replacement for horizontal .half floating */
  .experience,
  #resume ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .half {
    width: 50%;
    padding: 0 40px;
    margin: 0;
  }

  .phoneShow {
    display: none;
  }
}

/* Clearfix legacy compatibility */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ==========================================================================
   Scroll Section Layout Fixes
   ========================================================================== */
.scroll_section {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr; /* Split layout so left & right sit side-by-side */
  align-items: center;
  min-height: calc(100vh - 10px);
  width: 100%;
  padding: 0 10%;
  color: var(--text-main);
  font-size: 14px;
  line-height: 20px;
  border-bottom: 10px solid var(--primary-color);
  overflow: hidden;
}

.scroll_section h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 80px);
  line-height: 1.2;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2.88px;
  color: var(--text-main);
}

.scroll_section p {
  font-size: 1.2em;
  line-height: 1.2;
}

/* Zipbug Graphic */
.scroll_section #zipbug {
  grid-column: 2;
  justify-self: end;
  height: 90vh;
  max-width: 100%;
  margin-top: 2%;
}

.scroll_section #zipbug .st0 {
  opacity: 0.67;
  fill: #121719;
  stroke: #8F9395;
  stroke-miterlimit: 10;
}

.scroll_section #zipbug .st1 {
  fill: #121719;
  stroke: #8F9395;
  stroke-miterlimit: 10;
}

.scroll_section #zipbug .wing.left,
.scroll_section #zipbug .wing.right {
  transition: transform 0.2s linear;
  transform-origin: center;
}

.scroll_section #zipbug.open g.wing.left {
  transform: rotate(120deg) translateY(20%) translateX(20%);
}

.scroll_section #zipbug.open g.wing.right {
  transform: rotate(-120deg) translateY(20%) translateX(-20%);
}

/* Side-by-side layout positions */
.scroll_section__text {
  grid-column: 1;
  z-index: 5;
  max-width: 300px;
}

.scroll_section__text.large_text {
  max-width: 500px;
}

.scroll_section__text.large_text img {
  max-width: 400px;
  display: block;
  margin: auto;
  @media (max-width: 1080px) {
    max-width: 90%;
  }
  
}

.scroll_section .right-side {
  grid-column: 2;
  z-index: 5;
  max-width: 600px;
  transform: translateX(100vw);
  transition: transform 300ms ease;
  transition-delay: 300ms;
}

.scroll_section.active .right-side {
  transform: translateX(0);
}

.scroll_section__background {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: opacity 400ms ease;
  z-index: 1;
}

.scroll_section__background.active {
  opacity: 1;
  transition-delay: 300ms;
}

@media (max-width: 1080px) {
  .scroll_section #zipbug {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 10%;
    height: auto;
    margin-bottom: 20px;
  }

  .scroll_section.active .right-side {
    transform: translateX(0);
  }
}

@media (max-width: 1024px) {
  .scroll_section {
    grid-template-columns: 1fr;
    min-height: 600px;
    height: auto;
    padding: 20% 20px;
  }

  .scroll_section::after {
    content: " ";
    position: absolute;
    inset: 0 auto 0 0;
    width: 30%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
  }

  .scroll_section__text,
  .scroll_section .right-side {
    grid-column: 1;
    margin-left: 15%;
    margin-right: 20px;
    width: calc(85% - 20px);
    transform: none;
  }

  .scroll_section .scroll_section__background {
    background-attachment: scroll;
    opacity: 1;
    background-position: left bottom;
  }
}

/* ==========================================================================
   Navigation & Side Crumbs
   ========================================================================== */
.icon_menu {
  position: fixed;
  top: 60%;
  left: 15%;
  width: 85px;
  height: 60px;
  overflow: hidden;
  border-top: 2px solid red;
  opacity: 0;
  transition: opacity 300ms, top 600ms ease;
  z-index: 10;
}

.icon_menu.active {
  opacity: 1;
  transition-delay: 300ms;
}

.icon_menu img {
  width: 100%;
  transition: width 300ms, opacity 300ms ease;
}

.icon_menu .icon {
  display: block;
  width: 85px;
  height: 80px;
  padding: 10px 0;
}

.icon_menu .icon.inactive img {
  width: 80%;
  opacity: 0.3;
}

@media (max-width: 1024px) {
  .icon_menu {
    display: none;
  }
}

.mobile-icon {
  position: absolute;
  bottom: 40px;
  left: 25%;
  display: none;
  width: 85px;
  border-top: 2px solid red;
  padding-top: 5px;
  z-index: 5;
}

@media (max-width: 896px) {
  .mobile-icon {
    display: block;
  }
}

.side-crumbs {
  position: fixed;
  top: 50%;
  left: 5px;
  width: 143px;
  transform: translateY(-50%);
  z-index: 10;
}

.side-crumbs .crumb {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5px 10px 20px;
  color: var(--text-muted);
  fill: var(--text-muted);
  border-bottom: 1px solid var(--text-muted);
  cursor: pointer;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 100;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  left: calc(-100% + 50px);
  transition: color 300ms, left 300ms, border 300ms ease;
}

.side-crumbs .crumb span {
  display: inline-block;
  vertical-align: middle;
}

.side-crumbs .crumb .bold {
  margin: 0 8px;
}

.side-crumbs .crumb.active {
  color: var(--primary-color);
  fill: var(--primary-color);
  border-bottom: 5px solid var(--primary-color);
  left: 0%;
}

@media (max-width: 896px) {
  .side-crumbs .crumb.active {
    left: calc(-100% + 50px);
  }
}

.side-crumbs .start-crumb {
  width: 40px;
  padding-left: 10px;
  left: -5px;
}

.side-crumbs .start-crumb .bold {
  margin: 0;
}

.side-crumbs .start-crumb.active {
  left: -5px;
}

.side-crumbs .start {
  position: absolute;
  left: -25px;
  top: -45px;
  display: block;
  width: 100px;
  transform: rotate(90deg);
}

/* ==========================================================================
   Resume Section Alignment Fixes
   ========================================================================== */
#resume {
  color: var(--text-main);
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 600ms ease;
}

/* Force visible state when active or on smaller screens */
#resume.active {
  opacity: 1;
  visibility: visible;
  transition-delay: 300ms;
}

@media (max-width: 1080px) {
  #resume {
    opacity: 1;
    visibility: visible;
  }
}

#resume .container {
  grid-column: span 2;
  display:grid;
  
  margin: auto;
}

@media (max-width: 1080px) {
  #resume .container {
    margin-bottom: 30px;
  }
}

#resume h3 {
  text-align: center;
  font-size: 1.5em;
  margin: 10px 0;
}

#resume h5 {
  font-size: 1.2em;
  margin: 20px 0 0;
}

#resume h5 .thin {
  font-family: 'Roboto', sans-serif;
  font-size: 0.9em;
}

#resume h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 100;
  margin: 0 0 10px;
  font-size: 1em;
}

#resume h4 {
  margin: 10px 0;
}

#resume .experience {
  max-width: 1080px;
  margin: auto;
}

/* Fix right-side badges to sit inline on the right side of headings */
#resume .feelGood,
#resume .toGo {
  float: right;
  position: relative;
  top: -12px;
  font-size: 50px;
  line-height: 18px;
  font-family: serif;
}

#resume .feelGood {
  color: var(--primary-alt);
}

#resume .toGo {
  color: #c3c3c3;
}

#resume ul {
  list-style: circle;
  margin: 0;
  padding: 0;
}

#resume ul .half {
  padding: 0 10px;
}

#resume ul.disc {
  list-style: disc;
}

#resume ul ul {
  margin-left: 20px;
}

@media (max-width: 1080px) {
  #resume .feelGood,
  #resume .toGo {
    float: none;
  }
  #resume .experience, .college {
    max-width: 85%;
    margin-left: 15%;
  }
}

#resume .recreationImg {
  width: 100%;
}

#resume .avatar {
  width: 120px;
  margin: auto;
}

#resume .bg-hr {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 245px;
  height: 34px;
  margin: auto;
  background-color: #000;
  background-image: url("../images/backgrounds/dark_mosaic.png");
  border-left: 2px solid rgba(39, 144, 186, 0.5);
  border-right: 2px solid rgba(39, 144, 186, 0.5);
  transform: translateX(-50%) skewX(-25deg);
  z-index: -1;
}

#resume .objective {
  width: 80%;
  max-width: 650px;
  margin: 20px auto 0;
  text-align: center;
}

#resume .objective h2 {
  font-weight: 600;
  font-size: 2.5em;
}

#resume .objective h3 {
  position: relative;
  color: var(--text-main);
  font-size: 1.5em;
  font-weight: 100;
  z-index: 5;
  max-width: 250px;
  margin: 0 auto 20px;
}

#resume .objective h3::after,
#resume .objective h3::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 150%;
  height: 1px;
  background-color: rgb(39, 144, 186);
  transform: translate(-50%, -50%);
  z-index: -2;
}

#resume .objective h3::before {
  top: calc(50% - 2px);
}

#resume .objective h3::after {
  top: calc(50% + 2px);
}

.education{
  margin: 10% 0;
}

#resume .download {
  text-align: center;
  background-color: #000;
  background-image: url(../images/backgrounds/dark_mosaic.png);
  color: var(--text-main);
  border: 2px solid var(--primary-color);
  box-shadow: none;
  cursor: pointer;
  padding:20px 30px;
  text-decoration: none;
  margin:40px auto;
  display:block;
  max-width: 200px;
}

#resume .download:hover {
  color: #2b495d;
  border-color: #2b495d;
}

/* ==========================================================================
   Contact Section Alignment
   ========================================================================== */
#contact {
  position: relative;
  width: 100%;
  transform: translateX(-100%);
  transition: transform 300ms ease;
  padding: 0 15%;
}

#contact.active {
  transform: translateX(0);
}

@media (max-width: 1080px) {
  #contact {
    transform: translateX(0);
    padding: 0 5%;
  }
}

.form {
  width: 100%;
  padding: 20px;
  background-color: rgba(17, 145, 185, 0.8);
}

@media (max-width: 1080px) {
  .form {
    margin-bottom: 30px;
  }
}

.form label {
  display: block;
  width: 100%;
  clear: both;
  border: none;
}

.form label::after {
  content: "";
  display: table;
  clear: both;
}

.form input,
.form textarea {
  float: right;
  width: 80%;
  margin: 5px 0;
  padding: 10px;
  font-size: 18px;
  border: 0;
  border-radius: 0;
}

.form-avatar {
  width: 150px;
  height: 150px;
  margin: auto;
}

.form-avatar svg {
  width: 100%;
  height: auto;
  fill: #000;
  stroke: #000;
}

.button {
  display: inline-block;
  clear: both;
  margin: 10px auto;
  padding: 15px 30px;
  background-color: #000;
  background-image: url("../images/backgrounds/dark_mosaic.png");
  color: var(--text-main);
  border: transparent;
  box-shadow: none;
  cursor: pointer;
}

.social {
  margin-top: 20px;
}

.social a {
  display: inline-block;
  width: 20px;
  margin-right: 10px;
}

.social a svg {
  width: 100%;
  height: auto;
  fill: #efefef;
}

/* ==========================================================================
   Loaders & Animations
   ========================================================================== */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  transition: opacity 0.9s ease;
  transition-delay: 900ms;
  z-index: 999999;
}

.loader img {
  position: absolute;
  top: calc(50% - 50px);
  left: 50%;
  width: 250px;
  transform: translate(-50%, -50%);
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: 100px auto;
  transform: translate(-50%, -50%);
}

.loading-logo {
  position: absolute;
  top: calc(50% - 50px);
  left: 50%;
  width: 250px;
  fill: var(--text-main);
  stroke: var(--text-main);
  transform: translate(-50%, -50%);
}

.loading-logo svg {
  width: 100%;
}

.cube1, .cube2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  background-color: var(--primary-color);
  animation: sk-cubemove 1.8s infinite ease-in-out;
}

.cube2 {
  animation-delay: -0.9s;
}

@keyframes sk-cubemove {
  25% {
    transform: translateX(42px) rotate(-90deg) scale(0.5);
  }
  50% {
    transform: translateX(42px) translateY(42px) rotate(-179deg);
  }
  50.1% {
    transform: translateX(42px) translateY(42px) rotate(-180deg);
  }
  75% {
    transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
  }
  100% {
    transform: rotate(-360deg);
  }
}