@font-face {
  font-family: "ABC Monument Grotesk";
  src: url("./fonts/ABCMonumentGrotesk-Light-Trial.woff") format("woff");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "ABC Monument Grotesk";
  src: url("./fonts/ABCMonumentGrotesk-Regular-Trial.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "ABC Monument Grotesk";
  src: url("./fonts/ABCMonumentGrotesk-Medium-Trial.woff") format("woff");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "ABC Monument Grotesk";
  src: url("./fonts/ABCMonumentGrotesk-Bold-Trial.woff") format("woff");
  font-weight: 700;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8' fill='%23fe0032'/%3E%3C/svg%3E")
      10 10,
    auto;
}

:root {
  --text: #000;
  --text-light: #000;
  --text-hover: #fe0032;
  --sidebar-width: 25%;
  --gap: 6px;
}

html {
  font-size: 18px;
  min-height: 100%;
  background: #ffffff;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 배경 그라디언트 (모바일 fixed 지원) */
#bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: #ffffff;
  transition: background 1s ease;
}

body {
  font-family:
    "ABC Monument Grotesk",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* Sunset Info - 좌측 하단 */
.sunset-info {
  position: fixed;
  bottom: 32px;
  left: 20px;
  z-index: 150;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: calc(var(--sidebar-width) - 40px);
}

.sunset-location {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
}

.sunset-time {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  padding: 32px 20px 16px;
  overflow-y: auto;
  z-index: 100;
  background: transparent;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.logo {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;

  transition: color 0.15s ease;
}

.about-btn {
  font-size: 0.9rem;
  font-weight: 400;

  transition: color 0.15s ease;
}

.logo:hover,
.about-btn:hover {
  color: var(--text-hover);
}

.header-links {
  margin-bottom: 20px;
}

.header-link {
  display: block;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: color 0.15s ease;
}

.header-link:hover {
  color: var(--text-hover);
}

/* Nav Section */
.nav-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.nav-section:last-child {
  border-bottom: none;
}

.nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 5px 0;
  margin-bottom: 0;
}

.nav-list {
  list-style: none;
}

.nav-item {
  font-size: 0.95rem;
  font-weight: 400;
  padding: 5px 0;

  transition: color 0.15s ease;
  line-height: 1.35;
}

.nav-item:hover {
  color: var(--text-hover);
}

.nav-item .kr {
  display: none;
}

.nav-item.hidden {
  display: none;
}

.toggle-btn {
  font-size: 0.85rem;
  color: #000;
  padding: 5px 0;

  transition: color 0.15s ease;
}

.toggle-btn:hover {
  color: var(--text-hover);
}

/* Main */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px 16px 40px;
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-thumbnail {
  aspect-ratio: 1/1;
  background: #000;
  transition: none;
  overflow: hidden;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0.5px solid #ccc;
}

.project-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #fff;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition:
    opacity 0.2s ease,
    background 0.2s ease;
}

.project-card:hover .project-info {
  opacity: 1;
  background: rgba(0, 0, 0, 0.75);
}

.project-title-en,
.project-title-kr {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  display: block;
}

/* Footer */
.main-footer {
  margin-top: 20px;
  padding: 8px 0 60px;
  font-size: 0.8rem;
  color: var(--text);
}

/* Project Detail */
.project-detail {
  display: none;
  padding-bottom: 60px;
}

.project-detail.active {
  display: block;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
  margin-bottom: 30px;
  position: relative;
  z-index: 10;
}

.detail-header {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.detail-title {
  grid-column: span 1;
}

.detail-title h1 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.detail-title h1 a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.detail-title h1 a:hover {
  color: var(--text-hover);
}

.detail-title .kr {
  font-size: 0.9rem;
  font-weight: 400;
}

.detail-desc-wrap {
  grid-column: span 3;
}

.detail-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.detail-desc a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.detail-desc a:hover {
  color: var(--text-hover);
}

.detail-meta {
  grid-column: span 2;
  font-size: 0.85rem;
}

.detail-meta a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.detail-meta a:hover {
  color: var(--text-hover);
  text-decoration: underline;
}

.meta-row {
  display: flex;
  gap: 20px;
  margin-bottom: 8px;
}

.meta-label {
  color: #000;
  min-width: 80px;
}

.media-item {
  background: #000;
  grid-column: span 3; /* 기본 2단 */
  position: relative;
}

.media-item video[controls] {
  cursor: pointer;
}

.media-item.full {
  grid-column: 1 / -1; /* 전체 폭 */
}

.media-item.col2 {
  grid-column: span 3; /* 2단 */
}

.media-item.col3 {
  grid-column: span 2; /* 3단 */
}

.media-item img,
.media-item video {
  width: 100%;
  height: auto;
  display: block;
  border: 0.5px solid #ccc;
}

.detail-nav {
  position: fixed;
  bottom: 32px;
  left: calc(var(--sidebar-width) + 16px);
  right: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text);

  z-index: 1;
}

.detail-nav a {
  transition: color 0.15s ease;
}

.detail-nav a:hover {
  color: var(--text-hover);
}

/* About View */
.about-view {
  display: none;
}

.about-view.active {
  display: block;
}

.about-content {
  max-width: 100%;
  padding-bottom: 60px;
}

.about-hero {
  margin-bottom: 35px;
}

.about-hero .about-email {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.about-hero .about-email a {
  color: var(--text);
  text-decoration: underline;
  transition: color 0.15s ease;
}

.about-hero .about-email a:hover {
  color: var(--text-hover);
}

.about-hero .about-intro {
  font-size: 0.95rem;
  color: #000;
  margin-top: 12px;
  line-height: 1.5;
}

.about-hero .about-tools {
  font-size: 0.8rem;
  color: #999;
  margin-top: 8px;
  line-height: 1.5;
}

.about-sections {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.about-section {
  grid-column: span 2;
}

.about-section h2 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.about-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  margin-bottom: 12px;
}

.about-date {
  font-size: 0.8rem;
  color: #000;
  min-width: 140px;
}

.about-detail p {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.about-detail p a {
  color: var(--text);
  transition: color 0.15s ease;
  text-decoration: underline;
}

.about-detail p a:hover {
  color: var(--text-hover);
}

.about-detail .sub {
  font-size: 0.85rem;
  color: #000;
}

/* Mobile */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  background: #ffffff;
  z-index: 200;
  justify-content: space-between;
  align-items: center;
}

.mobile-logo {
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.mobile-logo:hover {
  color: var(--text-hover);
}

.menu-btn {
  font-size: 0.85rem;

  transition: color 0.15s ease;
}

.menu-btn:hover {
  color: var(--text-hover);
}

.mobile-header-right {
  display: flex;
  gap: 16px;
}

.mobile-about {
  font-size: 0.85rem;

  transition: color 0.15s ease;
}

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

@media (max-width: 1200px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .detail-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .detail-title,
  .detail-desc-wrap,
  .detail-meta {
    grid-column: span 1;
  }

  .detail-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
  }

  .meta-row {
    margin-bottom: 0;
  }

  .detail-content {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gap);
    margin-bottom: 30px;
  }

  .about-sections {
    grid-template-columns: 1fr;
  }

  .about-section {
    grid-column: span 1;
  }

  .about-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
  }

  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 85%;
    max-width: var(--sidebar-width);
    padding-top: 60px;
    padding-bottom: 100px;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .sidebar .sidebar-header {
    display: none;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .nav-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .nav-item {
    padding: 8px 0;
  }

  .main {
    margin-left: 0;
    padding: 60px 12px 20px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-info {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
  }

  .project-card:hover .project-thumbnail {
    opacity: 1;
  }

  /* 이미지 한 줄 나열 */
  .detail-content {
    grid-template-columns: 1fr;
  }

  .media-item,
  .media-item.full,
  .media-item.col2,
  .media-item.col3 {
    grid-column: span 1;
  }

  /* 모바일에서 sunset-info 위치 조정 */
  .sunset-info {
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 20px;
    background: #ffffff;
  }

  .sunset-location,
  .sunset-time {
    font-size: 0.85rem;
    color: var(--text);
  }

  /* 모바일에서 detail-nav 스타일 */
  .detail-nav {
    position: static;
    padding: 30px 0 60px;
    font-size: 0.85rem;
    left: auto;
    right: auto;
  }
}

/* Animations */
.project-card {
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.project-card:nth-child(1) {
  animation-delay: 0.02s;
}
.project-card:nth-child(2) {
  animation-delay: 0.04s;
}
.project-card:nth-child(3) {
  animation-delay: 0.06s;
}
.project-card:nth-child(4) {
  animation-delay: 0.08s;
}
.project-card:nth-child(5) {
  animation-delay: 0.1s;
}
.project-card:nth-child(6) {
  animation-delay: 0.12s;
}
.project-card:nth-child(7) {
  animation-delay: 0.14s;
}
.project-card:nth-child(8) {
  animation-delay: 0.16s;
}
.project-card:nth-child(9) {
  animation-delay: 0.18s;
}
.project-card:nth-child(10) {
  animation-delay: 0.2s;
}
.project-card:nth-child(11) {
  animation-delay: 0.22s;
}

/* Cursor Trail */
.cursor-trail {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

/* 맑음 - 노란색 원, 커지면서 사라짐 */
.cursor-trail.sunny {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 200, 80, 0.7) 0%,
    rgba(255, 200, 80, 0) 70%
  );
  animation: sunnyFade 0.8s ease-out forwards;
}

/* 흐림 - 회색 큰 원, 퍼지면서 사라짐 */
.cursor-trail.cloudy {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(160, 160, 170, 0.5) 0%,
    rgba(160, 160, 170, 0) 70%
  );
  animation: cloudyFade 1s ease-out forwards;
}

/* 비 - 파란색 물방울, 아래로 떨어짐 */
.cursor-trail.rain {
  width: 6px;
  height: 10px;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: rgba(100, 160, 220, 0.7);
  animation: rainFade 0.5s ease-in forwards;
}

/* 눈 - 연한 하늘색 작은 원, 천천히 내려감 */
.cursor-trail.snow {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(180, 210, 240, 0.8);
  animation: snowFade 1.2s ease-out forwards;
}

@keyframes sunnyFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

@keyframes cloudyFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes rainFade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(20px) scale(0.3);
  }
}

