@charset "utf-8";

:root {
  color-scheme: light dark;
  --text-color: light-dark(oklch(0.3 0 0), oklch(0.95 0 0));
  --color-50: oklch(from currentColor l c h / 0.5);
  --color-30: oklch(from currentColor l c h / 0.3);
  --color-10: oklch(from currentColor l c h / 0.1);
  --background-color: light-dark(oklch(1 0 0), oklch(0.05 0 0));
  --hover-background-color: light-dark(oklch(0.5525 0 0 / 0.08), oklch(0.7807 0 0 / 0.16));
  --hover-text-shadow: light-dark(oklch(0.7807 0 0 / 0.16), oklch(0.5525 0 0 / 0.32));
  --link-color: light-dark(oklch(0.4 0.211 262.91), oklch(0.8 0.1532 262.91));
  --link-visited-color: light-dark(oklch(0.4 0.211 285.15), oklch(0.8 0.1532 285.15));
  --tomato: light-dark(oklch(0.6962 0.1955 32.32), oklch(0.637 0.1955 32.32))
}

@media (prefers-color-scheme: dark) {
  pre[class*="language-"] {
    filter: hue-rotate(180deg) invert(0.95);
  }
}

body {
  font-size: 1em;
  font-family: serif;
  line-height: 1.4em;
  max-width: 150vh;
  padding: 1em;
  margin: auto;
  overflow-wrap: anywhere;
  background-color: var(--background-color);
  color: var(--text-color);
  word-break: keep-all;
  font-feature-settings: "zero" 1;
  font-variant-east-asian: proportional-width;
  font-variant-emoji: text;
}

header {
  display: flex;
}

nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

/* 접근성 특화 메뉴 글자 표시 */
.accessibility-link:focus::after {
  content: attr(aria-label)
}

main {
  padding: 1em 0;
}

svg {
  stroke: currentColor;
}

/* section 가로선 추가 */
section {
  padding: 0.5em 0em;
  border-top: 0.125em var(--color-50) dotted;
  border-bottom: 0.125em var(--color-50) dotted;
  margin: 1em 0em;
}

/* 글 목록 */
.content-list {
  list-style: none;
  display: flex;
  flex-flow: column wrap;
  font-weight: bold;
}

.content-list a {
  padding-left: 0.5em;
}

/* 글 메타데이터 */
.post-meta {
  display: block;
  font-weight: bold;
  font-size: 0.875em;
  text-decoration: underline solid var(--color-10) 40%;
  text-underline-offset: -25%;
  text-decoration-skip-ink: none;
}

/* 인스타페이퍼로 저장 */
#instapaper-form {
  text-align: right;
}


p {
  margin: 1em 0;
}

img, iframe, embed {
  width: 100%;
}

/* 헤딩 */
/* 제목 글자 배경 설정 */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2em;
  color: currentColor;
  text-shadow: 0.0625em 0.04375em var(--color-30)
}

h4,
h5,
h6 {
  font-weight: normal;
}

h1 {
  font-size: 2.5em;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.5em;
}

h4 {
  font-size: 1.2em;
}

h5 {
  font-size: 1em;
}

h6 {
  font-size: 0.875em;
}

/* 링크 */
a {
  color: var(--link-color);
}

a:visited {
  color: var(--link-visited-color);
}

/* 링크가 있는 a 태그 마우스 그림자 박스 */
a[href]:hover {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  box-shadow: 0px 0px 0.125em 0.25em var(--hover-background-color);
  background-color: var(--hover-background-color);
  border-radius: 0.5em;
  filter: drop-shadow(0px 0.125em 0.03125em var(--hover-text-shadow));
}

/* 인용 */
blockquote {
  color: currentColor;
  margin: 1em;
  padding-left: 1em;
  border-left: 0.125em solid var(--color-10);
}

blockquote p {
  font-size: 1em;
  color: currentColor;
  font-style: italic;
}

/* 키보드, 출력 내용*/
kbd,
samp {
  color: currentColor;
  font-family: monospace;
  font-size: 0.875em;
}

kbd {
  padding: 0 0.25em;
  border: 0.125em solid;
  border-top-color: var(--color-10);
  border-left-color: var(--color-10);
  border-right-color: var(--color-30);
  border-bottom-color: var(--color-30);
  background: var(--color-10);
}

/* 코드 단어 */
code {
  text-shadow: 0.0625em 0.04375em var(--color-10);
}

/* hr */
hr {
  background: var(--color-50);
}

/* 리스트, dd */
ul,
ol {
  margin: 0 1em;
  padding: 0 0 0 0.5em;
}

li {
  padding-top: 0.5em;
}

li p:last-child {
  margin: 0;
}

dd {
  margin: 0 0 0 0.5em;
}

/* 이미지 */
img {
  border: 0;
  -ms-interpolation-mode: bicubic;
  vertical-align: middle;
}

/* 이미지&SVG 아이콘 정렬 */
figure {
  margin: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
}

figure figcaption {
  word-break: break-word;
  padding-top: 0;
  min-height: 0;
  caption-side: bottom;
  text-align: center;
  font-size: 0.875em;
}

figure * {
  color: inherit !important;
}

/* 테이블 */
table {
  border-collapse: collapse;
  box-shadow: 0.5em 0.35em var(--color-10);
}

caption {
  font-size: 1.2em;
  line-height: 1.4em;
  font-weight: bold;
}

thead {
  border-bottom: 0.125em currentColor solid;
  background-color: var(--color-10);
}

th, td {
  border: 0.0625em var(--color-30) solid;
  padding: 0.5em;
}

td {
  vertical-align: top;
}

/* 코드블록 그림자 */
pre[class*="language-"] {
  color: var(--text-color);
  box-shadow: 0.5em 0.35em var(--color-10);
}

