:root {
  --bg: #1e1e1e;
  --text: #d9d9d9;
  --line: #d9d9d9;
  --panel: #3a3a3a;
  --hover-bg: #d9d9d9;
  --hover-text: #1e1e1e;
  --frame: clamp(24px, 6.25vw, 80px);
  --stroke: 1px;
  --grid-gap: 0px;
  --card-gap: 0px;
  --text-height: clamp(56px, 6.25vw, 80px);
  --inner-pad: clamp(20px, 2.5vw, 32px);
  --menu-size: clamp(11px, 0.95vw, 13px);
  --tag-size: clamp(8px, 0.72vw, 10px);
  --thumb-corner: clamp(22px, 3.12vw, 40px);
  --sticky-header-h: clamp(88px, 10vw, 128px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Avenir Next Medium", "Noto Sans KR", "Noto Sans JP", "Apple SD Gothic Neo", sans-serif;
  font-weight: 500;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-wrap {
  width: min(1440px, calc(100% - var(--frame) * 2));
  margin: var(--frame) auto;
  --col-size: calc(100% / 2);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 24px);
  margin-bottom: calc(var(--frame) / 2);
}

.brand {
  height: clamp(56px, 7vw, 90px);
}

.brand img {
  display: block;
  width: auto;
  height: 100%;
}

.brand svg {
  display: block;
  width: auto;
  height: 100%;
}

.brand svg path {
  fill: none;
  stroke: var(--line);
  stroke-width: var(--stroke);
  stroke-miterlimit: 10;
  vector-effect: non-scaling-stroke;
}

.top-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(8px, 1vw, 14px);
  width: var(--col-size);
  padding-top: clamp(2px, 0.5vw, 8px);
}

.contact-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.25vw, 18px);
  width: 100%;
}

.email {
  margin: 0;
  font-size: clamp(9px, 0.78vw, 11px);
  letter-spacing: 0.14em;
}

.socials {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 20px);
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.socials img {
  display: block;
  height: clamp(14px, 1.56vw, 20px);
  width: auto;
  filter: brightness(0) saturate(100%) invert(88%) sepia(0%) saturate(0%) hue-rotate(194deg) brightness(91%) contrast(90%);
  transition: filter 0.2s ease;
}

.socials a:nth-child(1) img {
  height: clamp(12px, 1.4vw, 18px);
}

.socials a:hover img {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(202deg) brightness(103%) contrast(103%);
}

.socials a:nth-child(2):hover img {
  filter: brightness(0) saturate(100%) invert(39%) sepia(72%) saturate(1797%) hue-rotate(306deg) brightness(93%) contrast(92%);
}

.socials a:nth-child(3):hover img {
  filter: brightness(0) saturate(100%) invert(16%) sepia(96%) saturate(7484%) hue-rotate(359deg) brightness(103%) contrast(114%);
}

