@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121311;
  --raised: #1a1b19;
  --ink: #ededea;
  --dim: #a3a39d;
  --faint: #83837d;
  --rule: rgba(237, 237, 234, 0.13);
  --rule-strong: rgba(237, 237, 234, 0.28);
  --felt: #4cb887;
  --hover: rgba(237, 237, 234, 0.06);
  --shade: rgba(0, 0, 0, 0.55);
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #efefed;
  --raised: #e6e6e3;
  --ink: #161616;
  --dim: #55554f;
  --faint: #6b6b66;
  --rule: rgba(22, 22, 22, 0.13);
  --rule-strong: rgba(22, 22, 22, 0.3);
  --felt: #0a6b48;
  --hover: rgba(22, 22, 22, 0.05);
  --shade: rgba(22, 22, 22, 0.28);
}

:root {
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --text: "Geist", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans KR", "Noto Sans SC", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 12px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
  --gap: clamp(16px, 2vw, 28px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

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

button {
  font: inherit;
  color: inherit;
}

a,
button {
  touch-action: manipulation;
}

button,
.lang-option {
  -webkit-user-select: none;
  user-select: none;
}

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

h1,
h2,
h3,
p,
dl,
dd,
figure,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
}

:focus-visible {
  outline: 2px solid var(--felt);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--felt);
  color: var(--paper);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
}

.icon-sm {
  width: 0.9em;
  height: 0.9em;
  fill: currentColor;
  flex: none;
}

.icon-lg {
  width: 0.7em;
  height: 0.7em;
  fill: currentColor;
  flex: none;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease-out);
}

.skip:focus-visible {
  transform: none;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand tools" "nav nav";
  align-items: center;
  row-gap: 4px;
  padding-top: calc(14px + env(safe-area-inset-top));
  padding-bottom: 14px;
}

.brand {
  grid-area: brand;
  justify-self: start;
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  grid-area: nav;
  display: flex;
  gap: 20px;
  font-size: 0.9375rem;
}

.site-nav a {
  padding: 6px 0;
  color: var(--dim);
  transition: color 150ms ease;
}

.tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  gap: 2px;
}

.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  min-width: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms var(--ease-out);
}

.control:active {
  transform: scale(0.95);
}

.lang-btn {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.caret {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transition: transform 200ms var(--ease-out);
}

.lang {
  position: relative;
}

.lang.open .caret {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  min-width: 160px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px -12px var(--shade);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transform-origin: top right;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out), visibility 0s linear 150ms;
}

.lang.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.lang-option {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--dim);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.lang-option[aria-selected="true"] {
  color: var(--ink);
  font-weight: 500;
}

.theme-btn .icon-moon,
:root[data-theme="light"] .theme-btn .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-btn .icon-moon {
  display: block;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 150ms ease, color 150ms ease;
}

.link .icon-sm {
  color: var(--faint);
  transition: transform 200ms var(--ease-out), color 150ms ease;
}

.hero {
  padding-top: clamp(64px, 14vh, 150px);
  padding-bottom: clamp(56px, 10vh, 112px);
}

.hero-name {
  font-family: var(--display);
  font-size: clamp(3.75rem, 15.5vw, 13.5rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.055em;
  margin-left: -0.04em;
}

.hero-intro {
  max-width: 22ch;
  margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: clamp(24px, 3vw, 36px);
}










.section-title {
  font-family: var(--display);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.work {
  padding-top: clamp(32px, 6vw, 64px);
}

.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--rule);
}

.work > .section-title {
  margin-bottom: clamp(24px, 3vw, 40px);
}

.project-name {
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.project-name a {
  transition: color 150ms ease;
}

.project-desc {
  max-width: 44ch;
  margin-top: 18px;
  color: var(--dim);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px 24px;
  margin-top: 28px;
}

.facts dt {
  color: var(--faint);
  font-size: 0.8125rem;
}

.facts dd {
  margin-top: 2px;
  font-size: 0.9375rem;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--felt);
}

.dot-dev {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--felt);
}

.app-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 15px;
}

.progress-panel {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--dim);
  font-size: 0.9375rem;
}

.progress-total {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

.progress li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.25rem;
  grid-template-areas: "name value" "bar bar";
  align-items: baseline;
  gap: 8px 16px;
  padding: 10px 0;
}

