html {
  overflow-y: scroll;
}

body {
  margin: 0;
  background: white;
  font-family: 'Noto Serif KR', serif;
}

/*Home페이지*/
.mobile_popup {
  display: none;
}

.home {
  position: relative;
  width: 100%;
  height: 100vh;
}

.location {
  margin-top: 110px;
  margin-left: 320px;
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.05;
}

.cities {
  font-weight: 500;
  text-align: left;
}

.signature {
  display: block;

  margin-left: 40px;
  margin-top: 350px;

  width: min(850px, 60vw);
  height: auto;
}

.menu {
  position: absolute;

  top: 120px;
  right: 120px;

  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
}

.introduction {
  writing-mode: vertical-rl;
  font-size: 27px;
  line-height: 1;
  margin-top: 35px;
}

.menu_nav {
  display: flex;
  flex-direction: column;
}

.menu_nav a.menu_home {
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 18px;
}

.menu_nav a {
  position: relative;
  display: block;

  text-decoration: none;
  color: black;

  font-size: 22px;
  font-weight: 100;
  line-height: 1.2;

  padding-right: 30px; /* 점 자리 확보 */
}

.menu_nav a:hover {
  opacity: 0.6;
}

.menu_nav a.active::after {
  content: "";

  position: absolute;
  right: 0;        /* ← 항상 같은 위치 */
  top: 50%;
  transform: translateY(-50%);

  width: 9px;
  height: 9px;

  background: #b30000;
  border-radius: 50%;
}

.mobile_notice {
  display: none;
}
/*Home페이지 끝*/

