:root {
  --bg: #ffffff;
  --dark: #050505;
  --muted: #747474;
  --line: rgba(0, 0, 0, 0.12);
  --container: 1080px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--dark);
  font-family: "Inter", "Pretendard", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-shell {
  width: min(calc(100% - 24px), 1080px);
  margin: 0 auto;
  min-height: 100vh;
}

.hero-header-shell {
  position: relative;
  width: 100%;
}

.site-shell.dark {
  width: 100%;
  background: var(--dark);
  color: white;
}

.site-shell.dark .site-header,
.site-shell.dark #app {
  width: min(calc(100% - 24px), 1080px);
  margin: 0 auto;
}

.site-header {
  position: fixed !important;
  top: 0;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 24px), 1080px);
  padding: 8px 0 10px;
  transform: translateX(-50%);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.hero-header-shell .site-header {
  z-index: 70;
  padding: 12px 0;
}

.hero-header-shell .site-header::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  border-radius: 0;
}

.hero-header-home .site-header::before {
  background: rgba(255, 255, 255, 0.2);
}

.hero-header-about .site-header::before {
  background: rgba(0, 0, 0, 0.2);
}

.dark-header,
.transparent-header {
  color: inherit;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  background: transparent;
  width: auto;
  overflow: visible;
  margin-left: 0;
}

.site-logo {
  display: block;
  width: auto;
  height: 40px;
  max-width: 124px;
  margin-left: 0;
  object-fit: contain;
}

.dark-header .site-logo,
.transparent-header .site-logo,
.site-shell.dark .site-logo {
  filter: invert(1) grayscale(1) contrast(200%);
  mix-blend-mode: screen;
}

.transparent-header {
  color: white;
}

body:not([data-page="home"]):not([data-page="about"]) .site-shell {
  padding-top: 68px;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.88rem;
}

.page-hero-image,
.about-hero-image,
.detail-cover,
.preview-image,
.tile-image,
.thumb-image {
  background-size: cover;
  background-position: center;
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: #ececec;
}

.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-main {
  display: grid;
  gap: 30px;
  padding-bottom: 120px;
  width: 100%;
}

.page-hero-image {
  min-height: 0;
  height: clamp(940px, 98vw, 1320px);
  width: 100%;
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.page-hero-links {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.ghost-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.about-main,
.contact-main,
.work-main,
.detail-main {
  width: min(100%, var(--container));
  margin: 0 auto;
}

.detail-main {
  width: 100%;
}

.about-main {
  padding-bottom: 80px;
  width: 100%;
}

.about-hero-image {
  min-height: 0;
  height: clamp(940px, 98vw, 1320px);
  background-color: #2a2a2a;
  width: 100%;
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.hero-video-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: inherit;
}

.hero-video-poster,
.hero-video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-poster {
  z-index: 0;
  opacity: 1;
  transition: opacity 0.28s ease;
}

.hero-video-shell video {
  z-index: 1;
  visibility: visible;
  opacity: 1;
}

.hero-video-shell.is-playing .hero-video-poster {
  opacity: 0;
  pointer-events: none;
}

.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 34px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.about-section h2 {
  margin: 0;
  font-size: 3.4rem;
  line-height: 0.95;
}

.about-section p {
  margin: 0 0 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-size: 0.76rem;
}

.floating-mark {
  position: fixed;
  right: 24px;
  bottom: 18px;
  z-index: 20;
}

.floating-mark-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 120px;
  padding: 22px;
  border-radius: 999px;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  transition: transform 0.18s ease;
}

.floating-mark-link:hover {
  transform: translateY(-2px);
}

.floating-logo-image {
  display: block;
  width: 104px;
  height: auto;
}

.site-shell.dark .floating-logo-image,
.transparent-header ~ #app .floating-logo-image,
.dark-header ~ #app .floating-logo-image {
  filter: invert(1) grayscale(1) contrast(200%);
  mix-blend-mode: screen;
}

.contact-main {
  min-height: calc(100vh - 100px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-content: start;
}

.contact-main h1 {
  margin: 24px 0 0;
  font-size: 4rem;
  line-height: 0.94;
}

.contact-form-public {
  display: grid;
  gap: 14px;
  margin-top: 120px;
}

.contact-form-public label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
}

.contact-form-public input,
.contact-form-public textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.primary-button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  background: var(--dark);
  color: white;
  cursor: pointer;
}

.contact-feedback {
  margin: 0;
  color: var(--muted);
}

.tab-bar {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
  font-size: 1.6rem;
}

.tab-link {
  padding-bottom: 6px;
  color: #8c8c8c;
}

.tab-link.active {
  color: var(--dark);
  border-bottom: 2px solid var(--dark);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 18px;
}

.home-main .work-main {
  width: min(100%, var(--container));
  margin: 0 auto;
}

.home-main .work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-card {
  display: grid;
  gap: 8px;
}

.work-card .tile-image {
  aspect-ratio: 1.3 / 1;
  background-color: #ececec;
}

.work-card strong {
  font-size: 0.95rem;
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-cover {
  min-height: 360px;
  margin: 0 0 30px;
  background-color: #131313;
}

.detail-main h1 {
  margin: 0 0 16px;
  font-size: 3rem;
}

.detail-main p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-rich {
  width: 100%;
  max-width: 100%;
  color: var(--dark);
}

.detail-rich > p,
.detail-rich > h2,
.detail-rich > h3,
.detail-rich > h4,
.detail-rich > ul,
.detail-rich > ol,
.detail-rich > blockquote {
  max-width: 720px;
}

.detail-rich img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: top;
  margin: 18px 0;
}