.progress-name {
  grid-area: name;
  font-size: 0.9375rem;
}

.progress-value {
  grid-area: value;
  justify-self: end;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.progress-bar {
  grid-area: bar;
  display: block;
  height: 2px;
  width: var(--p);
  border-radius: 2px;
  background: var(--felt);
}

.progress-note {
  margin-top: 14px;
  color: var(--faint);
  font-size: 0.875rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 28px;
}

.shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #0b0b0c;
}

.shot img {
  width: 100%;
  transition: transform 600ms var(--ease-out);
}

.project-media {
  display: block;
}

.project-candy .project-media {
  order: 2;
}

.nivra-media {
  position: relative;
}

.nivra-desktop {
  display: none;
}

.nivra-phone {
  width: min(62%, 300px);
  margin: 0 auto;
  border-radius: 20px;
}

.more {
  display: grid;
  gap: 20px;
  padding: clamp(40px, 6vw, 72px) 0 0;
  border-top: 1px solid var(--rule);
}

.more-title {
  font-size: 1rem;
  font-weight: 600;
}

.more-list li + li {
  border-top: 1px solid var(--rule);
}

.more-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name tag" "desc desc";
  align-items: baseline;
  gap: 2px 16px;
  padding: 16px 0;
}

.more-name {
  grid-area: name;
  font-weight: 600;
  transition: color 150ms ease;
}

.more-desc {
  grid-area: desc;
  color: var(--dim);
  font-size: 0.9375rem;
}

.more-tag,
.more-list .icon-sm {
  grid-area: tag;
  justify-self: end;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: clamp(64px, 9vw, 128px);
}

.band-body {
  min-width: 0;
}

.band-note {
  color: var(--dim);
  max-width: 52ch;
}

.prose {
  display: grid;
  gap: 18px;
  max-width: 62ch;
}

.prose p {
  color: var(--dim);
}

.prose .lead {
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.facts-row {
  margin-top: 12px;
}

.stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px var(--gap);
  margin-top: 28px;
}

.stack dt {
  font-weight: 600;
}

.stack dd {
  margin-top: 2px;
  color: var(--dim);
  font-size: 0.9375rem;
}

.stack a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 150ms ease;
}

.socials li + li {
  border-top: 1px solid var(--rule);
}

.socials a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}

.social-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.social-name {
  font-family: var(--display);
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  transition: color 150ms ease;
}

