* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  background-color: #d9d9d9;
}

#main-container {
  max-width: 90%;
  margin: 3rem auto 3rem auto;
  padding: 0;
}

nav ul {
  width: 100%;
  display: flex;
  align-items: center;
  height: 4rem;
  justify-content: flex-end;
  list-style: none;
  background-color: #fff;
  border-radius: 1rem;
  padding: 0 2rem 0 2rem;
}

nav img {
  height: 7rem;
  mix-blend-mode: darken;
}

nav li {
  display: flex;
  align-items: center;
  margin-right: 3rem;
  text-transform: uppercase;
  font-size: clamp(14px, 1vw, 50px);
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
}

nav li:first-child {
  margin-right: auto;
  cursor: auto;
}

nav li[id="semi-last"] {
  margin-right: 0;
}

nav li:last-child {
  margin-right: 0;
}

nav span {
  margin-left: 1rem;
  text-transform: uppercase;
  font-size: clamp(16px, 1.5vw, 60px);
  font-family: "Pacifico", cursive;
  color: #2197bd;
}

nav li.active {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.7rem;
  text-decoration-color: #2197bd;
  text-decoration-thickness: 0.1rem;
}

.section {
  margin: 6rem auto 0 auto;
}

#hero {
  max-width: 95%;
  /* min-height: 60vh; */
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: end;
  justify-content: space-between;
}

.left-hero {
  min-height: 100%;
  place-self: start;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
}

.right-hero {
  align-self: self-start;
  background-color: #fff;
  min-height: 100%;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#hero-image {
  max-width: 16vw;
  min-width: 232px;
  background-color: #a6a6a6;
  border-radius: 1rem;
  object-fit: cover;
  object-position: 0px 1%;
}

#lhbtn {
  padding: 10px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: #2197bd;
  font-weight: 700;
  font-size: large;
  color: #5ce1e6;
}
svg {
  background-color: #2197bd;
}

#lhbtn span {
  padding-left: 1rem;
}

.left-hero h1 {
  text-align: left;
  font-size: clamp(52px, 4vw, 80px);
  margin: 0;
  padding: 0;
  margin-top: 2rem;
}

#icons {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 1rem;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.icon {
  height: 45px;
  border-radius: 50%;
  border: 0.2rem solid #2197bd;
}

.icon:hover {
  scale: 105%;
  cursor: pointer;
}

.btn {
  background-color: #1d1d1b;
  color: #d9d9d9;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: clamp(24px, 1vw, 38px);
  border: none;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

#resume {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  justify-content: space-between;
}

#resume h2 {
  margin: 0;
  padding: 0;
  background-color: #2197bd;
  color: #d9d9d9;
  padding: 30px;
  text-align: start;
  font-weight: 500;
  border-radius: 1rem;
  font-size: clamp(20px, 1.6vw, 2rem);
}

#table-grid {
  width: 80%;
  min-height: 18rem;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr 6fr;
  border-radius: 1rem;
}

#topic > ul {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
}

#topic > ul > li {
  color: #1d1d1b;
  list-style: none;
  font-size: 1.5rem;
  padding: 20px;
  border-radius: 10px 0 0 10px;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: start;
}

#topic > ul > li.active {
  background-color: #2197bd;
  justify-content: end;
  font-weight: 600;
  color: #5ce1e6;
}

.sub-topic {
  background-color: #fff;
  border-radius: 0 1rem 1rem 0;
}

.sub-topic > ul > li {
  display: grid;
  grid-template-columns: 1fr 4fr;
  align-items: baseline;
  width: 100%;
  height: 100%;
  padding: 20px;
}
.sub-topic > ul > li > span {
  text-align: end;
  padding-right: 10px;
  font-size: 1.3rem;
  color: #a6a6a6;
  border-right: 2px solid #2197bd;
}

.sub-topic > ul > li > p {
  text-align: start;
  font-weight: 400;
  font-size: 1.1rem;
  color: #1d1d1b;
  margin-left: 10px;
}

#table-grid > div.deactive {
  display: none;
}

#topic-2 {
  padding: 2rem;
}

#topic-3 {
  display: flex;
  flex-direction: column;
  align-items: start;
  background-color: #fff;
  border-radius: 0 1rem 1rem 0;
}

#topic-3 > h3 {
  color: #2197bd;
  font-size: xx-large;
  margin: 2rem;
}

#topic-3 span {
  color: #a6a6a6;
  font-weight: 400;
  margin-left: 20px;
  justify-content: baseline;
  font-size: smaller;
}

#topic-3 p {
  padding: 0.5rem;
  margin-left: 1rem;
  text-transform: uppercase;
  font-weight: bolder;
  color: #a6a6a6;
}

#topic-3 > ul {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  list-style: none;
  margin: 2rem 0 0 2rem;
  list-style-position: outside;
  border-left: 2px solid #2197bd;
}

