*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
:root {
  --bg:      #ffffff;
  --ink:     #111111;
  --muted:   #999999;
  --line:    #e5e5e5;
  --skeleton: #efefef;
  --skeleton-shine: #f8f8f8;
  --font-d:  'Playfair Display', serif;
  /* 영문/숫자는 Inter로, 한글은 Pretendard로 렌더링됩니다 */
  --font-u:  'Inter', 'Pretendard', system-ui, sans-serif;
  --hh:      80px;
}
 
html { scroll-behavior: smooth; }
 
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-u);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
 
a { color: inherit; text-decoration: none; }
/*img { display: block; width: 100%; height: 100%; object-fit: cover; }*/
 
/* ── Header ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hh);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 36px;
}
 
.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
 
.logo-block { line-height: 1; }
 
.logo-block a {
  font-family: var(--font-d);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink);
  display: block;
}
 
.logo-block .sub {
  font-family: var(--font-u);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}
 
nav.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
}
 
nav.main-nav ul li a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 20px;
  transition: color 0.2s;
}
 
nav.main-nav ul li:not(:last-child) a {
  border-right: 1px solid var(--line);
}
 
nav.main-nav ul li a:hover { color: var(--ink); }
 
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
 
.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink);
  transition: all 0.3s;
}
 
/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
 
.mobile-nav.open { display: flex; }
 
.mobile-nav a {
  font-family: var(--font-d);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink);
  transition: color 0.2s;
}
 
.mobile-nav a:hover { color: var(--muted); }
 
.mobile-nav-close {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  font-weight: 300;
}
 
/* ── Grid ── */
main {
  margin-top: var(--hh);
  padding: 32px 36px 80px;
}
 
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto;
  gap: 3px;
}
 
/* Feature: first item spans 2 cols × 2 rows */
.portfolio-item.feature {
  grid-column: span 2;
  grid-row: span 2;
}
 
.portfolio-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
 
/* Aspect ratio for normal items */
.portfolio-item:not(.feature) {
  aspect-ratio: 4 / 3;
}

/* ── 썸네일 컨테이너 ── */
.thumb {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--skeleton);   /* 로드 전 배경 */
}
.portfolio-item:not(.feature) .thumb { aspect-ratio: 4 / 3; }

/* ==========================================================
   Hero Cover
   ========================================================== */

.portfolio-item.feature {
  overflow: hidden;
}

/* Cover Image */
.portfolio-item.feature .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1);
  animation:heroZoom 20s ease-out forwards;
}

/* Hero Text */
.portfolio-item.feature .overlay.hero-copy{
  position:absolute;
  inset:0;

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;

  padding:60px;

  opacity:0;
  transform:translateY(24px);

  animation:heroText 1.2s ease forwards;
  animation-delay:.5s;

  background:none;
  z-index:2;
}

.portfolio-item.feature .overlay.hero-copy h1{
  margin:0;

  font-family:var(--font-u);

  font-size:clamp(56px,5vw,88px);
  font-weight:800;

  line-height:1;
  letter-spacing:-0.05em;

  color:#fff;

  text-shadow:
    0 3px 15px rgba(0,0,0,.18),
    0 1px 2px rgba(0,0,0,.25);
}

.portfolio-item.feature .overlay.hero-copy p{
  margin:26px 0 0;

  font-size:12px;
  font-weight:400;

  letter-spacing:.25em;
  text-transform:uppercase;

  line-height:1.8;

  color:#fff;
  opacity:.9;
}

/* Mobile */
@media (max-width:768px){

  .portfolio-item.feature .overlay.hero-copy{
    padding:32px;
  }

  .portfolio-item.feature .overlay.hero-copy h1{
    font-size:42px;
  }

  .portfolio-item.feature .overlay.hero-copy p{
    font-size:10px;
  }
}

/* Animation */

@keyframes heroZoom{
  from{
    transform:scale(1);
  }
  to{
    transform:scale(1.03);
  }
}

@keyframes heroText{
  from{
    opacity:0;
    transform:translateY(24px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}
 
/* 이미지 로드 완료 시 shimmer 숨김 */
.thumb.loaded::before { opacity: 0; pointer-events: none; }
 
/* ── 이미지 ── */
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /*filter: grayscale(100%);*/
  opacity: 0;                       /* 처음엔 투명 */
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.6s ease;
  z-index: 2;
}
 
/* 로드 완료 시 페이드인 */
.thumb.loaded img {
  opacity: 1;
}
 
/* Feature item: match height of 2 normal items + gap */
.portfolio-item.feature .thumb {
  height: 100%;
}
 
.portfolio-item .thumb {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #ccc;
}
 
.portfolio-item:not(.feature) .thumb {
  aspect-ratio: 4 / 3;
}
 
/* Grayscale → color on hover */
.portfolio-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /*filter: grayscale(100%);*/
  transition: filter 0.5s ease, transform 0.6s ease;
}
 
