@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;700&display=swap');

html, body {
  margin: 0;
  padding: 0;
  background-color: #F3E9DC; 
  color: #2C2C2C; 
  font-family: 'Outfit', sans-serif;
  overflow: hidden; 
}

canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1; 
}

/* --- Navigation --- */
#top-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px; 
  display: flex;
  justify-content: space-between; 
  align-items: center;
  z-index: 200;
  padding: 0;
}

.nav-item {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-decoration: none;
  color: #4A4A4A; 
  transition: all 0.4s ease;
  padding: 30px 0; 
  cursor: pointer;
  text-transform: uppercase;
}

.nav-item:hover {
  color: #B56555; 
  background: rgba(0, 0, 0, 0.03); 
  text-shadow: 0 0 20px rgba(181, 101, 85, 0.4); 
}

.yt-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #B56555; 
  display: inline-block;
  margin-right: 5px;
  transition: all 0.3s ease;
}

.nav-item:hover .yt-icon {
  background-color: #8A4A3E;
  transform: scale(1.2);
}

/* --- Hero Section --- */
#hero {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 100; 
  width: 100%;
}

h1 { 
  font-weight: 700; 
  letter-spacing: -0.02em; 
  font-size: 4rem; 
  margin: 0; 
  color: transparent; 
  -webkit-text-stroke: 2px #2C2C2C; 
  transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
  pointer-events: auto; 
  white-space: nowrap; 
}

h1:hover {
  color: #2C2C2C; 
  -webkit-text-stroke: 0px;
  transform: scale(1.02);
  letter-spacing: 0.1em;
}

.role { 
  font-weight: 400; 
  font-size: 0.95rem;       
  letter-spacing: 0.33em;  
  margin-right: -0.33em;   
  color: #4A4A4A; 
  text-transform: uppercase; 
  margin-top: 15px;        
  margin-bottom: 5px;
}

.project-title {
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.72em;
  margin-right: -0.72em;
  color: #666666;
  filter: blur(0.5px); 
  text-transform: uppercase;
  margin-top: 5px;
}

/* --- Old Blog Button (PC Default) --- */
#old-blog-btn {
  position: absolute;
  top: 100px;  /* 네비게이션 아래 적절한 위치 */
  right: 5%;   
  z-index: 200;
  
  /* 크기 늘어짐 방지 (핵심) */
  display: inline-flex; 
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto !important;    
  height: auto !important;  
  
  padding: 6px 12px;
  border: 1px solid rgba(136, 136, 136, 0.5);
  border-radius: 4px; 
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.4); /* 반투명 배경 */
  
  filter: blur(0.5px); 
  opacity: 0.7;
  transition: all 0.3s ease;
}

.btn-label {
  font-size: 0.5rem; 
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #4A4A4A;
  margin-bottom: 2px;
  white-space: nowrap; 
  line-height: 1.2;
}

.btn-url {
  font-size: 0.35rem; 
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #666;
  white-space: nowrap;
  line-height: 1.2;
}

/* Button Hover */
#old-blog-btn:hover {
  filter: blur(0px); 
  opacity: 1;        
  background-color: #2C2C2C;
  border-color: #2C2C2C;
  transform: translateY(2px);
}

#old-blog-btn:hover .btn-label {
  color: #F3E9DC; 
}

#old-blog-btn:hover .btn-url {
  color: #aaa;
}

/* --- Footer Credits --- */
#footer-credits {
  position: absolute;
  bottom: 20px; 
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-size: 0.5rem; 
  font-weight: 300;
  letter-spacing: 0.1em;
  color: #888888;
  filter: blur(1px); 
  z-index: 200; 
  user-select: none;
  transition: all 0.5s ease; 
}

#footer-credits a {
  color: inherit; 
  text-decoration: none; 
  font-weight: 700; 
}

#footer-credits:hover {
  filter: blur(0px); 
  color: #2C2C2C; 
}


/* --------------------------------------------- */
/* [Mobile Responsiveness] (max-width: 768px)    */
/* --------------------------------------------- */
@media screen and (max-width: 768px) {
  /* Navigation adjustments */
  #top-nav {
    height: 60px;
  }
  
  .nav-item {
    font-size: 0.7rem; 
    padding: 20px 5px; 
  }

  /* Hero text adjustments */
  h1 {
    font-size: 13vw; 
    -webkit-text-stroke: 1px #2C2C2C; 
  }

  .role {
    font-size: 0.7rem; 
    letter-spacing: 0.2em; 
    margin-top: 10px;
  }
  
  /* [수정 완료] Old Blog Button 모바일 위치 및 크기 강제 고정 */
  #old-blog-btn {
    top: 70px;      /* 상단 네비게이션 바로 아래 */
    right: 15px;    /* 우측 여백 */
    bottom: auto !important; /* 중요: 아래쪽 좌표 해제하여 늘어짐 방지 */
    width: auto !important;
    height: auto !important;
    padding: 4px 8px; /* 모바일에 맞는 작은 패딩 */
  }
  
  /* Footer adjustments */
  #footer-credits {
    bottom: 30px;
  }
}