/* Global */
:root {
  /* App Colors */
  --color-primary: var(--color-black);
  --color-primary-variant: var(--color-gray);
  --color-primary-variant-point: var(--color-dark-gray);
  --color-accent: var(--color-blue);
  --color-accent-variant: var(--color-orange);
  --color-accent-icon: var(--color-pink);
  --color-text: var(--color-white);

  /* Background */
  --home-bg-gradient: linear-gradient(
    180deg,
    rgb(0, 39, 116) 0%,
    rgb(0, 0, 0) 100%
  );

  --home-bg-gradient-opposite: linear-gradient(
    180deg,
    rgb(0, 0, 0) 0%,
    rgb(20, 36, 37) 20%,
    rgb(13, 55, 49) 30%,
    rgb(21, 86, 77) 50%,
    rgb(2, 131, 118) 100%
  );

  --home-bg-gradient-green: linear-gradient(
    180deg,
    rgb(39, 101, 106) 0%,
    rgb(0, 51, 55) 50%,
    rgb(27, 30, 38) 100%
  );

  --home-bg-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='715' height='715' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%231B1E26' stroke-width='1'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%2301373B'%3E%3Ccircle cx='769' cy='229' r='5'/%3E%3Ccircle cx='539' cy='269' r='5'/%3E%3Ccircle cx='603' cy='493' r='5'/%3E%3Ccircle cx='731' cy='737' r='5'/%3E%3Ccircle cx='520' cy='660' r='5'/%3E%3Ccircle cx='309' cy='538' r='5'/%3E%3Ccircle cx='295' cy='764' r='5'/%3E%3Ccircle cx='40' cy='599' r='5'/%3E%3Ccircle cx='102' cy='382' r='5'/%3E%3Ccircle cx='127' cy='80' r='5'/%3E%3Ccircle cx='370' cy='105' r='5'/%3E%3Ccircle cx='578' cy='42' r='5'/%3E%3Ccircle cx='237' cy='261' r='5'/%3E%3Ccircle cx='390' cy='382' r='5'/%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 1800" fill="%23FFC03C"><path d="M1386.57 181.4c160.9 73.74 328.5 149.72 424.59 281.57 96.09 129.61 118.44 315.09 98.33 487.16-20.11 172.07-84.92 332.97-187.71 446.94-105.03 116.2-250.29 185.48-391.07 243.58-138.55 60.34-272.63 109.5-393.31 91.62-122.91-17.88-234.64-102.8-377.66-160.9-143.02-58.1-317.33-87.15-406.71-183.24-89.39-96.09-96.09-261.46 2.23-368.72 98.33-109.5 301.68-160.9 384.37-270.4 82.68-111.73 42.46-283.81 84.92-422.36C669.24 188.1 798.86 80.83 937.41 60.72c140.79-20.11 290.51 49.16 449.17 120.67Z"></path></svg>');
  --home-avatar-svg: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000" fill="#F2EC52"><path d="M1891 560c0-277-224-509-501-499-372 13-397 281-504 302s-215-179-511-75a459 459 0 0 0-222 218C10 809 262 886 259 992s-201 171-82 395c34 64 99 127 212 141 56 6 103 47 115 102a377 377 0 0 0 383 310c222 2 528-202 380-536-42-97 30-123 73-194s-11-120 128-156c233-61 423-246 423-494Z"></path></svg>');
  /* Colors */
  --color-white: #ffffff;
  --color-black: #050a13;
  --color-blue: #03e8f9;
  --color-orange: #fd6413;
  --color-pink: #d89a95;
  --color-yellow: #ffc03c;
  --color-gray: #1b1e26;
  --color-dark-gray: #2f3034;

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

  /* 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="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" ></path> </svg>');
  --divider-multi-wave: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none" > <path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" ></path> <path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" ></path> <path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" ></path> </svg>');
  --divider-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none" > <path d="M649.97 0L550.03 0 599.91 54.12 649.97 0z" ></path> </svg>');
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
body {
  font-family: "Open Sans", sans-serif;
  margin: 0;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  /* ul태그에서 리스트 앞에 . 삭제 */
  list-style: none;
  padding: 0;
}

a {
  text-decoration: none;
  color: var(--color-text);
}
button {
  background-color: transparent;
  outline: 0;
  border: 0;
}

/* 버튼이 focus되면 변함 */
button:focus {
  outline: 1px solid transparent;
}

.container {
  width: 100%; /* 기본 폭 */
}

/* 화면 스크롤 애니메이션 */
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,100&subset=latin,latin-ext);
.mydiv {
  position: relative;
  height: 100vh;
  width: 100%;
  color: #fff;
  align-items: center;
  justify-content: center;
  &:nth-child(1) {
    background: var(--color-pink);
  }
  &:nth-child(2) {
    background: var(--color-dark-gray);
  }
  &:nth-child(3) {
    background: #028376;
  }
  &:nth-child(4) {
    background: #673ab7;
  }
  &:nth-child(5) {
    background: #009688;
  }
}

/* Common */
.section {
  padding: 4rem;
  scroll-snap-align: start;
  text-align: center;
}

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

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

