:root {
  /* App Colors */
  --color-primary: var(--color-purple-dark);
  --color-primary-variant: var(--color-purple-light);
  --color-accent: var(--color-blue-dark);
  --color-accent-variant: var(--color-blue-light);
  --color-brand: var(--color-orange);
  --color-text: var(--color-black);
  --color-line: var(--color-gray-dark);
  --color-border: var(--color-gray-light);

  /* Background */
  --home-bg-gradient: linear-gradient(
    180deg,
    rgba(220, 211, 255, 1) 0%,
    rgba(243, 240, 255, 1) 100%
  );
  --home-bg-svg: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1600 800'%3E%3Cg fill-opacity='0.32'%3E%3Cpath fill='%23cbb4ff' d='M486 705.8c-109.3-21.8-223.4-32.2-335.3-19.4C99.5 692.1 49 703 0 719.8V800h843.8c-115.9-33.2-230.8-68.1-347.6-92.2C492.8 707.1 489.4 706.5 486 705.8z'/%3E%3Cpath fill='%23cdbdff' d='M1600 0H0v719.8c49-16.8 99.5-27.8 150.7-33.5c111.9-12.7 226-2.4 335.3 19.4c3.4 0.7 6.8 1.4 10.2 2c116.8 24 231.7 59 347.6 92.2H1600V0z'/%3E%3Cpath fill='%23d1c7ff' d='M478.4 581c3.2 0.8 6.4 1.7 9.5 2.5c196.2 52.5 388.7 133.5 593.5 176.6c174.2 36.6 349.5 29.2 518.6-10.2V0H0v574.9c52.3-17.6 106.5-27.7 161.1-30.9C268.4 537.4 375.7 554.2 478.4 581z'/%3E%3Cpath fill='%23d5d0ff' d='M0 0v429.4c55.6-18.4 113.5-27.3 171.4-27.7c102.8-0.8 203.2 22.7 299.3 54.5c3 1 5.9 2 8.9 3c183.6 62 365.7 146.1 562.4 192.1c186.7 43.7 376.3 34.4 557.9-12.6V0H0z'/%3E%3Cpath fill='%23DBD9FF' d='M181.8 259.4c98.2 6 191.9 35.2 281.3 72.1c2.8 1.1 5.5 2.3 8.3 3.4c171 71.6 342.7 158.5 531.3 207.7c198.8 51.8 403.4 40.8 597.3-14.8V0H0v283.2C59 263.6 120.6 255.7 181.8 259.4z'/%3E%3Cpath fill='%23e0deff' d='M1600 0H0v136.3c62.3-20.9 127.7-27.5 192.2-19.2c93.6 12.1 180.5 47.7 263.3 89.6c2.6 1.3 5.1 2.6 7.7 3.9c158.4 81.1 319.7 170.9 500.3 223.2c210.5 61 430.8 49 636.6-16.6V0z'/%3E%3Cpath fill='%23e5e2ff' d='M454.9 86.3C600.7 177 751.6 269.3 924.1 325c208.6 67.4 431.3 60.8 637.9-5.3c12.8-4.1 25.4-8.4 38.1-12.9V0H288.1c56 21.3 108.7 50.6 159.7 82C450.2 83.4 452.5 84.9 454.9 86.3z'/%3E%3Cpath fill='%23eae7ff' d='M1600 0H498c118.1 85.8 243.5 164.5 386.8 216.2c191.8 69.2 400 74.7 595 21.1c40.8-11.2 81.1-25.2 120.3-41.7V0z'/%3E%3Cpath fill='%23efebff' d='M1397.5 154.8c47.2-10.6 93.6-25.3 138.6-43.8c21.7-8.9 43-18.8 63.9-29.5V0H643.4c62.9 41.7 129.7 78.2 202.1 107.4C1020.4 178.1 1214.2 196.1 1397.5 154.8z'/%3E%3Cpath fill='%23F3F0FF' d='M1315.3 72.4c75.3-12.6 148.9-37.1 216.8-72.4h-723C966.8 71 1144.7 101 1315.3 72.4z'/%3E%3C/g%3E%3C/svg%3E");
  --home-avatar-svg: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000" fill="%23808"><path d="M1912 1209c27-319-72-699-318-882-187-139-462-224-785-204S85 468 84 880c0 455 481 345 636 484s139 514 477 516c386 3 693-420 715-671Z"></path></svg>');

  /* Colors */
  --color-white: #ffffff;
  --color-blue-dark: #22b8cf;
  --color-blue-light: #e7f5ff;
  --color-purple-dark: #7048e8;
  --color-purple-light: #e5dbff;
  --color-purple-bg: #f3f0ff;
  --color-red: #e45141;
  --color-orange: #f57e25;
  --color-black: #242424;
  --color-gray-dark: #555;
  --color-gray-light: #c5c4c7;

  /* Size */
  --size-max-width: 1200px;

  /*  Divider */
  --divider-single-wave: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"> <path d="M985.66,92.83C906.67,72,823.78,31,743.84,14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84,11.73-114,31.07-172,41.86A600.21,600.21,0,0,1,0,27.35V120H1200V95.8C1132.19,118.92,1055.71,111.31,985.66,92.83Z" ></path> </svg>');
  --divider-triangle-wave: url('data:image/svg+xml;utf8, <svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"> <path d="M598.97 114.72L0 0 0 120 1200 120 1200 0 598.97 114.72z" class="shape-fill"></path> </svg>');
}

