/* reset */
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  font-weight: normal;
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  padding: 0;
  margin: 0;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

html {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  -webkit-box-sizing: inherit;
  box-sizing: inherit;
}

img,
video {
  display: block;
  height: auto;
  max-width: 100%;
}

a {
  text-decoration: underline;
  color: black;
  cursor: pointer;
}

/* default behavior */
:root {
  --header-font-size: 1rem;
  --header-padding: 0.25rem;
}

html {
  font-size: 14px;
  /* font-size: clamp(12px, 1.2vw, 16px); */
  width: 100%;
}

body {
  width: 100%;
  display: flex;
  flex-direction: column;
  font-family: Pretndard, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  text-align: start;
  word-break: keep-all;
  background-color: white;
}

.main {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
}

/* section은 container만 자식으로 들고 있는다 */
/* container는 추상적 flex container로, 어디에나 쓸 수 있다 (즉, column도 container를 들고 있을 수 있다) */
/* container는 주로 columns를 들고 있고, columns는 column을 들고 있다 */
.section {
  display: flex;
  flex-direction: column;
}

.container {
  display: flex;
  flex-direction: column;
}

.header {
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  background-color: white;
  border-bottom: 1px solid black;
}

.columns {
  display: flex;
  flex-wrap: wrap;
  /* padding-bottom: 1rem; */
}

.rows {
  display: flex;
  flex-direction: column;
}

.column {
  padding: 0.5rem;
}

.row {
}

.column:not(:last-child) {
  border-right: 1px solid black;
}

.column.is-1-12 {
  flex: 1 1 calc(1 / 12 * 100%);
}
.column.is-2-12 {
  flex: 1 1 calc(2 / 12 * 100%);
}
.column.is-3-12 {
  flex: 1 1 calc(3 / 12 * 100%);
}
.column.is-4-12 {
  flex: 1 1 calc(4 / 12 * 100%);
}
.column.is-5-12 {
  flex: 1 1 calc(5 / 12 * 100%);
}
.column.is-6-12 {
  flex: 1 1 calc(6 / 12 * 100%);
}
.column.is-7-12 {
  flex: 1 1 calc(7 / 12 * 100%);
}
.column.is-8-12 {
  flex: 1 1 calc(8 / 12 * 100%);
}
.column.is-9-12 {
  flex: 1 1 calc(9 / 12 * 100%);
}
.column.is-10-12 {
  flex: 1 1 calc(10 / 12 * 100%);
}
.column.is-11-12 {
  flex: 1 1 calc(11 / 12 * 100%);
}
.column.is-12-12 {
  flex: 1 1 calc(12 / 12 * 100%);
}

@media screen and (max-width: 1200px) {
  .is-hidden-1200 {
    display: none;
  }

  .is-shown-1200 {
    display: flex;
  }
}

@media screen and (min-width: 1200px) {
  .is-hidden-1200 {
    display: block;
  }

  .is-shown-1200 {
    display: none;
  }
}

@media screen and (max-width: 900px) {
  .is-hidden-900 {
    display: none;
  }

  .is-shown-900 {
    display: flex;
  }

  .is-shown-600-900 {
    display: flex;
  }

  .column.is-1-12-900 {
    flex: 1 1 calc(1 / 12 * 100%);
  }
  .column.is-2-12-900 {
    flex: 1 1 calc(2 / 12 * 100%);
  }
  .column.is-3-12-900 {
    flex: 1 1 calc(3 / 12 * 100%);
  }
  .column.is-4-12-900 {
    flex: 1 1 calc(4 / 12 * 100%);
  }
  .column.is-5-12-900 {
    flex: 1 1 calc(5 / 12 * 100%);
  }
  .column.is-6-12-900 {
    flex: 1 1 calc(6 / 12 * 100%);
  }
  .column.is-7-12-900 {
    flex: 1 1 calc(7 / 12 * 100%);
  }
  .column.is-8-12-900 {
    flex: 1 1 calc(8 / 12 * 100%);
  }
  .column.is-9-12-900 {
    flex: 1 1 calc(9 / 12 * 100%);
  }
  .column.is-10-12-900 {
    flex: 1 1 calc(10 / 12 * 100%);
  }
  .column.is-11-12-900 {
    flex: 1 1 calc(11 / 12 * 100%);
  }
  .column.is-12-12-900 {
    flex: 1 1 calc(12 / 12 * 100%);
  }
}

@media screen and (min-width: 900px) {
  .is-hidden-900 {
    display: block;
  }

  .is-shown-900 {
    display: none;
  }

  .is-shown-600-900 {
    display: none !important;
  }
}

@media screen and (max-width: 600px) {
  .is-hidden-600 {
    display: none;
  }

  .is-shown-600 {
    display: flex;
  }

  .is-shown-600-900 {
    display: none;
  }

  .column.is-1-12-600 {
    flex: 1 1 calc(1 / 12 * 100%);
  }
  .column.is-2-12-600 {
    flex: 1 1 calc(2 / 12 * 100%);
  }
  .column.is-3-12-600 {
    flex: 1 1 calc(3 / 12 * 100%);
  }
  .column.is-4-12-600 {
    flex: 1 1 calc(4 / 12 * 100%);
  }
  .column.is-5-12-600 {
    flex: 1 1 calc(5 / 12 * 100%);
  }
  .column.is-6-12-600 {
    flex: 1 1 calc(6 / 12 * 100%);
  }
  .column.is-7-12-600 {
    flex: 1 1 calc(7 / 12 * 100%);
  }
  .column.is-8-12-600 {
    flex: 1 1 calc(8 / 12 * 100%);
  }
  .column.is-9-12-600 {
    flex: 1 1 calc(9 / 12 * 100%);
  }
  .column.is-10-12-600 {
    flex: 1 1 calc(10 / 12 * 100%);
  }
  .column.is-11-12-600 {
    flex: 1 1 calc(11 / 12 * 100%);
  }
  .column.is-12-12-600 {
    flex: 1 1 calc(12 / 12 * 100%);
  }
}

