/* 기본 스타일 초기화 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* body 스타일 */
body {
  /*height: 100%;/*단일페이지에선 에러가 났음. */
  width:100vw;
  background-color: #22262b;
  font-family: 'Roboto Condensed', sans-serif;
  overflow-x: hidden;
  overflow-y: hidden;
  visibility: hidden; /* 폰트 로딩 전 텍스트 숨기기 */
}

/* 폰트 로딩 후 body 스타일 */
body.fonts-loaded {
  visibility: visible;
  animation: fadeInBody 2s ease-in-out forwards;
}

/* fadeIn 애니메이션 정의 */
@keyframes fadeInBody {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* 배경 처리 */
body::before {
  content: "";
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* 대문 페이지 배경 */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  right:0;
  width: 100vw;
  height: 100%;
  overflow: hidden;
  background: #222;
  border:1px solid transparent;/*삐져나오는 이미지스케일 아티팩트 제거를 위한 아티팩트:크롬*/
}

.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right:0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  opacity: 0;
  transition: transform 15s ease, opacity 2s cubic-bezier(0.39, 0.58, 0.57, 1);
  background-color: #222; /* 로딩 지연 대비 */
  filter: blur(2px);
}

.bg-image.active {
  opacity: 1;
  z-index: 1;
  filter: none;
  transform: scale(1.07);
  /*border:1px solid transparent;/*삐져나오는 이미지스케일 아티팩트 제거를 위한 아티팩트:크롬*/
}

.grad {
position: fixed;
top:0;
left:0;
right:0;
width: 100%;
height: 100%;
z-index: 5;
pointer-events: none;
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.4) 100%);
}
/* 대문 타이틀 및 소셜 아이콘 */
.frontdoor_content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
  padding: 1em;
  max-width: 90%;
  z-index: 3;
}

/* 대문 타이틀 크기 */
.frontdoor_content h1 {
  font-size: 4em;
  font-weight: 400;
  line-height: 1.1;
}

.frontdoor_content h2 {
  font-size: 1.8em;
  font-weight: 400;
  margin: 0.5em 0 1em;
}

