body {
    background-image: url('../images/grey.png');
}

#header-layout, 
#links-header-layout, 
#gallery-header-layout {
    position: relative;
    
    background-size: cover;        
    background-position: center;   /* 중앙 기준 */
    background-repeat: no-repeat;  /* 타일 방지 */

    height: calc(100vh - 2px);
    border-bottom: 2px solid #333333;
    color: #dddddd;
}

#header-layout { background-image: url("../images/signature.jpg"); }
#links-header-layout { background-image: url("../images/links-signature.jpg"); }
#gallery-header-layout { background-image: url("../images/gallery-signature.jpg"); }

#links-header-layout, #signature-comment {
    color:#eeeeee;
}

#header-layout::before,
#links-header-layout::before,
#gallery-header-layout::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 0;
}

#navigation {
    display: flex; 
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 64px;
    
    background: #000000;

    justify-content: center;
    word-spacing: 1rem;
    z-index: 1000;

    border-bottom: 1px solid #333333;

    opacity: 0.8;
}

#navigation-items {
    width: 100%;
    height: 100%;
    max-width: 1200px;

    margin-left: 1rem;
    margin-right: 1rem;

    font-weight: bold;
    color: #ffffff;

    display: flex;
    align-items: center;             /* 세로 중앙 */
    justify-content: space-between;  /* 가로 중앙 */
}

#nav-right a {
    margin-right: 1.5rem;
}

#about-link.active,
#gallery-link.active,
#links-link.active {
    color: #ffc900;

    text-decoration: underline;
    text-underline-offset: 0.5rem;
}

#signature-comment {    
    height: 100vh;
    position: relative;

    display: flex;
    flex-direction: column;
        
    align-items: center;      /* 가로 가운데 */
    justify-content: center;  /* 세로 가운데 */
    text-align: center;

    color: #cccccc;
    line-height: 1.6;
}

@keyframes scroll-hint {
    0%, 70%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    80% {
        transform: translateY(6px);
        opacity: 0.8;
    }
    90% {
        transform: translateY(0);
        opacity: 1;
    }
}

#intro-gate {
    width: 5rem;
    height: 5rem;

    font-size: 3rem;
    margin-top: 2rem;
}

#intro-gate:hover {
    background-color: #333333;
    border-radius: 50%;

    animation: scroll-hint 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    cursor: pointer;
}

.section-header {
    font-size: 2rem;
    font-weight: 500;

    padding-bottom: 1rem;
    border-bottom: 3px solid #666666;
}

#profile-photo {
    position: absolute;
    
    top: 1rem;
    right: 1.5rem;
    
    width: 16rem;
    height: auto;
    
    border: 5px solid #dddddd;
    border-radius: 1.5rem;
}

#experience,
#works,
#gallery,
#links {
    width: 100%;
    max-width: 1150px;

    padding: 2rem;
    margin: 0 auto;
}

#experience a {
    text-decoration: none;
}

#experience-timeline {
    position: relative;
    margin: 0 auto;
}

.experience-timeline-item {
    display: flex;              /* flex 컨테이너로 설정 */
    position: relative;

    align-items: flex-start;    /* 세로 정렬: 위쪽 기준, 필요시 center로 바꿀 수 있음 */
    gap: 1rem;                  /* year와 content 사이 간격 */

    padding-left: 1rem;
    padding-right: 1rem;
}

.year {
    flex: 0 0 3.5rem;           /* 고정 너비 */
    
    font-size: 1.5rem;
    font-weight: 500;
    color: #999999;
    
    text-align: right;
    line-height: 2.5rem;
}

.content {
    flex: 1;                            /* 남은 공간 차지 */

    border-left: 2px solid #666666;
    padding-left: 1.5rem;               /* border와 텍스트 간격 */
    margin-left: 0.5rem;

    line-height: 2.5rem;
}

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

#gallery-items {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 1rem;

    padding-top: 2rem;
}

#gallery-moniter {
    width: 100%;
    height: 30rem;

    background-color: #666666;
    border-radius: 1rem;
    overflow: hidden;

    filter: drop-shadow(0 0 1.5rem rgba(220, 218, 211, 0.5));

    opacity: 1;
    transform: translateY(0);
}

.gallery-monitor-photo {
    width: 100%;
    height: 100%;

    opacity: 0;
    animation: fadeIn 500ms ease forwards;
}

#gallery-thumbnail-list {
    width: 100%;
    height: 30rem;

    background-color: #111111;
    border-radius: 1rem;

    overflow-y: auto;
}

#academic-research-photos,
#teaching-activity-photos {
    display: grid;

    grid-template-columns: 1fr 1fr 1fr 1fr;

    gap: 1rem;
    padding: 1rem;
}

.academic-research-photo,
.teaching-activity-photo {
    width: 100%;
    height: auto;

    border: 3px solid #dddddd;
    border-radius: 1rem;
}

#works-items,
#links-items {
    padding-top: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.works-item-title,
.links-item-title {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 500;
}

.links-item-title {
    margin-top: 1rem;
}

.works-content-title {
    font-size: 1.25rem;
    font-weight: 500;

    line-height: 2.5rem;

    margin-left: 0.5rem;
}

.works-toggle-contents {
    display: none;
}

.works-personal-project-image {
    width: 16rem;
    height: auto;

    float: left;
    margin-top: 0.5rem; 
    margin-right: 2rem;
    margin-left: 0.5rem;

    border: 2px solid #dddddd;
    border-radius: 1rem;
}

.works-personal-project-item:after {
    content: "";
    display: block;
    clear: both;
}

.works-personal-project-item {
    margin-bottom: 1rem;
    margin-right: 0.5rem;
}

.thumbnail-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;

    padding: 1rem;
}

.gallery-thumbnail {
    width: 100%;
    line-height: 1;

    cursor: pointer;
}

.gallery-photo {
    border: 3px solid #333333;
    border-radius: 0.75rem;
    height: 5.25rem;
    width:100%;
}

.signature-display-photo {
    width: 100%;
    height: 100%;
}

footer {
    width: 100%;

    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    margin: 0 auto;
    
    text-align: center;
    font-weight: bold;
    
    background-color: #111111;
    border-top : 1px solid #333333;
}