.title__bold {
  font-size: 3rem;
  /* margin: 1rem; */
  padding-top: 1rem;
  color: var(--color-primary-variant-point);
}

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

.line {
  width: 100%;
  height: 1px;
  visibility: visible;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: rgba(55, 53, 47, 0.09);
  margin: 2rem;
}

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

.header--dark {
  background-color: var(--color-primary);
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__logo__img {
  width: 36px;
  height: 36px;
}

.header__logo__title {
  font-size: 1.8rem;
}

.header__toggle {
  display: none;
  color: var(--color-white);
  font-size: 1.5rem;
  position: absolute;
  top: 1.3rem;
  right: 1rem;
}

.header__menu {
  display: flex;
  gap: 4px;
}

.header__menu__item {
  display: block;
  padding: 8px 16px;
  border-bottom: 1px solid transparent;
}

/* 헤더 메뉴에 마우스가 올라오면 hover되면 */
.header__menu__item:hover {
  border-bottom: 1px solid var(--color-accent);
}

/* 메뉴 아이템이 hover면서 active 클래스를 가진 상태이면 */
.header__menu__item.active {
  background-color: var(--color-accent);
  opacity: 0.8;
  border-radius: 10%;
}

/* Home */
#home {
  width: 100%;
  position: relative;
  background-color: var(--color-primary);
  background-image: var(--home-bg-gradient);
  color: var(--color-text);
  padding: 5rem 1rem;
  padding-top: 7rem;
  text-align: center;
  overflow: hidden;
}

#home::after {
  /* content: ""; */
  position: absolute;
  bottom: 0;
  left: 0;
  width: calc(100% + 1.3px);
  height: 60px;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  background-color: var(--color-white);
  mask: var(--divider-single-wave);
  -webkit-mask: var(--divider-single-wave);
}

.home__container {
  height: var(--size-max-height);
  position: relative;
  display: flex;
  flex-direction: column; /* Stack children vertically */
  align-items: center; /* Center children horizontally */
  justify-content: center; /* Center children vertically */
  padding-top: 3rem;
}

.home__avatar {
  background: var(--home-avatar-svg);
  position: relative;
  bottom: -70px;
  width: 250px;
  object-fit: cover;
  /* transform: scaleX(-1) rotate(-5deg); */
}

.home__content {
  position: absolute;
  bottom: 0;
  /* left: 50%; */
  transform: translateY(130%);
  text-align: center;
}

.home__divider svg {
  position: relative;
  display: block;
}

.home__title {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center; /* Center align text */
}

.home__title--strong {
  color: var(--color-accent);
}

.home__description {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.home__contact {
  display: inline-block;
  background-color: var(--color-accent);
  margin: 2rem;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border-radius: 4px;
}

.home__contact:hover {
  background-color: transparent;
  color: var(--color-text);
  outline: 2px solid var(--color-accent);
}

/* About */
#about {
  padding-top: 10rem;
}

.aboutMes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 5rem 5rem;
}

.aboutMe {
  display: flex;
  align-items: center;
  flex-basis: calc(50% - 1rem);
  padding: 1rem 1rem;
  color: var(--color-text);
  border-radius: 1rem;
}

.about__title {
  padding: 2rem 1rem;
  font-size: 1rem;
  font-weight: bold;
}

.about__icon {
  font-size: 2rem;
  margin: 1rem 4rem;
  color: var(--color-accent-icon);
  transition: all 300ms ease;
  cursor: default;
}

.about_desc {
  /* margin-top: 5rem; */
  text-align: left;
  white-space: nowrap;
}

/* 헤더 메뉴에 마우스가 올라오면 hover되면 */
.about_desc:hover {
  background-color: transparent;
  color: var(--color-pink);
}

.majors {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2.5rem 0;
}

.major {
  background-color: var(--color-primary-variant-point);
  padding: 1.5rem 1.5rem;
  color: var(--color-text);
  border-radius: 1rem;
  box-shadow: 4px 8px 8px rgba(0, 0, 0, 0.38);
  height: 250px;
  width: 250px;
}

.major__icon {
  font-size: 4rem;
  margin: 1rem 0;
  color: var(--color-accent);
  transition: all 300ms ease;
  cursor: default;
}

.major__title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}
/* major class에 마우스가 올라오면, major icon은 이미지 이동 */
.major:hover .major__icon {
  transform: rotate(-15deg) scale(1.2);
  color: var(--color-pink);
}

/* Job */
#experience {
  padding-top: 6rem;
}

.experiences {
  background-color: var(--color-text);
  border-radius: 2rem;
  width: 90%;
  display: inline-block;
  box-shadow: rgba(0, 0, 0, 0.24) 3px 3px 8px;
}

.jobs {
  display: flex;
  flex-wrap: wrap;
  text-align: start;
}

.job {
  width: 70%; /* Each job takes up half the width */
  padding: 3rem;
  box-sizing: border-box;
}

.company {
  display: grid;
  width: 30%;
  justify-content: center;
  align-items: center;
}

