/* Portfolio site. One family (the build subsets the vendored Pretendard, OFL, into a hashed /assets/sans-*.woff2 served as "FSW Sans", since the license reserves the Pretendard name for unmodified copies), one ground, one ink,
   one seal-red accent kept for the action and the tax-invoice line. Sections change field instead of
   drawing boxes: grey ground, a white price sheet, a dark contact field. */
:root {
  --ground: #eef0f2;
  --sheet: #ffffff;
  --ink: #15171a;
  --ink-2: #4a4f57;
  --line: #d3d7dc;
  --line-sheet: #e3e6ea;
  --accent: #c2351b;
  --dark: #15171a;
  --dark-ink: #f1f2f4;
  --dark-ink-2: #b4bac3;
  --dark-line: #33373d;
  --accent-on-dark: #f0714f;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1320px;
  --section: clamp(88px, 11vw, 168px);
  --font: "FSW Sans", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 420;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; font-weight: 700; }
p, li, dd { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: var(--gutter); top: -100px; background: var(--ink); color: var(--ground); padding: 10px 16px; z-index: 10; }
.skip:focus { top: 12px; }

/* Top: name, section links, language. */
.top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 12px 32px; padding-block: 28px 0;
}
.mark { font-weight: 700; font-size: 1.125rem; text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-inline-start: auto; }
.top nav a, .lang { text-decoration: none; color: var(--ink-2); font-size: 0.9375rem; padding-block: 6px; }
.top nav a:hover, .lang:hover { color: var(--ink); text-decoration: underline; }
.lang { font-weight: 560; color: var(--ink); }
/* On a phone the page is one scroll and the quote button reaches contact, so the top keeps the name
   and the language switch on one row. */
@media (max-width: 519px) {
  .top { flex-wrap: nowrap; }
  .top nav a:not(.lang) { display: none; }
}

/* Who. */
.intro { padding-block: clamp(64px, 10vw, 152px) var(--section); }
.intro h1 {
  font-size: clamp(1.875rem, 1.1rem + 3.1vw, 4rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  max-width: 21em;
}
.intro h1:lang(en) { line-height: 1.12; letter-spacing: -0.03em; max-width: 18em; }
.intro-body {
  display: grid; gap: 56px;
  margin-top: clamp(40px, 6vw, 88px);
}
.intro-text p { max-width: 36em; font-size: 1.125rem; }
.button {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 32px;
  padding: 15px 26px; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 620; border-radius: 999px;
  transition: background-color 240ms var(--ease), transform 240ms var(--ease);
}
.button:hover { background: #a82c15; text-decoration: none; }
.button:active { transform: translateY(1px); }
.roles h2 { font-size: 0.9375rem; font-weight: 640; color: var(--ink-2); margin-bottom: 14px; }
.roles dl > div { padding-block: 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; }
.roles dl > div:last-child { border-bottom: 1px solid var(--line); }
.roles dt { font-weight: 640; }
.roles dd { color: var(--ink-2); font-size: 0.9375rem; grid-column: 1; }
.roles dd.period { grid-column: 2; grid-row: 1; white-space: nowrap; font-size: 0.875rem; padding-top: 2px; }
@media (min-width: 960px) {
  .intro-body { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(48px, 7vw, 120px); align-items: start; }
}

/* Section heads share one shape: title left, short intro right on wide screens. */
.section-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.75rem); line-height: 1.25; letter-spacing: -0.02em; }
.section-head p { color: var(--ink-2); max-width: 34em; }
@media (min-width: 960px) {
  .section-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; }
}

