:root {
  /* variables */
  --cg-green-dark: rgb(24, 60, 42);
  --cg-green: rgb(61, 128, 76);
  --cg-offwhite: rgb(246, 243, 232);
  --cg-surface: rgb(255, 252, 242);
  --cg-border: rgb(205, 216, 193);
}

html {
  height: 100%;
}

body {
  background: var(--cg-offwhite);
  position: relative;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  font-family: "Manrope", sans-serif;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
}

strong {
  color: var(--cg-green);
}

em {
  background-color: var(--cg-border);
  color: var(--cg-green-dark);
  padding: 2px 4px;
  border-radius: 3px;
}

code {
  background-color: lightgray;
  padding: 1px 2px;
  border-radius: 2px;
}

/* CSS for navigation */

.navbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  width: 100%;
  height: 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;

  background-color: var(--cg-green-dark);
  color: var(--cg-surface);
  padding: 0px 0px;
  /* Debug border */
  /* border: solid red; */
}

.nav-list {
  display: flex;
  flex-direction: row;
  position: relative;
  right: 30px;
  list-style: none;

  /* Debug border */
  /* border: solid blue; */
}

.navbar a {
  color: var(--cg-surface);
  margin: 0 12px;
  text-decoration: none;
  letter-spacing: 2px;
  font-family: "IBM Plex Mono", monospace;
}

.navbar a:hover {
  color: var(--cg-green);
  text-decoration: underline;
}

.navbar a:active {
  color: var(--cg-green);
}

.logo a {
  font-family: "Space Grotesk", sans-serif;
}

.logo a:hover {
  text-decoration: None;
}

main {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0 120px;
}

main > h1 {
  max-width: 900px;
  margin: 0 auto 32px;
  color: var(--cg-green-dark);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -2px;
}

.page-title {
  display: flex;
  justify-content: center;
  font-size: 40px;
  font-family: "Space Grotesk", sans-serif;
}

/* CSS for portfolio grid */

.project {
  display: flex;
  flex-direction: row;
  max-width: 100%;
  margin: 1em 0 2em 0;

  /* Debug border */
  /* border: 2px solid blue; */
}

.item-link {
  width: 70%;

  /* Debug border */
  /* border: 2px solid red; */
}

.project-image {
  object-fit: block;
  width: 100%;
  height: 100px;
  flex-basis: 50px;
  flex-grow: 2;

  /* Debug border */
  /* border: 2px solid black; */
}

.project-details {
  display: flex;
  background-color: var(--cg-surface);
  width: 30%;
  height: 500px;
  flex-shrink: 1;
  padding: 0 20px;
  margin: 0px;
  line-height: 1.5;
  overflow: scroll;

  flex-direction: column;
  text-align: center;
  justify-content: center;

  /* Debug border */
  /* border: 2px solid green; */
}

.project-details a {
  color: var(--cg-green-dark);
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 1px;
}

.project-details a:hover {
  color: var(--cg-green);
  text-decoration: underline;
}

.project-details {
  font-weight: lighter;
}

.project-name {
  font-weight: bold;
  font-size: 20px;
}

/* CSS for home page */

.about {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(400px, 1.8fr);
  align-items: center;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px;
  background-color: var(--cg-surface);
  border: 1px solid var(--cg-border);
  border-radius: 12px;
}

.about-image img {
  max-width: 300px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.about-text {
  flex: 1;
  margin-left: 20px;
}

.about-text h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.5;
}

/* CSS for resume page */

#download-resume {
  display: inline-block;
  font-size: 24px;
}

.button {
  background-color: var(--cg-green-dark);
  border: none;
  color: var(--cg-surface);

  font-family: "IBM Plex Mono", monospace;

  padding: 5px 7px;
  text-align: center;

  border-radius: 2px;
}

.button:hover {
  background-color: var(--cg-green);
}

.resume {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px;
  background-color: var(--cg-surface);
  border: 1px solid var(--cg-border);
  border-radius: 12px;
}

.resume-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.resume-entry {
  height: fit-content;
}

.resume h2 {
  font-family: "Space Grotesk", sans-serif;
}

/* CSS for contact form */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px;
  background-color: var(--cg-surface);
  border: 1px solid var(--cg-border);
  border-radius: 12px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-family: Georgia;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid var(--cg-border);
  border-radius: 4px;
  font-size: 16px;
  resize: vertical;
}

/* Add some spacing to the form */
form {
  width: 500px;
  margin: 0 auto;
}

/* CSS for footer */

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--cg-green-dark);
  color: var(--cg-surface);
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 2.5rem;
}
