/* 기본 리셋 및 글꼴 설정 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

@font-face {
  font-family: 'MyFont';
  src: url('./assets/abc.ttf') format('woff2'),
       url('./assets/abc.ttf') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'MyFont', 'Noto Sans KR', sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  font-size: 0.75rem;
  color: #333;
  overflow-x: hidden;
  background-color: #fff;
}

html[lang="ko"] body {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 300;
}

/* 내부 레이아웃 컨테이너 */
.section-inner {
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* 공통 섹션 스타일 */
.section {
  width: 100%;
  margin-bottom: 1rem;
}

/* 3열 레이아웃 */
.section-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "logo about honors"
    "experience education contact"
    "works preview preview";
  gap: 1.5rem;
  align-items: start;
  row-gap: 0.4rem;
}
/* Grid area assignment for main sections */
.logo-section {
  grid-area: logo;
}

.about-section {
  grid-area: about;
}

.honors-section {
  grid-area: honors;
}

.experience-section {
  grid-area: experience;
}

.education-section {
  grid-area: education;
}

.contact-section {
  grid-area: contact;
}

.works-section {
  grid-area: works;
}

.preview-section {
  grid-area: preview;
}

/* works-preview는 grid + 비율 */
.works-preview-section .section-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  width: 100%;
}

.works-preview-section .works-column {
  padding: 0;
  grid-column: 1;
}

.works-preview-section .preview-column {
  padding: 0;
  grid-column: 2 / span 2;
}

.section-columns > div {
  display: flex;
  flex-direction: column;
}

/* 제목 */
/* 제목 및 언더라인 공통 보더: 라이트 모드에서 검정색 */
h2,
.underline {
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid #000;
  padding-bottom: 0.3rem;
}

/* 본문 텍스트 */
.about p {
  margin-top: 0.2rem;
  line-height: 1.2;
  font-size: 0.75rem;
}

/* 리스트 정렬 */
.honors-list,
.experience-list,
.education-list,
.contact-list,
.works-list {
  margin-top: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.honor-item,
.exp-item,
.edu-item,
.contact-item,
.work-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  width: 100%;
}

.work-item a {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.work-item:hover {
  filter: blur(1px);
}

/* PREVIEW */
.preview-area {
  width: 100%;
  background-color: #000;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.2rem;
  height: auto;
  min-height: 300px;
}

.preview-area > * {
  display: none;
}

.preview-area > .active-preview {
  display: block;
}

.preview-area video,
.preview-area img {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* 푸터 */
.footer {
  padding: 0.5rem 0;
  font-size: 0.7rem;
  color: #555;
  box-sizing: border-box;
  position: relative;
  width: 100vw;
}

/* ===== Footer base layout styles for desktop ===== */
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: -0.1rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.footer-left-item {
  flex: 1;
  text-align: left;
}

.footer-right-item {
  flex: 1;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 0.3rem;
}

.footer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  gap: 0.5rem;
}

.footer-left-item {
  padding-left: 0.1rem;
}

.footer-right-item {
  gap: 0.1rem;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  width: auto;
  height: 1px;
  background-color: #444;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
}

/* 언어 및 모드 토글 텍스트 */
.lang-text,
.mode-text {
  font-size: 0.7rem;
  color: #999;
  cursor: pointer;
  padding: 0 0.3rem;
  transition: filter 0.2s;
}

.lang-text.active,
.mode-text.active {
  color: #000;
  font-weight: 600;
}

.lang-text:hover,
.mode-text:hover {
  filter: blur(1px);
}

/* 강조 링크 */
.highlighted-link {
  color: red;
  text-decoration: none;
}

.highlighted-link:hover {
  filter: blur(1px);
}

/* 반응형 */
@media (max-width: 768px) {
  .section-columns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    grid-template-areas: none;
  }

  .section-columns > div {
    width: 100%;
  }

  .works-preview-section .section-columns {
    display: flex;
    flex-direction: column;
  }

  .works-preview-section .works-column,
  .works-preview-section .preview-column {
    width: 100%;
  }

  .footer-inner {
    display: flex;
    flex-direction: column;
    gap: -0.1rem;
  }

  .footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .footer-left-item {
    flex: 1;
    text-align: left;
  }

  .footer-right-item {
    flex: 1;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 0.3rem;
  }
}

/* 다크 모드 지원 */
body.dark-mode {
  background-color: #000;
  color: #fff;
}

body.dark-mode h2,
body.dark-mode p,
body.dark-mode span,
body.dark-mode a {
  color: #fff;
}

body.dark-mode .footer::before {
  background-color: #fff;
}

body.dark-mode .highlighted-link {
  color: #f55;
}

body.dark-mode .lang-text {
  color: #666;
}

body.dark-mode .lang-text.active {
  color: #fff;
  font-weight: 600;
}

body.dark-mode .mode-text {
  color: #666;
}

body.dark-mode .mode-text.active {
  color: #fff;
  font-weight: 600;
}

body.dark-mode .footer-left-item,
body.dark-mode .footer-right-item {
  color: #fff;
}
/* 다크 모드에서 h2, .underline 보더를 흰색으로 */
body.dark-mode h2,
body.dark-mode .underline {
  border-bottom: 1px solid #fff;
}
/* 로고 스타일 */
#main-logo {
  max-width: 70px;
  width: 27%;
  height: auto;
  object-fit: contain;
  margin-top: 0.6rem;
  margin-bottom: 0.5rem;
}