:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-name: #000000;
  --color-border: #e5e5e5;
  --font-main: "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-name: "Franklin Gothic Medium", "Franklin Gothic", "ITC Franklin Gothic", "Arial Narrow", Arial, sans-serif;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --max-width: 960px;
  --transition: 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.6; }

.container {
  width: min(100% - 2 * var(--space-md), var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.site-header.scrolled {
  border-bottom-color: var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin-inline: auto;
}

.nav-logo {
  font-family: var(--font-name);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-name);
  letter-spacing: 0.04em;
}

.nav-menu {
  font-size: 0.9rem;
  display: flex;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-menu a {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-name);
  transition: transform var(--transition);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-xl) var(--space-md);
}

.hero-title {
  font-family: var(--font-name);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 400;
  color: var(--color-name);
  letter-spacing: 0.02em;
  line-height: 1;
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
}

/* Sections */
.section {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}

.section-title {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.about-grid {
  display: grid;
  grid-template-columns: min(240px, 35%) 1fr;
  gap: var(--space-md);
  align-items: start;
}

.about-photo {
  width: 100%;
  display: block;
  object-fit: cover;
}

.about-text {
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    inset: 0;
    top: 53px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.98);
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .nav-menu.open { transform: translateX(0); }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .about-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}



/* Videos (비디오 섹션 유투브와 텍스트 크기)*/
/* Works 섹션: 영상 중심 비대칭 레이아웃 */
.work-item {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: flex-start;
}

/* 왼쪽 영상: 크기 확대 (비중 65%) */
.work-media {
  flex: 1.8;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
}

.work-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* 오른쪽 글: 짧은 텍스트용 (비중 35%) */
.work-info {
  flex: 1;
}

.work-name {
  font-size: 1.rem;
  font-weight: bold;
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

.work-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.work-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

/* 모바일 화면 대응 */
@media (max-width: 768px) {
  .work-item {
    flex-direction: column;
    gap: 1.5rem;
  }
}



/* 작품 간 간격 */
.work-item + .work-item {
  margin-top: 4rem;
}

/* 반전 레이아웃 (텍스트 왼쪽, 영상 오른쪽) */
.work-item.reverse {
  flex-direction: row; /* HTML 태그 순서대로 글 왼쪽, 영상 오른쪽 */
}

/* 모바일 모드 반응형 처리 */
@media (max-width: 768px) {
  .work-item {
    flex-direction: column;
    gap: 1.5rem;
  }
  .work-item.reverse {
    flex-direction: column-reverse; /* 모바일에서는 영상이 위로 올라가도록 설정 */
  }
}




/* 피지컬 모델링 섹션 */
.project-item {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  align-items: center; /* flex-start 대신 center로 두면 비디오와 글의 높이가 다를 때 세로 중앙 정렬되어 깔끔합니다 */
}

/* 프로젝트 간 간격 */
.project-item + .project-item {
  margin-top: 4rem;
}

/* [수정] 미디어 영역 (비디오와 이미지 공통 적용) */
.project-media {
  flex: 1.8;
  width: 100%;
  aspect-ratio: 16 / 9; /* 16:9 화면 비율 고정 */
  border-radius: 4px;
  overflow: hidden;
}

/* [추가] 유튜브 iframe 비디오 전용 스타일 */
.project-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 이미지 스타일 */
.project-photo {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.project-info {
  flex: 1;
}

.project-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.project-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted, #666);
  margin-bottom: 1rem;
}

.project-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text, #1a1a1a);
}

/* 모바일 반응형 (모바일에서는 무조건 사진/영상 위, 글 아래) */
@media (max-width: 768px) {
  .project-item {
    flex-direction: column;
    gap: 1.5rem;
  }

  .project-item.reverse {
    flex-direction: column-reverse;
  }
}

/* =========================================
   Physical Modeling Projects 섹션 배경 (투명도 조절형)
   ========================================= */

   #research-projects {
    position: relative;
    padding-top: 80px;
    padding-bottom: 80px;
    overflow: hidden; /* 배경이 섹션 밖으로 넘어가지 않도록 방지 */
  }
  
  /* 배경 이미지 및 투명도 설정 (글자 뒤로 배치) */
  #research-projects::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/bg_img.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    opacity: 0.35; /* 투명도: 0.1(매우 연함) ~ 1.0(진함) 숫자로 조절 가능 */
    z-index: 0;    /* 배경을 맨 뒤로 전송 */
  }
  
  /* 컨텐츠(글자, 영상 등)를 배경 위로 전송 */
  #research-projects .container {
    position: relative;
    z-index: 1;    /* 글자를 배경보다 위로 올림 */
  }

  /* ====푸터 내부 레이아웃 (좌: 저작권, 우: TOP 버튼) */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.to-top-btn {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.to-top-btn:hover {
  color: var(--color-name);
}