:root {
  --ink: #12100e;
  --ink-raised: #1c1916;
  --paper: #f4efe6;
  --gold: #c6a36a;
  --gold-text: #f0e2c8;
  --gold-deep: #6f4e24;
  --muted: #5c554c;
  --muted-dark: #c9bfb2;
  --line: #e3dacb;
  --line-dark: rgba(240, 226, 200, 0.16);
  --danger: #e7b2a8;
  color-scheme: dark;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

.theme-light {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
}

::selection { background: var(--gold); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/></svg>");
}

.public {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header, .hero, .section { padding: 1.5rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.header-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.languages a {
  color: var(--muted-dark);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.55rem 0.65rem;
}

.languages a:hover,
.languages a[aria-current="true"] { color: var(--gold-text); }

.sidebar .languages { padding: 0 1.25rem 1rem; }
.topbar .languages a,
.sidebar .languages a,
.card .languages a {
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 0.35rem 0.45rem;
}

html[lang="ko"] body {
  font-family: "Noto Sans KR", Outfit, ui-sans-serif, system-ui, sans-serif;
}

html[lang="ko"] .section h1 {
  font-family: "Noto Serif KR", "Cormorant Garamond", Georgia, serif;
  font-style: normal;
}

html[lang="ko"] .home-link,
html[lang="ko"] .categories a,
html[lang="ko"] .languages a {
  letter-spacing: 0;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
  margin-left: auto;
}

.home-link,
.categories a {
  color: var(--paper);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.55rem 0.75rem;
}

.home-link:hover,
.home-link[aria-current="page"],
.categories a:hover,
.categories a[aria-current="page"] { color: var(--gold-text); }

.hero, .section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 5rem;
}

.section h1 {
  margin: 1rem 0 0;
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.role {
  margin: 0;
  font-size: 0.875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

h1, .brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-style: italic;
}

.hero h1 {
  margin: 1rem 0 0;
  max-width: 16ch;
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.9;
}

.rule {
  width: 6rem;
  height: 1px;
  margin-top: 2rem;
  background: var(--gold);
}

.lede, .quiet-dark, .quiet-light, .page-header p, .panel p, .content dd {
  line-height: 1.6;
}

.lede {
  max-width: 28rem;
  margin: 2rem 0 0;
  font-size: 1.125rem;
  color: var(--muted-dark);
}

.lede a {
  color: var(--gold-text);
  text-decoration: none;
}

.lede a:hover { color: var(--paper); }

.gate-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.card {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  border: 1px solid var(--line-dark);
  background: var(--ink-raised);
  padding: 2.5rem 2rem;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0.75rem;
  border: 1px solid rgba(198, 163, 106, 0.3);
  pointer-events: none;
}

.card h1, .page-header h1, .panel h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
}

.card h1 {
  margin: 1rem 0 0;
  font-size: 3rem;
  line-height: 1;
}

.quiet-dark { color: var(--muted-dark); }
.quiet-light, .page-header p, .panel p, dt { color: var(--muted); }

.passkey-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.field { display: flex; flex-direction: column; gap: 0.5rem; }
.quiet-dark, .quiet-light, .label-dark, .label-light { margin: 0; font-size: 0.875rem; }
.label-dark { color: var(--gold-text); }
.label-light { color: var(--gold-deep); }

input {
  width: 100%;
  padding: 0.75rem;
  font: inherit;
}

.field-dark {
  border: 1px solid var(--line-dark);
  background: var(--ink);
  color: var(--paper);
}

.field-light {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.alert { margin: 0; color: var(--danger); font-size: 0.875rem; }
.alert[hidden] { display: none; }

.button, .account button, .topbar button {
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.button:disabled { opacity: 0.6; cursor: wait; }

.shell { min-height: 100vh; }

.sidebar { display: none; }
.topbar { display: block; }

.brand, .account, .content, .topbar { padding: 1.25rem; }
.brand { padding-top: 2rem; }
.brand-name { margin: 0.75rem 0 0; font-size: 1.75rem; line-height: 1; }
.sidebar .brand-name, .sidebar .eyebrow { color: var(--paper); }

.nav { display: flex; flex-direction: column; gap: 0.25rem; }
.nav a {
  border-left: 2px solid transparent;
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
}
.nav a[aria-current="page"] {
  border-color: var(--gold-deep);
  color: var(--ink);
}
.sidebar .nav a { color: var(--muted-dark); }
.sidebar .nav a[aria-current="page"] {
  border-color: var(--gold-text);
  color: var(--paper);
}

.account { border-top: 1px solid var(--line-dark); margin-top: auto; }
.account-name {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
}
.account-email, .account-role { margin: 0.35rem 0 0; }
.account-email { font-size: 0.875rem; color: var(--muted-dark); }
.account-role { letter-spacing: 0.18em; }
.account-links, .topbar form { display: flex; gap: 1rem; align-items: center; }
.account-links { margin-top: 1.25rem; }
.account button, .topbar button {
  background: transparent;
  color: var(--gold-text);
  padding: 0;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}
.account a, .quiet-link, .topbar a {
  color: var(--muted-dark);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.topbar {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar .brand-name { font-size: 1.5rem; }
.topbar > div, .topbar { }
.topbar { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1rem; }
.nav-inline { grid-column: 1 / -1; }
.nav-inline a { color: var(--muted-dark); }
.nav-inline a[aria-current="page"] { border-color: var(--gold-text); color: var(--paper); }

.content { padding: 2rem 1.25rem 3rem; }
.page-header { max-width: 40rem; }
.page-header h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1;
}
.eyebrow-deep { color: var(--gold-deep); letter-spacing: 0.28em; }
.page-header p { margin: 1.25rem 0 0; }

.cards {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}
.panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  padding: 1.5rem;
  margin-top: 1rem;
}
.cards .panel { margin-top: 0; }
.panel h2 { margin: 0.75rem 0 0; font-size: 1.875rem; }
.panel dl { margin: 1.25rem 0 0; }
.panel dt { font-size: 0.875rem; }
.panel dd { margin: 0 0 0.75rem; }
.panel-dashed {
  border-style: dashed;
  border-color: rgba(198, 163, 106, 0.5);
  background: transparent;
  margin-top: 1rem;
}

.category-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.category-index a {
  color: var(--gold-deep);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.key-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.key-list li {
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
}

.key-list h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.7rem;
}

.key-list p { margin: 0.3rem 0 0; }

.section-works { justify-content: flex-start; }

.works {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  max-width: 80rem;
}

.work-copy { max-width: 40rem; }

.work .work-meta {
  margin: 0;
  max-width: none;
  color: var(--gold-text);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.work h2 {
  margin: 0.35rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1;
}

.work p {
  margin: 1rem 0 0;
  max-width: 38rem;
  color: var(--muted-dark);
}

.facts {
  margin: 1.5rem 0 0;
  max-width: 38rem;
}

.facts div + div { margin-top: 1.15rem; }

.facts dt {
  margin: 0;
  color: var(--gold-text);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0.4rem 0 0;
  color: var(--muted-dark);
  line-height: 1.6;
}

.facts ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li + li { margin-top: 0.25rem; }

.contact {
  margin-top: 2.5rem;
  max-width: 32rem;
}

.contact > p {
  margin: 0;
  color: var(--muted-dark);
  line-height: 1.6;
}

.contact-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.contact-label {
  margin: 0 0 0.35rem;
  color: var(--gold-text);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.contact-mail {
  color: var(--paper);
  font-size: 1.05rem;
  text-decoration: none;
}

.contact-brand {
  color: var(--gold-text);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
}

.contact-mail:hover,
.contact-brand:hover { color: var(--paper); }

.stills { margin-top: 2rem; }

.stills .work-meta { margin-bottom: 0.75rem; }

.work-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.player {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player iframe,
.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.still { margin: 0; }

.still a { display: block; }

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

.list-action { margin-top: 2rem; }
.list-action .button { display: inline-block; text-decoration: none; }

.flash { margin: 1.5rem 0 0; color: var(--gold-deep); }

.project-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-group { margin-top: 2.25rem; }

.order-group h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
}

.order-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.drag-handle,
.order-tools button {
  border: 0;
  background: transparent;
  color: var(--gold-deep);
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
}

.drag-handle { cursor: grab; }

.drag-handle:active { cursor: grabbing; }

.order-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.project-row.is-dragging { opacity: 0.45; }

.project-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  padding: 1.25rem 1.5rem;
}

.project-main { flex: 1; min-width: 12rem; }

.project-row h2 {
  margin: 0.35rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
}

.row-actions { display: flex; gap: 1rem; align-items: center; }

.row-actions a,
.quiet-action {
  color: var(--gold-deep);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.project-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 36rem;
  margin-top: 2rem;
}

textarea.field-light {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  font: inherit;
}

.form-actions { display: flex; gap: 1.25rem; align-items: center; }

.form-error { margin: 0; color: #8a3d32; font-size: 0.875rem; }

.button-danger { background: #6e2e28; color: var(--paper); }

.media-note { max-width: 36rem; margin-top: 1.5rem; }

.metadata-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 36rem;
}

.metadata-list li {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  padding: 1rem 1.25rem;
}

.metadata-list h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.75rem;
}

.metadata-list p { margin: 0.35rem 0 0; }

.media-block {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 36rem;
  margin-top: 2.5rem;
}

.media-block h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
}

.media-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  padding: 0.9rem 1rem;
}

.media-row p { margin: 0; }

.media-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

input[type="file"] { padding: 0.6rem; background: white; }

.showreel {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--ink);
}

.showreel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showreel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 16, 14, 0.62), rgba(18, 16, 14, 0.28) 32%, rgba(18, 16, 14, 0.42) 70%, rgba(18, 16, 14, 0.78));
}

.showreel-preview {
  display: block;
  width: min(100%, 36rem);
  max-height: 20rem;
  margin-top: 1.5rem;
  background: #000;
}

.showreel-remove { margin: 1rem 0 2rem; }

@media (min-width: 768px) {
  .site-header, .hero, .section { padding-left: 3rem; padding-right: 3rem; }
  .shell { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); }
  .sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--ink);
    color: var(--paper);
  }
  .topbar { display: none; }
  .content { padding: 3rem 2.5rem; }
  .cards { grid-template-columns: 1fr 1fr; }
}