@media screen and (min-width: 600px) {
  .is-hidden-600 {
    display: flex;
  }

  .is-shown-600 {
    display: none;
  }

  .is-shown-600-900 {
    display: flex;
  }
}

/* project-specific */
body {
  overflow-y: hidden;
}

.header {
  font-size: var(--header-font-size);
  padding: var(--header-padding) 0;
}

.header .container {
  /* border-bottom: 1px solid black; */
}

.header .columns {
  flex-wrap: nowrap;
}

.header .column {
  /* padding: var(--header-padding) 0; */
  text-align: center;
  border: none;
  padding: 0 0.5rem;
}

.header .column a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column.is-full-height {
  height: calc(
    100dvh - var(--header-font-size) - var(--header-padding) * 2 - 4px
  );
  overflow-y: auto;
}

.column.is-half-height {
  height: calc(
    (100dvh - var(--header-font-size) - var(--header-padding) * 2 - 4px) / 2
  );
  overflow-y: auto;
}

.header a {
  /* text-decoration: underline; */
}

.header .columns {
  align-items: center;
}

.row .date-title {
  border-bottom: 1px solid black;
}

.rows {
  padding-bottom: 2rem;
  max-height: calc(
    100dvh - var(--header-font-size) - var(--header-padding) * 2 - 4px
  );
  overflow-y: auto;
}

.columns.date-title {
  flex-wrap: nowrap;
  align-items: start;
}

.columns.date-title.exception {
  flex-wrap: wrap;
}

.columns.date-title.exception .work-images,
.columns.date-title.exception .work-text {
  padding: 1rem 0;
}

.columns.date-title .column {
  border: none;
  padding: 0.1rem 0.3rem;
}

.column {
  padding: 0rem;
}

.column:has(.columns.exception),
.column:has(.columns.date-title) {
  padding: 0;
}

.container.work-images,
.container.work-text {
  padding: 0;
}

.container.work-text {
  gap: 0;
}

.container.work-text p:empty {
  height: 1rem;
}

.container.work-images {
  gap: 0.5rem;
}

.container.work-images:empty {
  padding: 0;
}

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

.column {
  line-height: 1.3;
}

.column .container.work-text {
  padding-bottom: 2rem;
  padding-right: 2rem;
}

.column .container.work-images {
  padding-bottom: 2rem;
}

@media screen and (max-width: 1050px) {
}

@media screen and (max-width: 900px) {
  .column.is-full-height {
    min-height: calc(
      100dvh - var(--header-font-size) - var(--header-padding) / 2 * 4 - 23px
    );
  }
}

@media screen and (max-width: 600px) {
  .column.home-tab-default {
    border-right: none;
  }
  .column.discourses-tab-default {
    border-right: none;
  }

  .column.home-tab-en {
    border-right: none;
  }

  .column.discourses-tab-en {
    border-right: none;
  }

  .column.about-tab-ko {
    border-right: none;
  }

  .column.works-tab-ko {
    border-right: none;
  }

  .column.date-title {
    border-right: none;
  }

  .column.is-full-height {
    min-height: 0;
  }
}

@media screen and (max-width: 900px) and (min-width: 600px) {
  .column.is-9-12 {
    display: flex;
    flex-direction: column;
    max-height: calc(
      100dvh - var(--header-font-size) - var(--header-padding) * 2 - 1px
    );
    overflow-y: auto;
  }

  .column.is-9-12 > .work-images {
    flex: 0 0 auto;
    overflow: hidden;
  }

  .column.is-9-12 > .work-text {
    flex: 1 1 auto;
  }
}

.footer {
  position: fixed;
  bottom: 4px;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: transparent;
  font-size: var(--header-font-size);
  padding: var(--header-padding) 0;
}

.footer .container {
  display: block;
  overflow: hidden;
}

/* Global image modal */
body.modal-open {
  overflow: hidden;
}

.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 1000;
  display: none;
  -webkit-box-pack: center;
          justify-content: center;
  -webkit-box-align: center;
          align-items: center;
}

.image-modal.is-open {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.image-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}

.image-modal__content {
  position: relative;
  margin: 0;
  z-index: 1;
}

.image-modal__img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}



.moving-text {
  display: inline-block;
  width: auto;
  white-space: nowrap;
  will-change: transform;
  -webkit-animation: moving-text-marquee var(--moving-text-duration, 20s) linear infinite;
  animation: moving-text-marquee var(--moving-text-duration, 20s) linear infinite;
}

@-webkit-keyframes moving-text-marquee {
  0% {
    -webkit-transform: translateX(var(--moving-text-start, 100%));
            transform: translateX(var(--moving-text-start, 100%));
  }
  100% {
    -webkit-transform: translateX(var(--moving-text-end, -100%));
            transform: translateX(var(--moving-text-end, -100%));
  }
}

@keyframes moving-text-marquee {
  0% {
    -webkit-transform: translateX(var(--moving-text-start, 100%));
            transform: translateX(var(--moving-text-start, 100%));
  }
  100% {
    -webkit-transform: translateX(var(--moving-text-end, -100%));
            transform: translateX(var(--moving-text-end, -100%));
  }
}