#topic-3 > ul > li:first-child {
  margin-top: 0px;
}

#topic-3 > ul > li {
  color: #1d1d1b;
  font-weight: 600;
  margin: 20px 10px 0 1rem;
}

#work > h2 {
  text-align: start;
  font-size: clamp(30px, 3vw, 80px);
  color: #1d1d1b;
  margin-bottom: 10rem;
}

#work-grid {
  width: 80%;
  margin: 3rem auto 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background-color: #fff;
  padding: 1.8rem;
  border-radius: 1rem;
}

#work-grid > div {
  place-self: center;
}

#work-grid > div > img {
  max-height: 10vw;
  object-fit: cover;
  border-radius: 1rem;
  cursor: pointer;
  min-height: 167px;
}

#work-grid > div > img:hover {
  transform: scale(1.1);
  z-index: 1;
}

.modal {
  max-width: 70%;
  display: flex;
  position: absolute;
  inset: 1;
  z-index: 20;
  background-color: #2197bd;
  padding: 0.7rem;
  border-radius: 1rem;
}

.modal img {
  height: 18vh;
  object-fit: cover;
  border-radius: 1rem;
}

.modal > div {
  display: flex;
  flex-direction: column;
  margin-left: 1rem;
  margin-right: auto;
  justify-content: space-between;
  align-items: start;
}

.modal h3 {
  color: #5ce1e6;
  font-size: clamp(22px, 1.8vw, 40px);
}

.modal p {
  color: #1d1d1b;
  font-size: clamp(15px, 1.5vw, 20px);
}

.modal span {
  color: #d9d9d9;
  font-size: clamp(18px, 1.6vw, 24px);
  margin-top: 10px;
}

#btn2 {
  background-color: #1d1d1b;
  color: #d9d9d9;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: clamp(12px, 1vw, 40px);
  border: none;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  position: absolute;
  bottom: 0;
  right: 0;
  margin: 0 1rem 1rem 0;
}

.modal.disabled {
  display: none;
}

#about-me > h2 {
  text-align: start;
  font-size: clamp(30px, 3vw, 80px);
  color: #1d1d1b;
  margin-bottom: 10rem;
}

#right-img {
  max-width: 16vw;
  min-width: 165px;
  background-color: #a6a6a6;
  border-radius: 1rem;
  object-fit: cover;
  object-position: 0px 1%;
  float: right;
  min-height: 250px;
}

.sub-container {
  width: 80%;
  display: flex;
  flex-direction: row-reverse;
  place-self: center;
  gap: 1rem;
}

#info {
  padding: 2rem;
  background-color: #fff;
  border-radius: 1rem;
  place-self: end;
}

#info > div {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
}

#info ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: 2rem;
  font-size: clamp(14px, 1vw, 40px);
  color: #1d1d1b;
}

#info > div > ul:first-child {
  text-transform: uppercase;
  font-weight: bold;
  align-items: end;
  text-align: right;
  margin-right: 20px;
  color: #a6a6a6;
}

#info > div > ul:last-child {
  align-items: baseline;
}

#info > div > #icons {
  justify-content: end;
  align-items: end;
  gap: 10px;
}

#contact-me > h2 {
  text-align: start;
  font-size: clamp(30px, 3vw, 80px);
  color: #1d1d1b;
  margin-bottom: 10rem;
}

#contact-me div.sub-container {
  flex-direction: row;
}

#contact-me img {
  height: 18vw;
}

form {
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: space-between;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
}

form span {
  font-size: clamp(16px, 1vw, 60px);
  color: #a6a6a6;
}

form input {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  border-style: none;
  margin-top: 0.2rem;
  background-color: #a6a6a6;
  margin-bottom: 0.8rem;
}

input[type="text"]:focus {
  outline: 0.2rem solid #2197bd;
}

#btn3 {
  margin-top: 1rem;
  margin-bottom: 0;
  align-self: self-end;
  background-color: #1d1d1b;
  color: #d9d9d9;
  padding: 0.6rem 1.5rem;
  border-radius: 1rem;
  font-size: large;
  border: none;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
#close-btn {
  display: none;
}

/* make whole thing responsive */

@media (max-width: 1580px) {
  #work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #work-grid > div > img {
    max-height: 16vw;
    min-height: 10vw;
  }
  #btn2 {
    padding: 0.8rem 1.8rem;
  }
}

@media (max-width: 1365px) {
  #info > div > #icons {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 1100px) {
  #contact-me div.sub-container {
    flex-direction: column;
  }
  #contact-me img {
    height: 34vw;
  }
  form {
    margin-top: 3rem;
  }
  form span {
    font-size: clamp(15px, 1.8vw, 1rem);
  }
  form input {
    padding: 0.4rem 1rem;
    margin-bottom: 1rem;
  }
  #btn3 {
    padding: 0.6rem 1.5rem;
    font: size 14px;
    margin-top: 0;
  }
  .modal h3 {
    font-size: 20px;
  }
  .modal p {
    font-size: 16px;
  }
  .modal span {
    font-size: 16px;
  }
}