.job__info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.job__name {
  color: var(--color-gray);
}

.job__desc {
  margin-left: 20px;
  margin-top: 20px;
  color: var(--color-primary-variant);
  margin-left: auto; /* Align to the left of the containing div */
}

.job__period {
  color: var(--color-primary-variant);
  font-size: 1em;
  margin-bottom: 1rem;
  margin-right: 1rem;
}

/* Skills */
#skills {
  position: relative;
  background-color: var(--color-primary-variant);
  color: var(--color-text);
}

#skills::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  /* width: calc(118% + 1.3px); */
  height: 60px;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  background-color: var(--color-primary);
  -webkit-mask: var(--divider-single-wave);
}

.skills {
  display: grid;
  grid-template-columns: 6fr 4fr;
  margin: 2rem 3rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2.8px 2.2px rgba(0, 0, 0, 0.034),
    0 6.7px 5.3px rgba(0, 0, 0, 0.048), 0 12.5px 10px rgba(0, 0, 0, 0.06),
    0 22.3px 17.9px rgba(0, 0, 0, 0.072), 0 41.8px 33.4px rgba(0, 0, 0, 0.086),
    0 100px 80px rgba(0, 0, 0, 0.12);
}

.skills__title {
  color: var(--color-accent);
  margin: 1rem 0;
  font-size: 1.2rem;
}

.skills__coding {
  grid-row: span 2;
  padding: 1rem;
  background-color: var(--color-primary);
}

.skills_tools {
  background-color: var(--color-primary-variant-point);
  padding: 1rem;
}

.skills_etc {
  padding: 1rem;
  background-color: var(--color-primary);
  filter: brightness(150%);
}

.bar {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.5rem;
  transition: transform 0.5s ease;
}

.bar__metadata {
  display: flex;
  justify-content: space-between;
}

.bar__bg {
  width: 100%;
  height: 3px;
  background-color: var(--color-primary-variant);
}

.bar:hover {
  transform: scale(1.05);
}

.bar__value {
  height: 5px;
  border-radius: 3rem;
  background-color: var(--color-accent);
}

/* Work */
#work {
  display: inline-table;
  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.1rem;
  padding: 0.5rem 3rem;
  border-radius: 4px;
  border: 1px solid var(--color-accent);
  cursor: pointer;
  white-space: nowrap;
}

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

.category__count {
  opacity: 0;
  position: absolute;
  top: -20px;
  right: 16px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 100%;
  background-color: var(--color-accent-variant);
  color: var(--color-text);
  transition: all 250ms ease-in;
}

.category--selected .category__count,
.category:hover .category__count {
  opacity: 1;
  top: 0;
}

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

.projects.anime-out {
  opacity: 0;
  transform: scale(0.96) translateY(20px);
}

.project {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.project_img {
  width: 100%;
  align-items: center;
}

.project__metadata {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-black);
  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);
}

/* css가상의 클래스, project__title클래스 다음에 넣고 싶으면 :after,
전에 넣고 싶으면 :before */

.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-accent);
}

/* Arrow up */
.arrow-up {
  background-color: var(--color-primary);
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  font-size: 3rem;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 100%;
  text-align: center;
  box-shadow: 5px 5px 0px 0px var(--color-accent);
  transition: opacity 300ms ease-in;
}

/* Footer */
#contact {
  background-color: var(--color-text);
  color: var(--color-primary);
  padding-bottom: 5rem; /* Add additional padding to prevent overlap */
}
#contact::after {
  content: "";
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  font-size: 2rem;
}

.contact__link {
  color: var(--color-primary-variant);
  transition: color 250ms ease-in;
}

.contact__link:hover {
  color: var(--color-accent);
}

@media screen and (max-width: 768px) {
  /* 페이지 애니메이션 추가 */
  .mydiv {
    width: 100%;
  }
  #about {
    margin-top: 3rem;
  }

  #experience {
    padding-top: 6rem;
  }

  .section {
    padding: 3rem 2rem;
  }

  .title {
    font-size: 2rem;
  }

  .description {
    font-size: 1rem;
  }

  .header {
    flex-direction: column;
    align-items: start;
    background-color: var(--color-primary);
  }

  .header__toggle {
    display: block;
  }

  .header__menu {
    display: none;
    flex-direction: column;
    text-align: center;
    padding: 1rem 4rem;
    gap: 1rem;
  }

  .header__menu.open {
    display: flex;
  }

  .header__nav {
    width: 100%;
  }

  #home {
    padding-bottom: 3rem;
  }

  #work {
    /* padding-bottom: 3rem; */
    padding-bottom: 10rem; /* Add additional padding to prevent overlap */
  }

  .home__title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
  }

  .aboutMes {
    flex-direction: column;
    /* align-items: center; */
  }

  .aboutMe {
    max-width: 25rem;
    align-items: center;
  }

  .majors {
    /* flex-direction: column; */
    align-items: center;
  }

  .major {
    max-width: 25rem;
  }

  .job {
    justify-content: center;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  .categories {
    flex-direction: column;
  }

  .category {
    width: 100%;
  }

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

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