/* 링크 스타일 */
.frontdoor_content a {
  font-size: 1em;
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* 미디어 쿼리 (반응형) */
@media (max-width: 600px) {
  .frontdoor_content h1 {
    font-size: 2.2em;
  }
  .frontdoor_content h2 {
    font-size: 1em;
  }
  .frontdoor_content a {
    font-size: 0.9em;
  }
}


/* 링크 마우스오버 시 색상 변경 */
.frontdoor_content a:hover {
  color: #ff5e3a;
}

/* 소셜 아이콘 스타일 */
.social-icons {
  margin-top: 1em;
  display: flex;
  justify-content: center;
  gap: 1.5em;
}

.social-icons a {
  color: #ddd;
  font-size: 1.5em;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
    transition: color 0.3s;
}

.social-icons a:hover {
  color: #ff5e3a;
}

/* 아이콘 래퍼 */
.icon-wrapper {
  width: 1.5em;
  height: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-wrapper svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.artstation-fix {
  padding: 5px;
  margin-right: 2px;
}



/* 갤러리 */
.gallery {
  column-count: 3;
  /*column-gap: 3px;*/
  column-gap:2%;/*갤러리 스탈*/
  padding: 20px;
  box-sizing: border-box;
  /*min-height:100vh;**/
  overflow:hidden;
  text-align:center;
  min-height:100vh;
}

.gallery-item:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(28, 32, 37, 0.7) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 0;
}

.gallery-item {
  display: inline-block;
  font-size: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  margin-bottom:18%;/*갤러리스탈*/
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity:0;
  transform: translateY(-20px);
  z-index:3;
  background:#333;
  /*padding:5%;*/
}
.gallery-item.visible, .desc.visible {
            opacity: 1;
            transform: translateY(0); /* 제자리로 슬라이드 */
        }
/* 갤러리 항목의 기본 스타일 */
.gallery a {
  display: inline-block;
  position: relative;
  text-decoration: none;  /* a 태그의 기본 밑줄 제거 */
}

.gallery a:hover .desc{
  color:#ffffff77;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.9) contrast(0.9) brightness(0.9);
  transition: filter 0.3s ease;
  transform-origin: 50% 24%;
}

.gallery-item:hover img {
  filter: saturate(1) contrast(1) brightness(1.1);
}

.desc {
	color: rgba(255, 255, 255, 0.3);
    width: 100%;
    text-align: right;
    margin-top: -20%;
	margin-bottom:11%;
    font-size: 0.8rem;
    padding: 10% 5%;
	margin-left:-1px;
	border-right:1px solid rgba(255, 255, 255, 0.07);
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.desc.visible {
/* transition-delay:0.15s;이미지보다 살짝 늦게 나옴 */
}
.desc h4 {
  padding-bottom:2%;
  font-weight:400;
}
.desc p {
  font-size:0.7em;
  padding-bottom: 2%
}
/* 반응형 갤러리 */
@media (min-width: 1451px) {
  .gallery {
    column-count: 5;
  }
}

@media (max-width: 1450px) {
  .gallery {
    column-count: 4;
  }
}

@media (max-width: 1150px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 820px) {
  .gallery {
    column-count: 2;
  }
  .gallery-item img {
    border-radius: 4px;
  }
}

@media (max-width: 580px) {
  .gallery {
    column-count: 1;
  }
  .gallery-item {
   box-shadow: none;
    border-radius: 8px;
  }
  .gallery-item img {
    filter: none;
  }
  .gallery-item::after {
    opacity:0 !important;
  }
  .gallery-item:hover::after {
    width: 0;
  }
  .gallery-item:hover img {
    transform: none;
  }
  .text-content{
  line-height:1.3!important;
  }
  .text-content h1{
  display:none;
  }
  .nav-links a {
  font-size:11px; /*네비게이션 메뉴 텍스트 크기 조절*/
  }
  .text-content p {
  font-size:0.8rem!important;
  }
  .thegap{
  /*margin-bottom:-40px!important;*/
  height: calc(100vh - 60px )!important;
  }
  #loadingMessage {
    bottom: 4em!important;
	}
}

/* lightgallery 스타일 */
.lg-sub-html {
  font-family: 'Roboto Condensed', sans-serif;
  color: #aaaaaabb;
}
.lg-components{
  z-index:1;
}

a#lg-download-1 {
  display: none;
}
a[id^="lg-download"] {
  display: none !important;
}

img.lg-object.lg-image, .lg-video-cont {
    box-shadow: 0 12px 24px #00000099;
}

.lg-backdrop {
  /*background-color: #22262b;*/
  background: radial-gradient(ellipse at center, #2d373d 50%, #07090a 100%);
}
@media (max-width: 580px) {
  .lg-backdrop {
  background: #22262b;
}
}
.image-item {
  cursor: pointer;
}

/* about 페이지 */
.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  height: 100vh;
}

.container {
  padding: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  max-width: 920px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 30px;
  filter:contrast(0.85);
}

.text-content {
  flex: 1;
  color: #888;
  line-height: 1.6;
  font-size: 15px;
  position: relative;
  z-index:3;
}

.text-content h1 {
  color: #ccc;
  margin-bottom: 20px;
  letter-spacing: 0.33em;
  text-shadow: 0 2px 4px #aaa;
}

.text-content p {
  margin-bottom: 15px;
}

.text-content .highlight {
  color: #ff5e3a;
  font-weight: 700;
}

.email {
  font-weight: 400;
  font-size: 1.2em;
  color: #ff5e3a;
  text-decoration: none;
  transition: all 0.3s ease;
  position:relative;
  z-index:3;
}

.text-content a.email:hover {
  color: #ccc;
  text-shadow: 0 1px 4px #aaa;
}

.text-content strong {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.33;
}

