/* ==========================================================================
   Layout — navigation, section scaffolding and footer.
   ========================================================================== */

/* --- Navigation ---------------------------------------------------------- */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}

/* --- Hamburger menu (mobile) --------------------------------------------- */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--color-ink);
  transition: all 0.3s ease-in-out;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.menu-links.open {
  max-height: 300px;
}

.menu-links li {
  list-style: none;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: var(--color-ink);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

/* --- Sections ------------------------------------------------------------ */

section {
  padding-top: 4vh;
  height: auto;
  min-height: fit-content;
  margin: 0 10rem;
  position: relative;
}

.section-container {
  display: flex;
  gap: 2rem;
  height: auto;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
}

/* --- Profile ------------------------------------------------------------- */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  width: 100%;
  max-width: 340px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: auto;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 3px solid var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section__pic-container img {
  /* Fill the square frame and crop, so any aspect ratio works.
     works regardless of the photo's aspect ratio. */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* --- About --------------------------------------------------------------- */

#about {
  position: relative;
}

#about h1 {
  margin-bottom: 10px;
}

.about-details-container {
  background: var(--color-surface);
  border: 2px solid var(--color-ink);
  border-radius: 4rem;
  padding: 3rem;
  margin: 6rem auto;
  max-width: 900px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.text-container {
  text-align: justify;
}

/* --- Projects ------------------------------------------------------------ */

#projects {
  position: relative;
  overflow-x: auto;
  white-space: nowrap;
  text-align: center;
}

.experience-details-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 2rem;
  padding-bottom: 1rem;
}

.about-containers {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  /* stretch, not center: cards in a row share a height, so rows read as a
     grid rather than a staggered line. */
  align-items: stretch;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

/* --- Contact ------------------------------------------------------------- */

#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* --- Footer -------------------------------------------------------------- */

footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}
