@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 {
  --bg: #f5f5f5;
  --text: #000;
  --text-light: #999;
  --text-hover: #fe0032;
  --border: #e5e5e5;
  --sidebar-width: 25%;
  --gap: 6px;
}

html {
  font-size: 18px;
  min-height: 100%;
  background: linear-gradient(
    to bottom,
    #f5f5f5 0%,
    #f5f5f5 75%,
    rgba(255, 180, 160, 0.5) 82%,
    rgba(255, 140, 140, 0.6) 88%,
    rgba(200, 140, 180, 0.7) 94%,
    rgba(160, 120, 160, 0.8) 100%
  );
  background-attachment: fixed;
}

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;
  cursor: pointer;
  transition: color 0.15s ease;
}

.about-btn {
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  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 var(--border);
}

.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;
  cursor: pointer;
  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: var(--text-light);
  padding: 5px 0;
  cursor: pointer;
  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;
  cursor: pointer;
}

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

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.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;
}

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

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

.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 .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-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: var(--text-light);
  min-width: 80px;
}

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

.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;
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 80px;
  color: var(--text);
}

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

.detail-nav a:hover {
  color: #fff;
}

/* 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-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: #666;
  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: #666;
}

/* Mobile */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  background: rgba(245, 245, 245, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  justify-content: space-between;
  align-items: center;
}

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

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

.menu-btn {
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.menu-btn: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;
    background: var(--bg);
  }

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

  .sidebar.open {
    transform: translateX(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: 12px;
    left: 12px;
    width: calc(100% - 24px);
  }

  .sunset-location,
  .sunset-time {
    font-size: 0.85rem;
  }
}

/* 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;
  width: 16px;
  height: 16px;
  background: radial-gradient(
    circle,
    rgba(254, 0, 50, 0.6) 0%,
    rgba(254, 0, 50, 0) 70%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: trailFade 0.8s ease-out forwards;
}

@keyframes trailFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}