.portfolio-item:hover .thumb img {
  /*filter: grayscale(0%);*/
  transform: scale(1.04);
}


 
/* Overlay: title appears on hover */
.portfolio-item .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 55%);
  /*opacity: 0;*/
  transition: opacity 0.35s ease;
  z-index: 2;
  pointer-events: none;
}
 
.portfolio-item:hover .overlay {
  opacity: 1;
}
 
.portfolio-item.feature .overlay {
  justify-content: flex-start;
  padding: 60px;
  opacity: 1;
  background: none;
}
 
.portfolio-item .overlay .title {
  font-family: var(--font-u);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  transform: translateY(5px);
  transition: transform 0.35s ease;
}
 
.portfolio-item.feature .overlay .title {
  /*
  font-size: 13px;
  letter-spacing: 0.14em;
  */
  
  font-family: var(--font-u);
  font-size: 56px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 3px 15px rgba(0,0,0,.25);
  
  
}
 
.portfolio-item:hover .overlay .title {
  /*transform: translateY(0);*/
}
 
/* Click link covers entire item */
.portfolio-item > a.cover-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}
 
/* ── Footer ── */
footer {
  border-top: 1px solid var(--line);
  padding: 24px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
 
footer p {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
 
/* ── Responsive ── */
@media (max-width: 1100px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-item.feature { grid-column: span 2; grid-row: span 2; }
}
 
@media (max-width: 768px) {
  header { padding: 0 20px; }
  main { padding: 20px 12px 60px; }
  footer { padding: 20px 20px; }
  nav.main-nav { display: none; }
  .hamburger { display: flex; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; }
  .portfolio-item.feature { grid-column: span 2; grid-row: span 1; }
  .portfolio-item.feature .thumb { aspect-ratio: 4 / 3; height: auto; }
  .portfolio-item .overlay { opacity: 1; }
  .portfolio-item .overlay .title { transform: translateY(0); }
}
 
@media (max-width: 480px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-item.feature { grid-column: span 1; }
}
 
@media (prefers-reduced-motion: reduce) {
  .portfolio-item .thumb img,
  .portfolio-item .overlay,
  .portfolio-item .overlay .title { transition: none; }
}
  
  
 .lefttop_logo img{width:150px;}
 
 
 
 
 /* ==========================================================================
   ── Contact Sub Page Styles ──
   ========================================================================== */

/* 서브 페이지 기본 패딩 */
main.sub-page {
  padding: 100px 36px 140px; /* 상하 여백을 넉넉히 두어 미니멀리즘 강조 */
}

/* 가로폭 제한을 위한 컨테이너 */
.sub-container {
  max-width: 1200px;
  margin: 0 auto;
  font-family: var(--font-u);
  letter-spacing: -0.01em;
   margin: 0 auto;
}

.sub-container strong {
  font-weight: 800;
  color: #888888; /* 핵심 키워드 강조 */
}


/* 타이틀: 스튜디오 이유 | studio2u */
.contact-title {
  font-family: var(--font-u);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #222222;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-title .divider {
  color: #cccccc;
  font-weight: 300;
  font-size: 18px;
}

.contact-title .en {
  font-weight: 600;
}

/* 정보 리스트 스타일 (정밀 정렬) */
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 20px; /* 행간 간격 */
  margin-bottom:50px;
}

.info-row {
  /*display: flex;
  align-items: flex-start;*/
  font-family: var(--font-u);
  font-size: 16px;
  line-height: 1.6;
}

.info-row-flex {
  display: flex;
  align-items: flex-start;
  font-family: var(--font-u);
  font-size: 16px;
  line-height: 1.6;
}

/* 좌측 기호 (A, E, F, H, I) */
.info-row-flex .label {
  width: 35px; /* 기호가 차지할 고정 너비 */
  color: #777777;
  font-weight: 500;
  flex-shrink: 0;
  display: inline-block;
}

/* 우측 실제 정보 텍스트 */
.info-row-flex .value {
  color: #888888;
  font-weight: 300;
}

/* 링크 요소 마우스 호버 효과 */
.info-row-flex .value a {
  color: #888888;
  transition: color 0.2s ease;
}

.info-row-flex .value a:hover {
  color: var(--ink); /* 호버 시 진하게 변경 */
  text-decoration: underline;
}

/* 영문 주소 서브 스타일 */
.info-row-flex .value .eng-sub {
  display: inline-block;
  margin-top: 2px;
}

/* ── 모바일 반응형 처리 ── */
@media (max-width: 768px) {
  main.sub-page {
    padding: 60px 20px 100px;
  }
  .contact-title {
    font-size: 19px;
    margin-bottom: 35px;
  }
  .info-row {
    font-size: 12.5px;
  }
  .info-row .label {
    width: 28px;
  }
}
  
  
/* ==========================================================================
   ── About Sub Page Styles ──
   ========================================================================== */


/* 상단 인트로 영역 (이미지 + 우측 글귀 조합) */
.about-intro-section {
  display: flex;
  align-items: flex-start;
  gap: 50px; /* 이미지와 텍스트 사이 정갈한 공백 */
  margin-bottom: 50px;
}


/* 좌측 이미지 블록 고정 비율 */
.about-image {
  width: 400px;
  flex-shrink: 0;
}

.about-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* 우측 텍스트 본문 */
.about-text-content {
  flex-grow: 1;
}

/* 글귀 그룹화 및 은은한 그레이톤 스타일링 */
.quote-group {
  font-size: 16px;
  line-height: 2.1; /* 이미지와 유사한 넉넉한 행간 */
  color: #888888;
  font-weight: 300;
}

.diary-quote {
  margin-bottom: 40px;
}

/* 전혜린 일기 구분점 (. . . . .) 및 출처 */
.quote-group .dots {
  color: #cccccc;
  margin: 16px 0;
  letter-spacing: 0.3em;
}

.quote-group .source {
  font-size: 16px;
  color: #aaaaaa;
  margin-top: 5px;
}


/* 하단 확장 텍스트 단락 (경계선 구분 후 이어지는 문단) */
.about-extended-section {
  border-top: 1px solid var(--line);
  padding-top: 50px;
  margin-top: 30px;
  font-size: 16px;
  line-height: 2.1;
  color: #888888;
  font-weight: 300;
  /* 우측 글귀들과 수직 시작선을 일치시키기 위한 좌측 여백 */
  padding-left: 450px; 
}

/* ── 모바일 및 태블릿 반응형 대응 ── */
@media (max-width: 1024px) {
  .about-extended-section {
    padding-left: 0; /* 태블릿 이하에서는 여백 해제 */
  }
}

@media (max-width: 820px) {
  .about-intro-section {
    flex-direction: column; /* 세로 1단 배열로 전환 */
    gap: 35px;
  }
  
  .about-image {
    width: 100%; /* 모바일에서는 이미지가 전체 너비 차지 */
    max-width: 500px;
    margin: 0 auto;
  }
  
  .quote-group {
    font-size: 13px;
    line-height: 1.9;
  }
  
  .about-extended-section {
    font-size: 13px;
    line-height: 1.9;
    padding-top: 35px;
  }
}
  

/* ==========================================================================
   ── Press Sub Page Styles ──
   ========================================================================== */



/* 4열 격자 그리드 배치 */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 20px; /* 상하 간격 32px, 좌우 간격 20px */
}

