@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/PlayfairDisplay-Regular.woff2") format("woff2");
  font-display: swap;
}

html {
  scroll-behavior: smooth;
  font-family: "Playfair Display", serif;
}

body {
  background-color: #3ab0bc;
  margin: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
}

h3 {
  font-weight: bold;
}

#hero {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
}

#hero h1 {
  font-size: clamp(1.4rem, 4vw, 3rem);
}

/* Nav Bar */

#nav_bar {
  background-color: rgba(59, 187, 192, 0.85);
  /* border-bottom: 1px solid #39a7ad; */
  border-bottom: 1px solid black;
  position: sticky;
  top: 0;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  position: sticky;
}

.nav-name {
  font-family: "Playfair Display", serif;
  font-weight: bold;
  padding-left: 1em;
}

a .nav-name,
a:has(.nav-name) {
  color: black;
  text-decoration: none;
}

#nav_bar ul li {
  list-style-type: none;
  float: right;
  padding-right: 1em;
  position: relative;
}

#nav_bar ul li a {
  font-family: "Playfair Display", serif;
  display: block;
  text-align: center;
  font-weight: bold;
  text-decoration: none;
  color: black;
}

#nav_bar ul li a visited {
  text-decoration: none;
  color: black;
}

#nav_bar ul li a:hover {
  font-style: italic;
}

/* Sidebar */

#sidebar {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 20px;
  height: 120px;
  background-color: #4dd4d9;
  padding: 20px 10px;
  margin-right: 1em;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

#sidebar i {
  scale: 1.5;
  color: black;
}

/* About Me */

.about-content {
  display: flex;
  align-items: flex-start;
  gap: 2em;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-top: 0;
}

.about-photo {
  max-width: 300px;
  border-radius: 10px;
  object-fit: cover;
}

/* About Me, Academics, Projects (shared) */

#about_me,
#academics,
#projects,
#contact {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px;
  text-align: left;
  box-sizing: border-box;
}

#about_me,
#academics,
#experience,
#projects,
#contact,
#footer {
  padding-top: 20px;
  padding-bottom: 20px;
  width: 100vw;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

#about_me,
#academics,
#projects {
  border-bottom: 1px solid black;
}

#academics {
  border-top: 1px solid black;
}

#contact {
  padding-top: 80px;
  padding-bottom: 120px;
}

#footer {
  border-top: 1px solid black;
  padding-bottom: 80px;
  background-color: #1a6670;
}

.about-text p {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
}

#about_me > *,
#academics > *,
#projects > *,
#contact > *,
#footer > * {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 10px;
  padding-right: 10px;
}

#about_me {
  border-top: 1px solid black;
  padding: 100px 0 100px 0;
}
/* Experience */

#experience {
  width: auto;
  height: auto;
  padding: 10px;
  border-collapse: collapse;
}

#experience h2 {
  margin: 0 auto;
  max-width: 1000px;
  padding: 10px;
  text-align: center;
}

#experience ol {
  text-align: left;
  display: inline-block;
  list-style-position: outside;
  padding-left: 1.25rem;
  margin: 0 auto;
}

#experience ol li {
  list-style-type: disc;
}

/* Carousel */

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
}

.carousel-viewport.expanded {
  overflow: visible;
  width: 100%;
  max-width: 1200px;
}

.carousel-track {
  display: flex;
  flex-direction: row;
  gap: 0;
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
  animation-duration: 0.5s;
}

.carousel-track.expanded {
  flex-shrink: 0;
  width: 100%;
  max-width: 1200px;
  padding: 10px;
  text-align: left;
  background-color: #3ab0bc;
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  transform: translateX(0);
}

.carousel-track.expanded .cell {
  opacity: 1;
  scale: 1;
  width: auto;
}

.cell {
  border-radius: 8px;
  flex-shrink: 0;
  width: 400px;
  max-width: 90vw;
  border: 1px solid black;
  padding: 10px;
  text-align: left;
  background-color: #4dd4d9;
  color: black;
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
  opacity: 0.5;
  scale: 0.9;
}

.cell.active {
  margin: 0 auto;
  opacity: 1;
  scale: 1;
}

#expand_experience {
  display: block;
  margin: 10px auto;
  border-radius: 8px;
  border-width: 0.7px;
  background-color: rgba(77, 212, 217, 0.85);
}

#expand_experience:hover {
  scale: 1.03;
  cursor: pointer;
}

/* Academics */

