/*
    1.2em 상위의 1.2배
    0.8rem 최상위의 0.8배

    ex, ch는 폰트와 폰트사이즈로 계산
    ex는 현제 폰트의 'x'높이값 혹은 em의 절반값
    x높이 값은 소문자 'x'의 높이값이다
    ex는 글자위치의 미세한조정에 쓰인다
    예) position: relative; bottom: 1ex;
    예) wigth: 40ch; // 현제 폰트로 문자열40자리
    간단히 말해 ch는 폰트의 가로길이
    ex는 세로길이를 기준으로 계산한다

    1vh 뷰포트 높이 1/100 크기
    1vw 뷰포트 넓이 1/100 크기

    브라우저 창크기가 1100px * 700px 일때
    1vmax = 11px   1vmin = 7px
    뷰포트의 가로 세로중 가장 긴것 혹은 짧은것을 중심으로 계산함

    1fr = 사용가능한 공간의(모든 마진, 갭 등등) 1/n
*/

@font-face {
    font-family: 'School';
    src: url('/resources/font/학교안심그림일기.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --maxw: 1200px;

    --gap: 20px;
    --margin: 15px;
    --in-padding: 5px;

    --radius: 10px;
    --shadow: 0.7;

    --page-background: #191919;
    --header-background: #2c2c2c;
    --panel-background: #222;

    /* lite mode
    --shadow: 0.2;
    --page-background: #fafafa;
    --header-background: #f3f3f3;
    color: #333;
    color: #444;
    color: #888;
    */

}

.txt1 {
    font-size: 22px;
    font-weight: bold;
    color: #ececec;
}

.txt2 {
    font-size: 16px;
    font-weight: normal;
    color: #aaa;
}

.txt3 {
    font-size: 14px;
    font-weight: bold;
    color: #777;
}

.txt4 {
    font-size: 18px;
    color: #ececec;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;    
}

a {
    all: unset;
    cursor: pointer;
    text-decoration: none;
    display: inline;
}

body {
    font-family: 'School', sans-serif;
    background-color: var(--page-background);
    margin: 0;
}

button {
    font-family: 'School', sans-serif;
}

.site {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
}

header.header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 0;
    border-bottom: 2px solid var(--header-background);
}

header .title a {
    display: flex;
    align-items: center;
}

header .title img {
    height: 2.2ex;
    padding-left: 5px;
}

header nav a {
    text-decoration: none;
    margin-left: 14px;
}


main {
    display: flex;
    flex-direction: column;
    gap: 50px;
    width: 100%;
    margin: 50px auto;
    flex: 1;
}

section h2.txt1 {
    border-left: 5px solid #ffe065;
    padding-left: 10px;
    width: fit-content;
    display: inline-block;
    margin: 0 0 var(--margin) 0;
}

footer {
    margin-top: 100vh;
    margin-top: var(--margin);
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--header-background);
}

@media (max-width:520px) {
    header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}