@font-face {
  font-family: Pretendard;
  src: url('/assets/fonts/PretendardVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #21211e;
  --muted: #605f58;
  --rule: #d6d4cc;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font: 16px/1.55 Pretendard, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
img { display: block; width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.04; font-weight: 620; letter-spacing: -.055em; }
:lang(ko) { word-break: keep-all; }
::selection { color: white; background: #302f2a; }
:focus-visible { outline: 2px solid #555449; outline-offset: 5px; }
.wrap { width: min(1200px, calc(100% - 112px)); margin-inline: auto; }
.back-link:hover {
  text-decoration: underline; text-underline-offset: .28em;
}
.home-intro {
  display: grid; justify-items: center; gap: 12px; text-align: center;
  padding-block: clamp(72px, 15vh, 152px) clamp(60px, 10vh, 112px);
}
.profile-image {
  width: clamp(64px, 12.5vw, 90px); height: auto;
  clip-path: circle(47% at 50% 50.2%);
}
.home-intro h1 { font-size: clamp(24px, 3.25vw, 34px); font-weight: 650; letter-spacing: -.07em; }
.coffee-link { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: .2em; }
.home-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-block-start: 14px;
}
.home-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}
.home-link img { width: 28px; height: 28px; }
.section-line {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  border-top: 1px solid var(--ink); padding-block: 17px 23px;
}
.section-line h2 { font-size: clamp(23px, 2.35vw, 33px); }
.back-link { display: inline-flex; gap: .72em; align-items: center; font-weight: 620; }
.gallery { margin-bottom: 96px; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); column-gap: 28px; row-gap: 53px; }
.work-image { overflow: hidden; background: #e9e5d9; aspect-ratio: 16 / 9; border-radius: 8px; }
.work-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.work-link { display: block; }
.work-link:hover img { transform: scale(1.015); }
.work-caption { display: flex; justify-content: space-between; gap: 18px; padding-top: 15px; }
.work-category { font: 11px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .085em; color: var(--muted); }
:lang(ko) .work-category { font-family: Pretendard, sans-serif; font-weight: 650; }
.new-label { border-left: 1px solid var(--rule); padding-left: 8px; margin-left: 8px; color: var(--ink); }
.work h3 { font-size: clamp(19px, 2vw, 24px); margin-top: 12px; }
.work-description { margin-top: 7px; color: var(--muted); }
.work-arrow { font-size: 26px; line-height: 1; padding: 9px 4px; }
.project-introduction {
  max-width: 720px;
  margin-inline: auto;
  padding-block: clamp(36px, 8vh, 90px) 56px;
}
.project-introduction h1 { font-size: clamp(34px, 6vw, 64px); }
.project-introduction p { margin-top: 14px; color: var(--muted); font-size: clamp(16px, 2vw, 20px); }
.project-introduction img { margin-block: 24px; border-radius: 8px; }
.project-introduction .button { background: var(--ink); color: var(--paper); }
.project-introduction .button:hover { background: #47463d; }
.inner-heading { padding-block: clamp(52px, 8vw, 110px) 40px; }
.inner-heading h1, .experience-heading h1 { font-size: clamp(43px, 8vw, 108px); letter-spacing: -.075em; }
.inner-heading > p, .experience-heading > p:last-child { color: var(--muted); font-size: clamp(17px, 1.9vw, 22px); margin-top: 14px; max-width: 55ch; }
.page-actions { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 25px; }
.page-404 .page-actions { margin-top: 0; margin-bottom: 70px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .65em; min-height: 44px; padding: 8px 14px; border: 1px solid var(--ink); background: transparent; font-weight: 590; font-size: 14px; }
.button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
[data-share-url] { min-height: 40px; padding: 5px 12px; border: 1px solid var(--rule); background: transparent; border-radius: 0; }
.experience-heading { padding-block: 29px 29px; }
.back-link { margin-bottom: 29px; color: var(--muted); font-size: 14px; }
.experience-heading .work-category { margin-bottom: 8px; }
.experience-details {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  align-items: start; gap: 32px; padding-block: 33px 87px; border-top: 1px solid var(--rule); margin-top: 27px;
}
.experience-details h2 { font-size: 29px; margin-bottom: 13px; }
.published-date { font-size: 13px; color: var(--muted); margin-top: 14px; }
.experience-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.experience-actions input, .status { flex-basis: 100%; min-width: 0; }
.status, .no-script { font-size: 14px; color: var(--muted); }
.controls p, .controls label { font-size: 14px; }
.controls {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-block: 14px;
}
.controls label { display: inline-flex; align-items: center; gap: 8px; }
.controls select { background: var(--paper); border: 1px solid var(--rule); min-height: 44px; padding: 0 9px; }
.controls input[type=range] { accent-color: var(--ink); width: min(120px, 35vw); }
.art-canvas { display: block; width: 100%; height: auto; aspect-ratio: 2.18; }
.drawing { background: #eee9dc; cursor: crosshair; touch-action: none; }
.orbit { background: #252623; }
.tile-stage { padding: clamp(17px, 5vw, 58px) 15px; background: #eae6d9; display: grid; justify-items: center; }
.tile-board { width: min(100%, 490px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tile { position: relative; display: grid; place-items: center; padding: 0; aspect-ratio: 1; min-width: 0; border: 1px solid #bcb5a4; background: #faf6e9; }
.tile:hover { background: #fffdf5; }
.tile[data-connected] { background: #dad9c7; }
.tile canvas { display: block; width: 100%; height: auto; }
.tile .tile-marker { position: absolute; inset-inline-start: 4px; bottom: 2px; font: 700 11px/1.1 var(--mono); }
.tile[data-terminal="out"] .tile-marker { inset-inline-start: auto; inset-inline-end: 4px; }
[data-puzzle-status] { min-height: 1.55em; }
.ad-placement { margin-block: 23px; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 64px); }
}
@media (max-width: 660px) {
  .wrap { width: calc(100% - 36px); }
  .section-line { padding-block: 14px 17px; }
  .work-grid { grid-template-columns: 1fr; row-gap: 33px; }
  .work-description { font-size: 15px; }
  .gallery { margin-bottom: 61px; }
  .experience-details { grid-template-columns: 1fr; gap: 22px; padding-bottom: 58px; }
  .experience-actions { justify-content: start; }
  .art-canvas { aspect-ratio: 16 / 9; border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