.academic-major {
  font-weight: bold;
  font-style: italic;
  display: flex;
  justify-content: space-between;
}

.academic-year {
  font-weight: normal;
  white-space: nowrap;
  margin-left: 2em;
}

.academic-minor {
  font-size: 14px;
  font-style: italic;
  font-weight: normal;
}

#academics .badges-list {
  padding-left: 4em;
}

/* Projects */

#projects h1 {
  border-bottom: 1px solid black;
}

#projcell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px;
  border-bottom: 1px solid black;
  text-align: left;
}

/* 6502 Demo Split Layout */

.project-split {
  display: flex;
  gap: 2em;
  align-items: flex-start;
}

.project-description {
  flex: 1;
  text-align: left;
}

.project-demo {
  flex: 1;
  background-color: #1a6670;
  border: 1px solid #4dd4d9;
  border-radius: 8px;
  padding: 1.5em;
}

.project-demo h2 {
  color: #4dd4d9;
  font-family: monospace;
  margin-top: 0;
  margin-bottom: 0.5em;
}

#code-input {
  width: 100%;
  font-family: monospace;
  font-size: 13px;
  background-color: #0d2b30;
  color: #4dd4d9;
  border: 1px solid #4dd4d9;
  border-radius: 4px;
  padding: 0.75em;
  resize: vertical;
  box-sizing: border-box;
}

#run-btn {
  display: inline-block;
  margin-top: 0.75em;
  padding: 8px 24px;
  background-color: #4dd4d9;
  color: #1a6670;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#run-btn:hover {
  background-color: #3ab0bc;
  color: black;
}

#vm-output {
  margin-top: 1em;
}

#vm-output h3 {
  color: #4dd4d9;
  font-family: monospace;
  font-size: 14px;
  margin-bottom: 0.25em;
}

#output-display {
  font-family: monospace;
  font-size: 13px;
  background-color: #0d2b30;
  color: #4dd4d9;
  border: 1px solid #4dd4d9;
  border-radius: 4px;
  padding: 0.75em;
  min-height: 2em;
  white-space: pre-wrap;
  margin: 0;
}

#cpu-state {
  margin-top: 1em;
}

#cpu-display {
  font-family: monospace;
  font-size: 13px;
  background-color: #0d2b30;
  color: #4dd4d9;
  border: 1px solid #4dd4d9;
  border-radius: 4px;
  padding: 0.75em;
  white-space: pre;
  margin: 0;
}

/* Shared utilities */

.subtext {
  font-size: 14px;
  font-style: italic;
}

.my-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(77, 212, 217, 1);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
  border-radius: 8px;
}

#button_container a {
  float: left;
  color: black;
  border: 1px solid black;
  border-radius: 8px;
  margin-right: 1em;
}

@media (max-width: 768px) {
  #about_me,
  #academics,
  #experience,
  #projects,
  #contact,
  #footer {
    width: 100%;
    padding-left: 1em;
    padding-right: 1em;
    box-sizing: border-box;
  }

  #about_me > *,
  #academics > *,
  #projects > *,
  #contact > *,
  #footer > * {
    padding-left: 0;
    padding-right: 0;
  }

  #nav_bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5em;
    width: 100%;
  }

  #nav_bar ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
  }

  #nav_bar ul li {
    float: none;
    padding: 0.25em 0.5em;
  }

  #sidebar {
    display: none;
  }

  #hero {
    width: 100%;
  }

  #hero h1 {
    font-size: 2rem;
    padding: 0 1em;
    text-align: center;
  }

  .about-content {
    flex-direction: column;
  }

  .about-photo {
    max-width: 100%;
    width: 100%;
  }

  .about-text p {
    font-size: large;
  }

  .carousel-viewport,
  .carousel-viewport.expanded {
    width: 100%;
    max-width: 100%;
  }

  .carousel-track.expanded {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .cell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .project-split {
    flex-direction: column;
  }

  #button_container {
    text-align: center;
  }

  #button_container a {
    float: none;
    display: inline-block;
    margin: 0.5em;
  }

  #contact {
    text-align: center;
  }

  #footer {
    text-align: center;
  }

  #footer > * {
    text-align: center;
  }

  .academic-major {
    flex-direction: column;
  }

  .academic-year {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.4rem;
  }

  .about-text p {
    font-size: medium;
  }

  #about_me {
    padding: 40px 1em;
  }

  #contact {
    padding-top: 40px;
    padding-bottom: 60px;
  }
}