/* Work: ranked list, the order comes from rankPortfolio. */
.work { padding-bottom: var(--section); }
.work-item {
  display: grid; gap: 12px 32px; padding-block: 32px 36px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.work-item:last-child { border-bottom: 1px solid var(--line); }
.work-name h3 { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); line-height: 1.3; letter-spacing: -0.015em; }
.work-role { color: var(--ink-2); font-size: 0.9375rem; margin-top: 6px; max-width: 30em; }
.work-body p { max-width: 38em; }
.work-stack { color: var(--ink-2); font-size: 0.9375rem; margin-top: 10px; }
.work-link { display: inline-block; margin-top: 14px; font-size: 0.9375rem; font-weight: 560; overflow-wrap: anywhere; }
.work-media { margin-top: 12px; background: var(--sheet); }
.work-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
@media (min-width: 900px) {
  .work-item { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .work-media { grid-column: 2; margin-top: 20px; }
}

/* Services: the price sheet. */
.services { background: var(--sheet); padding-block: var(--section); }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; vertical-align: top; padding: 20px 0; border-top: 1px solid var(--line-sheet); }
.price-table thead th { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); padding-block: 0 14px; border-top: 0; }
.price-table tbody tr:last-child > * { border-bottom: 1px solid var(--line-sheet); }
.price-table tbody th { font-size: 1.1875rem; font-weight: 640; padding-right: 24px; }
.price-table .related { color: var(--ink-2); font-size: 0.9375rem; padding-right: 24px; }
.price-table .related a { color: var(--ink); }
.price-table .num { text-align: right; white-space: nowrap; }
.price-table .amount { display: block; font-size: 1.1875rem; font-weight: 680; letter-spacing: -0.01em; }
.price-table .platform { display: block; font-size: 0.875rem; color: var(--ink-2); }
.basis { margin-top: 24px; font-size: 0.875rem; color: var(--ink-2); max-width: 46em; }
@media (max-width: 719px) {
  .price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; }
  .price-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding-block: 18px; border-top: 1px solid var(--line-sheet); }
  .price-table tbody tr:last-child { border-bottom: 1px solid var(--line-sheet); }
  .price-table tbody tr > * { padding: 0; border: 0 !important; }
  .price-table .related { grid-column: 1 / -1; grid-row: 2; }
}
@media (min-width: 720px) {
  .price-table tbody th { width: 34%; }
}

/* How a job runs. */
.process { padding-block: var(--section); }
.steps { counter-reset: none; }
.steps li { display: grid; gap: 6px 32px; padding-block: 22px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.step-term { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.steps p { max-width: 40em; }
.steps p + p { margin-top: 6px; }
.ai-note { margin-top: 32px; color: var(--ink-2); max-width: 40em; }
@media (min-width: 900px) {
  .steps li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: baseline; }
  .ai-note { margin-left: calc(5 / 12 * 100% + 13px); }
}

/* Contact and the closing name share the dark field. */
.contact { background: var(--dark); color: var(--dark-ink); padding-block: var(--section) 64px; }
.contact h2 { font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.75rem); letter-spacing: -0.02em; line-height: 1.25; }
.contact-intro { color: var(--dark-ink-2); margin-top: 16px; max-width: 34em; }
.email {
  display: inline-block; margin-top: clamp(32px, 5vw, 56px);
  font-size: clamp(1.5rem, 0.9rem + 3vw, 3.5rem); font-weight: 680; letter-spacing: -0.02em; line-height: 1.2;
  overflow-wrap: anywhere; text-decoration-thickness: 2px; text-underline-offset: 0.16em;
}
.email-label { display: block; margin-top: clamp(32px, 5vw, 56px); color: var(--dark-ink-2); font-size: 0.9375rem; }
.email-label + .email { margin-top: 4px; }
.channels { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 32px; }
.channels a { font-weight: 560; }
.tax { margin-top: 32px; color: var(--accent-on-dark); font-weight: 600; }
.contact :focus-visible, .foot :focus-visible { outline-color: var(--accent-on-dark); }

.foot { background: var(--dark); color: var(--dark-ink); padding-block: 64px 40px; }
.foot-name {
  font-size: clamp(3.5rem, 1rem + 13vw, 12rem); font-weight: 760; line-height: 1; letter-spacing: -0.04em;
  padding-top: 40px; border-top: 1px solid var(--dark-line);
}
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 32px; color: var(--dark-ink-2); font-size: 0.9375rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { color: var(--dark-ink); }

/* Not found. */
.missing { min-height: 70dvh; padding-block: clamp(80px, 14vw, 200px); }
.missing h1 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem); letter-spacing: -0.02em; line-height: 1.25; }
.missing p { color: var(--ink-2); margin-top: 16px; }
