/*==================== GOOGLE FONTS ====================*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/*==================== VARIABLES CSS ====================*/
:root {
    --header-height: 3rem;

    /*========== Colors ==========*/
    /* Change favorite color */
    --hue-color: 250; /*Purple 250 - Green 142 - Blue 230 - Pink 340*/

    /* HSL color mode */
    --first-color: hsl(var(--hue-color), 69%, 61%);
    --first-color-second: hsl(var(--hue-color), 69%, 61%);
    --first-color-alt: hsl(var(--hue-color), 57%, 53%);
    --first-color-lighter: hsl(var(--hue-color), 92%, 85%);
    --title-color: hsl(var(--hue-color), 8%, 15%);
    --text-color: hsl(var(--hue-color), 8%, 45%);
    --text-color-light: hsl(var(--hue-color), 8%, 65%);
    --input-color: hsl(var(--hue-color), 70%, 96%);
    --body-color: hsl(var(--hue-color), 60%, 99%);
    --container-color: #fff;
    --scroll-bar-color: hsl(var(--hue-color), 12%, 90%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 80%);

    /*========== Font and typography ==========*/
    --body-font: 'Poppins', sans-serif;

    /* .5rem = 8px, 1rem = 16px, 1.5rem = 24px ... */
    --big-font-size: 2rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1.125rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /*========== Font weight ==========*/
    --font-medium: 500;
    --font-semi-bold: 600;

    /*========== Margenes Bottom ==========*/
    /* .25rem = 4px, .5rem = 8px, .75rem = 12px ... */
    --mb-0-25: .25rem;
    --mb-0-5: .5rem;
    --mb-0-75: .75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

/* Font size for large devices */
@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 3rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

/*========== Variables Dark theme ==========*/


/*========== Button Dark/Light ==========*/


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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 0 var(--header-height) 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*==================== REUSABLE CSS CLASSES ====================*/
.section {
  padding: 2rem 0 4rem;
}

.section__title {
  font-size: var(--h1-font-size);
  color: var(--title-color);
}

.section__subtitle {
  display: block;
  font-size: var(--small-font-size);
  margin-bottom: var(--mb-3);
}

.section__title, 
.section__subtitle {
  text-align: center;
}

/*==================== LAYOUT ====================*/
.container {
  max-width: 768px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.header {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--body-color);
}

/* Portfolio Grid Customization */
.portfolio__container {
    grid-template-columns: repeat(2, 1fr); /* 한 줄에 2개씩 배치 */
    gap: 2rem;
}

.portfolio__card {
    background-color: var(--container-color);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform .3s;
}

.portfolio__card:hover {
    transform: translateY(-.5rem); /* 마우스 올리면 살짝 들리는 효과 */
}

.portfolio__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

.portfolio__description {
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-1);
    color: var(--text-color);
}

.portfolio__link {
    display: flex;
    align-items: center;
    column-gap: .25rem;
    font-size: var(--small-font-size);
    color: var(--first-color);
    font-weight: var(--font-medium);
}

/* 모달 배경 */
/* styles.css */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    
    /* [추가] 모달 배경 자체에 정렬 설정 */
    align-items: center;
    justify-content: center;
    overflow: hidden; /* 배경 스크롤 방지 */
}

.modal-content {
    background-color: var(--container-color);
    margin: 5vh auto; /* 화면 상단에서 5% 정도 여백 */
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 700px;
    position: relative;

    /* [핵심 수정] 높이 제한 및 스크롤바 활성화 */
    max-height: 85vh;    /* 화면 높이의 85%까지만 커지게 제한 */
    overflow-y: auto;   /* 내용이 넘치면 내부 스크롤바 생성 */
}

/* 모바일 대응 (화면이 작을 때 모달이 더 꽉 차게) */
@media screen and (max-width: 767px) {
    .modal-content {
        width: 95%;
        margin: 2vh auto;
        padding: 1.5rem;
    }
}

/* (선택사항) 스크롤바 디자인을 더 깔끔하게 */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--first-color);
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

@keyframes modalFadeIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 닫기 버튼 */
.close {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

/* 모달 내 텍스트 스타일 */
.modal h3 { color: var(--title-color); margin-bottom: 1rem; }
.modal ul { margin-left: 1.2rem; margin-top: 1rem; }
.modal li { margin-bottom: 0.5rem; list-style: disc; }

/* 모바일 대응 (한 줄에 1개씩) */
@media screen and (max-width: 568px) {
    .portfolio__container {
        grid-template-columns: 1fr;
    }
}

.contact__container {
    row-gap: 3rem;
}

.contact__information {
    display: flex;
    margin-bottom: var(--mb-2);
}

.contact__icon {
    font-size: 2rem;
    color: var(--first-color);
    margin-right: var(--mb-0-75);
}

.contact__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
}

.contact__subtitle {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* 이메일 링크에 마우스를 올렸을 때 강조 효과 */
.contact__subtitle:hover {
    color: var(--first-color);
}
/*==================== NAV ====================*/

/* 상단 메뉴바 오른쪽 정렬 */
.nav__menu {
    margin-left: auto; /* 로고와 메뉴 사이의 간격을 최대로 벌려 메뉴를 오른쪽으로 밉니다 */
}

/* 만약 위 방법으로 안 된다면 아래 방법을 시도해 보세요 (Flexbox 방식) */
.nav {
    display: flex;
    justify-content: space-between; /* 로고는 왼쪽, 메뉴는 오른쪽 끝으로 배치 */
    align-items: center;
}

.nav__list {
    display: flex;
    column-gap: 2rem; /* 메뉴 아이템 사이의 간격 */
}

/* 모바일 환경(화면이 작을 때) 메뉴 위치 조정 */
@media screen and (max-width: 767px) {
    .nav__menu {
        margin-left: 0; /* 모바일에서는 하단 탭바 형태이므로 중앙 정렬 유지 */
    }
}
/* show menu */


/* Active link */


/* Change background header */


/*==================== HOME ====================*/


/*==================== BUTTONS ====================*/


/*==================== ABOUT ====================*/


/*==================== SKILLS ====================*/


/*==================== QUALIFICATION ====================*/


/*==================== SERVICES ====================*/


/* Active Modal */


/*==================== PORTFOLIO ====================*/


/*==================== PROJECT IN MIND ====================*/


/*==================== TESTIMONIAL ====================*/


/*==================== CONTACT ME ====================*/


/*==================== FOOTER ====================*/


/*========== SCROLL UP ==========*/


/* Show scroll */


/*========== SCROLL BAR ==========*/


/*==================== MEDIA QUERIES ====================*/
/* For small devices */


/* For medium devices */


/* For large devices */