.text-content em {
  font-style: italic;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
  }
  .profile-image {
    margin-right: 0;
    margin-bottom: 20px;
    width: 120px;
    height: 120px;
  }
  .text-content {
    text-align: center;
  }
  .text-content h1 {
    font-size: 1.8em;
	display:none;
  }
  .text-content p {
    font-size: 1em;
  }
}

/* 페이지 이동 갭 */
.thegap {
  margin-bottom:-20px; /* 갑자기 무너짐, nu에선 안무너짐*/
  height: 100vh;
  background: #22262b;
}

.thegap2 {
  position: relative;
  height: 40px;
  background: #22262b;
  z-index: 2;
  border-top:1px solid rgba(255, 255, 255, 0.2)
}

/* footer 스타일 */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  text-align: center;
  padding: 2em 0;
  color: rgba(255, 255,255, 0.7);
  font-size: 0.75rem;
  font-family: 'Roboto Condensed', sans-serif;
  z-index: 3;
}

/*loading-message*/
#loadingMessage {
    position: fixed;
    bottom: 2em;
    right: 2em;
    color: rgba(255, 255, 255, 0.5);
	text-shadow: 0px 1px 2px black;
    z-index: 3;
    font-size: 0.8em;
	opacity:0;
	transition: opacity 0.3s ease;
	padding-right:1%;
}
#loadingMessage.visible{
  opacity:1;
}

/* 전체 화면을 덮는 로딩 스피너 */
#loading-spinner {
  position: fixed;
  top: calc(50% - 25px);
  left: calc(50% - 25px);
  align-items: center;
  justify-content: center;
  z-index: 9999; /* 다른 요소 위에 위치 */
}

/* 스피너 애니메이션 */
.spinner {
  border: 4px solid #555;
  border-top: 4px solid #999;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 2s linear infinite;
}
/* 애니메이션을 통한 부드러운 사라짐 */
.fade-out {
  opacity: 0;              /* 투명하게 만들어서 사라지게 */
  transition-delay: 3s;
  transition: opacity 0.5s ease-out; /* 0.5초 동안 사라짐 */
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 로딩 텍스트 스타일 */
#loading-spinner p {
  color: #999;
  margin-top: 1em;
}

h4 {
text-transform: uppercase;
}

/* Chrome, Edge, Safari 전용 */
::-webkit-scrollbar {
  width: 8px; /* 스크롤바 너비 */
}

::-webkit-scrollbar-track {
  background: #22262b; /* 스크롤 트랙 (배경) */
}

::-webkit-scrollbar-thumb {
  background-color: #555; /* 스크롤바 색 */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

.gallery {
width:100vw;
position:relative;
transition: transform 0.5s ease;
z-index:3;
background: #22262b;
}

#content {
    width: 100vw;
    height: 100vh;
	position: fixed;
    top: 0;
	/*left:100vw;*/
	left:0;
	transform: translateX(100vw);
    box-sizing: border-box;
	/*display:none;*/
	transition: transform 0.5s ease;
	z-index:3;
}

.profile-image {
  opacity: 0;
  transition: opacity 1s ease;
}
.profile-image.loaded {
  opacity: 1;
}


/* 네비게이션 바 */

.navbar {
  position: sticky;
  top:0;
  left:0;
  text-align:center;
  width:100%;
  background: linear-gradient(180deg, #22262b 0%, #22262b99 50%, transparent 100%);
  text-shadow: 0px 1px 2px black;
  z-index: 6;
  margin-top:-39px;
  padding-top:20px;
}

/* 네비게이션 링크 */
.nav-links {
  list-style: none;
  display: inline-flex;
}

.nav-links li {
  display: inline;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  padding: 10px 20px;
  transition: color 0.3s ease-out, text-shadow 0.3s ease-out;
}

.nav-links a:hover {
  color: #ff5e3a;
  text-shadow: 0 0 2px rgba(255, 94, 58, 0.7);
}

.nav-links li:not(:last-child) a {
  border-right: 2px solid rgba(255, 255, 255, 0.2);
}

.about-link {
letter-spacing:0.33em;
}

.gallery a {
    pointer-events: none;
}
.gallery a > div > img {
    pointer-events: auto;
}
