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

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

html {
  /* Global Font */
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  user-select: none;
}

main {
  /* Just in case */
  overflow: hidden;
}

/* Always remove text-decoration and color from links */
a {
  text-decoration: none;
  color: inherit;
}

/* Always make lists display: flex and remove bullets*/
ul {
  display: flex;
  list-style-type: none;
}

.container {
  /* display: flex because it's easier to make .screen fill the entire height */
  display: flex;
  flex-direction: column;
  height: 100vh; /* for old browsers */
  height: 100dvh; /* for new browsers */
}

/* Background Video */
.video-container {
  /* position video */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  /* fill viewport */
  height: 100%;
  width: 100%;
  /* gets rid of scrollbars and the white "line" at the bottom*/
  overflow: hidden;
  /* fallback in case video doesn't load */
  background-image: url("../images/background/fallback.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  color: #fff;
  background-color: #141414;
}

.status-bar a {
  /* makes status bar icons unclickable */
  pointer-events: none;
}

.icons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.menu,
.date-time,
.icons {
  /* centers each section respectively on the status bar */
  flex: 1;
}

.menu {
  /* hide "windows" menu in mobile mode */
  display: none;
}

.date-time {
  display: flex;
  gap: 8px;
}

.date {
  /* date is only visible in desktop mode */
  display: none;
}

/* Screen (where app icons, windows, etc go) */
.screen {
  flex: 1;
  position: relative;
}

.launcher {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
}

.quick-launch {
  display: flex;
  justify-content: space-between;
}

.app {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 36px;
  color: #fff;
  background-color: #363636;
  border-radius: 16px;
  width: 64px;
  height: 64px;
}

.app img {
  width: 50px;
  height: 50px;
}

.app-container .row {
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
}

.gap {
  flex: 1;
}

/* Windows/Apps */
.window {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
}

.title-bar {
  display: none;
}

.window .content {
  height: 100%;
  padding: 40px 20px 100px;
  overflow-y: scroll;
  color: #fff;
  text-align: center;
  /* Font */
  font-family: "Inconsolata", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.window .content p {
  margin: 16px 0;
}

.window .process .image {
  max-width: 500px;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 auto;
}

/* Hide scroll bar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

.resizer {
  position: absolute;
  width: 10px;
  height: 10px;
}

.resizer.nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.resizer.ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.resizer.se {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
}

.resizer.sw {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

/* Nav Bar*/
.nav-bar {
  display: flex;
  background-color: #000;
  color: #fff;
  padding: 10px;
}

.nav-bar a {
  flex: 1;
  text-align: center;
}

.fa-play {
  /* rotate "back" button */
  transform: rotate(180deg);
}

/* Dock (only visible in desktop mode) */
.dock {
  display: none;
}

/* Projects Go Here */
h2 {
  color: inherit;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.75rem;
  text-decoration: underline;
}

h4 {
  font-size: 1.5rem;
  text-decoration: underline;
}

.constraint {
  max-width: 768px;
  margin: 0 auto;
}

.tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style-type: none;
  margin-bottom: 16px;
}

.tags li {
  background-color: #282828;
  padding: 10px;
  border-radius: 8px;
}

.links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.links a {
  text-decoration: underline;
  color: #ff0000;
}

.thumbnail {
  border-radius: 25px;
  overflow: hidden;
}

/* Hades Specific  */
.hades .content {
  background-color: #141414;
}

/* Etch-a-sketch*/
.etch .content {
  background-color: #fffff4;
  color: #141414;
}

.etch .process h3 {
  border-top: 1px solid #141414;
}

.etch li {
  color: #fffff4;
}

/* CMS */
.cms .content {
  background-color: #eee;
  color: #8800ff;
}

.cms li {
  background-color: #8800ff;
  color: #eee;
}

.cms .process h3 {
  border-top: 1px solid #8800ff;
}

.cms .thumbnail {
  border: 1px solid #8800ff;
}

/* UI/UX Project */
.figma .content {
  background-color: #ffd43a;
  color: #1a202c;
}

.figma li {
  color: #ffd43a;
}

/* Flappy Clone */
.roblox .content {
  background-color: #add8e6;
}

/* Ricing */
.rice .content {
  background-color: #44475a;
}

/* General settings */
.process .row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 36px 0;
}

.process .row.even {
  flex-direction: row-reverse;
}

.process .image,
.process .info {
  flex: calc(50% - 16px);
  min-width: 200px;
}

.process .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.process h3 {
  border-top: 1px solid #fff;
  padding: 24px 0 0;
}

@media screen and (min-width: 370px) {
  .app {
    width: 80px;
    height: 80px;
  }
}

@media screen and (min-width: 768px) {
  .quick-launch {
    width: 500px;
    margin: 0 auto;
  }

  .app-container {
    display: flex;
    gap: 10px;
    width: 720px;
    margin: 0 auto;
  }

  .app-container .row {
    /* Temporary measure to bring the apps down */
    flex: 1;
  }
}

@media screen and (max-width: 1023px) {
  /* Reset window position in tablet mode and below */
  .window {
    left: 0 !important;
    top: 0 !important;
    height: 100% !important;
    width: 100% !important;
  }
}

@media screen and (min-width: 1024px) {
  /* Status Bar */
  .status-bar {
    background-color: rgba(38, 38, 38, 0.8);
  }

  .menu {
    display: initial;
  }

  .date-time {
    justify-content: center;
  }

  .date {
    display: initial;
  }

  .launcher {
    /* hide the launcher on desktop (I like keeping a clean desktop) */
    display: none;
  }

  /* Nav Bar */
  .nav-bar {
    /* hide nav bar on laptops and desktops */
    display: none;
  }

  /* Dock */
  .dock {
    /* returns dock in desktop mode */
    display: flex;
    align-items: center;
    gap: 16px;
    width: 800px;
    margin: 0 auto 24px;
    background-color: rgba(38, 38, 38, 0.8);
    border-radius: 24px;
    padding: 16px;
    z-index: 10000;
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 0);
    transition: all 0.4s;
    /* Prevents windows from getting stuck behind the dock */
    pointer-events: none;
  }

  .dock a {
    flex: 1;
    pointer-events: auto;
  }

  .dock img {
    filter: drop-shadow(8px 8px 10px #000);
  }

  .dock a:hover {
    transform: scale(1.25);
  }

  /* Apps in desktop mode */
  .window {
    width: 600px;
    height: 450px;
    min-width: 275px;
    min-height: 100px;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 16px;
    overflow: hidden;
    position: absolute;
  }

  .title-bar {
    background-color: #444;
    padding: 8px 16px;
    color: #fff;
    display: flex;
    text-align: center;
  }

  .title-bar > div {
    flex: 1;
  }

  .title-bar .window-controls {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
  }

  .title-bar p {
    cursor: default;
  }

  .maximized {
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 100% !important;
  }

  /* Hide dock when any windows are maximized */
  .maximized ~ .dock {
    bottom: -75px;
    transition: all 0.4s;
  }

  .maximized ~ .dock:hover {
    bottom: 0;
  }

  .maximized ~ .dock::before {
    /* Extends the hover range */
    content: "";
    position: absolute;
    z-index: -1;
    height: 100%;
    width: 100%;
  }
}