.detail-rich img[data-size="full"],
.detail-rich video[data-size="full"] {
  width: 100% !important;
  max-width: 100% !important;
  margin: 18px 0 !important;
}

.detail-rich video {
  display: block;
  width: 100%;
  margin: 18px 0;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
}

.detail-gallery .tile-image {
  aspect-ratio: 1 / 1.2;
}

@media (max-width: 820px) {
  .contact-main,
  .about-section,
  .work-grid,
  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .contact-form-public {
    margin-top: 12px;
  }

  .page-hero-image,
  .about-hero-image,
  .detail-cover {
    min-height: 240px;
    height: 320px;
  }

  body[data-page="home"] .site-shell {
    width: min(calc(100% - 16px), 100%);
  }

  body[data-page="home"] .site-header {
    top: 8px;
    width: min(calc(100% - 16px), 100%);
    padding: 10px 12px;
  }

  body[data-page="home"] .site-header::before {
    left: 0;
    width: 100%;
    transform: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 18px 40px rgba(8, 8, 8, 0.12);
    backdrop-filter: blur(18px);
  }

  body[data-page="home"] .site-logo {
    height: 28px;
  }

  body[data-page="home"] .site-nav {
    gap: 10px;
    font-size: 0.76rem;
    letter-spacing: -0.02em;
  }

  .home-main {
    gap: 20px;
    padding-bottom: 84px;
  }

  .page-hero-image {
    height: min(76svh, 620px);
    border-radius: 30px;
    width: calc(100vw - 16px);
    margin-left: calc(50% - 50vw + 8px);
  }

  .home-main .work-main {
    width: 100%;
    padding: 0 4px;
  }

  .home-main .work-grid {
    gap: 18px;
  }

  .work-card {
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 242, 236, 0.9));
    box-shadow: 0 16px 32px rgba(17, 17, 17, 0.08);
  }

  .work-card .tile-image {
    aspect-ratio: 1 / 1.08;
    border-radius: 18px;
  }

  .work-card strong {
    font-size: 1.02rem;
    letter-spacing: -0.03em;
  }

  .work-card p {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .floating-mark {
    right: 10px;
    bottom: 10px;
  }

  .floating-mark-link {
    min-width: 82px;
    min-height: 82px;
    padding: 14px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(14px);
  }

  .floating-logo-image {
    width: 58px;
  }

  body[data-page="about"] .site-shell {
    width: min(calc(100% - 16px), 100%);
  }

  body[data-page="about"] .site-header {
    top: 8px;
    width: min(calc(100% - 16px), 100%);
    padding: 10px 12px;
  }

  body[data-page="about"] .site-header::before {
    left: 0;
    width: 100%;
    transform: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: rgba(10, 10, 10, 0.34);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
  }

  body[data-page="about"] .site-logo {
    height: 28px;
  }

  body[data-page="about"] .site-nav {
    gap: 10px;
    font-size: 0.76rem;
    letter-spacing: -0.02em;
  }

  .about-main {
    padding-bottom: 84px;
  }

  .about-hero-image {
    height: min(72svh, 560px);
    border-radius: 30px;
    width: calc(100vw - 16px);
    margin-left: calc(50% - 50vw + 8px);
  }

  .about-section {
    gap: 16px;
    padding: 18px;
    margin: 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
  }

  .about-section h2 {
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.04em;
  }

  .about-section p {
    margin-bottom: 16px;
    font-size: 0.96rem;
    line-height: 1.72;
    color: rgba(255, 255, 255, 0.84);
  }

  .chip-list {
    gap: 10px;
    margin-top: 2px;
  }

  .chip {
    padding: 9px 13px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
  }

  body[data-page="work"] .site-shell {
    width: min(calc(100% - 16px), 100%);
  }

  body[data-page="work"] .site-header {
    top: 8px;
    width: min(calc(100% - 16px), 100%);
    padding: 10px 12px;
  }

  body[data-page="work"] .site-header::before {
    left: 0;
    width: 100%;
    transform: none;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 36px rgba(18, 18, 18, 0.08);
    backdrop-filter: blur(18px);
  }

  body[data-page="work"] .site-logo {
    height: 28px;
  }

  body[data-page="work"] .site-nav {
    gap: 10px;
    font-size: 0.76rem;
    letter-spacing: -0.02em;
  }

  .work-main {
    padding-bottom: 84px;
  }

  .tab-bar {
    gap: 10px;
    margin: 18px 4px 22px;
    padding: 4px 2px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    font-size: 1rem;
    white-space: nowrap;
  }

  .tab-bar::-webkit-scrollbar {
    display: none;
  }

  .tab-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: #f3efe9;
  }

  .tab-link.active {
    border-bottom: 1px solid var(--dark);
    background: var(--dark);
    color: #fff;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  body[data-page="work"] .work-card {
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 242, 236, 0.9));
    box-shadow: 0 16px 32px rgba(17, 17, 17, 0.08);
  }

  body[data-page="work"] .work-card .tile-image {
    aspect-ratio: 1 / 1.02;
    border-radius: 18px;
  }

  body[data-page="work"] .work-card strong {
    font-size: 1.04rem;
    letter-spacing: -0.03em;
  }

  body[data-page="work"] .work-card p {
    font-size: 0.87rem;
    line-height: 1.5;
  }
}

@media (max-width: 980px) {
  .home-main .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
