:root {
  color-scheme: dark;
  --background: #191210;
  --panel: #251e1c;
  --ink: #f6ede7;
  --muted: #ddd0c5;
  --cream: #f6dfc0;
  --green: #aad0b2;
  --line: #4d463d;
  --body: "DM Sans", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
.shell { width: min(100% - 64px, 1080px); margin-inline: auto; }
.top { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; }
.wordmark img { flex: 0 0 auto; object-fit: contain; }
.wordmark-text { display: grid; gap: 4px; }
.wordmark-text > span { font-size: 1.12rem; font-weight: 800; line-height: 1.2; letter-spacing: -.035em; }
.wordmark small { color: var(--muted); font-size: .76rem; }
nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 30px); font-size: .9rem; font-weight: 600; }
nav a { padding-block: 10px; text-decoration: none; white-space: nowrap; }
nav a:hover { text-decoration: underline; }
.nav-contact { padding-inline: 15px; border: 1px solid var(--line); border-radius: 5px; color: var(--cream); }
.intro { padding-block: clamp(42px, 7vw, 92px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: clamp(16px, 4vw, 48px); }
.intro h1 { margin-block: 12px 18px; color: var(--cream); font-size: clamp(2.1rem, 5.2vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -.06em; white-space: nowrap; }
.intro-copy { min-width: 0; }
.intro-kicker { color: var(--green); font-size: .92rem; font-weight: 700; }
.label { margin-bottom: 12px; color: var(--cream); font-size: .88rem; font-weight: 700; }
.intro-description, .work-copy p:last-child { max-width: 40ch; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.75; word-break: keep-all; }
.hero-link { display: inline-flex; align-items: center; gap: 14px; margin-top: 24px; padding: 10px 0; color: var(--cream); font-size: .95rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line); }
.hero-link span { transition: transform 180ms ease; }
.hero-link:hover span { transform: translateY(3px); }
.hero-logo { position: relative; width: 100%; }
.hero-logo img { display: block; width: 100%; height: auto; }
.logo-trace { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.platforms { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.platforms div { padding: 18px clamp(10px, 3vw, 28px); }
.platforms div + div { border-left: 1px solid var(--line); }
.platforms dt { color: var(--cream); font-weight: 600; letter-spacing: -.025em; }
.platforms dd { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.projects { margin-top: clamp(44px, 7vw, 78px); scroll-margin-top: 20px; }
.section-title { margin-bottom: 16px; font-size: 1.25rem; font-weight: 700; }
.work { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 64px); padding: clamp(20px, 4vw, 44px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.work .label { color: var(--green); }
.work h3 { margin-bottom: 18px; color: var(--cream); font-size: clamp(2.35rem, 5.2vw, 4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.055em; }
.work-copy p:last-child { max-width: 36ch; }
.project-lead { margin-bottom: 9px; color: var(--ink); font-size: 1.08rem; font-weight: 700; line-height: 1.5; word-break: keep-all; }
.project-preview { display: grid; justify-items: center; gap: 12px; padding: clamp(16px, 2.4vw, 28px); background: #1d1512; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.project-preview img { display: block; width: min(100%, 250px); height: auto; }
.project-preview figcaption { color: var(--muted); font-size: .82rem; }
.project-preview figcaption a { color: var(--cream); white-space: nowrap; }
.contact { margin-block: clamp(30px, 5vw, 54px); display: grid; justify-items: start; gap: 8px; }
.contact h2 { color: var(--ink); font-size: .94rem; font-weight: 700; }
.contact a { max-width: 100%; padding-block: 4px; color: var(--cream); overflow-wrap: anywhere; font-size: clamp(1rem, 2.3vw, 1.35rem); font-weight: 600; }
.contact a:hover { color: var(--green); }
.footer { min-height: 76px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 22px; padding-block: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.footer nav { font-size: inherit; }
.support { padding-block: clamp(48px, 8vw, 90px); }
.support h1 { margin-bottom: 16px; color: var(--cream); font-size: clamp(1.85rem, 5vw, 3rem); }
.support > p { max-width: 45ch; color: var(--muted); font-size: 1.06rem; line-height: 1.75; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes trace-line { to { stroke-dashoffset: 0; } }
@keyframes logo-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes trace-fade-out { from { opacity: 1; } to { opacity: 0; } }

@keyframes section-enter {
  from { opacity: .55; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .intro-copy > * { animation: arrive 720ms cubic-bezier(.2,.7,.3,1) both; }
  .hero-logo img { animation: logo-fade-in 540ms 810ms ease-out both; }
  .logo-trace { display: block; fill: none; stroke: #f6dfc0; stroke-width: 6; stroke-linecap: round; animation: trace-fade-out 400ms 960ms ease-out both; }
  .logo-trace path { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: trace-line 850ms cubic-bezier(.25,.6,.35,1) forwards; }
  .logo-trace .logo-trace-feather { stroke: #e2aa82; animation-duration: 620ms; animation-delay: 180ms; }
  .intro-kicker { animation-delay: 80ms; }
  .intro h1 { animation-delay: 155ms; }
  .intro-description { animation-delay: 230ms; }
  .hero-link { animation-delay: 305ms; }
  [data-reveal].is-entering { animation: section-enter 500ms ease-out; }
  .project-preview img { transition: transform 220ms ease-out; }
  .project-preview:focus-within img { transform: scale(1.025); }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .project-preview:hover img { transform: scale(1.025); }
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .top { min-height: 70px; }
  .intro, .work { grid-template-columns: 1fr; }
  .intro { gap: 0; padding-block: 12px 36px; }
  .intro h1 { font-size: clamp(1.6rem, 9.3vw, 3.65rem); }
  .hero-logo { width: min(100%, 420px); justify-self: center; }
  .project-preview img { width: min(100%, 235px); }
  .wordmark img { width: 42px; height: auto; }
}

@media (max-width: 420px) {
  .top { align-items: start; flex-direction: column; gap: 8px; padding-block: 12px; }
  .platforms div { padding-inline: 8px; }
  .platforms dt { font-size: .88rem; }
  .footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-link span { transition: none; }
}