.quick-nav {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

.quick-nav a {
  flex: 0 0 25%;
  height: clamp(30px, 3.12vw, 40px);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 3px;
  text-align: center;
  font-size: var(--menu-size);
  letter-spacing: 0.24em;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.quick-nav a + a {
  margin-left: calc(var(--stroke) * -1);
}

.quick-nav a:hover {
  background: var(--hover-bg);
  color: var(--hover-text);
}

.layout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.template-card {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  margin-left: calc(var(--stroke) * -1);
  margin-top: calc(var(--stroke) * -1);
}

.template-card:nth-child(2n + 1) {
  margin-left: 0;
}

.template-card:nth-child(-n + 2) {
  margin-top: 0;
}

.thumb-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: var(--stroke) solid var(--line);
  border-radius: var(--thumb-corner);
  background: var(--panel);
}

.text-box {
  min-height: var(--text-height);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  padding-left: var(--inner-pad);
  padding-right: clamp(14px, 1.4vw, 20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: calc(var(--stroke) * -1);
}

.text-tag,
.text-title {
  margin: 0;
  line-height: 1.25;
  text-align: left;
}

.text-tag {
  font-size: var(--tag-size);
  letter-spacing: 0.12em;
  margin-bottom: 2px;
}

.text-title {
  font-size: var(--menu-size);
  letter-spacing: 0.08em;
}

.work-detail-layout {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  align-items: start;
  gap: clamp(18px, 2.6vw, 36px);
}

.work-meta {
  position: sticky;
  top: var(--frame);
  align-self: start;
  display: flex;
  flex-direction: column;
  margin-top: calc(clamp(28px, 2.2vw, 34px) + clamp(14px, 1.7vw, 24px));
}

.work-title {
  margin: 0;
  font-size: clamp(18px, 1.72vw, 26px);
  font-weight: 500;
  letter-spacing: 0.14em;
}

.work-tag {
  margin: clamp(14px, 1.4vw, 20px) 0 0;
  font-size: var(--tag-size);
  letter-spacing: 0.2em;
}

.work-description {
  margin: clamp(18px, 1.8vw, 24px) 0 0;
  font-size: clamp(12px, 0.95vw, 14px);
  line-height: 1.9;
  letter-spacing: 0.1em;
}

.work-credits {
  margin-top: clamp(24px, 2.2vw, 32px);
  padding-top: clamp(18px, 2vw, 28px);
}

.work-credits h2 {
  margin: 0 0 clamp(10px, 1vw, 14px);
  font-size: var(--tag-size);
  letter-spacing: 0.2em;
  font-weight: 500;
  text-transform: lowercase;
}

.work-credits p {
  margin: 0;
  font-size: clamp(11px, 0.85vw, 12px);
  line-height: 1.45;
  letter-spacing: 0.06em;
}

.work-media {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(14px, 1.7vw, 24px);
  align-items: start;
}

.back-link {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  width: clamp(28px, 2.2vw, 34px);
  height: clamp(28px, 2.2vw, 34px);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.back-link img {
  width: 62%;
  height: auto;
}

.back-link:hover {
  background: var(--hover-bg);
  color: var(--hover-text);
}



.media-block {
  border: 0;
  background: var(--panel);
}

.video-block {
  grid-column: 1;
  grid-row: 2;
  aspect-ratio: 16 / 9;
}

.embed-wrap {
  width: 100%;
  height: 100%;
}

.embed-wrap iframe {
  border: 0;
  width: 100%;
  height: 100%;
}

.image-block {
  grid-column: 1 / -1;
  min-height: clamp(240px, 35vw, 460px);
}

.index-page .page-wrap {
  height: calc(100vh - var(--frame) * 2);
  min-height: calc(100vh - var(--frame) * 2);
  margin-top: var(--frame);
  margin-bottom: var(--frame);
  display: flex;
  flex-direction: column;
}

.index-main {
  flex: 1;
  min-height: 0;
}

.index-hero-box {
  width: 100%;
  height: 100%;
  border: var(--stroke) solid var(--line);
  border-radius: var(--thumb-corner);
  overflow: hidden;
  background: var(--panel);
}

.index-hero-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.index-quad {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0;
  background: transparent;
}

.quad-item {
  margin: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  position: relative;
}

.quad-item::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 3;
  width: var(--thumb-corner);
  height: var(--thumb-corner);
  box-sizing: border-box;
  border: 0;
}

.quad-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.quad-item:nth-child(1) {
  border-bottom-right-radius: var(--thumb-corner);
}

.quad-item:nth-child(1)::after {
  right: 0;
  bottom: 0;
  border-right: var(--stroke) solid var(--line);
  border-bottom: var(--stroke) solid var(--line);
  border-bottom-right-radius: var(--thumb-corner);
}

.quad-item:nth-child(1) img {
  object-position: left top;
}

.quad-item:nth-child(2) {
  border-bottom-left-radius: var(--thumb-corner);
}

.quad-item:nth-child(2)::after {
  left: 0;
  bottom: 0;
  border-left: var(--stroke) solid var(--line);
  border-bottom: var(--stroke) solid var(--line);
  border-bottom-left-radius: var(--thumb-corner);
}

.quad-item:nth-child(2) img {
  object-position: right top;
}

.quad-item:nth-child(3) {
  border-top-right-radius: var(--thumb-corner);
}

.quad-item:nth-child(3)::after {
  right: 0;
  top: 0;
  border-right: var(--stroke) solid var(--line);
  border-top: var(--stroke) solid var(--line);
  border-top-right-radius: var(--thumb-corner);
}

.quad-item:nth-child(3) img {
  object-position: left bottom;
}

.quad-item:nth-child(4) {
  border-top-left-radius: var(--thumb-corner);
}

.quad-item:nth-child(4)::after {
  left: 0;
  top: 0;
  border-left: var(--stroke) solid var(--line);
  border-top: var(--stroke) solid var(--line);
  border-top-left-radius: var(--thumb-corner);
}

.quad-item:nth-child(4) img {
  object-position: right bottom;
}

@media (max-width: 900px) {
  .index-page .page-wrap {
    height: calc(100vh - var(--sp-space) * 2);
    min-height: calc(100vh - var(--sp-space) * 2);
    margin-top: var(--sp-space);
    margin-bottom: var(--sp-space);
  }

  :root {
    --sp-space: calc(var(--frame) / 2);
  }

  .page-wrap {
    width: min(1440px, calc(100% - var(--frame)));
    margin: var(--sp-space) auto;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: end;
    gap: clamp(12px, 2vw, 16px);
    margin-bottom: var(--sp-space);
    position: sticky;
    top: var(--sp-space);
    z-index: 50;
    background: var(--bg);
    padding-bottom: 0;
    box-shadow: var(--sp-space) 0 0 0 var(--bg), calc(var(--sp-space) * -1) 0 0 0 var(--bg);
  }

  .topbar::before {
    content: "";
    position: absolute;
    left: calc(var(--sp-space) * -1);
    right: calc(var(--sp-space) * -1);
    top: calc(var(--sp-space) * -1);
    height: var(--sp-space);
    background: var(--bg);
    pointer-events: none;
  }


  .brand {
    align-self: end;
  }

  .top-actions {
    width: 100%;
    align-items: flex-end;
    padding-top: 0;
    align-self: end;
  }

  .contact-line {
    justify-content: flex-end;
    width: 100%;
  }

  .quick-nav {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
    align-items: flex-end;
  }

  .quick-nav a {
    flex: 0 0 50%;
    width: 50%;
  }

  .layout-grid {
    grid-template-columns: 1fr;
  }

  .template-card,
  .template-card:nth-child(2n + 1),
  .template-card:nth-child(-n + 2) {
    margin-left: 0;
  }

  .template-card + .template-card {
    margin-top: calc(var(--stroke) * -1);
  }

  .quick-nav a + a {
    margin-left: calc(var(--stroke) * -1);
    margin-top: 0;
  }

  .work-detail-layout {
    grid-template-columns: 1fr;
    gap: clamp(12px, 2vw, 18px);
    width: 100%;
    position: relative;
  }

  .work-meta {
    position: static;
    height: auto;
    padding-bottom: 0;
    gap: 0;
    margin-top: calc(clamp(28px, 2.2vw, 34px) + clamp(8px, 1.4vw, 12px));
    width: 100%;
  }

  .work-media {
    display: flex;
    flex-direction: column;
    gap: var(--sp-space);
    width: 100%;
  }

  .back-link {
    position: absolute;
    top: 0;
    right: 0;
    align-self: auto;
    margin-top: 0;
  }

  .work-credits {
    margin-top: clamp(18px, 2.4vw, 24px);
    padding-top: 0;
  }

  .work-title {
    line-height: 1.1;
  }

  .work-tag {
    line-height: 1;
  }

  .video-block,
  .image-block {
    width: 100%;
  }

  .image-block {
    min-height: clamp(180px, 52vw, 300px);
  }

  body.is-scrolled .topbar {
    margin-bottom: 0;
  }
}

.about-page .page-wrap {
  min-height: calc(100vh - var(--frame) * 2);
  display: flex;
  flex-direction: column;
}

.about-main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  padding-top: var(--frame);
}

.about-block {
  width: 100%;
  text-align: left;
}

.about-name {
  margin: 0;
  font-size: clamp(34px, 4vw, 64px);
  line-height: 1.04;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.about-role {
  margin: clamp(12px, 1.6vw, 20px) 0 0;
  font-size: clamp(14px, 1.1vw, 18px);
  line-height: 1.3;
  letter-spacing: 0.14em;
}

.about-description {
  margin: clamp(22px, 2.2vw, 30px) 0 0;
  max-width: none;
  width: 100%;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.75;
  letter-spacing: 0.08em;
}

.about-description-en {
  margin-top: clamp(12px, 1.4vw, 18px);
}

.about-socials {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.8vw, 24px);
  margin-top: clamp(40px, 3.6vw, 52px);
  flex-wrap: wrap;
}

.about-email {
  margin: 0;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.12em;
  order: 0;
  flex-basis: 100%;
  margin-top: 0;
}

.about-contact {
  margin: 0;
  font-size: clamp(10px, 0.8vw, 12px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  flex-basis: 100%;
}

.about-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.about-socials img {
  display: block;
  height: clamp(18px, 2vw, 24px);
  width: auto;
  filter: brightness(0) saturate(100%) invert(88%) sepia(0%) saturate(0%) hue-rotate(194deg) brightness(91%) contrast(90%);
  transition: filter 0.2s ease;
}

.about-socials a:nth-of-type(1) img {
  height: clamp(16px, 1.72vw, 21px);
}

.about-socials a:hover img {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(202deg) brightness(103%) contrast(103%);
}

.about-socials a:nth-of-type(2):hover img {
  filter: brightness(0) saturate(100%) invert(39%) sepia(72%) saturate(1797%) hue-rotate(306deg) brightness(93%) contrast(92%);
}

.about-socials a:nth-of-type(3):hover img {
  filter: brightness(0) saturate(100%) invert(16%) sepia(96%) saturate(7484%) hue-rotate(359deg) brightness(103%) contrast(114%);
}

@media (max-width: 900px) {
  .about-page .page-wrap {
    min-height: calc(100vh - var(--sp-space) * 2);
  }

  .about-main {
    align-items: flex-start;
    padding-top: var(--sp-space);
  }

  .about-name {
    font-size: clamp(28px, 8.4vw, 42px);
    letter-spacing: 0.04em;
  }

  .about-role {
    font-size: clamp(12px, 3.8vw, 16px);
    letter-spacing: 0.12em;
  }

  .about-description {
    max-width: 100%;
    font-size: clamp(12px, 3.5vw, 14px);
    line-height: 1.7;
  }
}