/*CV페이지*/
.cv_page {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.cv_content {
  margin-left: 75px;
  padding-top: 200px;
  width: 870px;
}

.cv_name {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.cv_based {
  margin-top: 18px;
  margin-bottom: 70px;
  font-size: 17px;
  font-weight: 400;
}

.cv_section {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid;
}

.cv_section:last-child {
  border-bottom: none;
}

.cv_section h2 {
  margin: 0 0 12px 0;
  font-size: 17px;
  font-weight: 1000;
}

.cv_section p {
  margin: 0 0 14px 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 400;
}

.cv_menu {
  position: absolute;
  top: 120px;
  right: 120px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
}

.cv_signature {
  width: 400px;
  height: auto;
  margin-top: -75px;
}
/*cv페이지*/

/*contact페이지*/
.contact_page {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.contact_content {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 430px;
}

.contact_info {
  text-align: center;
}

.contact_label {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.contact_value {
  margin: 2px 0 0 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

.instagram_label {
  margin-top: 26px;
}

.contact_value a {
  color: black;
  text-decoration: none;
}

.contact_value a:hover {
  opacity: 0.5;
}

.contact_note {
  margin-top: 26px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

.contact_menu {
  position: absolute;
  top: 120px;
  right: 120px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
}

.contact_signature {
  width: 400px;
  height: auto;
  margin-top: -75px;
}
/*contact페이지*/

/*works페이지*/
.works_page {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.works_list {
  position: fixed;
  left: 55px;
  bottom: 40px;
  width: 350px;
}

.works_group {
  margin-bottom: 34px;
}

.works_title {
  margin: 0 0 14px 0;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1.2;
}

.works_group p:not(.works_title) {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

.active_work {
  font-weight: 600;
}

.works_image {
  margin-left: 460px;
  padding-top: 290px;
  width: 880px;

  display: flex;
  flex-direction: column;
  gap: 14px;
}

.works_image img {
  display: block;
  width: 100%;
  height: auto;
}

.works_description {
  margin-left: 460px;
  margin-top: 24px;
  padding-bottom: 60px;
  width: 880px;
}

.works_description p {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

.works_description a {
  color: black;
  text-decoration: none;
}

.works_description a:hover {
  opacity: 0.6;
}

.work_item:hover {
  opacity: 0.6;
}

.work_item {
  position: relative;
  display: block;
  padding-right: 18px; /* 점 자리 */
  cursor: pointer;
}

.work_item.active_work::after {
  content: "";

  position: absolute;
  right: 145px;   /* ← 정렬 핵심 */
  top: 50%;
  transform: translateY(-50%);

  width: 9px;
  height: 9px;

  background: #b30000;
  border-radius: 50%;
}
/*works페이지*/

/*staement페이지*/
.statement_page {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.statement_content {
  margin-left: 75px;
  padding-top: 430px;
  width: 1000px;
}

.statement_content p {
  margin: 0 0 18px 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}
/*staement페이지*/

/* =========================
   Mobile
========================= */
@media screen and (max-width: 768px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  /* 공통 페이지 박스 */
  .home,
  .cv_page,
  .works_page,
  .statement_page,
  .contact_page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  /* 데스크탑 absolute/fixed 흔적 최대한 제거 */
  .menu,
  .cv_menu,
  .contact_menu,
  .works_list,
  .works_image,
  .works_description,
  .cv_content,
  .statement_content,
  .contact_content,
  .location,
  .signature,
  .cv_signature,
  .contact_signature {
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
  }

  /* 공통 메뉴: 모바일에서는 전부 아래쪽으로 */
  .menu,
  .cv_menu,
  .contact_menu {
    position: static !important;
    margin: auto 20px 0 20px !important;
    padding: 40px 0 240px 0 !important;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;

    width: auto !important;
    max-width: none !important;
  }

  /* 혹시 menu 내부에 desktop용 들여쓰기 남아있으면 제거 */
  .menu_nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 !important;
    padding: 0 !important;
  }

  .menu_nav a.menu_home {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 10px;
  }

  .menu_nav a {
    font-size: 18px;
    line-height: 1.15;
    padding-right: 16px;
  }

  .introduction {
    writing-mode: horizontal-tb;
    font-size: 16px;
    line-height: 1.2;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* cv / contact 메뉴 내부에서
   signature를 menu 텍스트보다 위로 올리기 */
.cv_menu,
.contact_menu {
  display: flex !important;
  flex-direction: column !important;
}

.cv_menu .cv_signature,
.contact_menu .contact_signature {
  order: -1 !important;
  display: block !important;
  margin: 0 0 12px 0 !important;
}

  /* -----------------
     Home
  ----------------- */
  .home {
    height: auto;
  }

  .location {
    position: static !important;
    margin: 24px 20px 0 20px !important;
    padding: 0 !important;

    display: inline-flex;
    align-items: flex-start;
    gap: 6px;

    font-size: 14px;
    line-height: 1.05;
    width: auto !important;
  }

  .signature {
    position: static !important;
    display: block;
    width: min(320px, 82vw) !important;
    height: auto !important;
    margin: 40px 20px 0 20px !important;
    padding: 0 !important;
  }

  /* -----------------
     CV
  ----------------- */
  .cv_signature {
    position: static !important;
    display: block;
    width: min(220px, 55vw) !important;
    height: auto !important;
    margin: 0 0 0 0 !important;
    padding: 0 !important;
  }

  .cv_content {
    width: auto !important;
    margin: 24px 20px 60px 20px !important;
    padding: 0 !important;
  }

  .cv_name {
    font-size: 22px;
  }

  .cv_based {
    margin-top: 12px;
    margin-bottom: 32px;
    font-size: 15px;
  }

  .cv_section {
    margin-bottom: 18px;
    padding-bottom: 12px;
  }

  .cv_section h2 {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .cv_section p {
    font-size: 15px;
    line-height: 1.3;
  }

  /* -----------------
     Works
  ----------------- */
  .works_list {
    position: static !important;
    width: auto !important;
    margin: 24px 20px 0 20px !important;
    padding: 0 !important;
  }

  .works_group {
    margin-bottom: 24px;
  }

  .works_title,
  .works_group p,
  .work_item {
    font-size: 15px;
    line-height: 1.25;
  }

  .work_item {
    padding-right: 14px;
  }

  .work_item.active_work::after {
    right: 0;
    width: 7px;
    height: 7px;
  }

  .works_image {
    position: static !important;
    width: auto !important;
    margin: 24px 20px 0 20px !important;
    padding: 0 !important;
    gap: 10px;
  }

  .works_image img {
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  .works_description {
    position: static !important;
    width: auto !important;
    margin: 18px 20px 60px 20px !important;
    padding: 0 !important;
  }

  .works_description p {
    font-size: 15px;
    line-height: 1.3;
  }

  /* works 페이지에서 메뉴가 위에 붙어 있으면,
     HTML상 .menu가 맨 위에 있어도 아래쪽으로 밀리게 */
  .works_page .menu,
  .works_page .cv_menu,
  .works_page .contact_menu {
    margin-top: auto !important;
  }

  /* -----------------
     Statement
  ----------------- */
  .statement_content {
    width: auto !important;
    margin: 24px 20px 60px 20px !important;
    padding: 0 !important;
  }

  .statement_content p {
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 14px;
  }

  .statement_page .menu,
  .statement_page .cv_menu,
  .statement_page .contact_menu {
    margin-top: auto !important;
  }

  /* -----------------
     Contact
  ----------------- */
  .contact_signature {
    position: static !important;
    display: block;
    width: min(220px, 55vw) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .contact_content {
    width: 100% !important;
    justify-content: center !important;
    margin: 24px 0 0 0 !important;
    padding: 0 !important;
  }

  .contact_info {
    width: 100%;
    padding: 0 20px 60px 20px;
    text-align: center !important;
    box-sizing: border-box;
  }

  .contact_label,
  .contact_value,
  .contact_note {
    font-size: 15px;
    line-height: 1.3;
  }

  .instagram_label,
  .contact_note {
    margin-top: 18px;
  }

  /* -----------------
     Mobile popup
  ----------------- */
  .mobile_popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    align-items: center;
    justify-content: center;
    z-index: 2000;
  }

  .mobile_popup_box {
    width: calc(100% - 40px);
    max-width: 320px;
    background: white;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
  }

  .mobile_popup_box p {
    margin: 0 0 14px 0;
    font-size: 14px;
    line-height: 1.4;
  }

  .mobile_popup_box button {
    border: 1px solid black;
    background: white;
    padding: 6px 14px;
    font: inherit;
    cursor: pointer;
  }
}

/* =========================
   mobile layout fix - order
   이 블록은 기존 @media 맨 아래에 추가
========================= */
@media screen and (max-width: 768px) {
  /* 공통: 페이지를 세로 flex로 확실히 */
  .home,
  .cv_page,
  .works_page,
  .statement_page,
  .contact_page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
  }

  /* 공통: 메뉴는 무조건 아래쪽 순서 */
  .menu,
  .cv_menu,
  .contact_menu {
    order: 99 !important;
    margin-top: auto !important;
  }

  /* home: location -> signature -> menu */
  .home .location {
    order: 1 !important;
  }

  .home .signature {
    order: 2 !important;
  }

  .home .menu {
    order: 3 !important;
  }

  /* cv: content -> signature/menu */
  .cv_page .cv_content {
    order: 1 !important;
  }

  .cv_page .cv_menu {
    order: 2 !important;
  }

  /* works: list -> image -> description -> menu */
  .works_page .works_list {
    order: 1 !important;
  }

  .works_page .works_image {
    order: 2 !important;
  }

  .works_page .works_description {
    order: 3 !important;
  }

  .works_page .menu,
  .works_page .cv_menu,
  .works_page .contact_menu {
    order: 4 !important;
    margin-top: auto !important;
  }

  /* statement: content -> menu */
  .statement_page .statement_content {
    order: 1 !important;
  }

  .statement_page .menu,
  .statement_page .cv_menu,
  .statement_page .contact_menu {
    order: 2 !important;
    margin-top: auto !important;
  }

  /* contact: content -> signature/menu */
  .contact_page .contact_content {
    order: 1 !important;
  }

  .contact_page .contact_menu {
    order: 2 !important;
  }

  /* 위쪽 공백을 만드는 가능성 있는 margin 제거 */
  .home .signature,
  .cv_page .cv_signature,
  .contact_page .contact_signature,
  .home .menu,
  .cv_page .cv_menu,
  .contact_page .contact_menu,
  .works_page .menu,
  .statement_page .menu {
    top: auto !important;
    bottom: auto !important;
  }
}
