@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Varela+Round&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&display=swap');


*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a, a:link, a:visited{
    color: inherit;
    text-decoration: none;
}

.card .info a {
  color: #ed4848;
  text-decoration: underline;
  font-weight: 500;
}
.card .info a:hover {
  color: #b93434;
  text-decoration: underline;
}


li{
    list-style: none;
}
.container{
    width: 1140px;
    margin: 0 auto;
}
header{
    position: fixed;
    color: white;
    top: 0;
    width: 100%;
    padding: 1rem;
    z-index: 1000;
}
header .container{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
header button{
    background-color: transparent;
    border: 0;
    cursor: pointer;
}
header h1 button{
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.gungsuh {
    font-family: "궁서체", "Gungsuh", serif;
}
.sofia {
    font-family: 'Sofia', cursive, sans-serif;
}
.noto-serif-kr {
  font-family: 'Noto Serif KR', serif;
}
.noto-serif-kr.logo-cvd {
  font-family: 'Noto Serif KR', serif;
  letter-spacing: 0.08em;   /* 자간을 0.25em(권장) 또는 4~8px 등으로 설정 */
  font-weight: 700;         /* 필요시 굵기 강조 */
  font-size: 2.5rem;        /* 필요시 크기 조정 */
  text-transform: uppercase;/* 대문자 유지 */
}
.didot-logo {
  font-family: 'Didot', 'Didot Title', serif;
  letter-spacing: 0.08em;  /* 자간 넓힘 */
  font-weight: 700;        /* 필요시 두께 조정 */
  font-size: 2.8rem;       /* 필요시 크기 조정 */
  text-transform: uppercase;
}
.noto-serif-kr-black {
  font-family: 'Noto Serif KR', serif;
  font-weight: 900;           /* Black Weight */
  letter-spacing: 0.08em;     /* 자간 넓힘, 디자인에 따라 조절 */
  font-size: 2.5rem;          /* 필요시 크기 조정 */
  text-transform: uppercase;  /* 대문자 유지 */
}


header nav ul{
    display: flex;
}
header nav ul li{
    padding: 10px;
}
header nav ul li button{
    font-size: 1.2rem;
    color: white;
}
header.active{
    background-color: #000;
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn{
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

main{
    width: 100%;
    height: 100vh;
    color: white;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('/images/main.jpg') center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
main h4{
    font-size: 2rem;
}
main h2{
    font-family: 'Varela Round', "Noto Sans KR", sans-serif;
    font-size: 3.5rem;
    margin: 2rem 0;
    letter-spacing: 3px;
}


main p{
    max-width: 500px;
    margin:0 auto;
    font-size: 1.25rem;
}
main button.enter{
    background-color: transparent;
    border: 3px solid white;
    border-radius: 20px;
    padding: 1rem 2rem;
    margin-top: 3rem;
    color: white;
    font-weight: bold;
    cursor: pointer;
}
main button.mouse{
    background-color: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    animation: upDown 1s ease-in-out infinite;
    cursor: pointer;
}
main h2 span::after{
    content: "";
    height: 40px;
    width: 3px;
    background-color: #fff;
    display: inline-block;
    animation: blink .7s ease-in-out infinite;
}
@keyframes blink{
    0%{
        opacity: 1;
    }
    100%{
        opacity: 0;
    }
}
@keyframes upDown{
    0%{
        bottom: 1rem;
    }
    50%{
        bottom: 1.5rem;
    }
    100%{
        bottom: 1rem;
    }
}
section{
    font-family: "Poppins","Noto Sans KR", sans-serif;
    padding: 5rem 0; 
}
section:nth-child(2n){
    background-color: #f8f8f8;
}
section .title{
    margin-bottom: 3rem;
}
section .title h4{
    font-size: 1.35rem;
    color:#ed4848;
    position: relative;
}
section .title h2{
    font-size: 3.5rem;
}
section .title p{
    font-size: 1.15rem;
}
section .about-self::after{
    content: "";
    clear: both;
    display: block;
}
section .about-self .left{
    width: 50%;
    float: left;
}
section .about-self .left img{
    max-width: 100%;
}
section .about-self .right{
    width: 50%;
    float: left;
    padding: 0 2rem;
}
section .about-self .right h3{
    font-size: 2.25rem;
    margin-bottom: 1rem;
}
section .about-self .right h3 strong{
    color:#ed4848;
}
section .about-self .right p{
    font-size: 1.15rem;
    margin: 1rem 0;
}
section .about-self .right .social a{
    font-size: 2.5rem;
    margin-right: 0.2rem;
}
.right p {
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 1.2em;
  color: #222;
  max-width: 40em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.timeline-horizontal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 3rem 2rem;
  width: 100%;
  max-width: 1140px;
  margin: 3rem auto 2rem auto;
  padding: 3rem 0;
  min-width: 0;
  background: transparent;
  align-items: stretch;
  justify-items: stretch;
}

/* 가로 타임라인 선 */
.timeline-horizontal::before,
.timeline-horizontal::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: #767676;
  z-index: 0; /* 부모(.timeline-horizontal) 기준으로 상자 바로 아래 */
}
.timeline-horizontal::before { top: 25%; }
.timeline-horizontal::after { top: 75%; }


/* 각 아이템을 선 위에 올리기 */
.timeline-item {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timeline-item:nth-child(-n+4) { /* 첫 줄 */
  grid-row: 1;
}
.timeline-item:nth-child(n+5) {  /* 두 번째 줄 */
  grid-row: 2;
}


/* 타임라인 내용 */
.timeline-content {
  background: #fff;
  border: 1.5px solid #767676;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  text-align: center;
  min-width: 140px;
  transition: background 0.3s, color 0.3s;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timeline-content .timeline-row {
  display: flex;
  align-items: center;
  justify-content: center; /* 또는 flex-start */
  margin-bottom: 0.7em;
  gap: 0;
}

.timeline-content .timeline-number,
.timeline-content h3 {
  display: inline-block;
  vertical-align: middle;
}

.timeline-content .timeline-number {
  margin-right: 0.6em; 
}

.timeline-content h3 {
  margin-bottom: 0; 
}

.timeline-row h3 {
  display: inline-block;       
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: #222;
}

.timeline-number {
  display: inline-flex;        
  justify-content: center;
  align-items: center;
  background: #767676;
  color: #fff;
  font-weight: bold;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.3rem;
  margin: 0;                   
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}


.timeline-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}


.timeline-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  color: inherit;
}

/* hover 효과 */
.timeline-content:hover {
  background: #767676;
  color: #fff;
}

.timeline-horizontal,
.timeline-item,
.timeline-content {
  position: relative;
  z-index: 1; /* 또는 1, 10 등 1000보다 낮게 */
}



.bg{
    background: url('/images/background.jpg') center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 650px;
}

@supports (-webkit-touch-callout: none) {
  .bg {
    background-attachment: scroll !important;
  }
}


section.portfolio::after{
    content: "";
    display: block;
    clear: both;
}

.portfolio-me::after {
    content: "";
    display: block;
    clear: both;
}

section.portfolio .portfolio-inner{
    width: 30%;
    margin-right: 5%;
    padding: 1rem 1rem 1.5rem 1rem;
    float: left;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    margin-bottom: 3rem;
}
section.portfolio .portfolio-inner:nth-child(3n){
    margin-right: 0;
}
section.portfolio .portfolio-inner img{
    width: 100%;
    display: block;
}
section.portfolio .portfolio-inner strong{
    color: #767676;
    margin: 0.5rem 0;
    display: block;
}
section.portfolio .portfolio-inner h3{
    font-size: 1.5rem;
}



.cards-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;        
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  max-width: 1140px;
  margin: 2rem auto;
  box-sizing: border-box;
  gap: 0.8rem;                   
}

.card {
  flex: 0 0 18%;
  max-width: 18%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;               
  padding: 1.2rem 1.3rem;
}

/*
.cards-row .card:not(:last-child) {
  margin-right: 1.0%;       
}
*/

.card:hover {
  border: 1.5px solid #ed4848;
  box-shadow: 0 4px 20px rgba(237,72,72,0.12);
}

.card .icon i {
  font-size: 2.1rem;
  color: #767676;
  min-width: 2.1rem;
  text-align: center;
}

.card .info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2em;
  color: #222;
  text-align: center;
}

.card .info p {
  font-size: 1rem;
  color: #555;
  margin: 0;
  line-height: 1.6;
  text-align: center;
}



footer{
    background: #f8f8f8;
    text-align: left;
    padding: 3rem;
    font-size: 14px;
}
footer h3{
    text-align: left;
    margin-bottom: 14px;
}
footer ul {
    display: flex;
    justify-content: left;
    margin-bottom: 1rem;
}
footer li{
    margin: 0 12px;
}
footer small{
    color: #c7c3ba;
    font-size: .775rem;
}



@media screen and (max-width:1140px){
    main .container{
        width: 992px;
    }
    section .container{
        width: 600px;
    }
    section .about-self .left{
        width: 100%;
        margin-bottom: 1.5rem;
    }
    section .about-self .right{
        width: 100%;
        padding: 0;
    }
    section .do-me .do-inner{
        width: 48%;
        margin-bottom: 1.5rem;
        margin-right: 0;
    }
    section .do-me .do-inner:nth-child(2n+1){
        margin-right: 4%;
    }
    section .portfolio-me .portfolio-inner{
        width: 48%;
        margin-right: 0;
    }
    section .portfolio-me .portfolio-inner:nth-child(2n+1){
        margin-right: 4%;
    }

    }

/*
@media (max-width: 1024px) {
  .timeline-horizontal {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 2rem 1rem;
    padding: 2rem 0;
  }
  .timeline-horizontal::before,
  .timeline-horizontal::after {
    left: 0;
    right: 0;
    width: 100%;
  }
  .timeline-item:nth-child(-n+2) { grid-row: 1; }
  .timeline-item:nth-child(n+3):nth-child(-n+4) { grid-row: 2; }
  .timeline-item:nth-child(n+5):nth-child(-n+6) { grid-row: 3; }
  .timeline-item:nth-child(n+7) { grid-row: 4; }
  .timeline-item::before {
    top: -2.2rem;
    bottom: auto;
  }
  .timeline-item:nth-child(even)::before {
    top: auto;
    bottom: -2.2rem;
  }
}
*/

@media (max-width: 1024px) {
  .timeline-horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 1fr);
    gap: 2rem 1rem;
    padding: 2rem 0;
  }
  .timeline-horizontal::before,
  .timeline-horizontal::after {
    display: none !important;
  }

  .timeline-item {
    height: 180px;
    min-height: 180px;
    display: flex;
    align-items: stretch;
  }
  .timeline-content {
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  .cards-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .card {
    max-width: 100%;
    flex: 1 1 100%;
    margin-bottom: 1.0rem;
    flex-direction: row;         /* 가로 정렬로 변경 */
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 0.7rem;
  }
  .icon {
    margin-bottom: 0;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
  }
  .info h4,
  .info p {
    text-align: left;
  }
}


@media screen and (max-width:992px){
    html{
        font-size: 14px;
    }
    main .container{
        width: 768px;
    }
    section .portfolio-me .portfolio-inner{
        width: 100%;
    }
}

@media (max-width: 992px) {
  .cards-grid {
    flex-wrap: wrap;
  }
  .card {
    flex: 0 0 48%;
    max-width: 48%;
    margin-bottom: 1.5rem;
  }
  .cards-grid .card:not(:last-child) {
    margin-right: 0;
  }
}


@media (max-width: 900px) {
    .timeline { 
        max-width: 98vw; 
    }
}



@media screen and (max-width:768px){
    html{
        font-size: 13px;
    }
    main .container{
        width: 576px;
    }
    section .container{
        width: 400px;
    }
    
}



@media (max-width: 768px) {
  .modal-img {
    max-width: 98vw;
    max-height: 80vh;
  }
  .modal-content {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .timeline::after { left: 24px; }
  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    width: 100%;
    left: 0;
    padding-left: 50px;
    padding-right: 10px;
    margin-bottom: 2.5rem;
  }
  .timeline-content {
    padding: 1.2rem 1rem;
  }
  .timeline-number {
    left: -32px;
    right: auto;
    top: -1.2rem;
  }
  .timeline-item.right .timeline-number {
    right: auto;
    left: -32px;
  }
  .timeline-item::after,
  .timeline-item.left::after,
  .timeline-item.right::after {
    left: 0;
    right: auto;
  }
}


@media (max-width: 600px) {
  .timeline-horizontal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem 0;
    padding: 1.5rem 0;
  }
  .timeline-horizontal::before,
  .timeline-horizontal::after {
    display: none;
  }
  .timeline-item {
    height: 140px;
    min-height: 140px;
    display: flex;
    align-items: stretch;
  }
  .timeline-content {
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .cards-row {
    flex-direction: column;
  }
  .card {
    flex: 1 1 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    padding: 0.8rem 0.5rem;
  }
}


@media screen and (max-width:576px){
    html{
        font-size: 12px;
    }
    main .container{
        width: 400px;
    }
    section .container{
        width: 360px;
    }
}

@media screen and (max-width:400px){
    html{
        font-size: 11px;
    }
    main .container{
        width: 320px;
    }
    section .container{
        width: 320px;
    }
    main h4{
        font-size: 1.5rem;
    }
    section .title h2{
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
  .timeline-content {
    padding: 1rem 0.5rem;
    font-size: 0.95rem;
  }
  .timeline-number {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 1rem;
    line-height: 1.6rem;
    left: -22px;
  }
}

main h4,
main h2 {
  font-family: 'Lora', serif !important;
}

