@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Outfit:wght@100..900&display=swap');

:root {
  --bg-light: hsl(0, 0%, 100%);
  --bg: hsl(0, 0%, 95%);
  --bg-dark: hsl(0, 0%, 90%);
  --text: hsl(0, 0%, 5%);
  --accent-light: hsl(225, 50%, 95%);
  --accent: hsl(225, 50%, 50%);
  --line-color: hsl(0, 0%, 0%);
  --line-weight: 1px;
}

/* reserves scrollbar space even if it's not needed */
html {
  scrollbar-gutter: stable;
}

*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-thumb {
  background-color: #00000040;
  border-radius: 4px;
}

body {
  padding: min(60px, 5%);
  background-color: var(--bg);
  color: var(--text);
}


/* SIDEBAR STUFF */

.sidebar {
  max-width: 240px;
  width: 100%;
  padding: 20px 40px;
  background-color: var(--bg);
  font-family: 'Outfit', sans-serif;
  border-right: 1px solid var(--line-color);
}

.sidebar a {
  display: block;
  font-size: 24px;
  margin: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: 0.2s;
}

.sidebar a:hover {
  border-bottom: 1px solid var(--line-color);
}

.sidebar a:active {
  background-color: var(--accent);
  color: var(--bg);
  border-bottom: 1px solid var(--accent);
  transition: 0s;
}

.sidebar .current {
  color: var(--accent);
}

#name {
  font-size: 2em;
  font-weight: 600;
  color: var(--accent);
}

#name:active {
  color: var(--bg);
}

.sidebar-icons {
  display: flex;
  justify-content: left;
  gap: 8px;
  margin: 12px 4px;
}

.sidebar-icons a {
  display: inline;
  font-size: 24px;
  margin: 0;
  border-bottom: 1px solid var(--bg);
}

.sidebar-icons a:hover {
  border-bottom: 1px solid var(--line-color);
}

.sidebar-icons a:active {
  /* background-color: var(--accent);
  color: var(--bg); */
  border-bottom: 1px solid var(--accent);
}


/* MAIN CONTENT */

.layout {
  /* center layout */
  display: flex;
  justify-content: center;
}

.intro {
  display: flex;
  align-items: flex-start;
  padding: 20px 0;
}

.intro p {
  font-size: 20px;
  flex: 1;
}

.intro img {
  width: 400px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 40px 40px 0;
  padding: 2px;
  border: 1px solid var(--line-color);
}

.content {
  width: min(800px, 100%);
  padding: 20px 80px 0;
  font-family: 'EB Garamond', serif;
}

/* GENERAL LAYOUT CHANGES FOR MOBILE */

@media (max-width: 1365px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    border-right: none;
    border-bottom: 1px solid var(--line-color);
    padding: 20px;
    text-align: center;
  }

  .sidebar-icons {
    justify-content: center;
  }

  .content {
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
  }

  .intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .intro img {
    width: 90%;
    max-width: 400px;
    margin: 20px 0;
  }
}

/* TIMELINE */

.timeline-block {
  margin-top: 40px;
  font-family: 'Outfit', sans-serif;
}

.timeline-block p {
  font-family: 'EB Garamond', serif;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  margin-top: 40px;
  padding-bottom: 20px;
}

.timeline::before {
  content: ' ';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--line-weight);
  background: var(--line-color);
}

.timeline>li {
  padding-left: 40px;
  margin-bottom: 40px;
}

.timeline-item::before {
  content: ' ';
  position: absolute;
  top: 38px;
  left: -40px;
  width: 40px;
  height: var(--line-weight);
  background: var(--line-color);
}

.timeline-item::after {
  content: ' ';
  position: absolute;
  height: 8px;
  width: 8px;
  border-radius: 0%;
  border: var(--line-weight) solid var(--line-color);
  top: 34px;
  left: -44.5px;
  transform: rotate(45deg);
  background-color: var(--bg);
}

.timeline-item {
  padding: 25px;
  border: var(--line-weight) solid var(--line-color);
  position: relative;
  background-color: var(--bg-light);
  box-shadow: 2px 2px 0 var(--line-color);
  transition: background-color 0.3s;
}

.timeline-item:hover {
  background-color: var(--accent-light);
  box-shadow: 4px 4px 0 var(--line-color);
}

h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.6em;
  font-family: 'Outfit', sans-serif;
}

.timeline-item>p {
  margin: 0;
  line-height: 1.6em;
}

.timeline-item ul {
  font-family: 'EB Garamond', serif;
  list-style-type: square;
  margin-top: 8px;
}

@media (max-width: 1365px) {
  .timeline>li {
    padding-left: 20px;
  }

  .timeline-item::before {
    left: -20px;
    width: 20px;
  }

  .timeline-item::after {
    left: -24.5px;
  }
}

/* PROJECT GRID */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 390px));
  gap: 20px;
}

@media (max-width: 1365px) {
  .project-grid {
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(min(390px, 100%), min(390px, 100%)));
  }
}

.project-card {
  position: relative;
  border: var(--line-weight) solid var(--line-color);
  padding: 20px;
  background-color: var(--bg-light);
  box-shadow: 2px 2px 0 var(--line-color);
  transition: background-color 0.3s;
}

.project-card:hover {
  box-shadow: 4px 4px 0 var(--line-color);
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 20px 0;
}

.project-buttons {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.project-button {
  padding: 4px;
  text-decoration: none;
  border-bottom: 1px solid var(--bg-light);
  color: var(--text);
  transition: 0.2s;
}

.project-button:hover {
  border-bottom: 1px solid var(--line-color);
}

.project-button:active {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}