* {
  box-sizing: border-box;
  scrollbar-width: 0;
}

*::-webkit-scrollbar {
  background-color: transparent;
  width: 1rem;
  height: 1rem;
}

*::-webkit-scrollbar-thumb {
  background-color: #a8a8a8;
  border-radius: 1rem;
  background-clip: padding-box;
  border: 0.2rem solid transparent;
}

*::-webkit-scrollbar-track {
  background-color: #eee;
  border-radius: 1rem;
  box-shadow: inset 0 0 0.5rem #fff;
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%;
  overflow-x: hidden;
}

body,
input,
textarea,
select,
table,
button,
code {
  font-size: 1.4rem;
  line-height: normal;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

ul,
ol,
li {
  list-style: none;
  padding: 0;
}

a {
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
}

button {
  outline: 0;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  user-select: none;
}

button:focus {
  outline: 0.1rem solid var(--color-primary);
}

select,
input,
textarea,
button {
  appearance: none;
}

/* Common */
main {
  flex: 1;
}

.section {
  padding: 7rem;
  text-align: center;
}

.title {
  font-size: 2.5rem;
  margin: 1rem 0;
}

.description {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0.5rem 0;
}

.max-container {
  max-width: var(--size-max-width);
  margin: 0 auto;
}

/* Header */
.header {
  background-color: transparent;
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem;
  height: 7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
  transition: all 300ms ease;
}

.progress_bar {
  position: absolute;
  height: 0.3rem;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-primary-variant);
  z-index: 9999;
}

.progress_fill {
  height: 100%;
  background-color: var(--color-primary);
  width: 0;
  transition: all 300ms ease;
}

.header-dark {
  /* /* background-color: var(--color-primary-variant); */
  box-shadow: rgba(17, 17, 26, 0.1) 0px 0px 16px;
  /* background-color: rgba(45, 52, 54, 0.45); */
  z-index: 10;
  backdrop-filter: saturate(180%) blur(24px);
}

.header_logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.header_logo_img {
  width: 3.6rem;
  height: 3.6rem;
  transition: all 0.3s;
}

.header_logo_title {
  font-size: 3.2rem;
  transition: all 0.3s;
}

.header_menu {
  display: flex;
  gap: 0.4rem;
}