/* 파일 */

figure.fileblock, #tt-body-page figure.fileblock {
  color: var(--link-color);
  margin: 0;
  width: 80vw;
  height: auto;
  border: none;
  background: none;
}

figure.fileblock a, #tt-body-page figure.fileblock a {
  height: auto;
  display: inline;
  text-align: right;
  border: 0.0625em solid;
  border-radius: 0.5em;
  padding: 0.5em;
  box-shadow: 0.5em 0.35em var(--color-10);
}

figure.fileblock a::after, #tt-body-page figure.fileblock a::after {
  content: "다운로드";
  background: none;
  position: relative;
  right: 0;
  top: 0;
}

figure.fileblock .image, #tt-body-page figure.fileblock .image {
  display: none;
}



figure.fileblock .desc, #tt-body-page figure.fileblock .desc {
  position: relative;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

figure.fileblock .filename, #tt-body-page figure.fileblock .filename {
  font-size: 1em;
  height: inherit;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

figure.fileblock .size, #tt-body-page figure.fileblock .size {
  font-family: monospace;
  font-size: small;
  color: currentColor;
  height: auto;
  margin: 0;
}

figure.fileblock .name, #tt-body-page figure.fileblock .name {
  white-space: wrap;
  height: auto;
}

/* 좋아요 숨기기 */
.container_postbtn {
  display: none !important;
}

/* 페이지 탐색 버튼 너비 조정 */
#pagination {
  column-gap: 1em;
}

.prev, .next {
  flex-grow: 1;
}

.no-more-prev, .no-more-next {
  visibility: hidden;
}

/* 포커스 요소 테두리 커스텀 */
*:focus-visible {
  outline: 0.125em var(--tomato) solid;
}

/* 입력 폼 스타일링 */
fieldset {
  display: flex;
  flex-wrap: wrap;
  border: 0.0625em solid var(--color-30);
  gap: 1em;
}


/* 문자열 입력 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="number"],
input[type="month"],
input[type="range"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
  color: currentColor;
  flex-basis: fit-content;
  background: var(--background-color);
  border: 0.125em solid var(--color-50);
  border-radius: 0.5em;
  box-shadow: 0em 0em 0.8em inset var(--color-10);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="date"]:hover,
input[type="datetime-local"]:hover,
input[type="month"]:hover,
input[type="week"]:hover,
input[type="time"]:hover,
input[type="number"]:hover,
input[type="month"]:hover,
input[type="range"]:hover,
input[type="search"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
textarea:hover {
  background-color: var(--hover-background-color);
}

/* 검색 */
input[type="search"] {
  border-radius: 5em;
  padding: 0 1em;
}

/* 버튼 입력 */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  color: currentColor;
  background: var(--color-10);
  padding-bottom: 0.25em;
  border: 0.25em double var(--color-50);
  border-radius: 0.5em;
  cursor: pointer;
  box-shadow: 0 0.125em var(--color-50);
  font-family: sans-serif;
}

button:hover, button:focus,
input[type="button"]:hover, 
input[type="button"]:focus,
input[type="submit"]:hover, 
input[type="submit"]:focus,
input[type="reset"]:hover,
input[type="reset"]:focus {
  background-color: var(--tomato);
  color: var(--background-color);
  box-shadow: 0 0.125em oklch(from var(--tomato) l c h / 0.5);
}

button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  box-shadow: none;
  background-color: oklch(from var(--tomato) calc(l * 0.9) c h);
  position: relative;
  top: 0.15em;
}

/* 선택 */
select {
  color: currentColor;
  background: var(--background-color);
  border: 0.125em solid var(--color-50);
  border-radius: 0.5em;
  box-shadow: -0.4em -0.2em 0.2em inset var(--color-10);
  cursor: pointer;
}

select:hover {
  background-color: var(--hover-background-color);
}

/* 색상 및 파일 */
input[type="color"],
input[type="file"]
input[type="image"] {
  color: currentColor;
  background: var(--background-color);
  border: 0.25em double var(--color-50);
  border-radius: 0.5em;
  cursor: pointer;
  font-family: sans-serif;
}

input[type="color"]:hover,
input[type="file"]:hover
input[type="image"]:hover {
  background-color: var(--hover-background-color);
}

/* disabled */
input:disabled {
  color: oklch(from currentColor l c h / 0.5);
  background: oklch(from var(--background-color) calc(l * 0.5) c h / 0.5);
  border-radius: 0;
  cursor: not-allowed;
}

/* 푸터 검색 폼 */
#searchBox {
  flex-grow: 7;
  width: 0;
}

#searchButton {
  flex-grow: 1;
}

@media print {
  * {
    background: transparent;
    color: oklch(0 0 0);
    filter: none;
    -ms-filter: none;
    box-shadow: none;
    text-shadow: none
  }
  
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    text-shadow: none;
    border-bottom: 1pt solid;
  }

  body {
    font-size: 12pt;
    max-width: 100%;
  }

  .no-print {
    display: none;
  }

  section {
    padding: 0;
    border-top: 0;
    border-bottom: 0;
    margin: 0;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ") ";
  }

  abbr[title]:after {
    content: " (" attr(title) ") ";
  }

  .ir a:after,
  a[href^="javascript:"]:after,
  a[href^="#"]:after {
    content: "";
  }

  /* 인쇄 시 인용, 코드 블록 테두리 추가 */
  pre,
  blockquote {
    border: 1pt solid;
    padding: 0pt 12pt;
    break-inside: avoid;
  }

  /* 인쇄 시 코드 블록 자동 줄바꿈 */
  pre, code {
    white-space: pre-wrap !important;
    text-indent: 12pt each-line hanging;
  }

  img {
    max-width: 100% !important;
  }

  @page {
    size: A4;
  }
}
 