@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap");

:root {
  --bg-color: #f4f9f6;
  --text-color: #000000;
  --code-color: #e3e9e5;
}

body {
  font-family: "Source Code Pro", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;

  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  padding: 7rem 10rem;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* Typography & General Layout */
figure {
  margin: 1.5rem 0;
}

figcaption {
  margin-top: -5px;
  font-size: smaller;
  font-style: italic;
}

main {
  display: grid;
  grid-template-columns: 4fr 5fr;
  gap: 2rem;
  flex-grow: 1;
}

.top-header {
  display: flex;
  flex-direction: row;
  margin: 0 0 6rem 0;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
  color: var(--text-color);
  justify-content: space-between;
}

.top-header h1, .top-header a {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
  color: var(--text-color);
}

.bio {
  margin-bottom: 2rem;
}

.date {
  margin-bottom: 2.5rem;
}

.content p {
  margin: 0 0 1.5rem 0;
  /* max-width: 70ch; */
}

.rss {
  float: left;
}

footer {
  margin-top: 4rem;
}

.links-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
}

.nav-links,
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-links {
  align-items: start;
}

.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a,
.project-list a {
  color: var(--text-color);
  text-decoration: none;
}

.nav-links a:hover,
.project-list a:hover {
  color: var(--bg-color);
  background-color: var(--text-color);
  font-weight: bold;
}

.nav-links a.active {
  font-weight: bold;
  text-decoration: underline;
}

/* Fix CSS Grid Blowout */
.col-left,
.col-right {
  min-width: 0;
}

.content {
  max-width: 80ch;
}

.content p,
.content li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

pre {
  font-size: 14px;
  overflow-x: auto;
  max-width: 100%;
  padding: 1rem;
  background: var(--code-color);
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background-color: var(--text-color);
  color: white;
  font-weight: bolder;
}

/* Responsive Media Query */
@media (max-width: 900px) {
  .hide-mobile {
    display: none;
  }

  body {
    padding: 2rem;
  }

  main {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .top-header,
  .bio,
  .date {
    margin-bottom: 2rem;
  }
}