/* 개별 보도 자료 아이템 구조 */
.sub-item {
  display: flex;
  flex-direction: column;
}

/* 이미지 박스 (오버플로우 숨김으로 내부 확대 효과 구현) */
.sub-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* 가로세로 1:1 정사각형 비율 고정 */
  overflow: hidden;
  background-color: #fcfcfc;
}

/* [수정] 기본 이미지 상태: 흑백 필터를 제거하고 항상 컬러로 표출 */
.sub-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0%); /* 무조건 선명한 컬러 상태 */
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), 
              opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 1;
}

/* [수정] 마우스 롤오버 작동 효과: 이미지가 4% 확대되며 시각적으로 선택된 느낌 전달 */
.sub-item:hover .sub-thumb img {
  transform: scale(1.04);     /* 부드럽게 중심축 기준 확대 */
  opacity: 0.85;              /* 마우스를 올렸을 때 살짝 투명해지며 링크가 활성화된 느낌 부여 */
}

/* 클릭 영역 확장 링크 */
.sub-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* 하단 서술 타이틀 영역 구역 */
.sub-description {
  padding-top: 14px;
  text-align: center;
}

.sub-title {
  font-family: var(--font-u);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #777777;
  line-height: 1.4;
  transition: color 0.3s, font-weight 0.3s;
}

/* 롤오버 시 하단 글자 색상도 검은색으로 선명하게 강조 */
.sub-item:hover .sub-title {
  color: var(--ink);
  font-weight: 400;
}

/* ── 반응형 레이아웃 분기점 ── */
@media (max-width: 1024px) {
  .sub-grid {
    grid-template-columns: repeat(3, 1fr); /* 태블릿 화면: 3열 격자 */
    gap: 24px 15px;
  }
}