.social-handle {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.socials .icon-sm {
  color: var(--faint);
  transition: transform 200ms var(--ease-out), color 150ms ease;
}

.sites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.sites a {
  display: inline-block;
  padding: 4px 0;
  color: var(--dim);
  transition: color 150ms ease;
}

.site-footer {
  margin-top: clamp(80px, 12vw, 160px);
  padding-top: 24px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  color: var(--faint);
  font-size: 0.8125rem;
}

.back {
  margin-top: clamp(16px, 4vw, 40px);
  color: var(--dim);
  font-size: 0.9375rem;
  text-decoration: none;
}

.case-head {
  padding-top: clamp(28px, 5vw, 56px);
}

.case-name {
  font-family: var(--display);
  font-size: clamp(3.5rem, 12vw, 10rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.055em;
  margin-left: -0.04em;
}

.case-lead {
  max-width: 30ch;
  margin-top: clamp(20px, 3vw, 32px);
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.facts-case {
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.case-figure {
  margin-top: clamp(32px, 5vw, 56px);
}

.case-figure-narrow .shot {
  max-width: 880px;
}

.case-body .band:first-child {
  padding-top: clamp(56px, 8vw, 104px);
}

.inline-figure {
  margin-top: 12px;
}

.phone-figure {
  width: min(70%, 300px);
  border-radius: 20px;
}

.files {
  display: grid;
  margin-top: 6px;
}

.files li {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  color: var(--dim);
  font-size: 0.9375rem;
}

.files li + li {
  border-top: 1px solid var(--rule);
}

.files code {
  color: var(--ink);
}

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

.groups dt {
  font-weight: 600;
}

.groups dd {
  margin-top: 2px;
  color: var(--dim);
  font-size: 0.9375rem;
}

.next {
  margin-top: clamp(80px, 11vw, 144px);
}

.next-link {
  display: grid;
  gap: 6px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.next-label {
  color: var(--faint);
  font-size: 0.875rem;
}

.next-name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  font-family: var(--display);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  transition: color 150ms ease;
}

.next-name .icon-lg {
  transition: transform 220ms var(--ease-out);
}

.notfound {
  padding-top: clamp(48px, 10vw, 120px);
}


@media (min-width: 640px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav tools";
    column-gap: 32px;
  }

  .site-nav {
    justify-self: end;
    gap: 28px;
  }

  .files li {
    grid-template-columns: minmax(150px, 1fr) 2fr;
    gap: 24px;
    align-items: baseline;
  }
}

@media (min-width: 900px) {
  .project {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: center;
  }

  .project-pool .project-text {
    grid-column: 1 / span 5;
  }

  .project-pool .project-media {
    grid-column: 6 / -1;
  }

  .project-candy .project-media {
    grid-column: 1 / span 6;
    grid-row: 1;
    order: 0;
  }

  .project-candy .project-text {
    grid-column: 8 / -1;
  }

  .project-nivra {
    align-items: start;
  }

  .project-nivra .project-text {
    grid-column: 8 / -1;
    grid-row: 1;
    position: sticky;
    top: 32px;
  }

  .project-nivra .project-media {
    grid-column: 1 / span 7;
    grid-row: 1;
  }

  .nivra-desktop {
    display: block;
    width: 92%;
  }

  .nivra-phone {
    position: absolute;
    right: 0;
    bottom: -8%;
    width: 24%;
    margin: 0;
    border-radius: 16px;
    box-shadow: 0 24px 48px -24px var(--shade);
  }

  .project-nivra {
    padding-bottom: clamp(96px, 10vw, 136px);
  }

  .project-wii .project-text {
    grid-column: 1 / span 5;
  }

  .project-wii .project-media {
    grid-column: 7 / -1;
  }

  .progress-wide .progress {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(32px, 5vw, 72px);
  }

  .more {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
  }

  .more-title {
    grid-column: 1 / span 3;
    padding-top: 16px;
  }

  .more-list {
    grid-column: 4 / -1;
  }

  .more-list a {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 7rem;
    grid-template-areas: "name desc tag";
  }

  .band {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
  }

  .band > .section-title {
    grid-column: 1 / span 3;
  }

  .band > .band-body {
    grid-column: 4 / -1;
  }

  .case-figure-narrow {
    display: flex;
    justify-content: center;
  }

  .case-figure-narrow .shot {
    width: 100%;
  }
}

@media (min-width: 1800px) {
  :root {
    --max: 1520px;
  }

  body {
    font-size: 1.125rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .control:hover {
    background: var(--hover);
    color: var(--ink);
  }

  .lang-option:hover,
  .lang-option:focus-visible {
    background: var(--hover);
    color: var(--ink);
    outline: none;
  }

  .site-nav a:hover,
  .back:hover,
  .sites a:hover {
    color: var(--ink);
  }

  .link:hover {
    text-decoration-color: currentColor;
  }

  .link:hover .icon-sm {
    color: var(--ink);
    transform: translate(2px, 0);
  }

  .link[target="_blank"]:hover .icon-sm {
    transform: translate(2px, -2px);
  }

  .back:hover .icon-sm {
    transform: translate(-2px, 0);
  }

  .project-name a:hover,
  .more-list a:hover .more-name,
  .next-link:hover .next-name {
    color: var(--felt);
  }

  .project:has(.project-media:hover) .shot img,
  .project:has(.project-name a:hover) .shot img {
    transform: scale(1.015);
  }

  .stack a:hover {
    text-decoration-color: currentColor;
  }

  .socials a:hover .social-name,
  .socials a:hover .social-icon {
    color: var(--felt);
  }

  .socials a:hover .icon-sm {
    color: var(--ink);
    transform: translate(2px, -2px);
  }

  .next-link:hover .icon-lg {
    transform: translate(4px, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-name,
  .hero-intro,
  .hero-links,
  .case-head,
  .facts-case {
    animation: rise 700ms var(--ease-out) both;
  }

  .hero-intro {
    animation-delay: 80ms;
  }

  .hero-links,
  .facts-case {
    animation-delay: 140ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }

}