@media (max-width: 1060px) {
  #work-grid {
    grid-template-columns: 1fr;
  }
  #work-grid > div > img {
    max-height: 30vw;
  }
  #info > div {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
  }
  #info > div > #icons {
    padding: 0;
  }
  .icon {
    height: 4vw;
    min-height: 28px;
  }
}

@media (max-width: 960px) {
  nav li {
    margin-right: 2rem;
    /* font-size: 1vw; */
  }

  #table-grid {
    grid-template-columns: 1fr;
  }

  #topic > ul {
    flex-direction: row;
    text-align: center;
  }
  #topic > ul > li {
    padding: 0.8rem;
    font-size: medium;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  #topic > ul > li.active {
    border-radius: 10px 10px 0 0;
    padding-bottom: 0.4rem;
    font-size: 1.2rem;
  }

  .sub-topic {
    border-radius: 0 0 1rem 1rem;
  }
  .sub-topic > ul > li > span {
    font-size: 0.8rem;
  }
  .sub-topic > ul > li > p {
    font-size: 0.8rem;
  }
  #topic-3 > h3 {
    font-size: 1.5rem;
  }
  #topic-3 span {
    font-size: 1.2rem;
  }
  #topic-3 p {
    font-size: 1rem;
    padding-left: 1rem;
  }
  #topic-3 ul {
    font-size: 0.8rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
  }
  #topic-3 {
    border-radius: 0 0 1rem 1rem;
  }
  #work-grid {
    grid-template-columns: 1fr;
    row-gap: 1.5rem;
  }
  .modal {
    transform: translate(-20%, 0.1rem);
  }
  .modal img {
    width: 20vw;
  }
  #btn2 {
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 790px) {
  #close-btn {
    display: block;
  }
  nav > ul > li.sidebar {
    display: none;
  }
  #btn2 {
    padding: 0.6rem 1.4rem;
  }

  #lhbtn svg {
    height: 20px;
  }
  #lhbtn span {
    font-size: 14px;
    padding-left: 0.2rem;
  }
  .left-hero h1 {
    font-size: clamp(30px, 5vw, 52px);
  }
  #hero-image {
    max-width: 20vw;
    min-width: 150px;
  }
  .left-hero {
    gap: 0.4rem;
  }
  .btn {
    padding: 0.5rem 1rem;
    font-size: clamp(10px, 3vw, 20px);
  }
  .icon {
    height: 24px;
  }

  #resume h2 {
    font-size: 16px;
  }
  #topic > ul > li {
    font-size: 16px;
  }
  #topic > ul > li.active {
    font-size: 17px;
  }
  .modal h3 {
    font-size: 20px;
  }
  .modal p {
    font-size: 14px;
  }
  .modal span {
    font-size: 15px;
  }
  div > #topic-3 > h3 {
    font-size: 20px;
    margin-bottom: 1rem;
  }
  div > #topic-3 > h3 > span {
    font-size: 18px;
    margin-bottom: 1rem;
  }

  div > #topic-3 > p {
    font-size: 14px;
  }
  div > #topic-3 > ul > li {
    font-size: 12px;
  }
}

@media (max-width: 740px) {
  #right-img {
    display: none;
  }
  #info > div {
    grid-template-columns: 1fr 3.5fr 0.5fr;
  }
}

@media (max-width: 540px) {
  #topic > ul > li {
    font-size: 12px;
  }
  #topic > ul > li.active {
    font-size: 14px;
  }
  .sub-topic > ul > li > span {
    font-size: clamp(8px, 12px, 12px);
  }
  .sub-topic > ul > li > p {
    font-size: clamp(8px, 11px, 10px);
  }
  #info {
    position: relative;
  }
  #info > div > #icons {
    flex-direction: row;
    position: absolute;
    bottom: 10px;
    right: 10px;
  }
  #info > div {
    grid-template-columns: 1fr 3fr 0fr;
  }
  div #topic-3 > h3 {
    font-size: 16px;
    margin-bottom: 0.5rem;
  }
  div #topic-3 > h3 > span {
    font-size: 14px;
    margin-left: 10px;
    margin-bottom: 0.5rem;
  }
  div #topic-3 > p {
    font-size: 12px;
  }
  div #topic-3 > ul > li {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  #info > div {
    grid-template-columns: 1fr 2fr 0fr;
  }
  #info > div > ul:first-child {
    font-size: 10px;
  }
  #info > div > ul > li {
    font-size: 10px;
  }
}

@media (max-width: 445px) {
  #lhbtn span {
    font-size: 10px;
  }
  #lhbtn > svg {
    width: 12px;
  }
  #resume h2 {
    font-size: 12px;
  }
}
