/* colors */
:root {
  --text: #e8ece9;
  --muted: #adb8b1;
  --green: #3d8a5e;
  --lightGreen: #93d4ac;
  --box: #27312c;
  --line: #3b4741;
  --placeholder: #333e38;
}

/* base page */
* {
  box-sizing: border-box;
}

html {
  background: #1f2622;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #1f2622 0%, #25302a 40%, #2f4136 75%, #44634f 100%) fixed;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--lightGreen);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, p {
  margin: 0;
}

img, video {
  width: 100%;
  display: block;
}

.page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px;
  flex-grow: 1;
}

.muted {
  color: var(--muted);
}

/* fonts: space grotesk for headings, jetbrains mono for small labels */
h1, h2, h3, .nav .name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

h3 {
  font-weight: 500;
}

.tag, .date, .counter, .row.header, .row .year, .details span, .chips span, .prevNext span {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.tag, .date {
  color: var(--lightGreen);
}

/* boxes, only for actual things like cards and lists */
.box {
  background: var(--box);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* headings with a line under them, like a github readme */
.section h2, .writeup h2 {
  font-size: 24px;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section, .writeup > div, .section > div {
  margin-bottom: 36px;
}

.section p, .writeup p {
  font-size: 17px;
  max-width: 760px;
}

/* top bar */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 18px 48px;
  background: rgba(26, 32, 29, 0.9);
  border-bottom: 1px solid var(--line);
}

.nav .name {
  color: var(--text);
  font-size: 22px;
}

.navLinks {
  display: flex;
  gap: 32px;
}

.navLinks a {
  color: var(--muted);
  font-weight: 500;
}

.navLinks a:hover, .navLinks .active {
  color: white;
  text-decoration: none;
}

/* buttons */
.button {
  display: block;
  background: var(--green);
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
}

.button:hover {
  text-decoration: none;
  background: #46986a;
}

.button.outline {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
}

/* homepage */
.home {
  display: flex;
  gap: 56px;
  align-items: flex-start;
}

.sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  background: #2b3630;
  margin-top: 65px;
}

.sidebar h1 {
  font-size: 34px;
}

.sidebar .tag {
  display: block;
}

.sidebar h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

.main {
  flex-grow: 1;
  min-width: 0;
}

.sectionTop {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.sectionTop h2 {
  font-size: 24px;
}

.favorite {
  display: block;
  overflow: hidden;
  color: var(--text);
  margin-bottom: 44px;
}

.favorite .info {
  padding: 22px 26px;
}

.favorite h3 {
  font-size: 28px;
  margin: 4px 0;
}

/* project cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: block;
  overflow: hidden;
  color: var(--text);
}

.card .info {
  padding: 16px 18px;
}

.card h3 {
  font-size: 20px;
}

.card:hover, .favorite:hover {
  border-color: var(--green);
  text-decoration: none;
}

.thumbnail {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--placeholder);
}

/* all projects page, tabs underline like github */
.tabs {
  display: flex;
  gap: 28px;
  margin: 24px 0;
  border-bottom: 1px solid var(--line);
}

.tab {
  color: var(--muted);
  padding: 10px 2px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-weight: 500;
}

.tab:hover {
  color: var(--text);
  text-decoration: none;
}

.tab.active {
  color: var(--text);
  border-bottom-color: var(--lightGreen);
}

.row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 130px 150px 70px 70px;
  gap: 24px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: #d0d8d3;
}

.row:last-child {
  border-bottom: none;
}

.row h3 {
  font-size: 20px;
}

.row.header {
  color: var(--muted);
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
}

.row .thumbnail {
  border-radius: 4px;
}

/* single project page */
.back {
  color: var(--muted);
}

.projectTitle {
  font-size: 46px;
  margin: 12px 0 28px;
}

.projectLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}

.projectLayout .writeup {
  margin-top: 40px;
}

.details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.details span {
  color: var(--muted);
}

.details .facts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* media viewer with arrows and counter */
.viewer {
  position: relative;
  overflow: hidden;
  background: var(--placeholder);
  border: 1px solid var(--line);
  border-radius: 6px;
  aspect-ratio: 16 / 9;
}

.viewer img, .viewer video {
  height: 100%;
  object-fit: contain;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(10, 12, 11, 0.8);
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.arrow.left {
  left: 14px;
}

.arrow.right {
  right: 14px;
}

.counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(10, 12, 11, 0.8);
  padding: 2px 10px;
  border-radius: 4px;
}

/* previous and next project */
.prevNext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.prevNext a {
  padding: 20px 24px;
  color: var(--text);
  font-size: 18px;
}

.prevNext a:hover {
  border-color: var(--green);
  text-decoration: none;
}

.prevNext .next {
  text-align: right;
}

.prevNext span {
  display: block;
  color: var(--muted);
}

/* about page */
.about {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.about .photo {
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--placeholder);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 20px;
}

.about h1 {
  font-size: 40px;
  margin-bottom: 28px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  background: rgba(147, 212, 172, 0.14);
  color: #b9e6ca;
  padding: 4px 12px;
  border-radius: 20px;
}

/* resume page */
.resume {
  max-width: 900px;
}

.resume .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.resume h1 {
  font-size: 40px;
}

.resume .button {
  font-weight: 700;
  padding: 14px 26px;
}

.resumeFile {
  width: 100%;
  height: 1100px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

/* footer */
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 48px;
  background: rgba(26, 32, 29, 0.9);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer div {
  display: flex;
  gap: 24px;
}

/* hover effects, things lift a little when the mouse is over them */
.card, .favorite, .prevNext a, .button, .arrow, .row {
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}

.card:hover, .favorite:hover, .prevNext a:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.button:hover {
  transform: translateY(-2px);
}

.button.outline:hover {
  background: rgba(61, 138, 94, 0.18);
  border-color: var(--green);
}

.row:not(.header):hover {
  background: rgba(255, 255, 255, 0.03);
}

.arrow:hover {
  transform: translateY(-50%) scale(1.1);
}

/* no movement for people who turn off animations on their computer */
@media (prefers-reduced-motion: reduce) {
  .card, .favorite, .prevNext a, .button, .arrow, .row {
    transition: none;
  }

  .card:hover, .favorite:hover, .prevNext a:hover, .button:hover {
    transform: none;
  }

  .arrow:hover {
    transform: translateY(-50%);
  }
}

/* phones */
@media (max-width: 800px) {
  .page {
    padding: 28px 20px;
  }

  .nav, .footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .navLinks {
    gap: 20px;
  }

  .home, .about {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .sidebar {
    width: 100%;
  }

  .cards, .projectLayout, .prevNext {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .projectLayout .writeup {
    margin-top: 32px;
  }

  .projectTitle {
    font-size: 32px;
  }

  .projectList {
    background: none;
    border: none;
  }

  .row, .row:last-child {
    display: block;
    padding: 0 0 18px;
    margin-bottom: 16px;
    background: var(--box);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
  }

  .row .type {
    display: inline-block;
    margin-right: 12px;
    color: var(--muted);
  }

  .row > * {
    margin: 0 18px;
  }

  .row .thumbnail {
    margin: 0 0 14px;
    border-radius: 0;
  }

  .row.header, .row .year, .row .madeWith {
    display: none;
  }

  .resumeFile {
    height: 600px;
  }
}