@keyframes snowFade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(12px) scale(0.5);
  }
}
/* 테스트용 - 밤 배경 (삭제하면 원래대로) 
html {
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #ffffff 60%,
    rgba(100, 80, 140, 0.7) 75%,
    rgba(60, 40, 100, 0.9) 88%,
    rgba(30, 20, 60, 1) 100%
  ) !important;
}
  */

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img,
.lightbox video {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  border: none;
  display: none;
  -webkit-user-select: none;
  user-select: none;
}

.lightbox img {
  pointer-events: none;
}

.lightbox video {
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 2rem;
  font-weight: 200;
  z-index: 9001;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  z-index: 9001;
  transition: opacity 0.2s ease;
  background: none;
  border: none;
}

.lightbox-prev {
  left: 40px;
}

.lightbox-next {
  right: 40px;
}

/* 왼쪽 화살표 < */
.lightbox-prev::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border-left: 1px solid #fff;
  border-bottom: 1px solid #fff;
  transform: translate(-25%, -50%) rotate(45deg);
}

/* 오른쪽 화살표 > */
.lightbox-next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border-right: 1px solid #fff;
  border-top: 1px solid #fff;
  transform: translate(-75%, -50%) rotate(45deg);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 0.7;
}

/* 이미지 개수 인디케이터 */
.lightbox-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 9001;
}

.lightbox-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.2s ease;
}

.lightbox-dot.active {
  background: #fff;
}

/* 모바일 라이트박스 */
@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    display: none !important;
  }

  .lightbox img,
  .lightbox video {
    max-width: 95%;
    max-height: 80%;
    pointer-events: auto;
  }

  .lightbox-dots {
    bottom: 40px;
  }

  .lightbox-dot {
    width: 5px;
    height: 5px;
  }
}

.media-item img,
.media-item video {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8' fill='%23fe0032'/%3E%3C/svg%3E")
      10 10,
    zoom-in;
  -webkit-user-select: none;
  user-select: none;
}

/* 이미지 우클릭/드래그 방지 */
.media-item img,
.project-thumbnail img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}