.header_menu_item {
  padding: 0.8rem 1.6rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.header_menu_item:hover {
  border-bottom: 0.1rem solid var(--color-primary);
}

.header_menu_item.active {
  border: 0.1rem solid var(--color-primary);
  border-radius: 0.4rem;
}
.home {
  position: relative;
  /* background-color: var(--color-purple-bg); */
  background: var(--home-bg-gradient);
  /* background-image: var(--home-bg-svg); */
  color: var(--color-text);
  text-align: center;
  padding: 10rem 0 14rem;
  overflow: hidden;
}

.home::after {
  content: "";
  mask: var(--divider-single-wave);
  -webkit-mask: var(--divider-single-wave);
  background: var(--color-white);
  position: absolute;
  bottom: 0;
  left: 0;
  overflow: hidden;
  line-height: 0;
  width: calc(100% + 1.3px);
  height: 72px;
}

.home_container {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  row-gap: 1rem;
}

.home_avatar {
  width: 25rem;
  height: 25rem;
  object-fit: cover;
  overflow: auto;
  border-radius: 100%;
  border: 0.3rem solid var(--color-primary);
  z-index: 20;
}
.home_container::after {
  content: "";
  display: block;
  z-index: 1;
  position: absolute;
  overflow: auto;
  top: 50%;
  left: 50%;
  width: 31rem;
  height: 30rem;
  background-repeat: no-repeat;
  transform: scaleX(-1) rotate(106deg) translate(-75%, -35%);
  background-image: var(--home-avatar-svg);
  opacity: 0.1;
  background: var(--home-avatar-svg);
  /* mask: var(--home-avatar-svg);
    -webkit-mask: var(--home-avatar-svg); */
}

.home_title {
  padding-top: 3rem;
  font-size: 3rem;
}

.home_title-strong {
  color: var(--color-primary);
}

.home_description {
  font-size: 1.3rem;
  color: var(--color-text);
}

/* Work */
.work {
  background-color: var(--color-primary);
  color: var(--color-text);
}

.categories {
  display: flex;
  justify-content: center;
  margin: 2.5rem;
  gap: 1rem;
}

.category {
  position: relative;
  color: var(--color-text);
  font-size: 1.2rem;
  padding: 1rem 4rem;
  border-radius: 20px;
  border: 1px solid var(--color-primary);
  cursor: pointer;
  white-space: nowrap;
}

.category-selected {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.category_count {
  opacity: 0;
  position: absolute;
  top: -2rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  border-radius: 100%;
  background-color: var(--color-purple-bg);
  color: var(--color-text);
  transition: all 250ms ease-in;
}

.category-selected .category_count,
.category:hover .category_count {
  opacity: 1;
  top: 0.7rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  transition: all 250ms ease-out;
}

.projects.anim-out {
  opacity: 0;
  transform: scale(0.96) translateY(20px);
}
.project {
  position: relative;
  border-radius: 0.8rem;
  overflow: hidden;
}

/* 초기에 실전 프로젝트가 아닌 것들은 숨김 */
.project[data-type="project2"] {
  display: none;
}

.project_img {
  width: 100%;
  height: 100%;
}

.project_metadata {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-black);
  color: var(--color-white);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 250ms ease-in;
  transform: translateY(-10px);
}

.project_metadata:hover {
  opacity: 0.8;
  transform: translateY(0px);
}

.project_title::after {
  content: "";
  display: block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0.5rem 0;
  width: 50px;
  height: 2px;
  background-color: var(--color-primary);
}

.arrow-up {
  background-color: var(--color-white);
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  font-size: 3rem;
  width: 4.5rem;
  height: 4.5rem;
  z-index: 1;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 100%;
  box-shadow: -10px -10px 30px 4px rgba(0, 0, 0, 0.1),
    10px 10px 30px 4px rgba(45, 78, 255, 0.15);
}

.footer {
  position: relative;
  background-color: var(--color-black);
  color: var(--color-white);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.6rem;
}

.contact-item i {
  font-size: 2rem;
  color: var(--color-primary);
}

.email-btn {
  background-color: var(--color-orange);
  color: var(--color-white);
  padding: 0.7rem 1.8rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(245, 126, 37, 0.3);
}

.email-btn:hover {
  background-color: var(--color-white);
  color: var(--color-orange);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(245, 126, 37, 0.4);
}

.github-btn {
  background-color: var(--color-blue-dark);
  color: var(--color-white);
  padding: 0.7rem 1.8rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(34, 184, 207, 0.3);
}

.github-btn:hover {
  background-color: var(--color-blue-light);
  color: var(--color-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(34, 184, 207, 0.4);
}

.resume-btn {
  background-color: var(--color-purple-dark);
  color: var(--color-white);
  padding: 0.7rem 1.8rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(112, 72, 232, 0.3);
}

.resume-btn:hover {
  background-color: var(--color-purple-light);
  color: var(--color-purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(112, 72, 232, 0.4);
}

.footer::after {
  content: "";
  mask: var(--divider-triangle-wave);
  -webkit-mask: var(--divider-triangle-wave);
  background: var(--color-white);
  position: absolute;
  top: -1px;
  left: 0;
  width: calc(100% + 1px);
  height: 21px;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

@media screen and (max-width: 786px) {
  .section {
    padding: 3rem 2rem;
  }

  .title {
    font-size: 2rem;
  }

  .description {
    font-size: 1rem;
  }

  .home {
    padding-bottom: 15rem;
  }
  .home_title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
  }

  .categories {
    flex-direction: column;
  }

  .category {
    width: 100%;
  }

  .projects {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-info {
    flex-direction: column;
    gap: 2rem;
  }

  .arrow-up {
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
  }
}