@media (max-width: 768px) {
  .sub-grid {
    grid-template-columns: repeat(1, 1fr); /* 모바일 디바이스: 2열 격자 */
    gap: 20px 12px;
  }
  .sub-title {
    font-size: 11px;
  }
  /* 모바일 기기 터치 환경에서는 확대 현상 비활성화 */
  .sub-item:hover .sub-thumb img {
    transform: none;
    opacity: 1;
  }
}


/* ── 상세페이지 하단 목록 이동 버튼 ── */
.sub-back-navigation {
  margin-top: 100px;         /* 본문과의 충분한 수직 거리 확보 */
  text-align: center;
  border-top: 1px solid var(--line); /* 상단 구분선 */
  padding-top: 40px;
}

.btn-back {
  font-family: var(--font-u);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase; /* 대문자 정렬 */
  color: var(--muted);       /* 기본 상태는 은은한 회색 */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.btn-back .arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}

/* 마우스 롤오버 시 진해지며 화살표가 왼쪽으로 미세하게 움직임 */
.btn-back:hover {
  color: var(--ink);
}

.btn-back:hover .arrow {
  transform: translateX(-4px);
}

/* ==========================================================================
   ── Active Nav ──
   ========================================================================== */

nav.main-nav ul li a.active {
  color: var(--ink);
  font-weight: 600;
  position: relative;
}

nav.main-nav ul li a.active::after {
  content: '';
  position: absolute;
  bottom: -28px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: var(--ink);
}

.mobile-nav a.active {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}


/* ==========================================================================
   ── Sub Page: 공통 레이아웃 ──
   ========================================================================== */

main.sub-page .content-wrap {
  max-width: 860px;
  margin: 0 auto;
}

/* 뒤로가기 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--ink); }
.back-link svg { transition: transform 0.2s; }
.back-link:hover svg { transform: translateX(-3px); }

/* 페이지 타이틀 바 */
.page-title-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 48px;
}

.page-title {
  font-family: var(--font-d);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.page-subtitle {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* 프로젝트 헤더 */
.project-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 48px;
}

.project-title {
  font-family: var(--font-d);
  font-size: 38px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 16px;
}

.project-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* 프로젝트 설명 */
.project-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: #444;
  margin-bottom: 56px;
  word-break: keep-all;
}

/* 프로젝트 이전/다음 네비 */
.project-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.project-nav a {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.project-nav a:hover { color: var(--ink); }


/* ==========================================================================
   ── Sub Page: 이미지 Lazy Load / Shimmer / Slide-up / Fallback ──
   ========================================================================== */

/* 이미지 목록 컨테이너 */
.image-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* 개별 이미지 래퍼 */
.img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--skeleton);
  /*Imin-height: 200px;*/
}

/* Shimmer 레이어 */
.img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--skeleton)       25%,
    var(--skeleton-shine) 50%,
    var(--skeleton)       75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  z-index: 1;
  transition: opacity 0.4s;
}

/* 로드 완료 시 shimmer 제거 */
.img-wrap.loaded::before { opacity: 0; pointer-events: none; }

/* 이미지: 로드 전 투명 + 아래서 올라오는 효과 */
.img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: relative;
  z-index: 2;
}

/* 로드 완료: 페이드인 + 슬라이드업 */
.img-wrap.loaded img {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   ── Sub Page: sub-thumb 에도 shimmer / fallback 적용 (Press 등) ──
   ========================================================================== */

/* sub-thumb shimmer */
.sub-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--skeleton)       25%,
    var(--skeleton-shine) 50%,
    var(--skeleton)       75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  z-index: 1;
  transition: opacity 0.3s;
}
.sub-thumb.loaded::before { opacity: 0; pointer-events: none; }

/* sub-thumb 이미지 로드 전 투명 */
.sub-thumb img {
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
              opacity  0.5s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  z-index: 2;
}
.sub-thumb.loaded img { opacity: 1; }


/* ==========================================================================
   ── Responsive 추가 ──
   ========================================================================== */

@media (max-width: 768px) {
  nav.main-nav ul li a.active::after {
    bottom: -20px;
  }
  .project-title { font-size: 28px; }
  .project-meta  { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .img-wrap::before,
  .sub-thumb::before   { animation: none; }
  .img-wrap img        { transition: opacity 0.3s; transform: none; }
}


/* ==========================================================
   Common Image Lazy Load
   ========================================================== */

.image-container.loaded::before {
  opacity: 0;
  pointer-events: none;
}

.image-container.error::before {
  display: none;
}

.image-container.error img {
  display: none;
}

.image-container.error .image-fallback {
  display: flex;
}

.image-fallback {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f4f4f4;
  z-index: 3;
}

.image-fallback svg {
  width: 36px;
  height: 36px;
  opacity: 0.25;
}

.image-fallback span {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

