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

:root {
  --bg-primary: #fefae0;
  --nav-bg-color: #219ebc;
  --text-light: #fff;
  --text-dark: #000;
  --other: hsl(0, 0%, 70%);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
}

.nav-bar {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  padding: 12px;
  background-color: var(--nav-bg-color);
}

.nav-bar a {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-light);
  border-radius: 6px;
  padding: 8px;
  transition: all 0.3s ease;
}

.nav-bar a:hover {
  color: var(--nav-bg-color);
  background-color: var(--text-light);
  box-shadow: 0 0 0 2px var(--text-light);
}

/* Adjust main layout */
main {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

/* Adjust items columns */
.whole-flex {
  display: flex;
  flex-direction: column;
}

/* Set relative position on background image to allow overlap */
.background-image {
  position: relative;
  width: 100%;
  max-height: 250px;
}

/* Style the background image itself */
.background-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* || Profile Picture */
/* Position profile-pic overlapping */
.profile-pic-figure {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 160px;
  z-index: 10;
  border-radius: 50%;
  padding: 4px;
  transition: all 0.5s ease;
}

.profile-pic-figure img {
  /* To be circle */
  width: 100%;
  height: 100%;
  border: 4px double gray;
  border-radius: 50%;
  object-fit: cover;
}

figcaption {
  text-align: center;
  color: var(--other);
  font-size: 12px;
  margin-top: 4px;
}

/* Profile Section */
.profile-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  z-index: 11;
  margin-top: 100px;
  text-align: center;
}

article h1 {
  text-align: center;
  padding-bottom: 4px;
  color: var(--text-dark);
  border-bottom: 2px solid var(--nav-bg-color);
}

.nowrap {
  white-space: nowrap;
}

h2,
h3 {
  color: var(--nav-bg-color);
  margin-top: 20px;
}

.main h2:first-of-type {
  margin-top: -20px;
}

.main .description,
.list {
  color: var(--text-dark);
  font-size: 16px;
  margin-top: 4px;
}

.main .description a,
.main .list a {
  color: var(--nav-bg-color);
  text-decoration: none;
}

.main p a:hover,
.main p a:visited,
.main .list a:hover,
.main .list a:visited {
  color: var(--other);
}

.list li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  line-height: 1.5;
  padding-left: 8px;
  margin-bottom: 6px;
}

.list li::before {
  content: "✅ ";
  display: inline-block;
  font-size: 1rem;
}

.main .list:nth-of-type(3) li {
  line-height: 1.5rem;
  margin-bottom: 6px;
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 60px;
  padding: 12px;
}

.contact p a {
  text-decoration: none;
}

@media (max-width: 480px) {
  .profile-pic-figure {
    width: 120px;
    height: 120px;
    bottom: -60px;
  }
}
