body {
  margin: 0;
  padding: 0;
  font-family: 'Nanum Gothic', 'Malgun Gothic', 'Dotum', 'AppleGothic', 'gulim', sans-serif;
  font-size: 13px;
  color: #6d6e71;
  background-color: #fff;
  line-height: 1.48;
  -webkit-text-size-adjust: none;
}

.container {
  width: 100%;
  max-width: 898px;
  margin: 0 auto;
  padding: 0 24px;              /* 좌우 안전 패딩 */
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInAll 1s ease-out forwards;
  box-sizing: border-box;
}

@keyframes fadeInAll {
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  text-align: center;
  font-size: clamp(8px, 6vw, 28px);
  letter-spacing: 0.1em;
  color: #222;
  margin: 46px 0 20px 0;
  white-space: nowrap;
}

@font-face {
  font-family: 'Nanum Gothic ExtraBold';
  src: url('/assets/fonts/NanumGothic-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}
.earth-bold {
  font-size: 1em;
  font-family: 'Nanum Gothic ExtraBold';
  font-weight: 800;
}

nav {
  text-align: center;
  margin: 0 0 50px 0;
  white-space: nowrap;
}
nav a {
  margin: 0 2.5%;
  font-size: clamp(2px, 3.5vw, 14px);
  text-decoration: none;
  color: #666;
}
nav a.on, nav a:hover {
  font-weight: bold;
  color: #111;
}

/* 링크 접근성: focus-visible로만 표시 */
a { color: inherit; text-decoration: none; transition: color .2s; }
a:focus-visible {
  outline: 2px solid #222;
  outline-offset: 2px;
}

/* 그리드 */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 32px 0px;
  width: 100%;
  margin: 0 auto;
  justify-items: center;
}

.work-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border-radius: 15px;
  padding: 8px 5px 10px 5px;
  transition: box-shadow .22s, transform .20s cubic-bezier(.23, 1.12, .55, .98);
  width: 100%;
  max-width: 136px;
  min-width: 0;
}
.work-item:hover {
  box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.14) !important;
  transform: translateY(-4px) scale(1.09);
  z-index: 2;
}
.work-item img {
  width: 136px;
  height: 136px;
  object-fit: cover;
  border-radius: 0;
  margin-bottom: 13px;
  background: #ffffff;
  display: block;
}

.work-title {
  font-size: 15px;
  font-weight: 600;
  color: #5d5d5d;
  text-align: center;
  margin-bottom: 0;
}
.work-title span {
  display: block;
  font-size: 12px;
  font-weight: normal;
  color: #888;
  margin-top: 2px;
}

/* 초소형 화면 대응 */
@media (max-width: 338px) {
  .work-item {
    transform: scale(1.4);
    transform-origin: center top;
    transition: transform 0.3s ease;
  }
  .works-grid {
    gap: 100px 0px;
  }
  .work-title { font-size: 8px !important; }
  .work-title span { font-size: 5px !important; }
}

/* 모바일 터치 잉크 제거 */
* { -webkit-tap-highlight-color: transparent !important; }
